summaryrefslogtreecommitdiffstats
path: root/src/plugins/gstreamer/mediaplayer
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Add PLUGIN_CLASS_NAME to qtmultimedia pluginsMiikka Heikkinen2012-12-101-0/+1
| | | | | | | | Needed for automating static plugin loading. Task-number: QTBUG-28131 Change-Id: Ia392b112fc46dedd34c9ffdbd6e874dbbfeaef83 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Fix QGstreamerPlayerSession::availablePlaybackRanges()Andras Becsi2012-11-282-20/+15
| | | | | | | | | | | | | | | Since buffering information through buffering queries is only valid if progressive download buffering (on-disk caching) is enabled or local media is played and we explicitly disable on-disk buffering because of cleanup issues with gstreamer availablePlaybackRanges() always returns an empty range for online media. Seeking is also possible using http range requests therefore if valid playback ranges could not be determined we should return the [0..duration] range unless the source is a live stream or the duration is unknown. Change-Id: Idbebc0fdde5053c6f9c0b3794c6d122492c6239c Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Remove nonfunctional mediaDownloadEnabled propertyAndras Becsi2012-11-203-24/+3
| | | | | | | | | | | | | | I suppose this was introduced after an API freeze to try to support on-disk buffering but since the code does not set the GST_PLAY_FLAG_DOWNLOAD flag on the player element the feature is not only undocumented but also nonfunctional. If on-disk buffering is needed we should add proper API to enable/disable it for all backends which might be possible with Qt 5.1 the earliest. Change-Id: I6b42a06166509db0023a3e0263ecc3a36f0d2bdb Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Clean up QGstreamerPlayerSessionAndras Becsi2012-11-202-18/+3
| | | | | | | | Remove dead code and fix compiler warnings about unused and uninitialized variables. Change-Id: I809d905e13234db1dbc1b9c2a0ac887c5c712fc7 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Media is always set to be seekable with the gstreamer backendAndras Becsi2012-11-201-16/+9
| | | | | | | | | | | | | | Since the used mechanism for querying whether the media is seekable was unreliable the code has been commented out and the media always set to be seekable. Query for seeking capabilities after the duration is known in updateDuration() which retries to determine the duration multiple times if unsuccessful and use gst_query_parse_seeking to check if the media is seekable or not. Change-Id: I141dfb1616dc59f8c92a698ddb2867f63a2656b9 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Rename namespace QtMultimedia -> QMultimediaSze Howe Koh2012-11-064-5/+5
| | | | | | | | | | | | | | | | Main code, examples, tests and docs updated. Method: 1. Mass find+replace "QtMultimedia::" -> "QMultimedia::" 2. Hand-modified declaration in qtmedianamespace.h/cpp For consistency (with minimal disruption), namespaces with a "Qt" prefix will be renamed. Part of the Header Consistency Project (http://lists.qt-project.org/pipermail/development/2012-October/007570.html) Change-Id: I1fbc43a1aa91d996aa61869fcd8d05186bf7cf6d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Rename namespace QtMultimedia::MetaData -> QMediaMetaDataSze Howe Koh2012-11-063-49/+48
| | | | | | | | | | | | | | | | | | Main code, examples, tests and docs updated. Method: 1. Remove unused forward-declarations, "class QMediaMetaData" 2. Mass find+replace "QtMultimedia::MetaData" -> "QMediaMetaData" 3. Un-nest from the QtMultimedia namespace in qtmedianamespace.h For consistency (with minimal disruption), namespaces with a "Qt" prefix will be renamed. Also, Qt guidelines don't include nested namespaces (http://lists.qt-project.org/pipermail/development/2012-October/006756.html) Part of the Header Consistency Project (http://lists.qt-project.org/pipermail/development/2012-October/007570.html) Change-Id: I40e59c1cf58c1792725e735e9285c51bc5f226b1 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* adjust to qt_plugin.prf changesOswald Buddenhagen2012-11-051-5/+1
| | | | | | | | | | DESTDIR and INSTALLS+=target are set up automatically now. note that in the qmediaserviceprovider test we must override that. also, TARGET munging is done automatically. Change-Id: Ida5d5601e22b099134d1ec07ace713e0d0986bd6 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Make QGstreamerPlayerSession 'VAAPI-aware'.Yoann Lopes2012-10-172-0/+86
| | | | | | | | | | | | | | | | At the moment the GStreamer player pipeline is not setup properly when the VAAPI plugin is available, resulting in no video being shown. Added 'video/x-surface' as one of the default raw formats for the decodebin. Don't use vaapidecode when the video sink is not compatible. This is a preliminary patch to support VAAPI. In the current state vaapidecode will never be used as none of our video sinks support the video/x-surface format. Change-Id: I39f339b483d4052dd1e29c2b0ef06343d5670224 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2414-336/+336
| | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Id77334cfb15de096941c88e32d04ca07b4eb4709 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* centralize load(qt_build_config)s in .qmake.confOswald Buddenhagen2012-09-121-2/+0
| | | | | Change-Id: Ie07a32729ec8679f799613f8f6ccdd9c1b6bf7c9 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Gst player backend: removed fifo based stream playback fallbackDmytro Poplavskiy2012-07-193-137/+5
| | | | | | | | | | It was used on systems without appsrc element support, but since the appsrc is part of base elements for a long, thre is a very little value in fifo based fallback. Change-Id: I162233cbb55821443c892f00ebd29c0498ae7152 Reviewed-by: Ling Hu <ling.hu@nokia.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Rename availabilityError to availability.Michael Goddard2012-06-292-3/+3
| | | | | | | It's perhaps clearer in the usual case. Change-Id: Id3cef82ac83f8c9b538b3315281664ce1c6a2b96 Reviewed-by: Ling Hu <ling.hu@nokia.com>
* build system cleanupsOswald Buddenhagen2012-06-251-1/+1
| | | | | | | | | | | | | | | | | - load(qt_module) => load(qt_build_config) - remove: - CONFIG+=module (obsolete) - code relating to module version headers (automated now) - %mastercontent assignment (automated now) - QT_BUILD_*_LIB defines (automated now) - pointless QPRO_PWD assignments - pointless DEFINES+=QT_MAKEDLL - pointless and commented out include and depend paths - qmake -project boilerplate Change-Id: I8f4586403848fe8f2dff4e889b389956ffcdea59 Reviewed-by: Jonas Rabbe <jonas.rabbe@gmail.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Fix namespace compilation.Toby Tomkins2012-06-251-1/+2
| | | | | | Change-Id: Id8d71a48df20da16647834e8f9732012f26f928f Reviewed-by: Michael Goddard <michael.goddard@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Enable auto resume of playback for gstreamer mediaplayerLing Hu2012-06-122-31/+44
| | | | | | | | | The resource policy now supports implicit auto-resume, so it is better to cooperate with that in mediaplayer to enable auto resume playback after resource lost. Change-Id: Iba0d28e64fa864dd6332a62e915316d48a12a533 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* GStreamer player session: remove code for old playbin.Lev Zelenskiy2012-05-142-148/+50
| | | | | | | We only support 'playbin2'. Change-Id: Ibe35f71377862cb83742c2f9b606c5e2fdd5199d Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* Update duration information after switching to PLAYING state.Lev Zelenskiy2012-05-111-1/+9
| | | | | | | | For rtsp streams duration information might not be available until playback starts. Change-Id: Id8829408a4bd2c0fc6a89f2d059d23a5a95d940e Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* When resource is lost pause the pipeline instead of stopping it.Lev Zelenskiy2012-05-111-32/+6
| | | | | Change-Id: Iccbf2f820ec6373d5853accc064dad659858514c Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* QGStreamerPlayerSession: unref pads after using them.Lev Zelenskiy2012-05-111-4/+12
| | | | | Change-Id: I3eec73eca5c2da3c449f362da8639a6dfb52a9e9 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* QGstreamerMetaDataProvider: fix keys not mapped properly.Lev Zelenskiy2012-05-111-1/+1
| | | | | | | | Add a key which is mapped against the QGstreamerMetaDataKeyLookup, not the original Gstreamer key. Change-Id: I2e20b102e97b9a3a7909ff925f195cd0bdff1775 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* Gst played: removed GST_SEEK_FLAG_ACCURATE flagDmytro Poplavskiy2012-05-101-2/+2
| | | | | | | | | | Forcing accurate seeking may be very slow for some files, it's not intended to be used with media players. Change-Id: I9fe759f6effa447a800aeea321cc46617c64866f Reviewed-by: Lev Zelenskiy <lev.zelenskiy@nokia.com> Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com> Reviewed-by: Ling Hu <ling.hu@nokia.com>
* Split gstreamer plugin into smaller plugins providing fewer servicesJonas Rabbe2012-04-277-15/+304
| | | | | | | | | | | | | | The gstreamer blob has been split into four plugins: audiodecoder, camerabin, mediacapture, and mediaplayer. Note: camerabin is still disabled because it is untested camerabin2 implementation. A new qmake configuration use_gstreamer_camera has been introduced and is needed for the mediacapture plugin to expose the camera service. This configuration has been disabled by default. Shared functionality has been moved to the internal gsttools library. Change-Id: Ifb2604f440cfa97513d39f5d7978766c88eaec45 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Make sure the audio/video availability information changes atomically.Michael Goddard2012-04-271-4/+8
| | | | | | | So there's a consistent picture of the stream availability. Change-Id: Id7ea166353c0151fcc11105a1e233e9fe8df9cc6 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* GStreamer backend: set initial volume and mute values.Lev Zelenskiy2012-04-051-9/+8
| | | | | | | | For each stream set initial volume to 100 and mute state to FALSE. Change-Id: I529a82c12f0fd65277f97193b3feed7f9782e4c0 Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Reset playbin state to NULL on end of stream signal.Lev Zelenskiy2012-04-054-6/+39
| | | | | | | | | | | | | According to GStreamer documentation "playbin should be set back to READY or NULL state, then the "uri" property should be set to the new location and then playbin be set to PLAYING state again." We reset playbin to NULL state and then call setMedia() again in case playback is restarted. Change-Id: If7efbf8d88e0aad461c3d1d8b802c6621af221f7 Reviewed-by: Mithra Pattison <mithra.pattison@nokia.com> Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com> Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* Fixed major mem leak of unfreed GstTagList when playing ogg files.bigbearzhu2012-04-041-0/+2
| | | | | | | | Could cause serious leak if ogg files contain coverart image. Should use gst_tag_list_fee to free the used taglist. Change-Id: I8f7b799729b84ad9a2ca45bc3e31f37a987a5885 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Fixed: Streams information is not updated properly for RTSP streams.Lev Zelenskiy2012-03-282-1/+21
| | | | | | | | | | | Changes to QGstreamerPlayerSession: Handle video-changed, audio-changed, and text-changed signals. Call getStreamsInfo() to update streams information. Change-Id: I8bfead3268771245635424b5f1debff624bbe038 Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com> Reviewed-by: Ling Hu <ling.hu@nokia.com> Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* Minor improvements on resource-policy interfacesLing Hu2012-03-261-1/+1
| | | | | | | Change-Id: I3e9c7c4d1fca90e0fb97b0058e9b5a5e34940025 Reviewed-by: Michael Goddard <michael.goddard@nokia.com> Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
* Make gstreamer player backend reserve/release video resource.Ling Hu2012-03-232-1/+28
| | | | | | | | Use request/release of various video related controls as an indication for the decision. Change-Id: I3a2a288c7c46ca62459896745bbdda26961bb181 Reviewed-by: Michael Goddard <michael.goddard@nokia.com> Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
* Implemented availability control for gstreamer player backendLing Hu2012-03-237-2/+151
| | | | | | Change-Id: I6d736b90ad59e258eb6f20befea8cfe1afce423a Reviewed-by: Michael Goddard <michael.goddard@nokia.com> Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
* Added resource policy support though internal plugin systemLing Hu2012-03-235-277/+12
| | | | | Change-Id: I374be17d49b6a5eed0b1ed94d0b9ca5f9a2caa9b Reviewed-by: Jonas Rabbe <jonas.rabbe@nokia.com>
* QMediaPlayer: GStreamer backend changes for playlist support.Lev Zelenskiy2012-03-212-14/+69
| | | | | | | | Register type find function to check if unrecognized media is a playlist. Emit MediaIsPlaylist error and let frontend handle playlists. Change-Id: Ib17da1c46014ac3c0f2f48b75ea9de2f0428b573 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* Handle more errors from GStreamer.Michael Goddard2012-03-161-6/+7
| | | | | | | | | Corrupted etc files can throw GST_STREAM_ERROR_DECODE and those should generally stop playback. So now any error is fatal, not just the recognised ones. Change-Id: I7b6dd2a460d94f70c459a313a9d4dc84028f8002 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* Move most of playlist API to private.Lev Zelenskiy2012-03-062-2/+2
| | | | | | | Moved objects either not needed to be public or require API review/redesign. Change-Id: Ibeb8b8c9c9a74bea32191c119fa4daaffde57c17 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* Don't reset saved playback position if playback resource is denied.Michael Goddard2012-02-272-1/+15
| | | | | | | | | | | | Resource denied and resource lost should be handled differently, on resource lost the current playback position should be preserved, while on resource denied player state should be changed to paused with pending position unchanged. (from qtmobility, SHA1 4e457432ef0f50cb91a1043f0390427cafcaef0d) Change-Id: I5ce755409c430598d68ee6a6a90f9d0858ea9da9 Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com>
* Add a partial gstreamer based audio decoder service.Michael Goddard2012-02-173-342/+0
| | | | | | | Doesn't work yet. Change-Id: Iebd085d68346cb73af8df59c84e8e52a17de2a52 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* GStreamer backend changes for media probing API.Lev Zelenskiy2012-02-163-3/+240
| | | | | | | | QGstreamerPlayerSession: Using GStreamer buffer probes to access media data. Change-Id: Ibc056283fdedaebba90456cc4e86ab63eae5f5f7 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Changes to QMediaPlayer GStreamer backend to allow setPosition before pauseLev Zelenskiy2012-02-061-2/+8
| | | | | | | | | | Do not display prerolled frames in stopped state. Instead store prerolled frame and display it only after switching to pause or playback state. Added new unit test with a sample video file to check this functionality. Change-Id: I3fd159a199b65ca10fdf9843af5675c5ae9dad05 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Added metaDataChanged(key,value) signal to metadata controls.Dmytro Poplavskiy2012-02-062-25/+34
| | | | | | | | | | | | | | It may be more efficient and convenient for application to use this signal instead of metaDataChanged(). metaDataChanged() signal is emitted for compatibility, backends should emit both signals. Signal added QMetadataReader/WritterControl, QMediaObject and QMediaRecorder. Change-Id: I5ca34a40e64b22034e6fde8cd7f9735cc3f72c68 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3014-14/+14
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I20e5215108c6ebd5f8474fed5c3665118e4791e6 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>