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