Fix off-by-one error in placing trailing \0.
[wine] / dlls / quartz / vidren.h
1 /*
2  * Implements CLSID_VideoRenderer.
3  *
4  * hidenori@a2.ctktv.ne.jp
5  */
6
7 #ifndef WINE_DSHOW_VIDREN_H
8 #define WINE_DSHOW_VIDREN_H
9
10 #include "iunk.h"
11 #include "basefilt.h"
12 #include "seekpass.h"
13
14 typedef struct CVideoRendererImpl CVideoRendererImpl;
15 typedef struct CVideoRendererPinImpl CVideoRendererPinImpl;
16
17
18 typedef struct VidRen_IBasicVideo
19 {
20         ICOM_VFIELD(IBasicVideo2);
21 } VidRen_IBasicVideo;
22
23 typedef struct VidRen_IVideoWindow
24 {
25         ICOM_VFIELD(IVideoWindow);
26 } VidRen_IVideoWindow;
27
28 struct CVideoRendererImpl
29 {
30         QUARTZ_IUnkImpl unk;
31         CBaseFilterImpl basefilter;
32         VidRen_IBasicVideo      basvid;
33         VidRen_IVideoWindow     vidwin;
34         QUARTZ_IFDelegation     qiext;
35
36         CSeekingPassThru*       pSeekPass;
37         CVideoRendererPinImpl*  pPin;
38
39         BOOL    m_fInFlush;
40
41         /* for rendering */
42         HANDLE  m_hEventInit;
43         HANDLE  m_hThread;
44         HWND    m_hwnd;
45         CRITICAL_SECTION        m_csSample;
46         BOOL    m_bSampleIsValid;
47         BYTE*   m_pSampleData;
48         DWORD   m_cbSampleData;
49 };
50
51 struct CVideoRendererPinImpl
52 {
53         QUARTZ_IUnkImpl unk;
54         CPinBaseImpl    pin;
55         CMemInputPinBaseImpl    meminput;
56
57         CVideoRendererImpl* pRender;
58 };
59
60
61
62 #define CVideoRendererImpl_THIS(iface,member)   CVideoRendererImpl*     This = ((CVideoRendererImpl*)(((char*)iface)-offsetof(CVideoRendererImpl,member)))
63 #define CVideoRendererPinImpl_THIS(iface,member)        CVideoRendererPinImpl*  This = ((CVideoRendererPinImpl*)(((char*)iface)-offsetof(CVideoRendererPinImpl,member)))
64
65 HRESULT CVideoRendererImpl_InitIBasicVideo2( CVideoRendererImpl* This );
66 void CVideoRendererImpl_UninitIBasicVideo2( CVideoRendererImpl* This );
67 HRESULT CVideoRendererImpl_InitIVideoWindow( CVideoRendererImpl* This );
68 void CVideoRendererImpl_UninitIVideoWindow( CVideoRendererImpl* This );
69
70 HRESULT QUARTZ_CreateVideoRenderer(IUnknown* punkOuter,void** ppobj);
71 HRESULT QUARTZ_CreateVideoRendererPin(
72         CVideoRendererImpl* pFilter,
73         CRITICAL_SECTION* pcsPin,
74         CVideoRendererPinImpl** ppPin);
75
76
77 #endif  /* WINE_DSHOW_VIDREN_H */