summaryrefslogtreecommitdiff
path: root/avmedia/source
AgeCommit message (Collapse)Author
2022-04-13Fix typoxuenhua
Change-Id: I77ee60e6e7c5482f49cb671d793687f831856628 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132918 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-04-10loplugin:stringview check for getToken and trimNoel Grandin
since we now have o3tl versions of those that work on string_view. Also improve those o3tl functions to support both string_view and u16string_view Change-Id: Iacab2996becec62aa78a5597c52d983bb784749a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132755 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-03-29tdf#145614 Convert #define to constexprofftkp
Change-Id: I2c57e2021a224fb7f69d1de5cf0f809a7d2422b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132151 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-03-22Move BSTR wrapper to systools, and fix some wrong BSTR usesMike Kaganski
BSTR is documented [1] to be prefixed by a 32-bit integer specifying its length *in bytes* (not characters), so passing wchar_t* as BSTR is wrong, and the length member of rtl_uString can't substitute the proper BSTR length, since rtl_uString::length specifies length in characters. Any code taking BSTR and using SysStringLen to get its length would only get half of the passed OUString data. In dbaccess/source/ui/dlg/adodatalinks.cxx, the abovementioned error was implemented. OTOH, OLEVariant::getByteSequence() in connectivity/source/drivers/ado/Aolevariant.cxx passed BSTR from tagVARIANT to ctor of OLEString, which resulted in the BSTR being freed in both dtors of OLEString and OLEVariant (the latter calls VariantClear, which itself clears string when vtfield is VT_BSTR). [1] https://docs.microsoft.com/en-us/previous-versions/windows/desktop/automat/bstr Change-Id: Iedbd62b20133644258af3660616add7b63cac258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131950 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-22Simplify CoCreateInstance / CoGetClassObject with COMReferenceMike Kaganski
Change-Id: Ieb1035410c3c6c4b40ea779e829a940460d19b5a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131922 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-03-04Fix typosAndrea Gelmini
Change-Id: I4b26b105e4c16b1860389deb7a629ff139bd260c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130976 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-03-01gtk4: media dimensions are only reliably available asyncCaolán McNamara
this is also the case for the direct gstreamer use in gtk3 but more egregious when abstracted away from it in gtk4 Change-Id: If90069308d67929585722c079c482cd4ad196e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130468 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-21gtk4: get getPreferredPlayerWindowSize workingCaolán McNamara
Change-Id: I5e5b02be6a902232c24120db513cdf3fc68b4421 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130224 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-21gtk4: get XFrameGrabber to workCaolán McNamara
Change-Id: I737fd72d11b11d0c3592857113e422f29da76e77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130223 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-19update video pos and size after change if currently playingCaolán McNamara
I'd prefer if it changed size during the resizing/repositioning, but at least make it immediately take the final size after the resize/reposition has happened. Change-Id: Ic3b4dd23921ad5cf6092f1514dd6538f9946998a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130178 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-19gtk4: use gtk_widget_set_can_target so the video can be picked up and movedCaolán McNamara
at least the rect it should stick to can be picked up and moved Change-Id: I71b53865049fef8dc3efa09dd441d66003ed1f47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130177 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-19gtk4: the assumption is that video is supposed to fit to the windowCaolán McNamara
Change-Id: Iacc31ee978a1279c23ac895fb6f8fd610ab3113d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130176 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-18first cut at using Gtk4 built in video playbackCaolán McNamara
Change-Id: Ib996cd3f5ddbf20a81cdbe4b1c6546d6df478fde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129783 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-18there's only one media backend per platform currentlyCaolán McNamara
Change-Id: I8722395617929f7d710713934dd619134a318071 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130170 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-14update play/pause/stop when one of the other changesCaolán McNamara
so (esp under gtk) that when pause is enabled and pause is clicked again that it remains visually enabled Change-Id: I779bb1491d2473db926b8075a0b574ef5767337d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129909 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-14Related: tdf#34759 ditch PlayPending hack and use GST_STATE_TARGETCaolán McNamara
which seems to resolve the various problems here like that pressing stop makes it rewind to start but continue to play and that rewind/seek makes it start when it shouldn't Change-Id: I3df44f82205b7e81ecbc4ac86240e02d52a92e62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129907 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-14Related: tdf#100007 pause state not always updating "play" state to offCaolán McNamara
if I press pause then the UI gets stuck with both pause and stop pressed in, the check against time here seems insufficient so change merge and the setters to return true if there was a real change and use that as the guard to update the UI Change-Id: I550624fa3dcd5655d715a1f965bba9345b25ded7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129906 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-14can drop unneeded TODOCaolán McNamara
Change-Id: I58d65b1da1aa54716b84fc31af7550037817194a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129908 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-02-11these label properties are already set to this text in the .uiCaolán McNamara
so we're just wastefully overwriting with the same string Change-Id: Ib03d5ae2cf48aa00f5f31256427afef58b684177 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129802 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-01-17tdf#145538 - Use range based for loopsVaibhavMalik4187
Change-Id: I5bf5a88d40f9633d9af9c40df2ee927130701f91 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128318 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-01-13Recheck modules [a-c]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I74a3c3a67c3639376e2251c3eb917fa4139dfbd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127808 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-01-02avmedia : use std::mutex instead of osl::MutexArnaud Versini
Change-Id: I0e779db4ef32ac74b9df18d1e162b49236b44b88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124122 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21Use sal::systools::CoInitializeGuard and sal::systools::ThrowIfFailedMike Kaganski
Change-Id: Ifb40e7672671df03b5ffc89905ad1e7b68451b68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127232 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-21loplugin:flatten in accessibility..basicNoel Grandin
Change-Id: If2cc282c2b135d634daf393a082c29049b10a677 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127223 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21no need to take solar mutex hereNoel Grandin
Application: :Post* will already do that Change-Id: If116ddd79b4ba30ce983d467161b8fab32dbd1cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127214 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-21Introduce sal::systools::COMReference::TryCoCreateInstanceMike Kaganski
Helps fixing uncaught exceptions introduced in commit 00eb9b8954a129fb365191ce8cdcbc4cf66a7333. TryCoCreateInstance returns HRESULT, because it allows to pass the info to the caller, which must check the result (either HRESULT, or validity of the reference) anyway. In case of failure, the previous contents of com_ptr_ is kept, which would be consistent with existing code in connectivity/ado replaced in a follow-up patch. Change-Id: I4c94695de96861ec312247acaa0c8fd35a23010a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127192 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-20Use more sal::systools::COMReferenceMike Kaganski
Change-Id: I29bf304d90db968682c2b0791372d0ea41375096 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127132 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-12-18use more cppu::BaseMutexNoel Grandin
Change-Id: I9defebeb9cb0ba22df3578c8aae7501add36a11c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127078 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-12-01Fix --disable-avmedia for DESKTOP buildJan-Marek Glogowski
Probably additional bits can be removed, but this now passes. Change-Id: I366bec43cfd6fb02e914c85c711b3b19586d534d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126161 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2021-11-17loplugin:stringliteraldefine in avmediaNoel Grandin
Change-Id: Ie34a45a745ac9546208444b2e499b581e18d449f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125275 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-16Drop redundant 'using rtl::OUString'Mike Kaganski
obsoleted by 6080259862ee9886d1dabcb7c06132268a398cc6 Change-Id: I246dc6050fe7adf60ab3c836db3cfa781578d483 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125142 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-10new loplugin:stringliteraldefineNoel Grandin
look for #define FOO "foo" that can be converted into OUStringLiteral. This is the first pass of this plugin, only doing those #define which are local to a single compilation unit. Change-Id: Ic8610e29ec42c36d03db5014a93c244315d5bbea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124962 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-08use more OUStringLiteral in MediaDescriptorNoel Grandin
Change-Id: I0567d103db8db401c737fed98483912a39352929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-10-28Prepare for removal of non-const operator[] from Sequence in avmediaMike Kaganski
Change-Id: Iefa86987f6ce43610177b7c4122744d37386ad6c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124335 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-10-27Add support for macOS SDK 12.0Stephan Bergmann
...and for now just silence all the new deprecation warnings Change-Id: Ic6e04f4bade91a823872cd4e453c41ee1950bd77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124275 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-27clang-tidy:readability-redundant-member-initNoel Grandin
Change-Id: Ibeff6e5cbc20ab86b1e9cb96292acb340849ede3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121149 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-23loplugin:referencecasting look through more clang TypesNoel Grandin
Note that because of where the fix resides, loplugin:redundantcast also notices a few more things. Change-Id: I0b66047fadfff2c5ceafcbd3eab085de00d861a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120865 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-07create comphelper::OMultiTypeInterfaceContainerHelper2 and use itNoel Grandin
based on OInterfaceContainerHelper2 which is considerably faster than the original OInterfaceContainerHelper Change-Id: I9c8b6d0e5382018824bf7188a26343703abf2d51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120161 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-07no need to use UNO_QUERY hereNoel Grandin
Change-Id: I1bfe8238d7c08f27d2b21f9fe79712aba045c812 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120152 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-06fix --disable-avmedia clang-plugins warningsCaolán McNamara
abandoned getting this to work because not sure what this should look like, seems caught between two stools as to what it wants to do Change-Id: Ica0d1e25f2a19dfee0fe40d3e106d05e1f861c2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120119 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-05Pass context and resource string down to boost::locale separatelyNoel Grandin
because this is often on a hot path, and we can avoid the splitting and joining of strings like this. Change-Id: Ia36047209368ca53431178c2e8723a18cfe8260a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119220 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-02convert #defines to OUStringLiteralNoel Grandin
mostly by doing $ git grep -l '#define.*\"' -- *.cxx | xargs perl -pi -e 's/^#define\s+(\w+)\s+(\".*\")/constexpr OUStringLiteral \1 = u\2;/g' Change-Id: Idface893449b0ef2a3c5254865a300585d752fbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119669 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-26use officecfg for security optionsNoel Grandin
Change-Id: I9d91fd5b260b82e05aac6567143386742953ecf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119486 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-12tdf#126665 Remember last used file picker directorySamuel Mehrbrodt
This introduces internal tracking of last used directories. Each caller of the file picker can pass a "context". The selected directory will then be saved & restored when opening the file picker with the same context again. After ffa636ba74b04b3258ec9a696bc4eac33581fa24 , the Windows file picker no longer tracks the last used directory itself. This is a replacement and an improvement at the same time, since there is not one global last used directory, but one per context. Change-Id: I10650cfb9359922690954fa65c89b4e47477e2c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118597 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-06-18tdf#130428 remove unnecessary usage of SfxItemState::UNKNOWNArmin Le Grand (Allotropia)
Rename ::StateChanged methods using SfxItemState to allow better analysis of SfxItemState/SfxPoolItem usage(s), discussion see tdf#130428 comment 30 Change-Id: I736be0160ad7a9b7882c1c8a4cc05d9396ee3305 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117366 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2021-06-17use string_view in the Translate APINoel Grandin
Change-Id: I0bb0ea9d39ed623928060ffd3f2e2bc36ba33209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117272 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-15unnecessary castNoel Grandin
Change-Id: Ib08132199c343a057a398a50dc09ccab92ab944d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115632 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-27loplugin:stringadd convert chained append to +Noel Grandin
which can use the more efficient *StringConcat Also fix a crash in stringview plugin which started happening while I working on this. Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-06forward declare vcl::window in vcl/event.hxxCaolán McNamara
Change-Id: Ib3fc1b72d3d45377e2d4ccd0ff3e6835d2c29930 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113631 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>