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