Update shell xxxAW wrapper prototypes for fixed SHLWAPI functions.
[wine] / dlls / quartz / fgraph.h
1 /*
2  * Copyright (C) Hidenori TAKESHIMA
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #ifndef WINE_DSHOW_FGRAPH_H
20 #define WINE_DSHOW_FGRAPH_H
21
22 /*
23                 implements CLSID_FilterGraph.
24
25         - At least, the following interfaces should be implemented:
26
27         IUnknown
28                 + IPersist
29                 + IDispatch
30                 + IFilterGraph - IGraphBuilder - IFilterGraph2
31                 + IGraphVersion
32                 + IGraphConfig
33                 + IDispatch - IMediaControl
34                 + IPersist - IMediaFilter
35                 + IDispatch - IMediaEvent - IMediaEventEx
36                 + IMediaEventSink
37                 + IDispatch - IMediaPosition
38                 + IMediaSeeking
39                 + IDispatch - IBasicVideo[2] (pass to a renderer)
40                 + IDispatch - IBasicAudio (pass to a renderer)
41                 + IDispatch - IVideoWindow  (pass to a renderer)
42                 + IDispatch - IAMStats
43         (following interfaces are not implemented)
44                 + IMarshal
45                 + IFilterMapper2 - IFilterMapper3
46                 FIXME - Are there any missing interfaces???
47  */
48
49 #include "iunk.h"
50 #include "complist.h"
51
52
53 typedef struct FG_IPersistImpl
54 {
55         ICOM_VFIELD(IPersist);
56 } FG_IPersistImpl;
57
58 typedef struct FG_IDispatchImpl
59 {
60         ICOM_VFIELD(IDispatch);
61 } FG_IDispatchImpl;
62
63 typedef struct FG_IFilterGraph2Impl
64 {
65         ICOM_VFIELD(IFilterGraph2);
66 } FG_IFilterGraph2Impl;
67
68 typedef struct FG_IGraphVersionImpl
69 {
70         ICOM_VFIELD(IGraphVersion);
71 } FG_IGraphVersionImpl;
72
73 typedef struct FG_IGraphConfigImpl
74 {
75         ICOM_VFIELD(IGraphConfig);
76 } FG_IGraphConfigImpl;
77
78 typedef struct FG_IMediaControlImpl
79 {
80         ICOM_VFIELD(IMediaControl);
81 } FG_IMediaControlImpl;
82
83 typedef struct FG_IMediaFilterImpl
84 {
85         ICOM_VFIELD(IMediaFilter);
86 } FG_IMediaFilterImpl;
87
88 typedef struct FG_IMediaEventImpl
89 {
90         ICOM_VFIELD(IMediaEventEx);
91 } FG_IMediaEventImpl;
92
93 typedef struct FG_IMediaEventSinkImpl
94 {
95         ICOM_VFIELD(IMediaEventSink);
96 } FG_IMediaEventSinkImpl;
97
98 typedef struct FG_IMediaPositionImpl
99 {
100         ICOM_VFIELD(IMediaPosition);
101 } FG_IMediaPositionImpl;
102
103 typedef struct FG_IMediaSeekingImpl
104 {
105         ICOM_VFIELD(IMediaSeeking);
106 } FG_IMediaSeekingImpl;
107
108 typedef struct FG_IBasicVideoImpl
109 {
110         ICOM_VFIELD(IBasicVideo2);
111 } FG_IBasicVideoImpl;
112
113 typedef struct FG_IBasicAudioImpl
114 {
115         ICOM_VFIELD(IBasicAudio);
116 } FG_IBasicAudioImpl;
117
118 typedef struct FG_IVideoWindowImpl
119 {
120         ICOM_VFIELD(IVideoWindow);
121 } FG_IVideoWindowImpl;
122
123 typedef struct FG_IAMStatsImpl
124 {
125         ICOM_VFIELD(IAMStats);
126 } FG_IAMStatsImpl;
127
128
129 typedef struct FG_FilterData
130 {
131         IBaseFilter*    pFilter;
132         IMediaPosition* pPosition;
133         IMediaSeeking*  pSeeking;
134         WCHAR*  pwszName;
135         DWORD   cbName;
136 } FG_FilterData;
137
138 typedef struct FilterGraph_MEDIAEVENT   FilterGraph_MEDIAEVENT;
139
140 typedef struct CFilterGraph
141 {
142         QUARTZ_IUnkImpl unk;
143         FG_IPersistImpl persist;
144         FG_IDispatchImpl        disp;
145         FG_IFilterGraph2Impl    fgraph;
146         FG_IGraphVersionImpl    graphversion;
147         FG_IGraphConfigImpl     grphconf;
148         FG_IMediaControlImpl    mediacontrol;
149         FG_IMediaFilterImpl     mediafilter;
150         FG_IMediaEventImpl      mediaevent;
151         FG_IMediaEventSinkImpl  mediaeventsink;
152         FG_IMediaPositionImpl   mediaposition;
153         FG_IMediaSeekingImpl    mediaseeking;
154         FG_IBasicVideoImpl      basvid;
155         FG_IBasicAudioImpl      basaud;
156         FG_IVideoWindowImpl     vidwin;
157         FG_IAMStatsImpl amstats;
158
159         /* IDispatch fields. */
160         /* IFilterGraph2 fields. */
161         CRITICAL_SECTION        m_csFilters;
162         DWORD   m_cActiveFilters;
163         FG_FilterData*          m_pActiveFilters;
164         /* IGraphVersion fields. */
165         LONG    m_lGraphVersion;
166         /* IMediaControl fields. */
167         /* IMediaFilter fields. */
168         CRITICAL_SECTION        m_csGraphState;
169         FILTER_STATE    m_stateGraph; /* must NOT accessed directly! */
170         CRITICAL_SECTION        m_csClock;
171         IReferenceClock*        m_pClock;
172         /* IMediaEvent fields. */
173         HANDLE  m_hMediaEvent;
174         CRITICAL_SECTION        m_csMediaEvents;
175         FilterGraph_MEDIAEVENT* m_pMediaEvents;
176         ULONG   m_cbMediaEventsPut;
177         ULONG   m_cbMediaEventsGet;
178         ULONG   m_cbMediaEventsMax;
179         HWND    m_hwndEventNotify;
180         long    m_lEventNotifyMsg;
181         LONG_PTR        m_lEventNotifyParam;
182         long    m_lEventNotifyFlags;
183         /* IMediaEventSink fields. */
184         /* IMediaPosition fields. */
185         /* IMediaSeeking fields. */
186         /* IBasicVideo2 fields. */
187         /* IBasicAudio fields. */
188         /* IVideoWindow fields. */
189         /* IAMStats fields. */
190 } CFilterGraph;
191
192 #define CFilterGraph_THIS(iface,member)         CFilterGraph*   This = ((CFilterGraph*)(((char*)iface)-offsetof(CFilterGraph,member)))
193 #define CFilterGraph_IPersist(th)               ((IPersist*)&((th)->persist))
194 #define CFilterGraph_IDispatch(th)              ((IDispatch*)&((th)->disp))
195 #define CFilterGraph_IFilterGraph2(th)          ((IFilterGraph2*)&((th)->fgraph))
196 #define CFilterGraph_IMediaControl(th)          ((IMediaControl*)&((th)->mediacontrol))
197 #define CFilterGraph_IMediaFilter(th)           ((IMediaFilter*)&((th)->mediafilter))
198 #define CFilterGraph_IMediaEventEx(th)          ((IMediaEventEx*)&((th)->mediaevent))
199 #define CFilterGraph_IMediaEventSink(th)                ((IMediaEventSink*)&((th)->mediaeventsink))
200
201 HRESULT QUARTZ_CreateFilterGraph(IUnknown* punkOuter,void** ppobj);
202
203 HRESULT CFilterGraph_InitIPersist( CFilterGraph* pfg );
204 void CFilterGraph_UninitIPersist( CFilterGraph* pfg );
205 HRESULT CFilterGraph_InitIDispatch( CFilterGraph* pfg );
206 void CFilterGraph_UninitIDispatch( CFilterGraph* pfg );
207 HRESULT CFilterGraph_InitIFilterGraph2( CFilterGraph* pfg );
208 void CFilterGraph_UninitIFilterGraph2( CFilterGraph* pfg );
209 HRESULT CFilterGraph_InitIGraphVersion( CFilterGraph* pfg );
210 void CFilterGraph_UninitIGraphVersion( CFilterGraph* pfg );
211 HRESULT CFilterGraph_InitIGraphConfig( CFilterGraph* pfg );
212 void CFilterGraph_UninitIGraphConfig( CFilterGraph* pfg );
213 HRESULT CFilterGraph_InitIMediaControl( CFilterGraph* pfg );
214 void CFilterGraph_UninitIMediaControl( CFilterGraph* pfg );
215 HRESULT CFilterGraph_InitIMediaFilter( CFilterGraph* pfg );
216 void CFilterGraph_UninitIMediaFilter( CFilterGraph* pfg );
217 HRESULT CFilterGraph_InitIMediaEventEx( CFilterGraph* pfg );
218 void CFilterGraph_UninitIMediaEventEx( CFilterGraph* pfg );
219 HRESULT CFilterGraph_InitIMediaEventSink( CFilterGraph* pfg );
220 void CFilterGraph_UninitIMediaEventSink( CFilterGraph* pfg );
221 HRESULT CFilterGraph_InitIMediaPosition( CFilterGraph* pfg );
222 void CFilterGraph_UninitIMediaPosition( CFilterGraph* pfg );
223 HRESULT CFilterGraph_InitIMediaSeeking( CFilterGraph* pfg );
224 void CFilterGraph_UninitIMediaSeeking( CFilterGraph* pfg );
225 HRESULT CFilterGraph_InitIBasicVideo2( CFilterGraph* pfg );
226 void CFilterGraph_UninitIBasicVideo2( CFilterGraph* pfg );
227 HRESULT CFilterGraph_InitIBasicAudio( CFilterGraph* pfg );
228 void CFilterGraph_UninitIBasicAudio( CFilterGraph* pfg );
229 HRESULT CFilterGraph_InitIVideoWindow( CFilterGraph* pfg );
230 void CFilterGraph_UninitIVideoWindow( CFilterGraph* pfg );
231 HRESULT CFilterGraph_InitIAMStats( CFilterGraph* pfg );
232 void CFilterGraph_UninitIAMStats( CFilterGraph* pfg );
233
234
235 #endif  /* WINE_DSHOW_FGRAPH_H */