summaryrefslogtreecommitdiff
path: root/avmedia
AgeCommit message (Collapse)AuthorFilesLines
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin1-2/+1
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-10loplugin:stringconstant (macOS)Stephan Bergmann4-4/+4
Change-Id: Icb9d9e1cd21e2506e36fe40a3b93b6a2521a868c Reviewed-on: https://gerrit.libreoffice.org/77239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): avmediaStephan Bergmann5-5/+5
Change-Id: I3736d81f73658105b877cd9577c6023ca4ca0805 Reviewed-on: https://gerrit.libreoffice.org/76698 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-22avmedia: Drop 'wrap_*' functionsMichael Weghorn1-14/+2
Just call the corresponding GStreamer functions directly. The wrapper functions are pointless since commit 6b911ae9eb9484bebbdc1323210020486f5ef33f ("Drop support for gstreamer-0.10"). Change-Id: I2963bd25a83632f4e693a1691180790452edffda Reviewed-on: https://gerrit.libreoffice.org/76116 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-07-19loplugin:referencecasting in avmedia..basicNoel Grandin1-6/+2
Change-Id: I6790b2e3902d64fb6f714f031affa221dbaba014 Reviewed-on: https://gerrit.libreoffice.org/75934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-04cid#1448380: Resource leak (avmedia/gstplayer)Julien Nabet1-3/+2
Change-Id: Ieaf5f68f17558f27e187241869c8fe01f8e29ba2 Reviewed-on: https://gerrit.libreoffice.org/75094 Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-14loplugin:logexceptionnicely in accessibility..basicNoel Grandin1-2/+3
Change-Id: I6e0b95b40e3d62db36352f3ea916f79f3dbc9084 Reviewed-on: https://gerrit.libreoffice.org/74018 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-13Don't link avmediagst with gtk3 and qt5Jan-Marek Glogowski3-138/+52
While the VCL plugins are dynamically loaded and therefore just load their depending toolkit libraries, the GStreamer avmedia backend now links against Qt and GTK+. The GStreamer API itself is toolkit agnostic and the toolkit setup just uses a single GStreamer symbol to create the specific video sink. So the toolkit binding can simply be moved into the VCL plugin. At the point of the GStreamer toolkit setup call the GStreamer library is loaded by avmediagst, so the dlsym lookup should never fail. I also dropped the special GtkWidget handling. Using g_object_get will increase the refcount of the widget. A g_object_unref after adding it to the container seems to destroy it correctly. Change-Id: I693947e441bceb4b09bc38920e308e39142d0a35 Reviewed-on: https://gerrit.libreoffice.org/73849 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-06-13tdf#125821 don't crash on missing gstreamer pluginsJan-Marek Glogowski1-8/+16
If GStreamer can't auto-detect an audio sink via "autoaudiosink", it'll return a nullptr. If the volume plugin is missing, then this currently also results in a crash. So check the gst_element_factory_make results before using the objects and change some wrong mpPlaybin checks to the right mpVolumeControl ones. This works for me without any audio and volume plugins. Since we are linked against libgstaudio, I assume the bin is always there. Change-Id: Ide526363d810ea48d0a62539c0a435553783e34a Reviewed-on: https://gerrit.libreoffice.org/73848 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-06-09Fix typoAndrea Gelmini1-1/+1
Change-Id: If234124feaf85cdac60f27a91480893c1e57878c Reviewed-on: https://gerrit.libreoffice.org/73729 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-06-09tdf#125219 qt5: Try qwidget5videosink on WaylandMichael Weghorn2-4/+40
Try to use GStreamer's qwidget5videosink when using the qt5 (or kde5) VCL plugin on Wayland. This is strongly inspired by commit 8543fbc72fafc0d71a8760752ca2ef5b7119cb5c ("gtk3+wayland: play video via gtksink gstreamer element"). qwidget5videosink allows to directly set a 'QWidget*' for the sink's "widget" property to make it paint into this widget, s. [1] for more details. In order for this to work, the relevant Qt5 packages for QtGStreamer need to be installed (provided e.g. by package 'qtgstreamer-plugins-qt5' on Debian). If qwidget5videosink is available, video playback works as expected on Wayland. If it is not available, GStreamer will create it's own (misplaced) window(s) to show the video as is the case without this commit. Switching to e.g. qtglvideosink in the future may theoretically improve performance, since that one uses OpenGL/OpenGLES and supports hardware colorspace conversion and color balance, while qwidgetvideosink does software painting (s. [1]). Also, extending commit 9d18bc40416b651340804f44ba5fae65f3bbbcfa ("tdf#125271 under wayland without gtksink, try waylandsink") to also work with (i.e. set the right window for) waylandsink on qt5 may be worth to take a look at in the future, but didn't "just work" in a quick attempt. [1] https://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/qtvideosink_overview.html Change-Id: I6e17838dcdf5c31a1a8a07f7836a4cf36c63bd06 Reviewed-on: https://gerrit.libreoffice.org/72968 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-06-07Drop support for gstreamer-0.10Michael Weghorn9-235/+8
Drop all GStreamer 0.10 support according to ESC decision of 2019-06-06. GStreamer 0.10 is obsolete and no longer needed, superseded by GStreamer 1.0 which is available in baseline (RHEL 7 or CentOS 7) and all relevant distros. Change-Id: Ic317eba04d2c17e141acc983f37fbfa4301c9f3f Reviewed-on: https://gerrit.libreoffice.org/73619 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-06-03Drop extra define ENABLE_GTKSINKMichael Weghorn3-7/+8
Directly use 'ENABLE_GTK3' instead, s.a. discussion at https://gerrit.libreoffice.org/#/c/72968/ . Change-Id: I9713cd942e3f7308974eebc432dce0d2bc5adadc Reviewed-on: https://gerrit.libreoffice.org/73270 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-05-27tdf#125271 under wayland without gtksink, try waylandsinkCaolán McNamara2-5/+51
and if there is no videosink then give up Change-Id: I6b60e7be1e77dbf5c4c277ccf47a4d121f3cd6a5 Reviewed-on: https://gerrit.libreoffice.org/72871 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-21tdf#124027: use ID of the embedded window and fix position of overlayKatarina Behrens1-8/+16
1) after many trials and errors what LibO apparently expects here is the ID of QWindow parent of [embedded] system child window 2) the position of the embedded window for video overlay has already been translated relative to the top-left corner of the slide (see bugfix of tdf#42873 how) in gen, gtk and kde5 vclplugs. So let's limit translating it 2nd time only to gtk3 vclplug which for some reason behaves differently (regression from 18138417485aeba6c52d935c616dba829b24ffd8) Change-Id: Ie4c6d14a50959c0fdd04e745918d4889c9da45ec Reviewed-on: https://gerrit.libreoffice.org/72458 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin2-2/+2
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-02tdf#101524: seeking position shouldn't pause video playbackKatarina Behrens2-1/+3
Change-Id: I846043815cdd41620f96c31843a77bea3d2db82f Reviewed-on: https://gerrit.libreoffice.org/71596 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-04-13use more std::make_uniqueNoel Grandin1-1/+1
Change-Id: I7d85cbc9105c5e0c4a8d9a69c4ac9d6dfc07eabd Reviewed-on: https://gerrit.libreoffice.org/70663 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-08tdf#42949 Fix IWYU warnings in include/sfx2/[t-z]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib3252828385d1dc8faf48a428b1593199647a679 Reviewed-on: https://gerrit.libreoffice.org/70383 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-02tdf#100007: slider and time field update during video playbackKatarina Behrens2-5/+16
To make this happen, restart idle in timeout handler (also start it when user bonks Play button and stop it when they bonk Pause or Stop button). The idle also needs a lower prio than TaskPriority::Repaint, otherwise the higher-prio events from our idle are going to starve UI repaints in the scheduler queue Change-Id: I4c767c3533e0e2ee9015c48b17075db5e0dc7ade Reviewed-on: https://gerrit.libreoffice.org/70068 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-03-28tdf#42949 Fix IWYU warnings in include/sfx2/[e-M]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I6e97c7ed6c0211dfafee83b9bdbea672e415fc49 Reviewed-on: https://gerrit.libreoffice.org/69715 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-27loplugin:unoquery (clang-cl)Stephan Bergmann1-4/+4
Change-Id: If66b07c8e9097698ba9ed774e04ef5b55574ba94 Reviewed-on: https://gerrit.libreoffice.org/69790 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-03-16Simplify containers iterations in accessibility, avmediaArkadiy Illarionov1-4/+4
Use range-based loop or replace with STL functions Change-Id: I47cabb02a2e52f2af8e87379fc44906d2a732d19 Reviewed-on: https://gerrit.libreoffice.org/69334 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-07log nice exception messages whereever possibleNoel Grandin1-2/+4
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-24tdf#123653 pass WM messages to the parent window.Mark Hung2-55/+3
Use cbWndExtra so that MediaPlayerWndProc can get the Window pointer. Do not handle mouse event WM messages in MediaPlayerWndProc and pass them to parent window because Slideshow handles the message themselvs. Change-Id: Ie790e06eb3813bc3b63f78f25cf6e1640c58dee2 Reviewed-on: https://gerrit.libreoffice.org/68242 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2019-02-24tdf#123653 let gstreamer gst video overlay bypass events.Mark Hung1-0/+1
Change-Id: I4a10f1b8b0220c91c41bc9b3bf37024d6ccbaf04 Reviewed-on: https://gerrit.libreoffice.org/68243 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2019-02-19gst 0.10 doesn't have gst_video_overlay_set_render_rectangleCaolán McNamara1-1/+2
Change-Id: I499e32ce86fabd18c52ac2f99713af0933572f7c
2019-02-19avmedia: set gstreamer gst_video_overlay size and position.Mark Hung2-1/+22
Have video fit to the media object size on the slide, allow more complicated interactions. Change-Id: Ice1fa4b521176ad7ed7f7d1d2b13e617e8282390 Reviewed-on: https://gerrit.libreoffice.org/67978 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-15tdf#40780 extend default media duration from 0.01s to 0.3s.Mark Hung1-1/+1
Player can only update the duration when the state of the GStreamer pipeline changes. But GStreamer need some time to get ready. However the default duration (0.01s) is so short that the audio node is deactivated before the duration update. Hence I just pick up a value that is long enough to allow update happen empirically. Change-Id: If94133fde09e414bd9ea3c4b162a13d5c70f4524 Reviewed-on: https://gerrit.libreoffice.org/67783 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2019-02-13Pointer is pointlessNoel Grandin3-7/+8
since it is just a wrapper around PointerStyle Change-Id: I51f065e0d4ad8bd91f5c84c5819048c720a19267 Reviewed-on: https://gerrit.libreoffice.org/67711 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-04tdf#44223 allow slideshow to play embedded media.Mark Hung1-0/+45
Implement MediaFileManager that create the temp media file for package urls when making slideshow. Change-Id: I10a5ddc405928b4322ad72eb603508faf25bf0db Reviewed-on: https://gerrit.libreoffice.org/67209 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2019-02-04tdf#44223 oox: import embedded media stream.Mark Hung1-9/+16
- Handle cTn and tgtEl of MediaNodeContext. - Setting the audio source of XAudio. - Embed the media in TimeNodeTargetElementContext. - Embed the media in SoundActionContext. - Allow avmedia::EmbedMedia to embed media from a XInputStream. Change-Id: I164ac50f97f2036db4bfa2f99adedff0bba382e2 Reviewed-on: https://gerrit.libreoffice.org/67208 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2019-01-08convert "*xxx.get()" to "*xxx"Noel Grandin1-1/+1
Change-Id: Ic307226591ff9702957ccdec486ccf70357eb6d9 Reviewed-on: https://gerrit.libreoffice.org/65951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-07tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4 Reviewed-on: https://gerrit.libreoffice.org/65614 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-28Return earlyMatteo Casalin1-7/+6
Change-Id: I96774c66d2a14b9be2d8e400be928c3c0073411f Reviewed-on: https://gerrit.libreoffice.org/65663 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2018-12-28Drop avmediaQuickTime.mkGabor Kelemen1-45/+0
Follow-up to 801cc9550b38778971a9b3ebf427a6a151c50033 After dropping the avmedia_QuckTime library the makefile used to build it can go too Change-Id: I69258825ec87fbca93dac5bd85f2e65050d03e96 Reviewed-on: https://gerrit.libreoffice.org/65620 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-20tdf#42949 Fix IWYU warnings in include/vcl/[t-u]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib32ea54a3fa690a0722fa75ddb4121ec78c0b64f Reviewed-on: https://gerrit.libreoffice.org/65386 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-10tdf#42949 Fix IWYU warnings in include/vcl/s*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152 Reviewed-on: https://gerrit.libreoffice.org/64479 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-08use Image(OUString) instead of Image(Bitmap(OUString))Noel Grandin1-1/+1
which benefits LOOL since we can delay creating the image until we know the dpi setting of the display we are going to write to. Achieved by perl -pi -w -e "s/\bImage\s*\(\s*BitmapEx\s*\((\w+)\s*\)\s*\)/Image\(\1\)/g" $( git grep -lw "BitmapEx" ) followed by git grep -nP '\bImage\s*\(\s*BitmapEx\s*\(' followed by commenting out the BitmapEx(OUString) constructor and seeing what needed adjusting. Change-Id: I3224e11937d720fa484b0d659d25673a9e809267 Reviewed-on: https://gerrit.libreoffice.org/64760 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-11-21tdf#42949 Fix IWYU warnings in include/vcl/[B-E]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Iabe571aa8f00492902c499094bea8365a3e17fca Reviewed-on: https://gerrit.libreoffice.org/63623 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-11-17Adapt to C++2a char_tStephan Bergmann1-1/+1
u8 literals incompatibly change their type (as implemented by recent Clang trunk) Change-Id: Ia4f7b91f5d86656a056303d2754981ab2093a739 Reviewed-on: https://gerrit.libreoffice.org/63494 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-16loplugin:buriedassign in avmedia..cuiNoel Grandin1-8/+8
Change-Id: Id44f1e98a3aac2c417f8030de603175bf68f0dfe Reviewed-on: https://gerrit.libreoffice.org/63467 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-07move SvTreeListBox to vclCaolán McNamara1-1/+1
Change-Id: I04a146d3d8a428ac1678827dc883525c40240a44 Reviewed-on: https://gerrit.libreoffice.org/62787 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-04replace double-checked locking patterns with thread safe local staticsMike Kaganski1-27/+8
Change-Id: Ie1aae7ecbd065a88b371d8c0deb586f54f7eff65 Reviewed-on: https://gerrit.libreoffice.org/62835 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-10-24remove more rtl::OUString and OString prefixesNoel Grandin19-81/+81
which seem to have snuck back in since the great rounds of removals. Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1 Reviewed-on: https://gerrit.libreoffice.org/62229 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19clang-tidy readability-misleading-indentationNoel Grandin1-4/+3
Change-Id: I4673fc7c694924b41d048a1918ddb8b0e0af1f79 Reviewed-on: https://gerrit.libreoffice.org/61935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-19clang-tidy modernize-redundant-void-argNoel Grandin1-2/+2
Change-Id: Ia25ac2e40f29e5b766a4c5c013fb53274196f656 Reviewed-on: https://gerrit.libreoffice.org/61934 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin1-2/+2
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17loplugin:staticvar in avmedia..connectivityNoel Grandin5-5/+5
Change-Id: I5dcac79131c810787e8fa49df75e55cc78147860 Reviewed-on: https://gerrit.libreoffice.org/61834 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-24loplugin:external (clang-cl)Stephan Bergmann2-3/+3
Including: * expanding STDAPI to its definition (as per <https://msdn.microsoft.com/library/ms686631(vs.85).aspx> "STDAPI"), to add __declspec(dllexport) into its middle, in extensions/source/activex/so_activex.cxx; as discussed in the comments at <https://gerrit.libreoffice.org/#/c/60691/> "Get rid of Windows .def files in setup_native, use __declspec(dllexport)", having a function both listed in a .def file EXPORTS and marking it dllexport is OK, and the latter helps the heuristics of loplugin:external; however, the relevant functions in extensions/source/activex/so_activex.cxx probably don't even need to be exported in the first place? * follow-up loplugin:salcall in sal/osl/w32/file-impl.hxx Change-Id: Ida6e17eba19cfa3d7e5c72dda57409005c0a0191 Reviewed-on: https://gerrit.libreoffice.org/60938 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>