1 #ifndef WINE_DSHOW_FGRAPH_H
2 #define WINE_DSHOW_FGRAPH_H
5 implements CLSID_FilterGraph.
7 - At least, the following interfaces should be implemented:
12 + IFilterGraph - IGraphBuilder - IFilterGraph2
15 + IDispatch - IMediaControl
16 + IPersist - IMediaFilter
17 + IDispatch - IMediaEvent - IMediaEventEx
19 + IDispatch - IMediaPosition
21 + IDispatch - IBasicVideo[2] (pass to a renderer)
22 + IDispatch - IBasicAudio (pass to a renderer)
23 + IDispatch - IVideoWindow (pass to a renderer)
24 (following interfaces are not implemented)
26 + IFilterMapper2 - IFilterMapper3
27 FIXME - Are there any missing interfaces???
34 typedef struct FG_IPersistImpl
36 ICOM_VFIELD(IPersist
);
39 typedef struct FG_IDispatchImpl
41 ICOM_VFIELD(IDispatch
);
44 typedef struct FG_IFilterGraph2Impl
46 ICOM_VFIELD(IFilterGraph2
);
47 } FG_IFilterGraph2Impl
;
49 typedef struct FG_IGraphVersionImpl
51 ICOM_VFIELD(IGraphVersion
);
52 } FG_IGraphVersionImpl
;
54 typedef struct FG_IGraphConfigImpl
56 ICOM_VFIELD(IGraphConfig
);
57 } FG_IGraphConfigImpl
;
59 typedef struct FG_IMediaControlImpl
61 ICOM_VFIELD(IMediaControl
);
62 } FG_IMediaControlImpl
;
64 typedef struct FG_IMediaFilterImpl
66 ICOM_VFIELD(IMediaFilter
);
67 } FG_IMediaFilterImpl
;
69 typedef struct FG_IMediaEventImpl
71 ICOM_VFIELD(IMediaEventEx
);
74 typedef struct FG_IMediaEventSinkImpl
76 ICOM_VFIELD(IMediaEventSink
);
77 } FG_IMediaEventSinkImpl
;
79 typedef struct FG_IMediaPositionImpl
81 ICOM_VFIELD(IMediaPosition
);
82 } FG_IMediaPositionImpl
;
84 typedef struct FG_IMediaSeekingImpl
86 ICOM_VFIELD(IMediaSeeking
);
87 } FG_IMediaSeekingImpl
;
89 typedef struct FG_IBasicVideoImpl
91 ICOM_VFIELD(IBasicVideo2
);
94 typedef struct FG_IBasicAudioImpl
96 ICOM_VFIELD(IBasicAudio
);
99 typedef struct FG_IVideoWindowImpl
101 ICOM_VFIELD(IVideoWindow
);
102 } FG_IVideoWindowImpl
;
104 typedef struct FilterGraph_MEDIAEVENT FilterGraph_MEDIAEVENT
;
106 typedef struct CFilterGraph
109 FG_IPersistImpl persist
;
110 FG_IDispatchImpl disp
;
111 FG_IFilterGraph2Impl fgraph
;
112 FG_IGraphVersionImpl graphversion
;
113 FG_IGraphConfigImpl grphconf
;
114 FG_IMediaControlImpl mediacontrol
;
115 FG_IMediaFilterImpl mediafilter
;
116 FG_IMediaEventImpl mediaevent
;
117 FG_IMediaEventSinkImpl mediaeventsink
;
118 FG_IMediaPositionImpl mediaposition
;
119 FG_IMediaSeekingImpl mediaseeking
;
120 FG_IBasicVideoImpl basvid
;
121 FG_IBasicAudioImpl basaud
;
122 FG_IVideoWindowImpl vidwin
;
124 /* IDispatch fields. */
125 /* IFilterGraph2 fields. */
126 QUARTZ_CompList
* m_pFilterList
;
127 /* IGraphVersion fields. */
128 LONG m_lGraphVersion
;
129 /* IMediaControl fields. */
130 /* IMediaFilter fields. */
131 CRITICAL_SECTION m_csGraphState
;
132 FILTER_STATE m_stateGraph
; /* must NOT accessed directly! */
133 CRITICAL_SECTION m_csClock
;
134 IReferenceClock
* m_pClock
;
135 /* IMediaEvent fields. */
136 HANDLE m_hMediaEvent
;
137 CRITICAL_SECTION m_csMediaEvents
;
138 FilterGraph_MEDIAEVENT
* m_pMediaEvents
;
139 ULONG m_cbMediaEventsPut
;
140 ULONG m_cbMediaEventsGet
;
141 ULONG m_cbMediaEventsMax
;
142 HWND m_hwndEventNotify
;
143 long m_lEventNotifyMsg
;
144 LONG_PTR m_lEventNotifyParam
;
145 long m_lEventNotifyFlags
;
146 /* IMediaEventSink fields. */
147 /* IMediaPosition fields. */
148 /* IMediaSeeking fields. */
149 /* IBasicVideo2 fields. */
150 /* IBasicAudio fields. */
151 /* IVideoWindow fields. */
154 #define CFilterGraph_THIS(iface,member) CFilterGraph* This = ((CFilterGraph*)(((char*)iface)-offsetof(CFilterGraph,member)))
155 #define CFilterGraph_IPersist(th) ((IPersist*)&((th)->persist))
156 #define CFilterGraph_IDispatch(th) ((IDispatch*)&((th)->disp))
157 #define CFilterGraph_IFilterGraph2(th) ((IFilterGraph2*)&((th)->fgraph))
158 #define CFilterGraph_IMediaControl(th) ((IMediaControl*)&((th)->mediacontrol))
159 #define CFilterGraph_IMediaFilter(th) ((IMediaFilter*)&((th)->mediafilter))
160 #define CFilterGraph_IMediaEventEx(th) ((IMediaEventEx*)&((th)->mediaevent))
161 #define CFilterGraph_IMediaEventSink(th) ((IMediaEventSink*)&((th)->mediaeventsink))
163 HRESULT
QUARTZ_CreateFilterGraph(IUnknown
* punkOuter
,void** ppobj
);
165 HRESULT
CFilterGraph_InitIPersist( CFilterGraph
* pfg
);
166 void CFilterGraph_UninitIPersist( CFilterGraph
* pfg
);
167 HRESULT
CFilterGraph_InitIDispatch( CFilterGraph
* pfg
);
168 void CFilterGraph_UninitIDispatch( CFilterGraph
* pfg
);
169 HRESULT
CFilterGraph_InitIFilterGraph2( CFilterGraph
* pfg
);
170 void CFilterGraph_UninitIFilterGraph2( CFilterGraph
* pfg
);
171 HRESULT
CFilterGraph_InitIGraphVersion( CFilterGraph
* pfg
);
172 void CFilterGraph_UninitIGraphVersion( CFilterGraph
* pfg
);
173 HRESULT
CFilterGraph_InitIGraphConfig( CFilterGraph
* pfg
);
174 void CFilterGraph_UninitIGraphConfig( CFilterGraph
* pfg
);
175 HRESULT
CFilterGraph_InitIMediaControl( CFilterGraph
* pfg
);
176 void CFilterGraph_UninitIMediaControl( CFilterGraph
* pfg
);
177 HRESULT
CFilterGraph_InitIMediaFilter( CFilterGraph
* pfg
);
178 void CFilterGraph_UninitIMediaFilter( CFilterGraph
* pfg
);
179 HRESULT
CFilterGraph_InitIMediaEventEx( CFilterGraph
* pfg
);
180 void CFilterGraph_UninitIMediaEventEx( CFilterGraph
* pfg
);
181 HRESULT
CFilterGraph_InitIMediaEventSink( CFilterGraph
* pfg
);
182 void CFilterGraph_UninitIMediaEventSink( CFilterGraph
* pfg
);
183 HRESULT
CFilterGraph_InitIMediaPosition( CFilterGraph
* pfg
);
184 void CFilterGraph_UninitIMediaPosition( CFilterGraph
* pfg
);
185 HRESULT
CFilterGraph_InitIMediaSeeking( CFilterGraph
* pfg
);
186 void CFilterGraph_UninitIMediaSeeking( CFilterGraph
* pfg
);
187 HRESULT
CFilterGraph_InitIBasicVideo2( CFilterGraph
* pfg
);
188 void CFilterGraph_UninitIBasicVideo2( CFilterGraph
* pfg
);
189 HRESULT
CFilterGraph_InitIBasicAudio( CFilterGraph
* pfg
);
190 void CFilterGraph_UninitIBasicAudio( CFilterGraph
* pfg
);
191 HRESULT
CFilterGraph_InitIVideoWindow( CFilterGraph
* pfg
);
192 void CFilterGraph_UninitIVideoWindow( CFilterGraph
* pfg
);
195 #endif /* WINE_DSHOW_FGRAPH_H */