0
即時嘗試將某個DMO插入到我的DirectShow圖中。我已經使用包裹適當的接口這DMO:將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工作得很好。 如果你們要檢查調用堆棧:
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的理由認爲他需要零樣本的時間戳。
感謝您的幫助!