我有一个自定义源代码,可以使用简单的拓扑结构。调用QueryInterface时,堆栈如下所示:
MySource.dll!MySource::QueryInterface(const _GUID & riid, void * * ppv) Line 83 C++
mfcore.dll!CMediaEventPtr::GetUnknown(struct IMFMediaEvent *,struct _GUID const &,void * *) Unknown
mfcore.dll!CMPSourceManager::OnNewStream() Unknown
mfcore.dll!CMPSourceManager::OnSourceEvent() Unknown
mfcore.dll!CMPSourceManager::OnSourceEventAsyncCallback::Invoke(struct IMFAsyncResult *) Unknown
使用没有拓扑的相同自定义源,让IMFCaptureEngine处理它。调用QueryInterface时,堆栈如下所示:
MySource.dll!MySource::QueryInterface(const _GUID & riid, void * * ppv) Line 42 C++
mfcore.dll!CMediaEventPtr::GetUnknown(struct IMFMediaEvent *,struct _GUID const &,void * *) Unknown
mfcore.dll!CSeqSourceWrap::HandleUpdatedStream(struct IMFMediaEvent *) Unknown
mfcore.dll!CSeqSourceWrap::OnSourceEvent() Unknown
mfcore.dll!CSeqSourceWrap::OnSourceEventAsyncCallback::Invoke(struct IMFAsyncResult *) Unknown
在topo的情况下,我接到GetStreamDescriptor和RequestSample的调用,一切正常。
MySourceCPP_COM.dll!MyStream::GetStreamDescriptor(IMFStreamDescriptor * * ppStreamDescriptor) Line 187 C++
mfcore.dll!CMPSourceManager::OnNewStream() Unknown
mfcore.dll!CMPSourceManager::OnSourceEvent() Unknown
mfcore.dll!CMPSourceManager::OnSourceEventAsyncCallback::Invoke(struct IMFAsyncResult *) Unknown
MySourceCPP_COM.dll!MyStream::RequestSample(IUnknown * pToken) Line 208 C++
mfcore.dll!CMPSourceNodeInfo::RequestSample() Unknown
mfcore.dll!CMPSourceNodeInfo::GenerateData() Unknown
mfcore.dll!CMPSourceNodeInfo::ProcessSample() Unknown
mfcore.dll!CMPWalker::ProcessCommands() Unknown
mfcore.dll!CMFMediaProcessor::ProcessSample() Unknown
mfcore.dll!CMFMediaProcessorStream::_RequestSample() Unknown
mfcore.dll!CMFMediaProcessorStream::RequestSample(struct IUnknown *) Unknown
mfcore.dll!CBitPump::HandleSinkRequestSample() Unknown
mfcore.dll!CBitPump::OnSinkEvent() Unknown
mfcore.dll!CBitPump::OnSinkEventAsyncCallback::Invoke(struct IMFAsyncResult *) Unknown
在IMFCaptureEngine案例中,我从未接到任何一个调用,因此数据永远不会流动。 我看到唯一的区别是CMPSourceManager与CSeqSourceWrap。