gdi32: Return the full DIB height in GetImage instead of clipping to the visible...
[wine] / include / wine / strmbase.h
1 /*
2  * Header file for Wine's strmbase implementation
3  *
4  * Copyright 2003 Robert Shearman
5  * Copyright 2010 Aric Stewart, CodeWeavers
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2.1 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20  */
21
22 HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE * pDest, const AM_MEDIA_TYPE *pSrc);
23 void WINAPI FreeMediaType(AM_MEDIA_TYPE * pMediaType);
24 AM_MEDIA_TYPE * WINAPI CreateMediaType(AM_MEDIA_TYPE const * pSrc);
25 void WINAPI DeleteMediaType(AM_MEDIA_TYPE * pMediaType);
26
27 /* Pin functions */
28
29 typedef struct BasePin
30 {
31         IPin IPin_iface;
32         LONG refCount;
33         LPCRITICAL_SECTION pCritSec;
34         PIN_INFO pinInfo;
35         IPin * pConnectedTo;
36         AM_MEDIA_TYPE mtCurrent;
37         REFERENCE_TIME tStart;
38         REFERENCE_TIME tStop;
39         double dRate;
40
41         const struct BasePinFuncTable* pFuncsTable;
42 } BasePin;
43
44 typedef HRESULT (WINAPI *BasePin_CheckMediaType)(BasePin *This, const AM_MEDIA_TYPE *pmt);
45 typedef HRESULT (WINAPI *BasePin_AttemptConnection)(BasePin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt);
46 typedef LONG (WINAPI *BasePin_GetMediaTypeVersion)(BasePin *This);
47 typedef HRESULT (WINAPI *BasePin_GetMediaType)(BasePin *This, int iPosition, AM_MEDIA_TYPE *amt);
48
49 typedef struct BasePinFuncTable {
50         /* Required for Input Pins*/
51         BasePin_CheckMediaType pfnCheckMediaType;
52         /* Required for Output Pins*/
53         BasePin_AttemptConnection pfnAttemptConnection;
54         /* Required for BasePinImpl_EnumMediaTypes */
55         BasePin_GetMediaTypeVersion pfnGetMediaTypeVersion;
56         BasePin_GetMediaType pfnGetMediaType;
57 } BasePinFuncTable;
58
59 typedef struct BaseOutputPin
60 {
61         /* inheritance C style! */
62         BasePin pin;
63         IMemInputPin * pMemInputPin;
64
65         const struct BaseOutputPinFuncTable* pFuncsTable;
66 } BaseOutputPin;
67
68 typedef HRESULT (WINAPI *BaseOutputPin_DecideBufferSize)(BaseOutputPin *This, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest);
69 typedef HRESULT (WINAPI *BaseOutputPin_DecideAllocator)(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc);
70 typedef HRESULT (WINAPI *BaseOutputPin_BreakConnect)(BaseOutputPin * This);
71
72 typedef struct BaseOutputPinFuncTable {
73         /* Required for BaseOutputPinImpl_DecideAllocator */
74         BaseOutputPin_DecideBufferSize pfnDecideBufferSize;
75         /* Required for BaseOutputPinImpl_AttemptConnection */
76         BaseOutputPin_DecideAllocator pfnDecideAllocator;
77         BaseOutputPin_BreakConnect pfnBreakConnect;
78 } BaseOutputPinFuncTable;
79
80 typedef struct BaseInputPin
81 {
82         /* inheritance C style! */
83         BasePin pin;
84
85         IMemInputPin IMemInputPin_iface;
86         IMemAllocator * pAllocator;
87         BOOL flushing, end_of_stream;
88         IMemAllocator *preferred_allocator;
89
90         const struct BaseInputPinFuncTable* pFuncsTable;
91 } BaseInputPin;
92
93 typedef HRESULT (WINAPI *BaseInputPin_Receive)(BaseInputPin *This, IMediaSample *pSample);
94
95 typedef struct BaseInputPinFuncTable {
96         /* Optional */
97         BaseInputPin_Receive pfnReceive;
98 } BaseInputPinFuncTable;
99
100 /* Base Pin */
101 HRESULT WINAPI BasePinImpl_GetMediaType(BasePin *This, int iPosition, AM_MEDIA_TYPE *pmt);
102 LONG WINAPI BasePinImpl_GetMediaTypeVersion(BasePin *This);
103 ULONG WINAPI BasePinImpl_AddRef(IPin * iface);
104 HRESULT WINAPI BasePinImpl_Disconnect(IPin * iface);
105 HRESULT WINAPI BasePinImpl_ConnectedTo(IPin * iface, IPin ** ppPin);
106 HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt);
107 HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin * iface, PIN_INFO * pInfo);
108 HRESULT WINAPI BasePinImpl_QueryDirection(IPin * iface, PIN_DIRECTION * pPinDir);
109 HRESULT WINAPI BasePinImpl_QueryId(IPin * iface, LPWSTR * Id);
110 HRESULT WINAPI BasePinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt);
111 HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum);
112 HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin);
113 HRESULT WINAPI BasePinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
114
115 /* Base Output Pin */
116 HRESULT WINAPI BaseOutputPinImpl_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv);
117 ULONG WINAPI BaseOutputPinImpl_Release(IPin * iface);
118 HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
119 HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
120 HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface);
121 HRESULT WINAPI BaseOutputPinImpl_EndOfStream(IPin * iface);
122 HRESULT WINAPI BaseOutputPinImpl_BeginFlush(IPin * iface);
123 HRESULT WINAPI BaseOutputPinImpl_EndFlush(IPin * iface);
124
125 HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(BaseOutputPin * This, IMediaSample ** ppSample, REFERENCE_TIME * tStart, REFERENCE_TIME * tStop, DWORD dwFlags);
126 HRESULT WINAPI BaseOutputPinImpl_Deliver(BaseOutputPin * This, IMediaSample * pSample);
127 HRESULT WINAPI BaseOutputPinImpl_BreakConnect(BaseOutputPin * This);
128 HRESULT WINAPI BaseOutputPinImpl_Active(BaseOutputPin * This);
129 HRESULT WINAPI BaseOutputPinImpl_Inactive(BaseOutputPin * This);
130 HRESULT WINAPI BaseOutputPinImpl_InitAllocator(BaseOutputPin *This, IMemAllocator **pMemAlloc);
131 HRESULT WINAPI BaseOutputPinImpl_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc);
132 HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(BasePin *This, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
133
134 HRESULT WINAPI BaseOutputPin_Construct(const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO * pPinInfo, const BasePinFuncTable* pBaseFuncsTable, const BaseOutputPinFuncTable* pBaseOutputFuncsTable, LPCRITICAL_SECTION pCritSec, IPin ** ppPin);
135
136 /* Base Input Pin */
137 HRESULT WINAPI BaseInputPinImpl_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv);
138 ULONG   WINAPI BaseInputPinImpl_Release(IPin * iface);
139 HRESULT WINAPI BaseInputPinImpl_Connect(IPin * iface, IPin * pConnector, const AM_MEDIA_TYPE * pmt);
140 HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt);
141 HRESULT WINAPI BaseInputPinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt);
142 HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin * iface);
143 HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin * iface);
144 HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface);
145 HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
146
147 HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, const PIN_INFO * pPinInfo, const BasePinFuncTable* pBaseFuncsTable, const BaseInputPinFuncTable* pBaseInputFuncsTable, LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin ** ppPin);
148
149 typedef struct BaseFilter
150 {
151         IBaseFilter IBaseFilter_iface;
152         LONG refCount;
153         CRITICAL_SECTION csFilter;
154
155         FILTER_STATE state;
156         REFERENCE_TIME rtStreamStart;
157         IReferenceClock * pClock;
158         FILTER_INFO filterInfo;
159         CLSID clsid;
160         LONG pinVersion;
161
162         const struct BaseFilterFuncTable* pFuncsTable;
163 } BaseFilter;
164
165 typedef IPin* (WINAPI *BaseFilter_GetPin)(BaseFilter* iface, int iPosition);
166 typedef LONG (WINAPI *BaseFilter_GetPinCount)(BaseFilter* iface);
167 typedef LONG (WINAPI *BaseFilter_GetPinVersion)(BaseFilter* iface);
168
169 typedef struct BaseFilterFuncTable {
170         /* Required */
171         BaseFilter_GetPin pfnGetPin;
172         BaseFilter_GetPinCount pfnGetPinCount;
173 } BaseFilterFuncTable;
174
175 HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv);
176 ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter * iface);
177 ULONG WINAPI BaseFilterImpl_Release(IBaseFilter * iface);
178 HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter * iface, CLSID * pClsid);
179 HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState );
180 HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock);
181 HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter * iface, IReferenceClock **ppClock);
182 HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter * iface, IEnumPins **ppEnum);
183 HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *pInfo);
184 HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter * iface, IFilterGraph *pGraph, LPCWSTR pName );
185 HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo);
186
187 LONG WINAPI BaseFilterImpl_GetPinVersion(BaseFilter* This);
188 VOID WINAPI BaseFilterImpl_IncrementPinVersion(BaseFilter* This);
189
190 HRESULT WINAPI BaseFilter_Init(BaseFilter * This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable* pBaseFuncsTable);
191
192 /* Enums */
193 HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enumFunc, BasePin_GetMediaTypeVersion versionFunc, IEnumMediaTypes ** ppEnum);
194
195 HRESULT WINAPI EnumPins_Construct(BaseFilter *base,  BaseFilter_GetPin receive_pin, BaseFilter_GetPinCount receive_pincount, BaseFilter_GetPinVersion receive_version, IEnumPins ** ppEnum);
196
197 /* Transform Filter */
198 typedef struct TransformFilter
199 {
200         BaseFilter filter;
201
202         IPin **ppPins;
203         ULONG npins;
204         AM_MEDIA_TYPE pmt;
205         CRITICAL_SECTION csReceive;
206
207         const struct TransformFilterFuncTable * pFuncsTable;
208         struct QualityControlImpl *qcimpl;
209 } TransformFilter;
210
211 typedef HRESULT (WINAPI *TransformFilter_DecideBufferSize) (TransformFilter *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest);
212 typedef HRESULT (WINAPI *TransformFilter_StartStreaming) (TransformFilter *iface);
213 typedef HRESULT (WINAPI *TransformFilter_StopStreaming) (TransformFilter *iface);
214 typedef HRESULT (WINAPI *TransformFilter_Receive) (TransformFilter* iface, IMediaSample* pIn);
215 typedef HRESULT (WINAPI *TransformFilter_CompleteConnect) (TransformFilter *iface, PIN_DIRECTION dir, IPin *pPin);
216 typedef HRESULT (WINAPI *TransformFilter_BreakConnect) (TransformFilter *iface, PIN_DIRECTION dir);
217 typedef HRESULT (WINAPI *TransformFilter_SetMediaType) (TransformFilter *iface, PIN_DIRECTION dir, const AM_MEDIA_TYPE *pMediaType);
218 typedef HRESULT (WINAPI *TransformFilter_CheckInputType) (TransformFilter *iface, const AM_MEDIA_TYPE *pMediaType);
219 typedef HRESULT (WINAPI *TransformFilter_EndOfStream) (TransformFilter *iface);
220 typedef HRESULT (WINAPI *TransformFilter_BeginFlush) (TransformFilter *iface);
221 typedef HRESULT (WINAPI *TransformFilter_EndFlush) (TransformFilter *iface);
222 typedef HRESULT (WINAPI *TransformFilter_NewSegment) (TransformFilter *iface,
223 REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
224 typedef HRESULT (WINAPI *TransformFilter_Notify) (TransformFilter *iface, IBaseFilter *sender, Quality qm);
225
226 typedef struct TransformFilterFuncTable {
227         /* Required */
228         TransformFilter_DecideBufferSize pfnDecideBufferSize;
229         /* Optional */
230         TransformFilter_StartStreaming pfnStartStreaming;
231         TransformFilter_Receive pfnReceive;
232         TransformFilter_StopStreaming pfnStopStreaming;
233         TransformFilter_CheckInputType pfnCheckInputType;
234         TransformFilter_SetMediaType pfnSetMediaType;
235         TransformFilter_CompleteConnect pfnCompleteConnect;
236         TransformFilter_BreakConnect pfnBreakConnect;
237         TransformFilter_EndOfStream pfnEndOfStream;
238         TransformFilter_BeginFlush pfnBeginFlush;
239         TransformFilter_EndFlush pfnEndFlush;
240         TransformFilter_NewSegment pfnNewSegment;
241         TransformFilter_Notify pfnNotify;
242 } TransformFilterFuncTable;
243
244 HRESULT WINAPI TransformFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv);
245 ULONG WINAPI TransformFilterImpl_Release(IBaseFilter * iface);
246 HRESULT WINAPI TransformFilterImpl_Stop(IBaseFilter * iface);
247 HRESULT WINAPI TransformFilterImpl_Pause(IBaseFilter * iface);
248 HRESULT WINAPI TransformFilterImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart);
249 HRESULT WINAPI TransformFilterImpl_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin **ppPin);
250 HRESULT WINAPI TransformFilterImpl_Notify(TransformFilter *iface, IBaseFilter *sender, Quality qm);
251
252 HRESULT TransformFilter_Construct( const IBaseFilterVtbl *filterVtbl, LONG filter_size, const CLSID* pClsid, const TransformFilterFuncTable* pFuncsTable, IBaseFilter ** ppTransformFilter);
253
254 /* Source Seeking */
255 typedef HRESULT (WINAPI *SourceSeeking_ChangeRate)(IMediaSeeking *iface);
256 typedef HRESULT (WINAPI *SourceSeeking_ChangeStart)(IMediaSeeking *iface);
257 typedef HRESULT (WINAPI *SourceSeeking_ChangeStop)(IMediaSeeking *iface);
258
259 typedef struct SourceSeeking
260 {
261         IMediaSeeking IMediaSeeking_iface;
262
263         ULONG refCount;
264         SourceSeeking_ChangeStop fnChangeStop;
265         SourceSeeking_ChangeStart fnChangeStart;
266         SourceSeeking_ChangeRate fnChangeRate;
267         DWORD dwCapabilities;
268         double dRate;
269         LONGLONG llCurrent, llStop, llDuration;
270         GUID timeformat;
271         PCRITICAL_SECTION crst;
272 } SourceSeeking;
273
274 HRESULT SourceSeeking_Init(SourceSeeking *pSeeking, const IMediaSeekingVtbl *Vtbl, SourceSeeking_ChangeStop fnChangeStop, SourceSeeking_ChangeStart fnChangeStart, SourceSeeking_ChangeRate fnChangeRate, PCRITICAL_SECTION crit_sect);
275
276 HRESULT WINAPI SourceSeekingImpl_GetCapabilities(IMediaSeeking * iface, DWORD * pCapabilities);
277 HRESULT WINAPI SourceSeekingImpl_CheckCapabilities(IMediaSeeking * iface, DWORD * pCapabilities);
278 HRESULT WINAPI SourceSeekingImpl_IsFormatSupported(IMediaSeeking * iface, const GUID * pFormat);
279 HRESULT WINAPI SourceSeekingImpl_QueryPreferredFormat(IMediaSeeking * iface, GUID * pFormat);
280 HRESULT WINAPI SourceSeekingImpl_GetTimeFormat(IMediaSeeking * iface, GUID * pFormat);
281 HRESULT WINAPI SourceSeekingImpl_IsUsingTimeFormat(IMediaSeeking * iface, const GUID * pFormat);
282 HRESULT WINAPI SourceSeekingImpl_SetTimeFormat(IMediaSeeking * iface, const GUID * pFormat);
283 HRESULT WINAPI SourceSeekingImpl_GetDuration(IMediaSeeking * iface, LONGLONG * pDuration);
284 HRESULT WINAPI SourceSeekingImpl_GetStopPosition(IMediaSeeking * iface, LONGLONG * pStop);
285 HRESULT WINAPI SourceSeekingImpl_GetCurrentPosition(IMediaSeeking * iface, LONGLONG * pCurrent);
286 HRESULT WINAPI SourceSeekingImpl_ConvertTimeFormat(IMediaSeeking * iface, LONGLONG * pTarget, const GUID * pTargetFormat, LONGLONG Source, const GUID * pSourceFormat);
287 HRESULT WINAPI SourceSeekingImpl_SetPositions(IMediaSeeking * iface, LONGLONG * pCurrent, DWORD dwCurrentFlags, LONGLONG * pStop, DWORD dwStopFlags);
288 HRESULT WINAPI SourceSeekingImpl_GetPositions(IMediaSeeking * iface, LONGLONG * pCurrent, LONGLONG * pStop);
289 HRESULT WINAPI SourceSeekingImpl_GetAvailable(IMediaSeeking * iface, LONGLONG * pEarliest, LONGLONG * pLatest);
290 HRESULT WINAPI SourceSeekingImpl_SetRate(IMediaSeeking * iface, double dRate);
291 HRESULT WINAPI SourceSeekingImpl_GetRate(IMediaSeeking * iface, double * dRate);
292 HRESULT WINAPI SourceSeekingImpl_GetPreroll(IMediaSeeking * iface, LONGLONG * pPreroll);
293
294 /* PosPassThru */
295 HRESULT WINAPI RendererPosPassThru_RegisterMediaTime(IUnknown *iface, REFERENCE_TIME start);
296 HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface);
297 HRESULT WINAPI RendererPosPassThru_EOS(IUnknown *iface);
298
299 HRESULT WINAPI CreatePosPassThru(IUnknown* pUnkOuter, BOOL bRenderer, IPin *pPin, IUnknown **ppPassThru);
300 HRESULT WINAPI PosPassThru_Construct(IUnknown* pUnkOuter, LPVOID *ppPassThru);
301
302 /* Filter Registration */
303
304 typedef REGPINTYPES AMOVIESETUP_MEDIATYPE;
305 typedef REGFILTERPINS AMOVIESETUP_PIN;
306
307 typedef struct AMOVIESETUP_FILTER {
308         const CLSID *clsid;
309         const WCHAR *name;
310         DWORD merit;
311         UINT pins;
312         const AMOVIESETUP_PIN *pPin;
313 } AMOVIESETUP_FILTER, *LPAMOVIESETUP_FILTER;
314
315 typedef IUnknown *(CALLBACK *LPFNNewCOMObject)(LPUNKNOWN pUnkOuter, HRESULT *phr);
316 typedef void (CALLBACK *LPFNInitRoutine)(BOOL bLoading, const CLSID *rclsid);
317
318 typedef struct tagFactoryTemplate {
319         const WCHAR *m_Name;
320         const CLSID *m_ClsID;
321         LPFNNewCOMObject m_lpfnNew;
322         LPFNInitRoutine m_lpfnInit;
323         const AMOVIESETUP_FILTER *m_pAMovieSetup_Filter;
324 } FactoryTemplate;
325
326 HRESULT WINAPI AMovieDllRegisterServer2(BOOL bRegister);
327 HRESULT WINAPI AMovieSetupRegisterFilter2(const AMOVIESETUP_FILTER *pFilter, IFilterMapper2  *pIFM2, BOOL  bRegister);
328
329 /* Output Queue */
330 typedef struct tagOutputQueue {
331     CRITICAL_SECTION csQueue;
332
333     BaseOutputPin * pInputPin;
334
335     HANDLE hThread;
336     HANDLE hProcessQueue;
337
338     LONG lBatchSize;
339     BOOL bBatchExact;
340     BOOL bTerminate;
341     BOOL bSendAnyway;
342
343     struct list *SampleList;
344
345     const struct OutputQueueFuncTable* pFuncsTable;
346 } OutputQueue;
347
348 typedef DWORD (WINAPI *OutputQueue_ThreadProc)(OutputQueue *This);
349
350 typedef struct OutputQueueFuncTable
351 {
352     OutputQueue_ThreadProc pfnThreadProc;
353 } OutputQueueFuncTable;
354
355 HRESULT WINAPI OutputQueue_Construct( BaseOutputPin *pInputPin, BOOL bAuto,
356     BOOL bQueue, LONG lBatchSize, BOOL bBatchExact, DWORD dwPriority,
357     const OutputQueueFuncTable* pFuncsTable, OutputQueue **ppOutputQueue );
358 HRESULT WINAPI OutputQueue_Destroy(OutputQueue *pOutputQueue);
359 HRESULT WINAPI OutputQueue_ReceiveMultiple(OutputQueue *pOutputQueue, IMediaSample **ppSamples, LONG nSamples, LONG *nSamplesProcessed);
360 HRESULT WINAPI OutputQueue_Receive(OutputQueue *pOutputQueue, IMediaSample *pSample);
361 VOID WINAPI OutputQueue_EOS(OutputQueue *pOutputQueue);
362 VOID WINAPI OutputQueue_SendAnyway(OutputQueue *pOutputQueue);
363 DWORD WINAPI OutputQueueImpl_ThreadProc(OutputQueue *pOutputQueue);
364
365 typedef struct tagBaseWindow
366 {
367         HWND hWnd;
368         LONG Width;
369         LONG Height;
370         HINSTANCE hInstance;
371         LPWSTR pClassName;
372         DWORD ClassStyles;
373         DWORD WindowStyles;
374         DWORD WindowStylesEx;
375         HDC hDC;
376
377         const struct BaseWindowFuncTable* pFuncsTable;
378 } BaseWindow;
379
380 typedef LPWSTR (WINAPI *BaseWindow_GetClassWindowStyles)(BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx);
381 typedef RECT (WINAPI *BaseWindow_GetDefaultRect)(BaseWindow *This);
382 typedef BOOL (WINAPI *BaseWindow_PossiblyEatMessage)(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam);
383 typedef LRESULT (WINAPI *BaseWindow_OnReceiveMessage)(BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam);
384 typedef BOOL (WINAPI *BaseWindow_OnSize)(BaseWindow *This, LONG Height, LONG Width);
385
386 typedef struct BaseWindowFuncTable
387 {
388         /* Required */
389         BaseWindow_GetClassWindowStyles pfnGetClassWindowStyles;
390         BaseWindow_GetDefaultRect pfnGetDefaultRect;
391         /* Optional, WinProc Related */
392         BaseWindow_OnReceiveMessage pfnOnReceiveMessage;
393         BaseWindow_PossiblyEatMessage pfnPossiblyEatMessage;
394         BaseWindow_OnSize pfnOnSize;
395 } BaseWindowFuncTable;
396
397 HRESULT WINAPI BaseWindow_Init(BaseWindow *pBaseWindow, const BaseWindowFuncTable* pFuncsTable);
398 HRESULT WINAPI BaseWindow_Destroy(BaseWindow *pBaseWindow);
399
400 HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This);
401 HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This);
402 RECT WINAPI BaseWindowImpl_GetDefaultRect(BaseWindow *This);
403 LRESULT WINAPI BaseWindowImpl_OnReceiveMessage(BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam);
404 BOOL WINAPI BaseWindowImpl_OnSize(BaseWindow *This, LONG Height, LONG Width);
405
406 typedef struct{
407     ITypeInfo *pTypeInfo;
408 } BaseDispatch;
409
410 HRESULT WINAPI BaseDispatch_Init(BaseDispatch *This, REFIID riid);
411 HRESULT WINAPI BaseDispatch_Destroy(BaseDispatch *This);
412 HRESULT WINAPI BaseDispatchImpl_GetIDsOfNames(BaseDispatch *This, REFIID riid, OLECHAR **rgszNames, UINT cNames, LCID lcid, DISPID *rgdispid);
413 HRESULT WINAPI BaseDispatchImpl_GetTypeInfo(BaseDispatch *This, REFIID riid, UINT itinfo, LCID lcid, ITypeInfo **pptinfo);
414 HRESULT WINAPI BaseDispatchImpl_GetTypeInfoCount(BaseDispatch *This, UINT *pctinfo);
415
416 #ifdef __IVideoWindow_FWD_DEFINED__
417 typedef struct tagBaseControlWindow
418 {
419         BaseWindow baseWindow;
420         IVideoWindow IVideoWindow_iface;
421         BaseDispatch baseDispatch;
422
423         BOOL AutoShow;
424         HWND hwndDrain;
425         HWND hwndOwner;
426         BaseFilter* pFilter;
427         CRITICAL_SECTION* pInterfaceLock;
428         BasePin*  pPin;
429 } BaseControlWindow;
430
431 HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, const IVideoWindowVtbl *lpVtbl, BaseFilter *owner, CRITICAL_SECTION *lock, BasePin* pPin, const BaseWindowFuncTable* pFuncsTable);
432 HRESULT WINAPI BaseControlWindow_Destroy(BaseControlWindow *pControlWindow);
433
434 BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam);
435 HRESULT WINAPI BaseControlWindowImpl_GetTypeInfoCount(IVideoWindow *iface, UINT*pctinfo);
436 HRESULT WINAPI BaseControlWindowImpl_GetTypeInfo(IVideoWindow *iface, UINT iTInfo, LCID lcid, ITypeInfo**ppTInfo);
437 HRESULT WINAPI BaseControlWindowImpl_GetIDsOfNames(IVideoWindow *iface, REFIID riid, LPOLESTR*rgszNames, UINT cNames, LCID lcid, DISPID*rgDispId);
438 HRESULT WINAPI BaseControlWindowImpl_Invoke(IVideoWindow *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS*pDispParams, VARIANT*pVarResult, EXCEPINFO*pExepInfo, UINT*puArgErr);
439 HRESULT WINAPI BaseControlWindowImpl_put_Caption(IVideoWindow *iface, BSTR strCaption);
440 HRESULT WINAPI BaseControlWindowImpl_get_Caption(IVideoWindow *iface, BSTR *strCaption);
441 HRESULT WINAPI BaseControlWindowImpl_put_WindowStyle(IVideoWindow *iface, LONG WindowStyle);
442 HRESULT WINAPI BaseControlWindowImpl_get_WindowStyle(IVideoWindow *iface, LONG *WindowStyle);
443 HRESULT WINAPI BaseControlWindowImpl_put_WindowStyleEx(IVideoWindow *iface, LONG WindowStyleEx);
444 HRESULT WINAPI BaseControlWindowImpl_get_WindowStyleEx(IVideoWindow *iface, LONG *WindowStyleEx);
445 HRESULT WINAPI BaseControlWindowImpl_put_AutoShow(IVideoWindow *iface, LONG AutoShow);
446 HRESULT WINAPI BaseControlWindowImpl_get_AutoShow(IVideoWindow *iface, LONG *AutoShow);
447 HRESULT WINAPI BaseControlWindowImpl_put_WindowState(IVideoWindow *iface, LONG WindowState);
448 HRESULT WINAPI BaseControlWindowImpl_get_WindowState(IVideoWindow *iface, LONG *WindowState);
449 HRESULT WINAPI BaseControlWindowImpl_put_BackgroundPalette(IVideoWindow *iface, LONG BackgroundPalette);
450 HRESULT WINAPI BaseControlWindowImpl_get_BackgroundPalette(IVideoWindow *iface, LONG *pBackgroundPalette);
451 HRESULT WINAPI BaseControlWindowImpl_put_Visible(IVideoWindow *iface, LONG Visible);
452 HRESULT WINAPI BaseControlWindowImpl_get_Visible(IVideoWindow *iface, LONG *pVisible);
453 HRESULT WINAPI BaseControlWindowImpl_put_Left(IVideoWindow *iface, LONG Left);
454 HRESULT WINAPI BaseControlWindowImpl_get_Left(IVideoWindow *iface, LONG *pLeft);
455 HRESULT WINAPI BaseControlWindowImpl_put_Width(IVideoWindow *iface, LONG Width);
456 HRESULT WINAPI BaseControlWindowImpl_get_Width(IVideoWindow *iface, LONG *pWidth);
457 HRESULT WINAPI BaseControlWindowImpl_put_Top(IVideoWindow *iface, LONG Top);
458 HRESULT WINAPI BaseControlWindowImpl_get_Top(IVideoWindow *iface, LONG *pTop);
459
460 HRESULT WINAPI BaseControlWindowImpl_put_Height(IVideoWindow *iface, LONG Height);
461 HRESULT WINAPI BaseControlWindowImpl_get_Height(IVideoWindow *iface, LONG *pHeight);
462 HRESULT WINAPI BaseControlWindowImpl_put_Owner(IVideoWindow *iface, OAHWND Owner);
463 HRESULT WINAPI BaseControlWindowImpl_get_Owner(IVideoWindow *iface, OAHWND *Owner);
464 HRESULT WINAPI BaseControlWindowImpl_put_MessageDrain(IVideoWindow *iface, OAHWND Drain);
465 HRESULT WINAPI BaseControlWindowImpl_get_MessageDrain(IVideoWindow *iface, OAHWND *Drain);
466 HRESULT WINAPI BaseControlWindowImpl_get_BorderColor(IVideoWindow *iface, LONG *Color);
467 HRESULT WINAPI BaseControlWindowImpl_put_BorderColor(IVideoWindow *iface, LONG Color);
468 HRESULT WINAPI BaseControlWindowImpl_get_FullScreenMode(IVideoWindow *iface, LONG *FullScreenMode);
469 HRESULT WINAPI BaseControlWindowImpl_put_FullScreenMode(IVideoWindow *iface, LONG FullScreenMode);
470 HRESULT WINAPI BaseControlWindowImpl_SetWindowForeground(IVideoWindow *iface, LONG Focus);
471 HRESULT WINAPI BaseControlWindowImpl_SetWindowPosition(IVideoWindow *iface, LONG Left, LONG Top, LONG Width, LONG Height);
472 HRESULT WINAPI BaseControlWindowImpl_GetWindowPosition(IVideoWindow *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight);
473 HRESULT WINAPI BaseControlWindowImpl_NotifyOwnerMessage(IVideoWindow *iface, OAHWND hwnd, LONG uMsg, LONG_PTR wParam, LONG_PTR lParam);
474 HRESULT WINAPI BaseControlWindowImpl_GetMinIdealImageSize(IVideoWindow *iface, LONG *pWidth, LONG *pHeight);
475 HRESULT WINAPI BaseControlWindowImpl_GetMaxIdealImageSize(IVideoWindow *iface, LONG *pWidth, LONG *pHeight);
476 HRESULT WINAPI BaseControlWindowImpl_GetRestorePosition(IVideoWindow *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight);
477 HRESULT WINAPI BaseControlWindowImpl_HideCursor(IVideoWindow *iface, LONG HideCursor);
478 HRESULT WINAPI BaseControlWindowImpl_IsCursorHidden(IVideoWindow *iface, LONG *CursorHidden);
479 #endif
480
481 #ifdef __IBasicVideo_FWD_DEFINED__
482 #ifdef __amvideo_h__
483 typedef struct tagBaseControlVideo
484 {
485         IBasicVideo IBasicVideo_iface;
486         BaseDispatch baseDispatch;
487
488         BaseFilter* pFilter;
489         CRITICAL_SECTION* pInterfaceLock;
490         BasePin*  pPin;
491
492         const struct BaseControlVideoFuncTable* pFuncsTable;
493 } BaseControlVideo;
494
495 typedef HRESULT (WINAPI *BaseControlVideo_GetSourceRect)(BaseControlVideo* This, RECT *pSourceRect);
496 typedef HRESULT (WINAPI *BaseControlVideo_GetStaticImage)(BaseControlVideo* This, LONG *pBufferSize, LONG *pDIBImage);
497 typedef HRESULT (WINAPI *BaseControlVideo_GetTargetRect)(BaseControlVideo* This, RECT *pTargetRect);
498 typedef VIDEOINFOHEADER* (WINAPI *BaseControlVideo_GetVideoFormat)(BaseControlVideo* This);
499 typedef HRESULT (WINAPI *BaseControlVideo_IsDefaultSourceRect)(BaseControlVideo* This);
500 typedef HRESULT (WINAPI *BaseControlVideo_IsDefaultTargetRect)(BaseControlVideo* This);
501 typedef HRESULT (WINAPI *BaseControlVideo_SetDefaultSourceRect)(BaseControlVideo* This);
502 typedef HRESULT (WINAPI *BaseControlVideo_SetDefaultTargetRect)(BaseControlVideo* This);
503 typedef HRESULT (WINAPI *BaseControlVideo_SetSourceRect)(BaseControlVideo* This, RECT *pSourceRect);
504 typedef HRESULT (WINAPI *BaseControlVideo_SetTargetRect)(BaseControlVideo* This, RECT *pTargetRect);
505
506 typedef struct BaseControlVideoFuncTable {
507         /* Required */
508         BaseControlVideo_GetSourceRect pfnGetSourceRect;
509         BaseControlVideo_GetStaticImage pfnGetStaticImage;
510         BaseControlVideo_GetTargetRect pfnGetTargetRect;
511         BaseControlVideo_GetVideoFormat pfnGetVideoFormat;
512         BaseControlVideo_IsDefaultSourceRect pfnIsDefaultSourceRect;
513         BaseControlVideo_IsDefaultTargetRect pfnIsDefaultTargetRect;
514         BaseControlVideo_SetDefaultSourceRect pfnSetDefaultSourceRect;
515         BaseControlVideo_SetDefaultTargetRect pfnSetDefaultTargetRect;
516         BaseControlVideo_SetSourceRect pfnSetSourceRect;
517         BaseControlVideo_SetTargetRect pfnSetTargetRect;
518 } BaseControlVideoFuncTable;
519
520 HRESULT WINAPI BaseControlVideo_Init(BaseControlVideo *pControlVideo, const IBasicVideoVtbl *lpVtbl, BaseFilter *owner, CRITICAL_SECTION *lock, BasePin* pPin, const BaseControlVideoFuncTable* pFuncsTable);
521 HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo);
522
523 HRESULT WINAPI BaseControlVideoImpl_GetTypeInfoCount(IBasicVideo *iface, UINT*pctinfo);
524 HRESULT WINAPI BaseControlVideoImpl_GetTypeInfo(IBasicVideo *iface, UINT iTInfo, LCID lcid, ITypeInfo**ppTInfo);
525 HRESULT WINAPI BaseControlVideoImpl_GetIDsOfNames(IBasicVideo *iface, REFIID riid, LPOLESTR*rgszNames, UINT cNames, LCID lcid, DISPID*rgDispId);
526 HRESULT WINAPI BaseControlVideoImpl_Invoke(IBasicVideo *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS*pDispParams, VARIANT*pVarResult, EXCEPINFO*pExepInfo, UINT*puArgErr);
527 HRESULT WINAPI BaseControlVideoImpl_get_AvgTimePerFrame(IBasicVideo *iface, REFTIME *pAvgTimePerFrame);
528 HRESULT WINAPI BaseControlVideoImpl_get_BitRate(IBasicVideo *iface, LONG *pBitRate);
529 HRESULT WINAPI BaseControlVideoImpl_get_BitErrorRate(IBasicVideo *iface, LONG *pBitErrorRate);
530 HRESULT WINAPI BaseControlVideoImpl_get_VideoWidth(IBasicVideo *iface, LONG *pVideoWidth);
531 HRESULT WINAPI BaseControlVideoImpl_get_VideoHeight(IBasicVideo *iface, LONG *pVideoHeight);
532 HRESULT WINAPI BaseControlVideoImpl_put_SourceLeft(IBasicVideo *iface, LONG SourceLeft);
533 HRESULT WINAPI BaseControlVideoImpl_get_SourceLeft(IBasicVideo *iface, LONG *pSourceLeft);
534 HRESULT WINAPI BaseControlVideoImpl_put_SourceWidth(IBasicVideo *iface, LONG SourceWidth);
535 HRESULT WINAPI BaseControlVideoImpl_get_SourceWidth(IBasicVideo *iface, LONG *pSourceWidth);
536 HRESULT WINAPI BaseControlVideoImpl_put_SourceTop(IBasicVideo *iface, LONG SourceTop);
537 HRESULT WINAPI BaseControlVideoImpl_get_SourceTop(IBasicVideo *iface, LONG *pSourceTop);
538 HRESULT WINAPI BaseControlVideoImpl_put_SourceHeight(IBasicVideo *iface, LONG SourceHeight);
539 HRESULT WINAPI BaseControlVideoImpl_get_SourceHeight(IBasicVideo *iface, LONG *pSourceHeight);
540 HRESULT WINAPI BaseControlVideoImpl_put_DestinationLeft(IBasicVideo *iface, LONG DestinationLeft);
541 HRESULT WINAPI BaseControlVideoImpl_get_DestinationLeft(IBasicVideo *iface, LONG *pDestinationLeft);
542 HRESULT WINAPI BaseControlVideoImpl_put_DestinationWidth(IBasicVideo *iface, LONG DestinationWidth);
543 HRESULT WINAPI BaseControlVideoImpl_get_DestinationWidth(IBasicVideo *iface, LONG *pDestinationWidth);
544 HRESULT WINAPI BaseControlVideoImpl_put_DestinationTop(IBasicVideo *iface, LONG DestinationTop);
545 HRESULT WINAPI BaseControlVideoImpl_get_DestinationTop(IBasicVideo *iface, LONG *pDestinationTop);
546 HRESULT WINAPI BaseControlVideoImpl_put_DestinationHeight(IBasicVideo *iface, LONG DestinationHeight);
547 HRESULT WINAPI BaseControlVideoImpl_get_DestinationHeight(IBasicVideo *iface, LONG *pDestinationHeight);
548 HRESULT WINAPI BaseControlVideoImpl_SetSourcePosition(IBasicVideo *iface, LONG Left, LONG Top, LONG Width, LONG Height);
549 HRESULT WINAPI BaseControlVideoImpl_GetSourcePosition(IBasicVideo *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight);
550 HRESULT WINAPI BaseControlVideoImpl_SetDefaultSourcePosition(IBasicVideo *iface);
551 HRESULT WINAPI BaseControlVideoImpl_SetDestinationPosition(IBasicVideo *iface, LONG Left, LONG Top, LONG Width, LONG Height);
552 HRESULT WINAPI BaseControlVideoImpl_GetDestinationPosition(IBasicVideo *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight);
553 HRESULT WINAPI BaseControlVideoImpl_SetDefaultDestinationPosition(IBasicVideo *iface);
554 HRESULT WINAPI BaseControlVideoImpl_GetVideoSize(IBasicVideo *iface, LONG *pWidth, LONG *pHeight);
555 HRESULT WINAPI BaseControlVideoImpl_GetVideoPaletteEntries(IBasicVideo *iface, LONG StartIndex, LONG Entries, LONG *pRetrieved, LONG *pPalette);
556 HRESULT WINAPI BaseControlVideoImpl_GetCurrentImage(IBasicVideo *iface, LONG *pBufferSize, LONG *pDIBImage);
557 HRESULT WINAPI BaseControlVideoImpl_IsUsingDefaultSource(IBasicVideo *iface);
558 HRESULT WINAPI BaseControlVideoImpl_IsUsingDefaultDestination(IBasicVideo *iface);
559 #endif
560 #endif
561
562 /* BaseRenderer Filter */
563 typedef struct BaseRendererTag
564 {
565         BaseFilter filter;
566
567         BaseInputPin *pInputPin;
568         IUnknown *pPosition;
569         CRITICAL_SECTION csRenderLock;
570         HANDLE evComplete;
571         HANDLE ThreadSignal;
572         HANDLE RenderEvent;
573         IMediaSample *pMediaSample;
574
575         IQualityControl *pQSink;
576         struct QualityControlImpl *qcimpl;
577
578         const struct BaseRendererFuncTable * pFuncsTable;
579 } BaseRenderer;
580
581 typedef HRESULT (WINAPI *BaseRenderer_CheckMediaType)(BaseRenderer *This, const AM_MEDIA_TYPE *pmt);
582 typedef HRESULT (WINAPI *BaseRenderer_DoRenderSample)(BaseRenderer *This, IMediaSample *pMediaSample);
583 typedef VOID (WINAPI *BaseRenderer_OnReceiveFirstSample)(BaseRenderer *This, IMediaSample *pMediaSample);
584 typedef VOID (WINAPI *BaseRenderer_OnRenderEnd)(BaseRenderer *This, IMediaSample *pMediaSample);
585 typedef VOID (WINAPI *BaseRenderer_OnRenderStart)(BaseRenderer *This, IMediaSample *pMediaSample);
586 typedef VOID (WINAPI *BaseRenderer_OnStartStreaming)(BaseRenderer *This);
587 typedef VOID (WINAPI *BaseRenderer_OnStopStreaming)(BaseRenderer *This);
588 typedef VOID (WINAPI *BaseRenderer_OnWaitEnd)(BaseRenderer *This);
589 typedef VOID (WINAPI *BaseRenderer_OnWaitStart)(BaseRenderer *This);
590 typedef VOID (WINAPI *BaseRenderer_PrepareRender)(BaseRenderer *This);
591 typedef HRESULT (WINAPI *BaseRenderer_ShouldDrawSampleNow)(BaseRenderer *This, IMediaSample *pMediaSample, REFERENCE_TIME *pStartTime, REFERENCE_TIME *pEndTime);
592 typedef HRESULT (WINAPI *BaseRenderer_PrepareReceive)(BaseRenderer *This, IMediaSample *pMediaSample);
593 typedef HRESULT (WINAPI *BaseRenderer_EndOfStream)(BaseRenderer *This);
594 typedef HRESULT (WINAPI *BaseRenderer_BeginFlush) (BaseRenderer *This);
595 typedef HRESULT (WINAPI *BaseRenderer_EndFlush) (BaseRenderer *This);
596 typedef HRESULT (WINAPI *BaseRenderer_BreakConnect) (BaseRenderer *This);
597 typedef HRESULT (WINAPI *BaseRenderer_CompleteConnect) (BaseRenderer *This, IPin *pReceivePin);
598
599 typedef struct BaseRendererFuncTable {
600         /* Required */
601         BaseRenderer_CheckMediaType pfnCheckMediaType;
602         BaseRenderer_DoRenderSample pfnDoRenderSample;
603         /* Optional, Data Handlers */
604         BaseRenderer_OnReceiveFirstSample  pfnOnReceiveFirstSample;
605         BaseRenderer_OnRenderEnd  pfnOnRenderEnd;
606         BaseRenderer_OnRenderStart  pfnOnRenderStart;
607         BaseRenderer_OnStartStreaming  pfnOnStartStreaming;
608         BaseRenderer_OnStopStreaming  pfnOnStopStreaming;
609         BaseRenderer_OnWaitEnd  pfnOnWaitEnd;
610         BaseRenderer_OnWaitStart  pfnOnWaitStart;
611         BaseRenderer_PrepareRender  pfnPrepareRender;
612         BaseRenderer_ShouldDrawSampleNow  pfnShouldDrawSampleNow;
613         BaseRenderer_PrepareReceive pfnPrepareReceive;
614         /* Optional, Input Pin */
615         BaseRenderer_CompleteConnect pfnCompleteConnect;
616         BaseRenderer_BreakConnect pfnBreakConnect;
617         BaseRenderer_EndOfStream pfnEndOfStream;
618         BaseRenderer_BeginFlush pfnBeginFlush;
619         BaseRenderer_EndFlush pfnEndFlush;
620 } BaseRendererFuncTable;
621
622 HRESULT WINAPI BaseRendererImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv);
623 ULONG   WINAPI BaseRendererImpl_Release(IBaseFilter * iface);
624 HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSample);
625 HRESULT WINAPI BaseRendererImpl_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin **ppPin);
626 HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter * iface);
627 HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart);
628 HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface);
629 HRESULT WINAPI BaseRendererImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *clock);
630 HRESULT WINAPI BaseRendererImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState);
631 HRESULT WINAPI BaseRendererImpl_EndOfStream(BaseRenderer* iface);
632 HRESULT WINAPI BaseRendererImpl_BeginFlush(BaseRenderer* iface);
633 HRESULT WINAPI BaseRendererImpl_EndFlush(BaseRenderer* iface);
634 HRESULT WINAPI BaseRendererImpl_ClearPendingSample(BaseRenderer *iface);
635
636 HRESULT WINAPI BaseRenderer_Init(BaseRenderer *This, const IBaseFilterVtbl *Vtbl, IUnknown *pUnkOuter, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseRendererFuncTable* pBaseFuncsTable);
637
638 #ifdef __IBasicAudio_FWD_DEFINED__
639 typedef struct tagBasicAudio
640 {
641         IBasicAudio IBasicAudio_iface;
642         BaseDispatch baseDispatch;
643 } BasicAudio;
644
645 HRESULT WINAPI BasicAudio_Init(BasicAudio *This, const IBasicAudioVtbl *Vtbl);
646 HRESULT WINAPI BasicAudio_Destroy(BasicAudio *pBasicAudio);
647
648 HRESULT WINAPI BasicAudioImpl_GetTypeInfoCount(IBasicAudio *iface, UINT*pctinfo);
649 HRESULT WINAPI BasicAudioImpl_GetTypeInfo(IBasicAudio *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo);
650 HRESULT WINAPI BasicAudioImpl_GetIDsOfNames(IBasicAudio *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId);
651 HRESULT WINAPI BasicAudioImpl_Invoke(IBasicAudio *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr);
652 #endif
653
654 /* Dll Functions */
655 BOOL WINAPI STRMBASE_DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv);
656 HRESULT WINAPI STRMBASE_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
657 HRESULT WINAPI STRMBASE_DllCanUnloadNow(void);