DirectShow加入自己filter后链接问题..

 今天想试验下,将SDK中BALL那个PushSource写成一个APP,就按<<DirectShow开发指南>>上步骤进行:

(1)先增加那个PushSource Desktop Filter:    AddFilterByID(m_pGB,CLSID_PushSourceDesktop,L"PushSource Desktop Filter",&pSplitter);

(2)找到输出PIN:   

IPin *pOut = NULL;
   hr = GetUnConnectedPin(pSplitter,PINDIR_OUTPUT,&pOut);

(3)智能连接:m_pGB->Render(pOut);

编译后报CLSID_PushSourceDesktop没定义错误,后加上头文件后再编译通过了,但又报了个错:

CFilterGraph.obj : error LNK2001: unresolved external symbol _CLSID_PushSourceDesktop
../Builds/Debug/MediaClient.exe : fatal error LNK1120: 1 unresolved externals,好郁闷啊....

后来搜索下半天才知道:原来要加个头文件:#include <initguid.h>,好晕啊....

你可能感兴趣的:(filter,output)