WMF: Disabled the video probe control.

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>
This commit is contained in:
Yoann Lopes
2012-11-30 16:42:14 +01:00
committed by The Qt Project
parent 1315dcf09c
commit 6a6c9ca37c
2 changed files with 57 additions and 52 deletions

View File

@@ -115,11 +115,12 @@ QMediaControl* MFPlayerService::requestControl(const char *name)
} }
return 0; return 0;
} else if (qstrcmp(name,QMediaVideoProbeControl_iid) == 0) { } else if (qstrcmp(name,QMediaVideoProbeControl_iid) == 0) {
if (m_session) { // FIXME!! Disabled in Qt 5.0 because it is unstable
MFVideoProbeControl *probe = new MFVideoProbeControl(this); // if (m_session) {
m_session->addProbe(probe); // MFVideoProbeControl *probe = new MFVideoProbeControl(this);
return probe; // m_session->addProbe(probe);
} // return probe;
// }
return 0; return 0;
} }

View File

@@ -979,69 +979,73 @@ IMFTopology *MFPlayerSession::insertMFT(IMFTopology *topology, TOPOID outputNode
if (FAILED(topoLoader->Load(topology, &resolvedTopology, NULL))) if (FAILED(topoLoader->Load(topology, &resolvedTopology, NULL)))
break; break;
// FIXME!! VideoProbe disabled in Qt 5.0 because it is unstable.
// Commented out the following code to skip inserting the transform node
// getting the video frames.
// Get all output nodes and search for video output node. // Get all output nodes and search for video output node.
if (FAILED(resolvedTopology->GetOutputNodeCollection(&outputNodes))) // if (FAILED(resolvedTopology->GetOutputNodeCollection(&outputNodes)))
break; // break;
DWORD elementCount = 0; // DWORD elementCount = 0;
if (FAILED(outputNodes->GetElementCount(&elementCount))) // if (FAILED(outputNodes->GetElementCount(&elementCount)))
break; // break;
for (DWORD n = 0; n < elementCount; n++) { // for (DWORD n = 0; n < elementCount; n++) {
IUnknown *element = 0; // IUnknown *element = 0;
IMFTopologyNode *node = 0; // IMFTopologyNode *node = 0;
IMFTopologyNode *inputNode = 0; // IMFTopologyNode *inputNode = 0;
IMFTopologyNode *mftNode = 0; // IMFTopologyNode *mftNode = 0;
do { // do {
if (FAILED(outputNodes->GetElement(n, &element))) // if (FAILED(outputNodes->GetElement(n, &element)))
break; // break;
if (FAILED(element->QueryInterface(IID_IMFTopologyNode, (void**)&node))) // if (FAILED(element->QueryInterface(IID_IMFTopologyNode, (void**)&node)))
break; // break;
TOPOID id; // TOPOID id;
if (FAILED(node->GetTopoNodeID(&id))) // if (FAILED(node->GetTopoNodeID(&id)))
break; // break;
if (id != outputNodeId) // if (id != outputNodeId)
break; // break;
// Insert MFT between the output node and the node connected to it. // // Insert MFT between the output node and the node connected to it.
DWORD outputIndex = 0; // DWORD outputIndex = 0;
if (FAILED(node->GetInput(0, &inputNode, &outputIndex))) // if (FAILED(node->GetInput(0, &inputNode, &outputIndex)))
break; // break;
if (FAILED(MFCreateTopologyNode(MF_TOPOLOGY_TRANSFORM_NODE, &mftNode))) // if (FAILED(MFCreateTopologyNode(MF_TOPOLOGY_TRANSFORM_NODE, &mftNode)))
break; // break;
if (FAILED(mftNode->SetObject(m_videoProbeMFT))) // if (FAILED(mftNode->SetObject(m_videoProbeMFT)))
break; // break;
if (FAILED(resolvedTopology->AddNode(mftNode))) // if (FAILED(resolvedTopology->AddNode(mftNode)))
break; // break;
if (FAILED(inputNode->ConnectOutput(0, mftNode, 0))) // if (FAILED(inputNode->ConnectOutput(0, mftNode, 0)))
break; // break;
if (FAILED(mftNode->ConnectOutput(0, node, 0))) // if (FAILED(mftNode->ConnectOutput(0, node, 0)))
break; // break;
isNewTopology = true; // isNewTopology = true;
} while (false); // } while (false);
if (mftNode) // if (mftNode)
mftNode->Release(); // mftNode->Release();
if (inputNode) // if (inputNode)
inputNode->Release(); // inputNode->Release();
if (node) // if (node)
node->Release(); // node->Release();
if (element) // if (element)
element->Release(); // element->Release();
if (isNewTopology) // if (isNewTopology)
break; // break;
} // }
} while (false); } while (false);
if (outputNodes) if (outputNodes)