summaryrefslogtreecommitdiffstats
path: root/src/plugins/directshow
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-04-102-3/+4
|\ | | | | | | | | | | | | | | 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: don't change camera zoom level if not requestedIhor Dutchak2019-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | DirectShowCameraZoomControl sets camera zoom level to 1x each time, when camera goes into LoadedStatus (e.g. on stream stop), which is inconveniant, specially if camera has physical remote, and zoom level may be changed externally. Disable this behavior, if zoom level was not requested explicitly by zoomTo(...) function from client code. Fixes: QTBUG-74180 Change-Id: I99ff76af04f80c630a0c397db5713e6706ebf175 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Ihor Dutchak <ihor.youw@gmail.com>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-091-4/+1
|\| | | | | | | Change-Id: I26440611372622174c5b077be21e5a22b8136e97
| * DirectShow: Fix crash when camera is being destroyedVal Doroshchuk2019-02-061-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | If a camera is going to be destroyed, a service plugin releases media service, (which releases ds camera session) and might call CoUninitialize. This leads to a crash when DirectShowSampleGrabber is destroyed after releasing the camera. Added a fix to release the sample grabber together with camera session. Task-number: QTBUG-73461 Change-Id: I8e518d0242d983c8d2bb00c30ad87c7e8e1e2c93 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | DirectShow: Fix video and audio probes in media playerVal Doroshchuk2019-01-153-39/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Windows: Build directshow media player with wmf if availableVal Doroshchuk2019-01-144-17/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed -mediaplayer-backend configure param. It allows to build directshow media player together with wmf's one, if the last is available. It is useful to switch to another backend without rebuilding. By default directshow media player will be used. [ChangeLog][Platform Specific Changes][Windows] Removed -mediaplayer-backend config param which allowed to build wmf together with DirectShow. Task-number: QTBUG-32783 Change-Id: I486a93d9493407af3793cfe338b35daab7c642db Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-042-35/+40
|\| | | | | | | Change-Id: I5394a9d75850771068d43d2509b14a3ac4efcf83
| * DirectShow: Don't queue video buffers from sample grabberVal Doroshchuk2018-11-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Fixed an issue when buffers are sent using queued connection. Thus all buffers were collected before they were handled. Now only last buffer is kept. Also moved handling of device lost timer to main thread. Task-number: QTBUG-72012 Change-Id: I338587c5854739d6081c5cb502377e5779776417 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * DirectShow: use supported pixel formats for QCamera video surfaceIhor Dutchak2018-11-282-25/+29
| | | | | | | | | | | | | | | | | | | | [ChangeLog][DirectShow] Do not convert QCamera video frames to RGB32 if provided QAbstractVideoSurface supports frame pixel format, requested by QCameraViewfinderSettings. Task-number: QTBUG-68768 Change-Id: I78d0aaf6c22c4bfee2b17f78a3709d7ba9a8b4fa Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
| * DirectShow: Display windows error string when camera failsVal Doroshchuk2018-11-272-5/+6
| | | | | | | | | | | | | | | | | | | | Additionally to custom error messages it needs to show standard ones with error codes. Task-number: QTBUG-71851 Change-Id: I6504ec2417b0f686ab4e1a6902c4f00eeefcbbf2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Andy Shaw <andy.shaw@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-10-201-1/+1
|\| | | | | | | Change-Id: Id4521553c437efa66ad52b2e419b446184a0ec11
| * Merge remote-tracking branch 'origin/5.11' into 5.12v5.12.0-beta2Qt Forward Merge Bot2018-10-051-1/+1
| |\ | | | | | | | | | Change-Id: I70b363e614391ecce15ed55ef1267973c8b21355
| | * DirectShow: Fix crash when camera destroyedVal Doroshchuk2018-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The lambda function is called even if the object is destroyed. Task-number: QTBUG-70932 Change-Id: I070059bd61769a6864a2848f2b537609577769de Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-057-6/+214
|\| | | | | | | | | | | Change-Id: I600b0532f154dc885913f14a5d24261c0de93893
| * | DirectShow: Fix typo which breaks cameraVal Doroshchuk2018-10-041-1/+1
| | | | | | | | | | | | | | | Change-Id: Ib2f799024b91131d33b9247dec167cae3e6adde9 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * | DirectShow: Implement image capture settingsVal Doroshchuk2018-09-257-5/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added camera image encoder control that 1. applies image encoder settings (resolution and codec) used to capture images 2. returns supported image codecs from QImageWriter::supportedImageFormats 3. returns supported resolutions Since DirectShow camera session uses QImage based on QVideoFrame image encoder control returns viewfinder supported resolutions. Not available if camera is not loaded. Setting resolution via encoder control causes viewfinder resolution to be ignored. Task-number: QTBUG-32743 Change-Id: I1de3ca9c6543937cb62f73cb64a81d23b0d5c4c9 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-09-0643-767/+639
|\| | | | | | | | | | | Change-Id: I87da2a6655784bcaf76dd73992c8b874853b1fc7
| * | DirectShow: Fix clang-tidy warnings about else after returnFriedemann Kleint2018-09-0513-476/+373
| | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-052-19/+13
| | | | | | | | | | | | | | | | | | | | | - Replace by range-based for Change-Id: Ie73bf5b6e1ebd90e4db653af0791ec88b68ed883 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | DirectShow: Fix clang-tidy warnings about C-style castsFriedemann Kleint2018-09-053-17/+23
| | | | | | | | | | | | | | | | | | | | | Replace by reinterpret_cast<>. Change-Id: Iebcac7858d875e2d6f53db21489d86beb19ba947 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * | DirectShow: Fix clang-tidy warnings about class definitionsFriedemann Kleint2018-09-0533-255/+230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-073-6/+48
|\| | | | | | | Change-Id: I4f6a59c4b9af45bfc0a5aeec8092c0d4e8fd3b2e
| * DirectShow: Notify if camera has been unpluggedVal Doroshchuk2018-08-023-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If being used camera has been disconnected, state and status will remain like it is still active. Also no events are sent. Previously to fix this the camera needed to be unloaded and loaded again manually. IMediaEvent provides an ability to catch device removal notification with EC_DEVICE_LOST event. Since ISampleGrabber is used to get buffers. Added a fix to check if no buffers received for some time afterwards check for EC_DEVICE_LOST event. In case if the device is lost, the camera should be unloaded. Change-Id: I3a5edf00ce8ee25d8b06800fdad833a722bdba0d Task-number: QTBUG-68035 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * DirectShow: Postpone setting camera image processing param if not readyVal Doroshchuk2018-08-022-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Setting camera image processing parameters fails if the graph builder is not ready. We avoid this race condition by having a list of pending parameter changes which is applied when graph builder has been created. Task-number: QTBUG-69143 Change-Id: I5702ea5a2dceacff333fcf8dce05372a0208b8d9 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@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-256-30/+30
| | | | | | | | 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-2413-205/+79
| | | | | | | | | | | | | | | | | | | | | 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>
* DirectShowPlayerService: Proper check of DirectShowUtils::connectFilters's ↵Oliver Wolff2018-04-171-2/+2
| | | | | | | | | | | result The function returns a bool no HRESULT. Neither SUCCEEDED nor FAILED returns the proper result when fed with a bool. Change-Id: Ic46957f1f2c9098afac2e216fe5ef2dd1dee00a6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* DirectShowUtils::findUnconnectedPin: Try other pins if matchPin failsOliver Wolff2018-04-171-3/+0
| | | | | | | | | | If matchPin fails for one of the pins (for whatever reason), the loop can just continue and check whether another unconnected pin can be found. If this check fails for every pin, false will be returned in the end. Change-Id: I1a58a26633b43052f3963212932d789d4800c714 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* DirectShowUtils::connectFilters: Return false if every pin failsOliver Wolff2018-04-171-3/+3
| | | | | | | | If every pin connection fails, the result of the function should be false. It does not matter if graph->EnumFilters(&f); failed or succeeded. Change-Id: I87ec6bcda5d5dbe60154b39e21c73af1dd06fe3d Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* DirectShowUtils::matchPin: Return false on connection mismatchOliver Wolff2018-04-171-1/+1
| | | | | | | | | If the pin's connection state does not match shouldBeConnected, the function has to return false instead of checking the result of the isPinConnected call. Change-Id: Id15f054d5847434a5bb06b91bbc1455c6fdd2ded Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* DirectShow: Add warning when not supported playback rate appliedVal Doroshchuk2018-03-221-1/+4
| | | | | | | | | | | | IMediaSeeking::SetRate() may return an error when not supported rate is being applied. Added a warning to inform user about incorrect rate value also fixed a bug when the rate has been always fell back to 1.0 instead of previous value. Task-number: QTBUG-55354 Change-Id: I85fb5572cba6920b461a023aef1bc09a981ab033 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* DirectShow: Emit an error if QCamera::start() failsVal Doroshchuk2018-03-213-13/+29
| | | | | | | | | | | | | | | | | | | If a camera is not started successfully, then an error() should be emitted. After an error the camera's state will be QCamera::UnloadedState and status will be QCamera::UnloadedStatus. The error signal is handled when the camera is unable to set following states: QCamera::UnloadedState, QCamera::LoadedState or QCamera::LoadingState. Thus additionally to QCamera::start() an error can be emitted even when QCamera::load(), QCamera::unload(), or QCamera::stop() is called. Task-number: QTBUG-51825 Change-Id: Ib5ea08ed7983ea49a7bf8c0321cc5266a68d9144 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* DirectShow: Add the zoom controlChristian Stromme2018-01-225-2/+309
| | | | | | | | | | Makes is possible to to control the zoom value, if the camera supports it. [ChangeLog][DirectShow] Added camera zoom support. Change-Id: I7a24c7fefb947bdcfc3ff8f755aa761135cc6fde Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* DirectShow: Add video probe support for the cameraChristian Stromme2018-01-224-0/+52
| | | | | | | | | | This change makes it possible to use the QVideoProbe class with the camera. [ChangeLog][DirectShow] Added support for video probes in the camera. Change-Id: Ib353e80e68ea2dcc5b33fd81863f4b6613257e45 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* DirectShow: Add camera image capture controlsChristian Stromme2018-01-2210-11/+328
| | | | | | | | | | Adds controls for setting the capture destination and buffer format. [ChangeLog][DirectShow] Added support for setting the capture destination and format. Change-Id: I7420ea5dce9bf1bef391b6ba3a1537bedfbcf52d Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* DirectShow: Add exposure controlChristian Stromme2018-01-225-9/+530
| | | | | | | | | | Makes it possible to manually control the shutter speed and/or the aperture on cameras that supports it. [ChangeLog][DirectShow] Added support for manual camera exposure control Change-Id: I340964f899fec365df870834b230c1d743ceb2e8 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-202-27/+8
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/avfoundation/mediaplayer/avfmediaplayersession.h src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm Change-Id: Ic43fb2a805ed9f0f2ea48993d47859716f1f11b4
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-182-27/+8
| |\ | | | | | | | | | Change-Id: I7566f543ce11ff6cddc4d17e2c258a582f365b65
| | * Revert "DirectShow: Fix memory leak in CLSID_FilterGraph"v5.9.4Christian Strømme2018-01-152-27/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reverted commit brakes rendering on video on Windows; only the first frame is delivered. This reverts commit 8ec92863f13061c3dd2d56376eddfe258915589f. Task-number: QTBUG-65736 Change-Id: I298da5803efe13d0f17868714393cc9b1760b4a7 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-064-10/+35
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I5acdc7e0bd3729b80522dfff0f388cf2507fb111
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-062-8/+27
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I3d6e69f3f99b2f0a0e2c29ffdd02176e1f22304e