我的DirectShow应用程序正在使用Win7。当我将其切换到Win2008 R2服务器时,它无法初始化NullRender过滤器,错误代码为-2147221164(0x80040154
REGDB_E_CLASSNOTREG
"类未注册")。
HRESULT CDirectShowGraph::AddFilterToGraph(CComPtr<IBaseFilter>& spFilter, GUID filterGuid, LPCWSTR filterName)
{
HRESULT hr = S_OK;
//Create the filter
hr = spFilter.CoCreateInstance(filterGuid);
if (FAILED(hr))
{
CDirectShowGraph::Msg(TEXT("[CDirectShowGraph::AddFilterToGraph] Failed to initialize filter \"%s\" hr=0x%x"), filterName, hr);
return hr;
}
//Add the filter to the graph
if (FAILED(hr = m_spGraph->AddFilter(spFilter, filterName)))
{
CDirectShowGraph::Msg(TEXT("[CDirectShowGraph::AddFilterToGraph] Adding filter failed \"%s\" hr=0x%x"), filterName, hr);
return hr;
}
return hr;
}
...
m_DirectShowGraph.AddFilterToGraph( m_spNullRenderer, CLSID_NullRenderer, L"NullRender")
我也尝试重新安装Windows SDK。
当我展开DirectShow Filters节点时,甚至GraphEdit崩溃了。我尝试了DirectShowFilterManager(http://www.softella.com/dsfm/index.en.htm),它也没有在列表中显示NullRender。但是,在Win7上出现NullRender。
答案 0 :(得分:2)
微软将Null Renderer从Win Server 2008中取出(以及像Sample Grabber这样的其他过滤器 - 全部由qedit.dll
托管)。您需要查找替换,例如,可以在旧的Platform SDK中使用类似的过滤器/示例。
另见: