Added LGPL standard comment, and copyright notices where necessary.
[wine] / dlls / quartz / vidren.h
1 /*
2  * Implements CLSID_VideoRenderer.
3  *
4  * Copyright (C) Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef WINE_DSHOW_VIDREN_H
22 #define WINE_DSHOW_VIDREN_H
23
24 #include "iunk.h"
25 #include "basefilt.h"
26 #include "seekpass.h"
27
28 typedef struct CVideoRendererImpl CVideoRendererImpl;
29 typedef struct CVideoRendererPinImpl CVideoRendererPinImpl;
30
31
32 typedef struct VidRen_IBasicVideo
33 {
34         ICOM_VFIELD(IBasicVideo2);
35 } VidRen_IBasicVideo;
36
37 typedef struct VidRen_IVideoWindow
38 {
39         ICOM_VFIELD(IVideoWindow);
40 } VidRen_IVideoWindow;
41
42 struct CVideoRendererImpl
43 {
44         QUARTZ_IUnkImpl unk;
45         CBaseFilterImpl basefilter;
46         VidRen_IBasicVideo      basvid;
47         VidRen_IVideoWindow     vidwin;
48         QUARTZ_IFDelegation     qiext;
49
50         CSeekingPassThru*       pSeekPass;
51         CVideoRendererPinImpl*  pPin;
52
53         BOOL    m_fInFlush;
54
55         /* for rendering */
56         HANDLE  m_hEventInit;
57         HANDLE  m_hThread;
58         HWND    m_hwnd;
59         CRITICAL_SECTION        m_csReceive;
60         BOOL    m_bSampleIsValid;
61         BYTE*   m_pSampleData;
62         DWORD   m_cbSampleData;
63 };
64
65 struct CVideoRendererPinImpl
66 {
67         QUARTZ_IUnkImpl unk;
68         CPinBaseImpl    pin;
69         CMemInputPinBaseImpl    meminput;
70
71         CVideoRendererImpl* pRender;
72 };
73
74
75
76 #define CVideoRendererImpl_THIS(iface,member)   CVideoRendererImpl*     This = ((CVideoRendererImpl*)(((char*)iface)-offsetof(CVideoRendererImpl,member)))
77 #define CVideoRendererPinImpl_THIS(iface,member)        CVideoRendererPinImpl*  This = ((CVideoRendererPinImpl*)(((char*)iface)-offsetof(CVideoRendererPinImpl,member)))
78
79 HRESULT CVideoRendererImpl_InitIBasicVideo2( CVideoRendererImpl* This );
80 void CVideoRendererImpl_UninitIBasicVideo2( CVideoRendererImpl* This );
81 HRESULT CVideoRendererImpl_InitIVideoWindow( CVideoRendererImpl* This );
82 void CVideoRendererImpl_UninitIVideoWindow( CVideoRendererImpl* This );
83
84 HRESULT QUARTZ_CreateVideoRenderer(IUnknown* punkOuter,void** ppobj);
85 HRESULT QUARTZ_CreateVideoRendererPin(
86         CVideoRendererImpl* pFilter,
87         CRITICAL_SECTION* pcsPin,
88         CRITICAL_SECTION* pcsPinReceive,
89         CVideoRendererPinImpl** ppPin);
90
91
92 #endif  /* WINE_DSHOW_VIDREN_H */