ISampleGrabber未声明的标识符 [英] ISampleGrabber undeclared identifier

查看:147
本文介绍了ISampleGrabber未声明的标识符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行由graphEditPlus生成的代码(使用VS2010),但以下行遇到了麻烦:

I'm trying to execute a code generated by graphEditPlus (using VS2010) but having a trouble with the following line:

CComQIPtr<ISampleGrabber, &IID_ISampleGrabber> pSampleGrabber_isg(pSampleGrabber);

其中的错误是:错误C2065:"ISampleGrabber":未声明的标识符错误C2065:"IID_ISampleGrabber":未声明的标识符错误C2514:"ATL :: CComQIPtr":类没有构造函数

where the errors are: error C2065: 'ISampleGrabber' : undeclared identifier error C2065: 'IID_ISampleGrabber' : undeclared identifier error C2514: 'ATL::CComQIPtr' : class has no constructors

我尝试下载不同版本的Windows SDK(V7.1,V6.0A,V5)并设置了include/lib路径,但仍然存在相同的问题!

I tried downloading different versions of Windows SDK (V7.1, V6.0A, V5) and set the include / lib paths but still having the same problem!

是否仍支持SampleGrabber?主要是在我的代码中使用SampleGrabber来从视频捕获源中抓取帧...

Is the SampleGrabber still being supported? Mainly, the SampleGrabber is used in my code to grab frames from a video capturing source...

感谢您的帮助...

推荐答案

Microsoft不推荐使用Sample Grabber和整个DES API,但是如果您导入类型库,或者只是将声明复制到项目中,则该组件仍然可用除了一些最新的操作系统版本(Windows Server 2008?)完全消失之外,您可能还需要其他解决方案,例如从早期的SDK示例构建自己的解决方案.

Microsoft deprecated Sample Grabber and the entire DES API, however you if you import the type library, or just copy the declarations into your project - the component is still usable except some very latest OS releases (Windows Server 2008?) where it is completely gone and you might need another solution such as building your own from earlier SDK samples.

请参见

See ISampleGrabber deprecated: where can I find alternatives? for more information.

另请参见 RenderWmvVideo.cpp 与代​​码片段一起复制/粘贴并将声明重新添加到您的项目中(文件顶部的 #pragma 部分):

See also RenderWmvVideo.cpp with code fragment to copy/paste and re-add the declarations to your project (#pragma section at the top of the file):

#pragma region Windows SDK Tribute, qedit.h

struct __declspec(uuid("0579154a-2b53-4994-b0d0-e773148eff85"))
ISampleGrabberCB : IUnknown
{

...

#pragma endregion

这篇关于ISampleGrabber未声明的标识符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆