stillcap实现过程中遇到的问题及解决方法。
实现过程参考了http://blog.csdn.net/yangpan011/article/details/52596705 。及directshow中stillcap源码。
1、头文件
IGraphBuilder需添加 dshow.h 头文件
ISampleGrabber需添加qedit.h 头文件
2、编译出现如下错误
1>wcam_grab.obj : error LNK2001: 无法解析的外部符号 _CLSID_SampleGrabber
1>wcam_grab.obj : error LNK2001: 无法解析的外部符号 _CLSID_CaptureGraphBuilder2
1>wcam_grab.obj : error LNK2001: 无法解析的外部符号 _IID_ICaptureGraphBuilder2
在链接器->输入中 :strmiids.lib ,然后添加该lib所在路径
编译显示无法解析的外部符号:FreeMediaType()
需添加strmbasd.lib及streambasd路径
3。
m_pGrabber.CoCreateInstance() m_pGrabber返回值为00000
需在m_pGrabber.CoCreateInstance()加
hr=CoInitialize(0);