summaryrefslogtreecommitdiffstats
path: root/src/plugins/gstreamer/mediaplayer
Commit message (Collapse)AuthorAgeFilesLines
* GStreamer: add QT_GSTREAMER_PLAYBIN_AUDIOSINK env variablev5.9.0-beta2Yoann Lopes2017-04-071-1/+2
| | | | | | | | Allows to set a custom audio sink to be used by the media player, instead of the default 'autoaudiosink'. Change-Id: I13ea93a787ba6412a42bf48ecf7d3a822060cbe4 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-104-11/+13
|\ | | | | | | | | | | | | Conflicts: src/plugins/gstreamer/camerabin/camerabincontainer.h Change-Id: I4942d41d69112335fe0c994002f1b32ef3aad051
| * Use QT_CONFIG macro to check for featuresLars Knoll2017-02-274-11/+13
| | | | | | | | | | | | | | And remove many custom defines. Change-Id: I658cc8430d1d99ed3c0aafe03a77adce76621a29 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devYoann Lopes2017-01-261-1/+2
|\| | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/multimediawidgets/videographicsitem/videoplayer.h src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp Change-Id: Id5ce05ffe2cd25657232157b162680b2e24a35ba
| * return better images in metadata in gstreamerTasuku Suzuki2016-12-151-1/+2
| | | | | | | | | | | | | | | | cover art image uses "preview image". But "image" is better for that. "preview image" will be used for thumbnail image. Change-Id: Ic01f878f146b0369eb84e6b153fa68fbc6c54e57 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| * GStreamer: Only register one typefind functionChristian Strømme2016-12-142-12/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each time a GStreamer session was created it would register the same callback function, but each time with a new user data, which in our case was a pointer to the session. The pointer would then be used without verification of its validity. The problem with this is that the typefind function is static and used for all sessions, making multiple sessions impossible. The documentation for gst_type_find_register() also clearly specifies that the supplied user data needs to valid as long as the plugin is loaded, which of course was not the case. With this change only one callback function will be registered, and each session will register itself with a typefind delegate, that will keep track of sessions that are still alive. Note: This only makes sure that the typefind function is called on a valid session, it does not make sure that the type actually belong to the session, which is a separate issue. Task-number: QTBUG-50460 Change-Id: I20eeabfe4e85839e8845003298d6f64705c2e15e Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
| * GStreamer: fix a memory leak in the media player sessionYoann Lopes2016-12-121-4/+6
| | | | | | | | | | | | | | A gchar* was never freed. Change-Id: Ib28fee3d13839bf15a9216bdcd5da68b6d1f904c Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | GStreamer: Add missing override and remove redundant virtualAlexander Volkov2016-12-137-39/+39
| | | | | | | | | | Change-Id: I61997676d7f002e769de499b19cbea3d96876480 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | GStreamer: Remove typefind functionChristian Strømme2016-12-122-68/+12
|/ | | | | | | | | | The typefind function was not well suited for our use-case, as it can't be configured to work with multiple sessions. The detection of playlist resources has also been moved into the abstraction layer; making this implementation redundant. Change-Id: Ife04ffe91707665a36706330f89401b49248bf91 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Fix mir detectionLars Knoll2016-11-231-2/+3
| | | | | | | | | The old check would have never triggered unless you compiled with CONFIG+=mir by hand. Change-Id: I1d418dce09adaedbdff366dfeb8f4036cac0f075 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Cleanup all maemo/meego specific codeLars Knoll2016-11-143-25/+2
| | | | | Change-Id: I6c6f28084c6b030928eebc53c5d0009b168ede6a Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-111-6/+6
|\ | | | | | | | | | | | | | | | | | | Conflicts: qtmultimedia.pro src/multimedia/playback/qmediaplayer.cpp src/plugins/directshow/directshow.pro tests/auto/integration/qmediaplayerbackend/BLACKLIST Change-Id: I6dacdcbb223c1d12dd72eb308a67170983c709b3
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-041-6/+6
| |\ | | | | | | | | | Change-Id: Ib038c5e3ebb48c0e46569a35d530fa5ceaf06a32
| | * GStreamer: emit mediaStatus changes before state changesYoann Lopes2016-10-061-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | This makes sure all mediaStatus changes are emitted, even when some action is done on the media player as a result of a state change. Task-number: QTBUG-49578 Change-Id: I60153cd8e1d665797a25549ab81afcfb553ce2cc Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | GStreamer: support cover artTasuku Suzuki2016-07-261-0/+1
|/ / | | | | | | | | Change-Id: I05987f578a40c23dc2eb6f3e6a7f76d11f704214 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-4/+4
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/avfoundation/mediaplayer/mediaplayer.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.pro tests/auto/unit/qmediaserviceprovider/mockserviceplugin5/mockserviceplugin5.pro Change-Id: I5742596230dc510ba2a09eba624429bb67179194
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-251-4/+4
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: I8e1554b648327ea2fb342b882ce8e439bd6f271d Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-261-5/+14
|\| | | | | | | Change-Id: I2e4e9cca01d63ed0d1e7f71c7a58322390696036
| * GStreamer: fix GstAppSrc usage.Yoann Lopes2016-01-191-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow our GstAppSrc wrapper to be reconfigured with a new GstAppSrc object. This is necessary because that object changes every time playback is restarted, even for the same source. The consequence of not allowing the reconfigure was that playback for a given qrc media would only work the first time; any subsequent calls to play() would not work since our wrapper wouldn't know about the new GstAppSrc object and therefore wouldn't be able to produce any data. Also improved management of the wrapper lifecycle. Task-number: QTBUG-49531 Change-Id: I905afb6848cc7e9a563b4edc2c5875cdd7e53d21 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-1914-196/+280
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I324f65c61171f36641472964d095d72e452afb3a Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Gstreamer plugin: replace foreach with range-based forAnton Kudryavtsev2016-01-151-1/+2
|/ | | | | Change-Id: Ic6d0f9d6b45eae1cdadc46783cb6f5bb7c64ac8c Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* GStreamer: fix compilation with version < 0.10.31.Yoann Lopes2015-10-203-8/+12
| | | | | | | | | | Qt 5.4 and earlier required GStreamer 0.10.24 as minimum version. Qt 5.5 added code that requires 0.10.31, this code is now ifdef'd and we now support again 0.10.24. Task-number: QTBUG-48353 Change-Id: Ie708a33c0515874b003ce26a3400475075d316ca Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* GStreamer: refactored widget and window control.Yoann Lopes2015-08-181-4/+4
| | | | | | | | | | | | | | | | | | | Instead of always using xvimagesink as GStreamer backend for the widget and window control (works only with X11), we now try to pick a video sink that fits the current configuration. It first tries a set of known video sinks that can work with the Qt platform plugin in use. If none is available, it dynamically picks a video sink available on the system that can be used with our backend. Even if the video sink is now picked in a smarter way, xcb is still the only supported platform plugin. The reason is that it's the only Unix plugin which can provide a valid native window handle. Additional work is needed to support other plugins like wayland or directfb. Change-Id: I3843dea363d6a0b85a6cc1f2952783b743e48ac6 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* QMediaPlayer: handle resource files in a cross-platform way.Yoann Lopes2015-04-072-27/+0
| | | | | | | | | | | | | | | | | | | | It was the backend's responsibility to handle resource files in an appropriate way. In practice, it was either not handled at all, or implemented in an almost identical manner in every backend that does handle it. This is now dealt with in QMediaPlayer, always passing to the backend something it will be able to play. If the backend has the StreamPlayback capability, we pass a QFile from which it streams the data. If it doesn't, we copy the resource to a temporary file and pass its path to the backend. Task-number: QTBUG-36175 Task-number: QTBUG-42263 Task-number: QTBUG-43839 Change-Id: I57b355c72692d02661baeaf74e66581ca0a0bd1d Reviewed-by: Andrew Knight <qt@panimo.net> Reviewed-by: Peng Wu <peng.wu@intopalo.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-242-2/+17
|\ | | | | | | | | | | | | | | | | Conflicts: qtmultimedia.pro src/gsttools/qgstreamervideowidget.cpp src/plugins/gstreamer/camerabin/camerabinservice.cpp Change-Id: I883f20dc17924ab42514a1aa00d16675a0f13d99
| * GStreamer: improved logic for window and widget controls usage.Yoann Lopes2015-02-182-2/+17
| | | | | | | | | | | | | | | | | | | | Provide these controls only when the xvimagesink gstreamer element is available. This allows QVideoWidget to fallback to QVideoRendererControl when xvimagesink is not available. Task-number: QTBUG-41618 Change-Id: I59f90ea8857c7ec0ffa08be9804e5458d95b79c4 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Update copyright headersAntti Kokko2015-02-1214-98/+98
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I1c6faa4f59f8eca54f01ef20941fa60161dd7872 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Fix initialization orderLaszlo Agocs2015-01-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid the following warning: In file included from qgstreamerplayersession.cpp:34:0: qgstreamerplayersession.h: In constructor ‘QGstreamerPlayerSession::QGstreamerPlayerSession(QObject*)’: qgstreamerplayersession.h:203:10: warning: ‘QGstreamerPlayerSession::m_usingColorspaceElement’ will be initialized after [-Wreorder] bool m_usingColorspaceElement; ^ qgstreamerplayersession.h:197:17: warning: ‘GstElement* QGstreamerPlayerSession::m_videoSink’ [-Wreorder] GstElement* m_videoSink; ^ qgstreamerplayersession.cpp:107:1: warning: when initialized here [-Wreorder] QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent) ^ Change-Id: Ic4dfe6ead19db8d581cc7de622f478e63524715b Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | GStreamer: port to 1.0.Yoann Lopes2014-11-277-239/+178
|/ | | | | | | | | | | | | | | 0.10 is still used by default. To enable GStreamer 1.0, pass GST_VERSION=1.0 to qmake for qtmultimedia.pro. Contributions from: Andrew den Exter <andrew.den.exter@qinetic.com.au> Ilya Smelykh <ilya@videoexpertsgroup.com> Jim Hodapp <jim.hodapp@canonical.com> Sergio Schvezov <sergio.schvezov@canonical.com> Change-Id: I72a46d1170a8794a149bdb5e20767afcc5b7587c Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* GStreamer: fix artist-related metadata keys.Yoann Lopes2014-09-261-2/+4
| | | | | | | | QMediaMetaData::AlbumArtist now maps to GST_TAG_ALBUM_ARTIST and QMediaMetaData::ContributingArtist to GST_TAG_ARTIST. Change-Id: Ifa2cb90ee8ae09beaee572ad113c05776e699432 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* GStreamer: fix QMediaPlayer metadata signals.Yoann Lopes2014-09-261-0/+5
| | | | | | | | - metaDataAvailableChanged was never emitted - metaDataChanged was not emitted when clearing the current media Change-Id: Ide05056450171a87aeb018be7e0bdea136341946 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Ensure pre-roll frames are displayed when gstreamer backend is paused.Andrew den Exter2014-09-122-56/+46
| | | | | | | | | | | | Perform a seek before transitioning from the stopped state to paused or playing to force the pipeline to resupply the video sink with any pre-roll buffer it may have previously ignored during loading. And don't assume showPrerollFrames to be true if the current state is not stopped as the policy handling may have prevented an effectual state change. Change-Id: I288a70bc4da32f3534eab4b14702ca8f8fdb4222 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Update license headers and add new license filesAntti Kokko2014-08-2414-266/+154
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: Ied06887225df341064c12bcc14c259ae74116f2e Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-101-1/+1
|\ | | | | | | Change-Id: I38ebcb3da0e4d2acc9e7108c9579ea98323864e0
| * GStreamer: fix looping a media when it's loaded from qrc.Yoann Lopes2014-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When playing a media for the second time, the backend resets the the media by calling setMedia() with the same value. The problem is that setMedia() clears the previous media, which is a QFile in this case and is the one we are trying to set again... The QFile was deleted, causing the current media to be a dangling pointer. Change-Id: I6854b40212fd084d1e31e756a040a02ad103b7ba Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | Fix stuttering with RTSP streams.Andrew den Exter2014-06-261-0/+1
|/ | | | | | | | | Set the rtspsrc buffer-mode to 'slave' which is the default in gstreamer 1.0 and doesn't cause the stuttering apparent with the default buffer mode. Change-Id: I4241fbe638c176ad93f441a3f76a1041ef1cb6bb Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix static initialization order fiasco in some plugins.Yoann Lopes2014-06-062-78/+73
| | | | | | | | | Some static variables were initialized using QMediaMetaData values, which are also statically initialized. Task-number: QTBUG-39202 Change-Id: Ibedc0a77d96cdfa575aad122c4ec654e6830e1f7 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* GStreamer: disable clock syncing in video sink for live sources.Yoann Lopes2014-05-091-0/+1
| | | | | | Task-number: QTBUG-38465 Change-Id: Icdf2df36b9b3c09dd047e60ac24e221a3d233c6f Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* GStreamer: correctly get metadata from live sources.Yoann Lopes2014-04-092-23/+11
| | | | | | | | | | For some unknown reason, "iradio-mode" was set to false on the source element, which was preventing new metadata to be received when playing live streams. Task-number: QTBUG-37640 Change-Id: Ib90297e81e26a99c3dfc753bdcd5cbd1ee2f6764 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* GStreamer: cleanup system includes.Yoann Lopes2014-04-071-14/+0
| | | | | | | | | | | | Replaced some linux includes with <private/qcore_unix_p.h> to be more portable. Use qt_safe_open() and qt_safe_close() instead of ::open() and ::close(). Task-number: QTBUG-38061 Change-Id: Idb3f50d070ec1701cafba98e79e2e85824653a3a Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* GStreamer: each QMediaPlayer now has its own volume by default.Yoann Lopes2014-04-032-13/+49
| | | | | | | | | | | | | | | | | | | | | | | | We were using the volume property of GStreamer's playbin element to set the volume. This could behave differently depending on the system configuration; it could affect the system volume or the media player own audio stream. We now use a 'volume' element to do software attenuation on the audio data sent to the audio sink, it allows each QMediaPlayer to always have its own volume. To preserve the previous behavior, developers can set the QT_GSTREAMER_USE_PLAYBIN_VOLUME environment variable to true. [ChangeLog][QtMultimedia][GStreamer] QMediaPlayer::setVolume() doesn't change the system volume anymore (it could be the case before depending on the system configuration). Set the QT_GSTREAMER_USE_PLAYBIN_VOLUME environment variable to true to restore that behavior. Task-number: QTBUG-30317 Task-number: QTBUG-36511 Change-Id: Ia0249962a74ac21fb110fcb634c08706f8d5767a Reviewed-by: Wouter Huysentruit <wouter_huysentruit@hotmail.com> Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* fix: 'm_state' was not declared in this scopeZhang Xingtao2014-03-281-1/+1
| | | | | | | | | Error occurred when building with DEBUG_PLAYBIN defined. It should be m_currentState from context. Change-Id: Iad59966ca19c9d1b589fc8641599494436a0a5f3 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Jing Bai <doris.bai@gmail.com>
* GStreamer: fix memory leaks.Yoann Lopes2014-03-211-5/+11
| | | | | | | Many GStreamer objects were not properly managed or never released. Change-Id: I38b3854e8b9e2264b5b647f331d3bb16b886e2d6 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* GStreamer: don't try to seek when it's not supported.Yoann Lopes2014-03-211-2/+2
| | | | | | | This eliminates warnings on the console. Change-Id: I6a0509dba4a0f7ec6fad33f8803be746f425a616 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* whitespace fixesOswald Buddenhagen2014-01-301-2/+2
| | | | | | | | remove trailing spaces & expand tabs. Change-Id: I05ef110abed90f13b47752760ffb4567a11a6a5e Reviewed-by: Yoann Lopes <yoann.lopes@digia.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* Fix playback with exotic gstreamer pipelines.Andrew den Exter2014-01-131-1/+7
| | | | | | | | | | Extend the list of raw video formats, and allow the playbin flags to be overridden by an environment variable when the default isn't suitable for whatever reason. Change-Id: I4c7d821b0ce29f5ad2dc0341e378ffd17c489e98 Reviewed-by: John Brooks <john.brooks@dereferenced.net> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Some cleanup in the GStreamer plugin.Yoann Lopes2013-09-202-11/+9
| | | | | | | | | | | | Removed QGstreamerVideoOverlay and related classes. It was used as 'Window' control but performs worse than QGstreamerVideoWindow which does basically the same thing using GStreamer ready-made components instead. Removed X11 dependencies and related configuration tests. It was only needed for QGstreamerVideoOverlay. Change-Id: I2ad2636ccf0060e56cd64f3d9e5b3c24dc75f5a3 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Multimedia plugins now have a unique JSON metadata 'Keys' property.Yoann Lopes2013-06-211-1/+2
| | | | | | | | | | | | | | | | | | | | | They previously had the multimedia services they provided as keys. This was a problem when several plugins were available on the same platform, providing the same multimedia service, but with different features or capabilities. Since they had the same key, only the first plugin in the directory was loaded. Nevertheless, it was actually working until commit 732dcfe7 in qtbase, as all plugins were loaded even when sharing the same key. The services a multimedia plugin provides are now declared in the 'Services' property. To preserve compatibility with third-party plugins, if that new property doesn't exist it falls back to the 'Keys' property. Task-number: QTBUG-31868 Task-number: QTBUG-31476 Change-Id: Ic3ba32eeef21b69b922bd3d4feb111101559d132 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Decouple qmediametadata.h from qmultimedia.hSze Howe Koh2013-05-142-0/+2
| | | | | | | | qmultimedia.h is included in more places, but qmediametadata.h is larger. This patch should reduce unnecessary #include-ing. Change-Id: I4a3d174bafc555d794bb75087c1f6b79745ae903 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1014-14/+14
| | | | | | Change-Id: Ia8c1c38aba1544603fada8c414cc856f365fd15b Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>