summaryrefslogtreecommitdiffstats
path: root/src/plugins/directshow/common
diff options
context:
space:
mode:
authorVal Doroshchuk <valentyn.doroshchuk@qt.io>2018-11-28 16:03:46 +0100
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2019-01-15 08:46:37 +0000
commit94921e0fd8b9904e7472ae9546fa82e3eca55407 (patch)
treea3c2166e35aaa1588584af15d4794a73cc73a1d6 /src/plugins/directshow/common
parent4eb0a083cbadca2d24d2382e159864b2980e425f (diff)
DirectShow: Fix video and audio probes in media player
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>
Diffstat (limited to 'src/plugins/directshow/common')
-rw-r--r--src/plugins/directshow/common/directshowutils.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/directshow/common/directshowutils.cpp b/src/plugins/directshow/common/directshowutils.cpp
index 8f3f321e7..d1c1d42ab 100644
--- a/src/plugins/directshow/common/directshowutils.cpp
+++ b/src/plugins/directshow/common/directshowutils.cpp
@@ -56,8 +56,10 @@ bool DirectShowUtils::isPinConnected(IPin *pin, HRESULT *hrOut)
hrOut = &hr;
*hrOut = pin->ConnectedTo(&connectedPin);
- if (*hrOut == VFW_E_NOT_CONNECTED) // Not an error in this case
+ if (*hrOut == VFW_E_NOT_CONNECTED) { // Not an error in this case
*hrOut = S_OK;
+ return false;
+ }
if (FAILED(*hrOut)) {
qCDebug(qtDirectShowPlugin, "Querying pin connection failed!");
@@ -282,7 +284,7 @@ bool DirectShowUtils::connectFilters(IGraphBuilder *graph,
// Try to connect to the upstream filter first.
if (findAndConnect(upstreamFilter))
- return false;
+ return true;
const auto getFilters = [graph, hrOut]() -> IEnumFilters * {
IEnumFilters *f = nullptr;