Added some stubs.
[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         (following interfaces are not implemented)
43                 + IMarshal
44                 + IFilterMapper2 - IFilterMapper3
45                 FIXME - Are there any missing interfaces???
46  */
47
48 #include "iunk.h"
49 #include "complist.h"
50
51
52 typedef struct FG_IPersistImpl
53 {
54         ICOM_VFIELD(IPersist);
55 } FG_IPersistImpl;
56
57 typedef struct FG_IDispatchImpl
58 {
59         ICOM_VFIELD(IDispatch);
60 } FG_IDispatchImpl;
61
62 typedef struct FG_IFilterGraph2Impl
63 {
64         ICOM_VFIELD(IFilterGraph2);
65 } FG_IFilterGraph2Impl;
66
67 typedef struct FG_IGraphVersionImpl
68 {
69         ICOM_VFIELD(IGraphVersion);
70 } FG_IGraphVersionImpl;
71
72 typedef struct FG_IGraphConfigImpl
73 {
74         ICOM_VFIELD(IGraphConfig);
75 } FG_IGraphConfigImpl;
76
77 typedef struct FG_IMediaControlImpl
78 {
79         ICOM_VFIELD(IMediaControl);
80 } FG_IMediaControlImpl;
81
82 typedef struct FG_IMediaFilterImpl
83 {
84         ICOM_VFIELD(IMediaFilter);
85 } FG_IMediaFilterImpl;
86
87 typedef struct FG_IMediaEventImpl
88 {
89         ICOM_VFIELD(IMediaEventEx);
90 } FG_IMediaEventImpl;
91
92 typedef struct FG_IMediaEventSinkImpl
93 {
94         ICOM_VFIELD(IMediaEventSink);
95 } FG_IMediaEventSinkImpl;
96
97 typedef struct FG_IMediaPositionImpl
98 {
99         ICOM_VFIELD(IMediaPosition);
100 } FG_IMediaPositionImpl;
101
102 typedef struct FG_IMediaSeekingImpl
103 {
104         ICOM_VFIELD(IMediaSeeking);
105 } FG_IMediaSeekingImpl;
106
107 typedef struct FG_IBasicVideoImpl
108 {
109         ICOM_VFIELD(IBasicVideo2);
110 } FG_IBasicVideoImpl;
111
112 typedef struct FG_IBasicAudioImpl
113 {
114         ICOM_VFIELD(IBasicAudio);
115 } FG_IBasicAudioImpl;
116
117 typedef struct FG_IVideoWindowImpl
118 {
119         ICOM_VFIELD(IVideoWindow);
120 } FG_IVideoWindowImpl;
121
122 typedef struct FilterGraph_MEDIAEVENT   FilterGraph_MEDIAEVENT;
123
124 typedef struct CFilterGraph
125 {
126         QUARTZ_IUnkImpl unk;
127         FG_IPersistImpl persist;
128         FG_IDispatchImpl        disp;
129         FG_IFilterGraph2Impl    fgraph;
130         FG_IGraphVersionImpl    graphversion;
131         FG_IGraphConfigImpl     grphconf;
132         FG_IMediaControlImpl    mediacontrol;
133         FG_IMediaFilterImpl     mediafilter;
134         FG_IMediaEventImpl      mediaevent;
135         FG_IMediaEventSinkImpl  mediaeventsink;
136         FG_IMediaPositionImpl   mediaposition;
137         FG_IMediaSeekingImpl    mediaseeking;
138         FG_IBasicVideoImpl      basvid;
139         FG_IBasicAudioImpl      basaud;
140         FG_IVideoWindowImpl     vidwin;
141
142         /* IDispatch fields. */
143         /* IFilterGraph2 fields. */
144         QUARTZ_CompList*        m_pFilterList;
145         /* IGraphVersion fields. */
146         LONG    m_lGraphVersion;
147         /* IMediaControl fields. */
148         /* IMediaFilter fields. */
149         CRITICAL_SECTION        m_csGraphState;
150         FILTER_STATE    m_stateGraph; /* must NOT accessed directly! */
151         CRITICAL_SECTION        m_csClock;
152         IReferenceClock*        m_pClock;
153         /* IMediaEvent fields. */
154         HANDLE  m_hMediaEvent;
155         CRITICAL_SECTION        m_csMediaEvents;
156         FilterGraph_MEDIAEVENT* m_pMediaEvents;
157         ULONG   m_cbMediaEventsPut;
158         ULONG   m_cbMediaEventsGet;
159         ULONG   m_cbMediaEventsMax;
160         HWND    m_hwndEventNotify;
161         long    m_lEventNotifyMsg;
162         LONG_PTR        m_lEventNotifyParam;
163         long    m_lEventNotifyFlags;
164         /* IMediaEventSink fields. */
165         /* IMediaPosition fields. */
166         /* IMediaSeeking fields. */
167         /* IBasicVideo2 fields. */
168         /* IBasicAudio fields. */
169         /* IVideoWindow fields. */
170 } CFilterGraph;
171
172 #define CFilterGraph_THIS(iface,member)         CFilterGraph*   This = ((CFilterGraph*)(((char*)iface)-offsetof(CFilterGraph,member)))
173 #define CFilterGraph_IPersist(th)               ((IPersist*)&((th)->persist))
174 #define CFilterGraph_IDispatch(th)              ((IDispatch*)&((th)->disp))
175 #define CFilterGraph_IFilterGraph2(th)          ((IFilterGraph2*)&((th)->fgraph))
176 #define CFilterGraph_IMediaControl(th)          ((IMediaControl*)&((th)->mediacontrol))
177 #define CFilterGraph_IMediaFilter(th)           ((IMediaFilter*)&((th)->mediafilter))
178 #define CFilterGraph_IMediaEventEx(th)          ((IMediaEventEx*)&((th)->mediaevent))
179 #define CFilterGraph_IMediaEventSink(th)                ((IMediaEventSink*)&((th)->mediaeventsink))
180
181 HRESULT QUARTZ_CreateFilterGraph(IUnknown* punkOuter,void** ppobj);
182
183 HRESULT CFilterGraph_InitIPersist( CFilterGraph* pfg );
184 void CFilterGraph_UninitIPersist( CFilterGraph* pfg );
185 HRESULT CFilterGraph_InitIDispatch( CFilterGraph* pfg );
186 void CFilterGraph_UninitIDispatch( CFilterGraph* pfg );
187 HRESULT CFilterGraph_InitIFilterGraph2( CFilterGraph* pfg );
188 void CFilterGraph_UninitIFilterGraph2( CFilterGraph* pfg );
189 HRESULT CFilterGraph_InitIGraphVersion( CFilterGraph* pfg );
190 void CFilterGraph_UninitIGraphVersion( CFilterGraph* pfg );
191 HRESULT CFilterGraph_InitIGraphConfig( CFilterGraph* pfg );
192 void CFilterGraph_UninitIGraphConfig( CFilterGraph* pfg );
193 HRESULT CFilterGraph_InitIMediaControl( CFilterGraph* pfg );
194 void CFilterGraph_UninitIMediaControl( CFilterGraph* pfg );
195 HRESULT CFilterGraph_InitIMediaFilter( CFilterGraph* pfg );
196 void CFilterGraph_UninitIMediaFilter( CFilterGraph* pfg );
197 HRESULT CFilterGraph_InitIMediaEventEx( CFilterGraph* pfg );
198 void CFilterGraph_UninitIMediaEventEx( CFilterGraph* pfg );
199 HRESULT CFilterGraph_InitIMediaEventSink( CFilterGraph* pfg );
200 void CFilterGraph_UninitIMediaEventSink( CFilterGraph* pfg );
201 HRESULT CFilterGraph_InitIMediaPosition( CFilterGraph* pfg );
202 void CFilterGraph_UninitIMediaPosition( CFilterGraph* pfg );
203 HRESULT CFilterGraph_InitIMediaSeeking( CFilterGraph* pfg );
204 void CFilterGraph_UninitIMediaSeeking( CFilterGraph* pfg );
205 HRESULT CFilterGraph_InitIBasicVideo2( CFilterGraph* pfg );
206 void CFilterGraph_UninitIBasicVideo2( CFilterGraph* pfg );
207 HRESULT CFilterGraph_InitIBasicAudio( CFilterGraph* pfg );
208 void CFilterGraph_UninitIBasicAudio( CFilterGraph* pfg );
209 HRESULT CFilterGraph_InitIVideoWindow( CFilterGraph* pfg );
210 void CFilterGraph_UninitIVideoWindow( CFilterGraph* pfg );
211
212
213 #endif  /* WINE_DSHOW_FGRAPH_H */