在实时视频上叠加位图
您好,我想在实时视频上叠加位图。我正在尝试使用 directshow 示例来做到这一点。 我编辑了 PlayCapMonker 示例并添加了一些函数来启用此功能。 中解释的程序执行此操作
我按照下面链接http://www.ureader.com/msg/ 1471251.aspx
现在我遇到错误
错误 2 错误 C4430:缺少类型说明符 - 假定为 int。注意:C++ 不支持default-int
错误 3 错误 C4430:缺少类型说明符 - 假定为 int。注意:C++ 不支持default-int
错误 5 错误 C4430:缺少类型说明符 - 假定为 int。注意:C++ 不支持default-int
错误 6 错误 C4430:缺少类型说明符 - 假定为 int。注意:C++ 不支持default-int
错误 8 错误 C4430:缺少类型说明符 - 假定为 int。注意:C++ 不支持default-int
错误 9 错误 C4430:缺少类型说明符 - 假定为 int。注意:C++ 不支持default-int
错误 21 错误 C4430:缺少类型说明符 - 假定为 int。注意:C++ 不支持default-int
错误 22 错误 C4430:缺少类型说明符 - 假定为 int。注意:C++ 不支持default-int
错误 26 错误 C4430:缺少类型说明符 - 假定为 int。注意:C++ 不支持default-int
错误 27 错误 C4430:缺少类型说明符 - 假定为 int。注意:C++ 不支持default-int 错误 36 错误 C2228:“.m_alpha”左侧必须具有类/结构/联合
错误 38 错误 C2227:“->SetAlphaBitmap”的左侧必须指向类/结构/联合/泛型类型
错误 7 错误 C2146:语法错误:缺少 ';'在标识符“Pool”之前 错误 4 错误 C2146:语法错误:缺少 ';'在标识符“格式”之前 c:\Program Files\Microsoft Platform SDK\include\Vmr9.h 368 PlayCapMoniker 错误 1 错误 C2143:语法错误:缺少 ';'在“”
之前 错误 20 错误 C2143:语法错误:缺少 ';'在“”之前
错误 25 错误 C2143:语法错误:缺少 ';'在“*”之前
错误 30 错误 C2065:“g_pMixerBitmap”:未声明的标识符
错误 33 错误 C2065:“g_pMixerBitmap”:未声明的标识符
错误 37 错误 C2065:“g_pMixerBitmap”:未声明的标识符
错误 31 错误 C2065:“g_hbm”:未声明的标识符
错误 32 错误 C2065:“g_hbm”:未声明的标识符
错误 35 错误 C2065:“config”:未声明的标识符
错误 10 错误 C2061:语法错误:标识符“IDirect3DSurface9”
错误 11 错误 C2061:语法错误:标识符“IDirect3DSurface9”
错误 12 错误 C2061:语法错误:标识符“IDirect3DSurface9”
错误 13 错误 C2061:语法错误:标识符“IDirect3DSurface9”
错误 16 错误 C2061:语法错误:标识符“IDirect3DSurface9”
错误 19 错误 C2061:语法错误:标识符“IDirect3DSurface9”
错误 23 错误 C2061:语法错误:标识符“IDirect3DSurface9”
错误 24 错误 C2061:语法错误:标识符“IDirect3DSurface9”
错误 28 错误 C2061:语法错误:标识符“IDirect3DSurface9”
错误 29 错误 C2061:语法错误:标识符“IDirect3DSurface9”
错误 14 错误 C2061:语法错误:标识符“IDirect3DDevice9”
错误 15 错误 C2061:语法错误:标识符“IDirect3DDevice9” 错误 17 错误 C2061:语法错误:标识符“IDirect3DDevice9”
错误 18 错误 C2061:语法错误:标识符“IDirect3DDevice9”
错误 34 错误 C2039:“pDDS”:不是“_VMR9AlphaBitmap”SDK\Samples\Multimedia\DirectShow\Capture\PlayCapMoniker\PlayCapMoniker.cpp 的成员 263 PlayCapMoniker
Hi i want to Overlay bitmap on live video. Iam trying to do this with the directshow sample.
I edited PlayCapMonker sample and added some functions to enable this.
i did this with the procedure explained in below link
http://www.ureader.com/msg/1471251.aspx
Now i am gettting errors
Error 2 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 5 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 6 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 8 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 9 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 21 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 22 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 26 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 27 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error 36 error C2228: left of '.m_alpha' must have class/struct/union
Error 38 error C2227: left of '->SetAlphaBitmap' must point to class/struct/union/generic type
Error 7 error C2146: syntax error : missing ';' before identifier 'Pool'
Error 4 error C2146: syntax error : missing ';' before identifier 'Format' c:\Program Files\Microsoft Platform SDK\include\Vmr9.h 368 PlayCapMoniker
Error 1 error C2143: syntax error : missing ';' before ''
Error 20 error C2143: syntax error : missing ';' before ''
Error 25 error C2143: syntax error : missing ';' before '*'
Error 30 error C2065: 'g_pMixerBitmap' : undeclared identifier
Error 33 error C2065: 'g_pMixerBitmap' : undeclared identifier
Error 37 error C2065: 'g_pMixerBitmap' : undeclared identifier
Error 31 error C2065: 'g_hbm' : undeclared identifier
Error 32 error C2065: 'g_hbm' : undeclared identifier
Error 35 error C2065: 'config' : undeclared identifier
Error 10 error C2061: syntax error : identifier 'IDirect3DSurface9'
Error 11 error C2061: syntax error : identifier 'IDirect3DSurface9'
Error 12 error C2061: syntax error : identifier 'IDirect3DSurface9'
Error 13 error C2061: syntax error : identifier 'IDirect3DSurface9'
Error 16 error C2061: syntax error : identifier 'IDirect3DSurface9'
Error 19 error C2061: syntax error : identifier 'IDirect3DSurface9'
Error 23 error C2061: syntax error : identifier 'IDirect3DSurface9'
Error 24 error C2061: syntax error : identifier 'IDirect3DSurface9'
Error 28 error C2061: syntax error : identifier 'IDirect3DSurface9'
Error 29 error C2061: syntax error : identifier 'IDirect3DSurface9'
Error 14 error C2061: syntax error : identifier 'IDirect3DDevice9'
Error 15 error C2061: syntax error : identifier 'IDirect3DDevice9'
Error 17 error C2061: syntax error : identifier 'IDirect3DDevice9'
Error 18 error C2061: syntax error : identifier 'IDirect3DDevice9'
Error 34 error C2039: 'pDDS' : is not a member of '_VMR9AlphaBitmap' SDK\Samples\Multimedia\DirectShow\Capture\PlayCapMoniker\PlayCapMoniker.cpp 263 PlayCapMoniker
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个众所周知的问题(意思是:google 会是你的朋友),涉及各种头文件(qedit.h、d3d9.h、vmr.h)之间的冲突。例如,请参阅 http://tmhare.mvps.org/faqs.htm#qed 。
G
来自 tmhare 网站的 内容:
您的包含文件列表中可能也有。这是一个已知问题,解决方法是将使用 VMR9 的代码和使用 DES 以及 IMediaDet 等相关函数的代码拆分为两个单独的源文件。这意味着您不能将任一头文件放入预编译头(例如 stdafx.h)中。
查德拉克在新闻组上发布了替代解决方案。他使用下面的#define 来避免冲突:
This is a well-known issue (meaning: google would have been your friend), involving a clash between various header files (qedit.h, d3d9.h, vmr.h). See http://tmhare.mvps.org/faqs.htm#qed for example.
G
content from tmhare's site:
You probably also have in your include file list. This is a known issue and the workaround is to split your code that uses VMR9 and the code that uses DES and related functions like IMediaDet into two separate source files. This means that you can't put either header file in a precompiled header such as stdafx.h.
An alternative solution was posted on the newsgroups by chadderack. He uses the #define below so that the conflicts are avoided: