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