我正在尝试将某个DMO插入到我的DirectShow图中。我已经使用适当的接口封装了这个DMO:
ATL::CComPtr< IBaseFilter > spDMOWrapper;
ATL::CComPtr< IDMOWrapperFilter > spDMOWrapperEx;
if(FAILED(hr = spDMOWrapper.CoCreateInstance(CLSID_DMOWrapperFilter)))
return hr;
if(FAILED(hr = spDMOWrapper.QueryInterface(&spDMOWrapperEx)))
return hr;
IDMOWrapperFilter->Init(SomeDMO)
connecting pins and so on
if(FAILED(hr = pGraph->AddFilter(spDMOWrapper, L"WM DMO Video Encoder")))
return hr;下面的问题在相同的输入上随机出现,
qasf.dll!CMediaWrapperFilter::NewSample()使用我的DMO中实现的"Flush“函数重新初始化我的样本的时间戳。
我不确定到底发生了什么,但据我所能说,没有任何差距,在简短的剪辑中,DMO工作得很好。如果你们想检查callstack:
DMO::Compression::Mainconcept::H264Encoder::Flush() Line 1165 C++
qasf.dll!CMediaWrapperFilter::NewSample() + 0x48 bytes
qasf.dll!CWrapperInputPin::Receive() + 0x16 bytes
Filters::Helpers::CPipeOutT<Filters::Helpers::CGenericPipe>::Deliver(IMediaSample * pSample) Line 383 + 0x20 bytes C++
Filters::Helpers::CPipeInT<Filters::Helpers::CGenericPipe,Filters::Helpers::CGenericInputPin>::Receive(IMediaSample * pSample) Line 178 + 0x23 bytes C++
CBaseOutputPin::Deliver(IMediaSample * pSample) Line 2695 + 0x20 bytes C++除了解决这个问题之外,我更感兴趣的是让CMediaWrapperFilter认为他需要将样本的时间戳清零的原因。
谢谢你的帮忙!
发布于 2012-08-03 16:17:38
这就是DMO Wrapper Filter的行为。如果在流式传输时发现底层DMO不再生成输出,但仍不接受新输入,则筛选器刷新DMO并指示流错误。
https://stackoverflow.com/questions/11706852
复制相似问题