views:

193

answers:

1

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

+2  A: 

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:

#ifndef __D3DRM_H__
#define __D3DRM_H__
#endif

#include <dshow.h>
#include <d3d9.h>
#include <vmr9.h>
#include <qedit.h>
#include <dxerr9.h>
Geraint Davies
THe above link is not opening.