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