summaryrefslogtreecommitdiffstats
path: root/src/plugins/directshow/player
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Update commercial license headers"v5.15.3-lts-lgplTarja Sundqvist2021-03-2520-413/+413
| | | | | | | | | | | This reverts commit 80d46e3a5f64ff2456c40bdba63b6d5c69a32cdd. Revert of commercial license headers is required for Qt 5.15.3 opensource release. Task-number: QTBUG-91108 Change-Id: I5c64ffa120f916711e5cf01c828774f8456dec06 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Update commercial license headersTarja Sundqvist2021-01-2720-413/+413
| | | | | | | | | | | | | | | | Updated header.COMM to files in tqtc-qtmultimedia. Examples, tests or documentation files are not updated. The commercial license header may contain some additional lines so that its line count equals with the earlier license header. Reaso for this is that some autotests use hard coded line numbers and a change in the line count causes failures in tests. Task-number: QTQAINFRA-4171 Change-Id: I86ebf7c3653b55983cefff246c0cb019cbcda8c4 Reviewed-by: Akseli Salovaara <akseli.salovaara@qt.io>
* Fix case of header file includes for building with mingw-w645.14Marius Kittler2020-04-261-1/+1
| | | | | Change-Id: Ie0e6599234c38c5e5a75b681a911f3728871861e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* DirectShow: Round stop position down to available bytes in IAsyncReaderVal Doroshchuk2020-03-161-1/+1
| | | | | | | | | | | | | | | | | | Currently requested IMediaSample might contain the end time that exceeds the available bytes which causes returning an error in WaitForNext() and stopping the playback. Regarding to IAsyncReader::Request documentation: The start and stop positions should match the alignment that was decided when the pins connected. The stop position might exceed the real duration. If so, the method rounds the stop position down to the actual alignment. Fixes: QTBUG-77782 Change-Id: I644e25bfc6bb8f6d345b8424b79fb56490d82c0e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> (cherry picked from commit 9e96fe2cbf79a44039de0edcc854050d84b87588) Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-151-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/multimedia/video/qvideoframe.cpp src/plugins/directshow/player/directshowplayercontrol.cpp Change-Id: I00840245e35861cf4fe1d62789815ca125b2052a
| * DirectShow: Fix crash when media in qrc is set twiceVal Doroshchuk2019-10-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | When qrc media content is set, it allocates and opens QFile. If the same content is set again, the url remains the same, but it creats new QFile, and need to update DirectShowIOReader by new stream. Change-Id: If3f5c187c4e2987e1a593b45f9a46c3c1b77ce45 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-081-6/+8
|\| | | | | | | | | | | | | Conflicts: src/multimedia/configure.json Change-Id: Ie887a5f4d718cb3e082b0e2ee996c6687af330cb
| * DirectShow: Don't seek if playback is stoppedVal Doroshchuk2019-10-011-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the playback is already stopped, and after that new position is requested twice, e.g. stop(); setPosition(0); setPosition(0); this causes the playback to start. Need to postpone setting of new position until play is requested. Also no need to emit positionChanged when position is not changed. Fixes: QTBUG-68778 Change-Id: Ib62942ee155d9c8ed2310132dcc6b501dfef1a04 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| * DirectShow: Emit media status before errorVal Doroshchuk2019-10-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Media status should be emitted before any error. Since error can cause changing the media and changing to new media status. Fixes BFAIL : tst_QMediaPlayerBackend::playlistObject() Compared values are not the same Actual (mediaStatusSpy.count()): 4 Expected (6) : 6 Task-number: QTBUG-46368 Change-Id: I8eb82e7a551d78abd143baa594cfda9bacd7e544 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-011-1/+8
|\| | | | | | | | | | | | | Conflicts: src/multimedia/video/qvideoframe.h Change-Id: I8458c4138be05f661d6528116cbc6b18298f0a91
| * DirectShow: Implement QMediaVideoProbeControl->flushVal Doroshchuk2019-09-271-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Need to flush when at least one frame is probed and stop is called, EOS or QMediaPlayer is destroyed. Fixes BFAIL : tst_QMediaPlayerBackend::probes() '(probeHandler.isVideoFlushCalled)' returned FALSE. () Task-number: QTBUG-46368 Change-Id: I09ebd6608c9a1b8a0a0707d83200d75ddb435734 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-123-0/+7
|\| | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstvideorenderersink.cpp src/gsttools/qgstvideorenderersink_p.h Change-Id: I7fe29161d568fa3f7688abfd2f993d1b16ac3fb9
| * DirectShow: Allow QMediaPlayer in secondary threadVal Doroshchuk2019-09-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since using of any COM objects must be only after CoInitialize(), otherwise CoCreateInstance() returns nothing which causes a crash. If QMediaPlayer is moved to another thread, loading of any content will also cause a crash because of COM is not initialized. Proposing to use thread_local ref counter to keep each thread initialized and avoid double initialization. Fixes: QTBUG-77163 Change-Id: I81c67d6407b853c824edd3b42454fddf792fd90c Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-083-0/+5
| |\ | | | | | | | | | Change-Id: Idc377c82cc1d2bd53069babc7f14618ef46dc67b
| | * DirectShow: Add startTime and endTime to QVideoFrameVal Doroshchuk2019-08-293-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the application seeks to a new position, the Media Session restarts the presentation clock at the specified seek time. The media source might deliver samples with a slightly earlier time stamp if the seek time does not fall on a key-frame boundary. And IMFSample->GetSampleTime will return time that is related to a position when the clock has been restarted, and can be also negative. So if it needs to have times from the beginning, it would require to add seeked position to times from IMFSample. It also reverts c4de056a6aa44567cdbf2ce91a464e597ad4af8f Fixes: QTBUG-77849 Change-Id: I1a7cb7bd18aee73087a61d2ed2c3d644ad0fbd50 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | Port from QMutex::Recursive to QRecursiveMutexMarc Mutz2019-08-012-18/+19
| | | | | | | | | | | | | | | | | | | | | | | | Also port from QMutexLocker to std::lock_guard or std::unique_lock, as the former will not support QRecursiveMutex going forward. Change-Id: I1ed1a129e2b9b77aa0a729e8cab03c673566a345 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-302-4/+5
|\| | | | | | | | | | | Change-Id: I329eeefafed87ff7467d21d5d099cf9897660167
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-07-234-11/+12
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/directshow/player/directshowplayerservice.cpp Change-Id: I482098bb3c3b5b291175ca798b0d6ba61ad87d86
| | * DirectShow: Set QMediaPlayer::NoMedia if empty url is providedVal Doroshchuk2019-07-172-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of clearing current playlist by passing nullptr to QMediaPlayer::setPlaylist, empty url is passed to a backend: QMediaContent m(playlist, QUrl(), false); setMedia(m); The status should be updated by QMediaPlayer::NoMedia if empty url is passed. Fixes tst_QMediaPlayerBackend::playlistObject() Task-number: QTBUG-65574 Change-Id: Iea03e3fcb8d74c9b1b482aa06b42686cf8c9e9a7 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * use correct types when creating an empty Windows eventRolf Eike Beer2019-07-161-1/+1
| | | | | | | | | | | | | | | Change-Id: I9f811b4d0aadb04d3552dcd1f26a1565dfc230e2 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
| | * DirectShow plugin: use new style connect syntaxRolf Eike Beer2019-07-162-3/+3
| | | | | | | | | | | | | | | Change-Id: I5c2dadfe1154961adcecf779126166aea4d32393 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
| | * DirectShow plugin: use nullptr instead of NULLRolf Eike Beer2019-07-162-7/+7
| | | | | | | | | | | | | | | Change-Id: Ied89175c4b7f5df090deac174b1da1e8496ee533 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | | DirectShow: Introduce nullptrFriedemann Kleint2019-06-1217-81/+81
| | | | | | | | | | | | | | | | | | | | | Apply Fixits by Qt Creator. Change-Id: Idbd52ceaac6ee02f23d05f5a9b1ab6d58298b6a5 Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* | | DirectShow: Use member initializationFriedemann Kleint2019-06-1220-190/+97
| | | | | | | | | | | | | | | Change-Id: I4e696083c2ed78b374f2df64706ecb2297f122dd Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* | | DirectShow: Clang warnings about else after return, breakFriedemann Kleint2019-06-122-16/+19
| | | | | | | | | | | | | | | | | | | | | Disentangle code of DirectShowPlayerService::requestControl(). Change-Id: I2e90d5c86acdbe2f20f421f43929e0e9c5580eaf Reviewed-by: André de la Rocha <andre.rocha@qt.io>
* | | DirectShow: Replace typedef by usingFriedemann Kleint2019-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | Apply some fixits by Qt Creator. Change-Id: I20b62c70b5ed0e79ca735f1ab9b048023eb9dc7d Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-032-5/+23
|\| | | | | | | | | | | Change-Id: Id1638836ea3faf16c4ba39119029522b2afbe803
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-032-5/+23
| |\| | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/directshow/player/directshowplayerservice.cpp Change-Id: I6b7edc312ecfadf84653ce24321ec55da41e131a
| | * DirectShow: Don't hide returned error when video output was not providedVal Doroshchuk2019-04-111-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the video output could be set after doRender(), we do not report an error in this case. But need to report the error when the video output has not been submitted at all. Otherwise it hides the error and not possible to determine playback issues. Added a fix to remember an error while rendering without the video output and handle it if playing is requested. That means, if it is required, the video output must be set before play() is called. Not all medias require valid video output, but if there is an error, we need to report about it. Fixes tst_QMediaPlayerBackend::playlist() Task-number: QTBUG-65574 Change-Id: I9faae19c08ad0273545bb7617ea3a11539084f1f Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * DirectShow: Report about an error for wrong urlsVal Doroshchuk2019-05-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If wrong url is passed, no need to try it again. But report an error instead. Also there cannot be empty url, because if an url is empty, NoMedia should be emitted. Fixes tst_QMediaPlayerBackend::playlistObject() Task-number: QTBUG-65574 Change-Id: I658b16cfe7b96c202715651d6b20d01a9af6c746 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| | * DirectShow: Don't update status on pending tasks when graph is loadedVal Doroshchuk2019-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests expect to see updated playback position together with QMediaPlayer::BufferedMedia. But currently QMediaPlayer::BufferedMedia is emitted before updating the position. Removed updating the status if the graph is already loaded but a task is still pending. Fixes tst_QMediaPlayerBackend::seekInStoppedState Task-number: QTBUG-65574 Change-Id: I66d214312dbf31973a13b5154a52599aa517f38c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
| | * DirectShow: Don't set the same mediaVal Doroshchuk2019-05-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes tst_QMediaPlayerBackend::playlistObject() Actual (currentMediaSpy.count()): 2 Expected (1) : 1 .\tst_qmediaplayerbackend.cpp(1224) : failure location Task-number: QTBUG-65574 Change-Id: Ia7cbcb4a22ee43df9e1efff065910b084bdbf00e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | | Deprecate canonicalUrl and canonicalRequest in QMediaContentVaL Doroshchuk2019-05-131-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | Since QMediaContent can contain only one content and media resources are already deprecated, canonicalUrl and canonicalRequest are a bit confusing and outdated. Deprecated and replaced by QMediaContent::request() which already contains the url. Change-Id: I418006e112f49466b0129bf1e6e1ae629c714538 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-04-101-2/+3
|\| | | | | | | | | | | | | | | Conflicts: tests/auto/integration/qdeclarativevideooutput/tst_qdeclarativevideooutput.cpp Done-with: Val Doroshchuk <valentyn.doroshchuk@qt.io> Change-Id: I745dd948c1e98180115f85c17bef802351bbdb6b
| * Windows: Reset position on pause in QMediaPlayer after EOSVal Doroshchuk2019-04-101-2/+3
| | | | | | | | | | | | | | | | | | | | pause() should reset position to the beginning after EOS. Fixes tst_QMediaPlayerBackend::processEOS Task-number: QTBUG-65574 Change-Id: I4802102bde657d7a3dde0b426c335b021207ae08 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* | DirectShow: Fix video and audio probes in media playerVal Doroshchuk2019-01-152-37/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Added using ICaptureGraphBuilder2 to connect source filter and sample grabber to probe video and audio buffers. The capture graph builder can automatically add some intermediate filters as needed. Video buffers are always requested in ARGB32 format. Task-number: QTBUG-71819 Change-Id: I7382635758ba3bd76c8806cabd0895c67072be6c Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | DirectShow: Move parsing of the metadata to worker threadVal Doroshchuk2018-11-284-86/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since parsing of the metadata from file might take some time, and no need to block gui thread because of it, moved the parsing to worker thread. Also there is no need to use a synchronization in DirectShowMetaDataControl because reading/writing of the metadata is handled only from main thread. In case if new media is set (from main thread) during parsing the metadata (worker thread), it will still block the main thread before previous parsing is finished. Task-number: QTBUG-66526 Change-Id: Iffb23c6436639039365596725ddb54d2510d9c83 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | DirectShow: Stop surface on EndOfStreamVal Doroshchuk2018-11-221-0/+1
| | | | | | | | | | | | | | | | Surface should be stopped to flush video frame. Task-number: QTBUG-71610 Change-Id: I1d7b4e0c1c04ebfbf764ffc8621a7028dd88f22d Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-172-3/+1
|\| | | | | | | Change-Id: Iaf74b2b0f03af46942beaa5aa1fc61296a66ec47
| * DirectShow: Fix compiler warningsFriedemann Kleint2018-11-062-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix: player\directshowiosource.cpp:100:22: warning: unused variable 'count' [-Wunused-variable] static const int count = sizeof(directshow_subtypes) / sizeof(GUID); player\directshowplayerservice.cpp: In member function 'virtual QMediaControl* DirectShowPlayerService::requestControl(const char*)': player\directshowplayerservice.cpp:237:27: warning: 'filter' may be used uninitialized in this function [-Wmaybe-uninitialized] setVideoOutput(filter); Change-Id: I0a9098db182d3954d50d5b23ca00424ee691f60d Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-0613-428/+362
|\| | | | | | | Change-Id: I87da2a6655784bcaf76dd73992c8b874853b1fc7
| * DirectShow: Fix clang-tidy warnings about else after returnFriedemann Kleint2018-09-055-317/+250
| | | | | | | | | | | | | | | | | | - Unindent the code or replace by switch () - Smaller fixups when reindenting (nullptr, use QStringView for comparison against wchar_t) Change-Id: I249cb00b9ebe375b089d8d53b10c2d16d5771680 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * DirectShow: Fix clang-tidy warnings about loopsFriedemann Kleint2018-09-051-2/+2
| | | | | | | | | | | | | | - Replace by range-based for Change-Id: Ie73bf5b6e1ebd90e4db653af0791ec88b68ed883 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * DirectShow: Fix clang-tidy warnings about class definitionsFriedemann Kleint2018-09-0510-109/+110
| | | | | | | | | | | | | | | | | | | | | | | | - Use ' = default' for trivial constructors/destructors - replace virtual by override or add override where applicable - Replace trivial constructors by member initialization for simple structs - Add Q_DISABLE_COPY where applicable - Mark move assignment/move constructors as noexcept - Remove unused member variables Change-Id: I579fb69ebcd945b94de32b827d93e5a4dab4df97 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Do not use QMediaResource internallyVal Doroshchuk2018-08-302-9/+3
|/ | | | | | | | Removed usage of QMediaResource internally, since it is going to be deprecated. Task-number: QTBUG-28850 Change-Id: I476ae11ac58215aa4df4a76abb0cec3aa44f206a Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Introduce a new environment variable to disable EVR in DirectShowLuca Carlon2018-07-282-12/+16
| | | | | | | | | A new environment variable QT_DIRECTSHOW_NO_EVR is introduced to disable EVR, which is needed in some cases (see QTBUG-53019). Task-number: QTBUG-53019 Change-Id: I8e39ad36d37f5e7c2da0d1fdc62dc95dda715ec0 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Build fix for DirectShow plugin when EVR is disabledLuca Carlon2018-07-282-0/+4
| | | | | | | | | Fix compilation and link error when building the DirectShow plugin without EVR support. Change-Id: Ic14c4898e37739953c588e41c73e655350518457 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* Directshow: Don't report failure for stream source with no video outputAndy Shaw2018-06-201-3/+3
| | | | | | | | | | | The video output is set after it has handled this doRender() call which means that it would report an error with the media, even though it was renderable. This approach ensures that it does not report an error and will correctly report as loaded in this case. Change-Id: I6ec6abb82dcdd8f122e198ff6a765cf83931ee10 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* DirectShow: Add overrideFriedemann Kleint2018-04-252-16/+16
| | | | | | | | Silence the clang-cl build. Task-number: QTBUG-63512 Change-Id: I701998d63a54b556b32fa0100bf43ef3071e598b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix DirectShow COM class hierarchyFriedemann Kleint2018-04-242-10/+33
| | | | | | | | | | | | | | | | | | | | | Remove the class DirectShowObject. Move the ref counting code to a macro COM_REF_MIXIN that is used for the classes that are actually instantiated. Fix warnings: common/directshowpin.h(56,5): warning: 'reinterpret_cast' from class 'DirectShowPin *' to its base at non-zero offset 'IUnknown *' behaves differently from 'static_cast' [-Wreinterpret-base-class] DIRECTSHOW_OBJECT ^~~~~~~~~~~~~~~~~ common/directshowobject.h(69,33): note: expanded from macro 'DIRECTSHOW_OBJECT' return GetInterface(reinterpret_cast<IUnknown*>(this), ppv); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ common/directshowpin.h(56,5): note: use 'static_cast' to adjust the pointer correctly while upcasting Task-number: QTBUG-63512 Task-number: QTBUG-64157 Change-Id: Ibef143d675cd169b78fe46ff5a0c83f6e3434487 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>