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