summaryrefslogtreecommitdiffstats
path: root/src/plugins/wmf/player/mfplayersession.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Updated license headersAntti Kokko2016-01-191-14/+20
| | | | | | | | | | | 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>
* WMF: correctly handle media with multiple streams.Yoann Lopes2015-12-041-74/+88
| | | | | | | | Only use the default streams and make sure only one stream of each kind (audio/video) is added to the topology. Change-Id: Ied37174fa722068b4cd1b5f91b60e0cef5c1d7b3 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* WMF: fix type negotiation in video probe transform.Yoann Lopes2015-12-041-16/+3
| | | | | | | | - report supported types (same as the video sink) - handle type changes coming from upstream Change-Id: I922fc4869ecac3999e055c39adf1b847127a0012 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* DirectShow: use the EVR in the window control.Yoann Lopes2015-11-051-10/+2
| | | | | | | | | | Reuse existing code from the WMF plugin, which already uses the EVR. This enables HW-accelerated video decoding when using QMediaPlayer with a QVideoWidget. Task-number: QTBUG-45593 Change-Id: I757e4d53cd2c648aee6ba33a4851a8c6adc62843 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-7/+17
|\ | | | | | | | | | | | | | | Conflicts: src/multimedia/playback/playlistfileparser.cpp src/plugins/windowsaudio/qwindowsaudiodeviceinfo.cpp Change-Id: I52950def2b8283ae15797d05d4ead6a1256eba19
| * WMF: fix reported sample type of 8-bit audio formats.Yoann Lopes2015-04-141-1/+4
| | | | | | | | | | | | | | | | | | | | Always report 8-bit PCM data as unsigned integer. Even though there's no API to actually know that, it's standard on Windows. 8-bit is unsigned and 16-bit is signed. Task-number: QTBUG-45540 Change-Id: I4a3c09084de688ea7afc3bc147508184fb582224 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
| * Fix compile issue when building with -no-widgetsAndy Shaw2015-04-071-4/+4
| | | | | | | | | | Change-Id: I49a9aa684b0dfbe0e3d9e576aad06d65d6c3ecdd Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
| * WMF: don't resume playback after doing a seek while paused.Andy Shaw2015-03-311-2/+9
| | | | | | | | | | | | | | Task-number: QTBUG-32746 Change-Id: I5a9ee96324e0ddc65311f47dc887bcb91b036fd2 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2015-02-131-1/+1
|\| | | | | | | Change-Id: I5575a4ba13212c9bfe73a3de3ef17c6528beafc3
| * Fix some typosSergio Ahumada2015-02-111-1/+1
| | | | | | | | | | Change-Id: Iaf8f50741d3103480668b4a654a202d8a363bc45 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Update copyright headersAntti Kokko2015-02-121-7/+7
|/ | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-10-141-6/+7
|\ | | | | | | Change-Id: I716fd3acb69e424047691069cd4a781f656d0487
| * WMF: Use media source only when it is initialized.David Schulz2014-09-301-5/+6
| | | | | | | | | | Change-Id: I0efcf6139d0b81194cf25383025f080f8656728c Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
| * WMF: Fix null ptr derefernce in MFPlayerSession.David Schulz2014-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checking the sender of the mediaSourceReady signal to prevent accessing the incorrect source resolver. When the source resolver has finished the asynchronous operation and the source resolver gets recreated in the player at the same time in a different thread the signal mediaSourceReady still gets emitted from the old source resolver. The player assumes that the signal was emitted from the current source resolver and accesses the unresolved media source in the handleMediaSourceReady slot. Task-number: QTBUG-39980 Change-Id: Ic52f6918995aac250048d91f89c520cfea111bd0 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into 5.4Sergio Ahumada2014-09-261-29/+33
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Iad73368a22c6d4662188e6f357a265d0c26756d0
| * WMF: fix initializing of media player's volume.Nodir Temirkhodjaev2014-09-111-3/+3
| | | | | | | | | | | | | | | | According to the docs, MESessionTopologyStatus with status == MF_TOPOSTATUS_READY should be the correct place for the GetService call. Change-Id: I7fdbedbe43b2191b35b95c7fd9c86940f58daff7 Reviewed-by: Wouter Huysentruit <wouter_huysentruit@hotmail.com> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
| * WMF: fix memory leaks.Nodir Temirkhodjaev2014-09-111-26/+30
| | | | | | | | | | | | | | | | | | | | | | Release requested interfaces. Task-number: QTBUG-32481 Change-Id: I846981f6a7a7ea77588b9322fc41e05e583bdb15 Reviewed-by: Wouter Huysentruit <wouter_huysentruit@hotmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Jeff Tranter <jtranter@ics.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-011-15/+26
|\| | | | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstreamervideoinputdevicecontrol.cpp src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp Change-Id: Ic854589562d2deeaa0ebf75840cb8a2ee32e99de
| * WMF: fix bufferStatus() and availablePlaybackRanges().Yoann Lopes2014-08-251-15/+26
| | | | | | | | | | | | | | | | - Correctly initialize and clear PROPVARIANT structures - Return coherent data even when the information is not available Change-Id: I22b46f95f255cbb740a154c6296a5c3a91e64f67 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* | Update license headers and add new license filesAntti Kokko2014-08-241-19/+11
|/ | | | | | | | | - 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>
* WMF: improve changing playback rate on a media player.Yoann Lopes2014-04-091-6/+47
| | | | | | | | | | | | | | | | | | | | | | When going back to normal rate after playing in fast forward (greater than 2x), playback seemed frozen for some amount of time (up to 8 seconds). When playing in fast forward, only key frames are shown, ignoring all the others. When returning to a normal rate, the source reader will usually be pointing to a key frame in the future compared to the player clock position, meaning that all the frames in between won't be shown until the player clock catches up with the latest key frame that was read. When leaving fast-forward, we now reset the position on the player to force the source reader to point back to the frame at the current clock position and avoid the seamingly frozen playback. Also, emit playbackRateChanged() signal when changing the playback rate. Change-Id: I4f04f0f250083378e94fb4a47f9f917abeaaf24e Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* WMF: each media player now has its own volume.Yoann Lopes2014-03-071-27/+23
| | | | | | | | | | | | | | | Instead of setting the volume on the audio session, which is shared by all QMediaPlayers, we now set the volume on the media player's own audio stream. This results in all QMediaPlayers correctly having independent volumes. [ChangeLog][QtMultimedia][Windows] QMediaPlayer::setVolume() does not affect the volume of other QMediaPlayers anymore. Task-number: QTBUG-30317 Change-Id: I8ea8ec47fc86127da01dc5c8247fb6f72c834630 Reviewed-by: Wouter Huysentruit <wouter_huysentruit@hotmail.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Normalize signal & slot signatures in connectionThiago Macieira2014-02-031-1/+1
| | | | | | | Profiling shows Qt Creator spends 2% of its load time normalizing Change-Id: I1a4bef16be79ced35c47da865153ebe1bee22f9c Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* WMF: remove dead code.Yoann Lopes2013-12-111-333/+0
| | | | | Change-Id: Ib3b595263e64336cc5d0482edd890e7b4e534927 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* WMF: fix some crashes.Yoann Lopes2013-12-111-3/+5
| | | | | | Task-number: QTBUG-30827 Change-Id: Iafc53f7095ad9c086b3982afb2af045c54497dc9 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* WMF: fixed various media player issues.Yoann Lopes2013-12-041-13/+18
| | | | | | | | | - Switch to BufferedMedia only once playback actually started, not when requesting to start. - Report the position to have changed when seeking in stopped state. Change-Id: I930b3e6977cebe5935ed033d0a4d4e1eb899ad2c Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* Revert "WMF: fixed MediaPlayer buffering logic."Yoann Lopes2013-12-041-13/+3
| | | | | | | | | | | This reverts commit d599f7319af86265083bae96f21d942aeff24737. This was not the correct logic... According to the documentation, the BufferedMedia status should be set only when in the PlayingState. Change-Id: I36053ebc09c0517fcd2a1a7f2b091fbe8f04f3d0 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* WMF: emit positionChanged() signal when reaching the end of a media.Yoann Lopes2013-10-291-1/+3
| | | | | | | | This is necessary for QML MediaPlayer to report the correct position at the end of a media. Change-Id: Ifac2a721b850c726305d1a98e360da638b1fa87a Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* WMF: fixed compilation on Windows Vista.Yoann Lopes2013-10-111-5/+16
| | | | | | | | | We were using one function which is available only on Windows 7 (and later). Replace it with Vista-compatible calls. Task-number: QTBUG-32864 Change-Id: I77492a407330c3689dfbf8dc1180894cf7ca5f8d Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* WMF: fixed QMediaPlayer changing to EndOfMedia status too early.Yoann Lopes2013-08-161-7/+7
| | | | | | | | | | | | | | It was changing to EndOfMedia status and explicitly stopping playback when receiving the MEEndOfPresentation event from the WMF session. However, this event means that all data has bean read from the source but not necessarily played yet. According to the documentation, playback is done when the MESessionEnded event is sent. It now reports the EndOfMedia status at that moment instead. stop() is not explicitly called anymore since MESessionEnded also implies the session has stopped. Task-number: QTBUG-30825 Change-Id: I6c6c09e736fe33f7cf17c75038ea7be1b5701a1c Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* WMF: fixed MediaPlayer buffering logic.Yoann Lopes2013-07-191-3/+13
| | | | | | | | | | | | | | | To have a consistent behavior with other backends, the WMF plugin now starts the session after loading a media in order to start buffering some data and correctly notify when the media is buffered. It was previously reporting a BufferedMedia status only (and wrongly) after explicitly starting the media player. Not all source readers (usually a source reader is specific to a file format) implement the service needed to query buffering progress. In that case just report the media to be buffered immediately after loading. Change-Id: I6e6332ae08e96fc789556761e5169b88c36c5e37 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* WMF: fixed unresolved topologies when using the custom MediaSink.Yoann Lopes2013-01-231-3/+185
| | | | | | | | | | | | | When using our custom MediaSink with RGB formats, Media Foundation fails sometimes to resolve the topology. Inserting ourselves a ColorConverter transform in the topology resolves the problem. The ColorConverter transform cannot handle dynamic frame size changes (this can happen with H264 videos for example) so we also need to insert a Resizer transform to handle transparently frame size changes. Change-Id: Id7f37a0af65f142fbe6d420ad7b2c1ac2156c21b Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* WMF: fixed scrubbing and changing rate to 0 or negative values.Yoann Lopes2013-01-231-24/+36
| | | | | | Task-number: QTBUG-29147 Change-Id: I3e32e520d676d120d60bcd07d122006c1346eb0d Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: Ia8c1c38aba1544603fada8c414cc856f365fd15b Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* WMF: release video controls before releasing the sessionYoann Lopes2013-01-071-0/+7
| | | | | | | | | For the VideoRendererControl, also stop the video surface at the same time. This fixes a crash when changing video. Change-Id: I49484f8b277c345dafb3e5947cf5d23df15546f3 Reviewed-by: Jason Barron <jason@cutehacks.com>
* WMF: re-enabled video probes and made it more robust.Yoann Lopes2013-01-071-55/+92
| | | | | | | | | | | | Fixed the way the custom MF Transform (getting the frames) works: - Recreate it whenever we load a new media - During media type negotiation between nodes, the MFT should support the same types as the video sink supports - Allow input and output types to be changed as many times as needed, otherwise the topology cannot be resolved in some cases Change-Id: I7ca77e1a3dee83643f1a97f2e6ada9c5c0e88309 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* WMF: Fixed incorrect QMediaPlayer volume reporting.Yoann Lopes2012-12-211-5/+6
| | | | | | Task-number: QTBUG-26621 Change-Id: Id70a68ad61fd7d68f4ee277f33a54bd9c00c05d0 Reviewed-by: Jason Barron <jason@cutehacks.com>
* WMF: Improved error reporting.Yoann Lopes2012-12-111-27/+35
| | | | | | | | | | | When loading the source fails because the file format is not supported, we now report a FormatError instead of a ResourceError. When the file format is supported but the media cannot be played (topology cannot be resolved), it is most likely caused by a missing codec and we then report a FormatError. Change-Id: I101a86c129a0c5dccb543fc1247cb741994684fd Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* WMF: Recreate the MFMediaSession when loading a new media.Yoann Lopes2012-12-071-14/+47
| | | | | | | | | | | | | | MFMediaSession doesn't seem to handle correctly the change of media source, causing the playback not to work afterwards. A single MFMediaSession was created and used for every loaded media, we now create a new one whenever we load a new media (releasing the old one beforehand). Task-number: QTBUG-26819 Change-Id: Id99c9dd54e161823d9580933e063f16240806529 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Jason Barron <jason@cutehacks.com>
* WMF: Fixed shutdown sequence.Yoann Lopes2012-12-071-1/+1
| | | | | | | | | | | | A wrong shutdown sequence was causing a wait condition to never be met, resulting in a 5 seconds hang on shutdown. Also reduced the wait condition timeout to 100 ms. Task-number: QTBUG-28432 Change-Id: Ib415bf66634603d839be3e34e497e3a3c5a19ad9 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Jason Barron <jason@cutehacks.com>
* WMF: Disabled the video probe control.Yoann Lopes2012-11-301-47/+51
| | | | | | | | | Using the video probe cause unstability in the video playback. Disabled for 5.0 release. Should be fixed and re-enabled in the next version. Change-Id: I274212a0943ac098194ad59d6e07bed7740bc8a3 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* tr()-Fixes.Friedemann Kleint2012-11-291-16/+16
| | | | | | | | Make WMF-player error message consistent (sentences, no exclamation marks). Improve wording. Change-Id: I876b26067fb374833037aa93dd9675ab556bf972 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-241-24/+24
| | | | | | | | | 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>
* Videoprobe implementation for wmf backend.Lev Zelenskiy2012-07-191-5/+229
| | | | | | Change-Id: Ia597af428764229a76c0059ae7a57eb302aee63d Reviewed-by: Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Audioprobe implementation for wmf backend.Lev Zelenskiy2012-07-111-1/+162
| | | | | Change-Id: I63af91af870cb92c838c1ab5d4752815aa60a03f Reviewed-by: Ling Hu <ling.hu@nokia.com>
* Added wmf implementation for QAudioDecoderControlLing Hu2012-07-111-3/+7
| | | | | | Change-Id: Ib6d5c93577bd55995a9ae51e757156149890f15d Reviewed-by: Jun Zhu <jun.5.zhu@nokia.com> Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Refactoring wmf pluginLing Hu2012-06-291-1/+1
| | | | | | | | make mf startup/shutdwon inside plugin instead of player component make sourceresolver a common component for a wmf related tasks. Change-Id: I49cdc4fa512a62398a68cd2be2f522f567d11c7c Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Fixed some crash with WMF backendLing Hu2012-06-251-15/+23
| | | | | Change-Id: I721ba049e2ecafff53ee70d5b930fb52c15fbe09 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | 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>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: Ie8cd560b6d9a2c6e552b6be1ad8bc96c80a6535c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>