here is the code
Its not returning an error but the filter graph later fails to render the stream. The remaining code works with other source filters, so that code is not the problem. Amazingly enough, just using IGraphBuilder::AddSourceFilter() doesnt work either.Code:HRESULT hr; pthis->HasPTZ = FALSE; pthis->PanLocation = 0; pthis->TiltLocation = 0; //----------------------------// // Create the Source Filter // //----------------------------// hr = CoCreateInstance( CLSID_WMAsfReader , NULL , CLSCTX_INPROC_SERVER , IID_IGraphBuilder , (void**)&pthis->pCapFilter); if(FAILED(hr)){ pthis->FailPoint = 1; return hr; } hr = pthis->pCapFilter->QueryInterface(IID_IFileSourceFilter , (void**)&pthis->pFileSource); if(FAILED(hr)){ MessageBox(NULL , "Failed to QueryInterface(IID_IFileSourceFilter)" , "DirectShow Error" , MB_OK); return hr; } hr = pthis->pFileSource->Load("C:/iei/test.wmv" , &pthis->MediaType); if(FAILED(hr)){ MessageBox(NULL , "Failed to Load File" , "DirectShow Error" , MB_OK); return hr; } pthis->pDecoder = pthis->pCapFilter; return hr;



LinkBack URL
About LinkBacks



