开发者

Writing a .wmv file using WMA sf filter

开发者 https://www.devze.com 2023-01-03 10:08 出处:网络
I am trying to create an output .wmv file using WM Asf writer filter.Here is my code . IBaseFilter* pASFWriter;

I am trying to create an output .wmv file using WM Asf writer filter.Here is my code .

IBaseFilter* pASFWriter; CoCreateInstance(CLSID_WMAsfWriter,NULL,CLSCTX_INPROC_SERVER,IID_IBaseFilter,(void**) (&pASFWriter));

pGraphBuilder->AddFilter(pASFWriter,L"FileWriter");

IFileSinkFilter *pSink2=NULL;

pASFWriter->QueryInterface(IID_IFileSinkFilter,(void**)&pSink2); pSink2->SetFileName(OUTFILENAME,NULL);

开发者_运维技巧

All of the above return S_OK however there is no file created .I am not able to understand why this is so?


All you're doing here is creating a DirectShow filter and setting it up to write to a file. Nothing will happen until the filter is connected to other filters that supply it with data and the graph is run. The file won't be created until the first valid data is received.

See this MDSN topic for more information.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号