ReactOS 0.4.15-dev-5666-gc548b97
strmbase.h File Reference
#include "wine/list.h"
Include dependency graph for strmbase.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  BasePin
 
struct  BasePinFuncTable
 
struct  BaseOutputPin
 
struct  BaseOutputPinFuncTable
 
struct  BaseInputPin
 
struct  BaseInputPinFuncTable
 
struct  BaseFilter
 
struct  BaseFilterFuncTable
 
struct  TransformFilter
 
struct  TransformFilterFuncTable
 
struct  SourceSeeking
 
struct  AMOVIESETUP_FILTER
 
struct  tagFactoryTemplate
 
struct  tagOutputQueue
 
struct  OutputQueueFuncTable
 
struct  tagBaseWindow
 
struct  BaseWindowFuncTable
 
struct  BaseDispatch
 
struct  BaseRendererTag
 
struct  BaseRendererFuncTable
 

Typedefs

typedef struct BasePin BasePin
 
typedef HRESULT(WINAPIBasePin_CheckMediaType) (BasePin *This, const AM_MEDIA_TYPE *pmt)
 
typedef HRESULT(WINAPIBasePin_AttemptConnection) (BasePin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
 
typedef LONG(WINAPIBasePin_GetMediaTypeVersion) (BasePin *This)
 
typedef HRESULT(WINAPIBasePin_GetMediaType) (BasePin *This, int iPosition, AM_MEDIA_TYPE *amt)
 
typedef struct BasePinFuncTable BasePinFuncTable
 
typedef struct BaseOutputPin BaseOutputPin
 
typedef HRESULT(WINAPIBaseOutputPin_DecideBufferSize) (BaseOutputPin *This, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
 
typedef HRESULT(WINAPIBaseOutputPin_DecideAllocator) (BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc)
 
typedef HRESULT(WINAPIBaseOutputPin_BreakConnect) (BaseOutputPin *This)
 
typedef struct BaseOutputPinFuncTable BaseOutputPinFuncTable
 
typedef struct BaseInputPin BaseInputPin
 
typedef HRESULT(WINAPIBaseInputPin_Receive) (BaseInputPin *This, IMediaSample *pSample)
 
typedef struct BaseInputPinFuncTable BaseInputPinFuncTable
 
typedef struct BaseFilter BaseFilter
 
typedef IPin *(WINAPIBaseFilter_GetPin) (BaseFilter *iface, int iPosition)
 
typedef LONG(WINAPIBaseFilter_GetPinCount) (BaseFilter *iface)
 
typedef LONG(WINAPIBaseFilter_GetPinVersion) (BaseFilter *iface)
 
typedef struct BaseFilterFuncTable BaseFilterFuncTable
 
typedef struct TransformFilter TransformFilter
 
typedef HRESULT(WINAPITransformFilter_DecideBufferSize) (TransformFilter *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
 
typedef HRESULT(WINAPITransformFilter_StartStreaming) (TransformFilter *iface)
 
typedef HRESULT(WINAPITransformFilter_StopStreaming) (TransformFilter *iface)
 
typedef HRESULT(WINAPITransformFilter_Receive) (TransformFilter *iface, IMediaSample *pIn)
 
typedef HRESULT(WINAPITransformFilter_CompleteConnect) (TransformFilter *iface, PIN_DIRECTION dir, IPin *pPin)
 
typedef HRESULT(WINAPITransformFilter_BreakConnect) (TransformFilter *iface, PIN_DIRECTION dir)
 
typedef HRESULT(WINAPITransformFilter_SetMediaType) (TransformFilter *iface, PIN_DIRECTION dir, const AM_MEDIA_TYPE *pMediaType)
 
typedef HRESULT(WINAPITransformFilter_CheckInputType) (TransformFilter *iface, const AM_MEDIA_TYPE *pMediaType)
 
typedef HRESULT(WINAPITransformFilter_EndOfStream) (TransformFilter *iface)
 
typedef HRESULT(WINAPITransformFilter_BeginFlush) (TransformFilter *iface)
 
typedef HRESULT(WINAPITransformFilter_EndFlush) (TransformFilter *iface)
 
typedef HRESULT(WINAPITransformFilter_NewSegment) (TransformFilter *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
 
typedef HRESULT(WINAPITransformFilter_Notify) (TransformFilter *iface, IBaseFilter *sender, Quality qm)
 
typedef struct TransformFilterFuncTable TransformFilterFuncTable
 
typedef HRESULT(WINAPISourceSeeking_ChangeRate) (IMediaSeeking *iface)
 
typedef HRESULT(WINAPISourceSeeking_ChangeStart) (IMediaSeeking *iface)
 
typedef HRESULT(WINAPISourceSeeking_ChangeStop) (IMediaSeeking *iface)
 
typedef struct SourceSeeking SourceSeeking
 
typedef REGPINTYPES AMOVIESETUP_MEDIATYPE
 
typedef REGFILTERPINS AMOVIESETUP_PIN
 
typedef struct AMOVIESETUP_FILTER AMOVIESETUP_FILTER
 
typedef struct AMOVIESETUP_FILTERLPAMOVIESETUP_FILTER
 
typedef IUnknown *(CALLBACKLPFNNewCOMObject) (LPUNKNOWN pUnkOuter, HRESULT *phr)
 
typedef void(CALLBACKLPFNInitRoutine) (BOOL bLoading, const CLSID *rclsid)
 
typedef struct tagFactoryTemplate FactoryTemplate
 
typedef struct tagOutputQueue OutputQueue
 
typedef DWORD(WINAPIOutputQueue_ThreadProc) (OutputQueue *This)
 
typedef struct OutputQueueFuncTable OutputQueueFuncTable
 
typedef struct tagBaseWindow BaseWindow
 
typedef LPWSTR(WINAPIBaseWindow_GetClassWindowStyles) (BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx)
 
typedef RECT(WINAPIBaseWindow_GetDefaultRect) (BaseWindow *This)
 
typedef BOOL(WINAPIBaseWindow_PossiblyEatMessage) (BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
typedef LRESULT(WINAPIBaseWindow_OnReceiveMessage) (BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam)
 
typedef BOOL(WINAPIBaseWindow_OnSize) (BaseWindow *This, LONG Height, LONG Width)
 
typedef struct BaseWindowFuncTable BaseWindowFuncTable
 
typedef struct BaseRendererTag BaseRenderer
 
typedef HRESULT(WINAPIBaseRenderer_CheckMediaType) (BaseRenderer *This, const AM_MEDIA_TYPE *pmt)
 
typedef HRESULT(WINAPIBaseRenderer_DoRenderSample) (BaseRenderer *This, IMediaSample *pMediaSample)
 
typedef VOID(WINAPIBaseRenderer_OnReceiveFirstSample) (BaseRenderer *This, IMediaSample *pMediaSample)
 
typedef VOID(WINAPIBaseRenderer_OnRenderEnd) (BaseRenderer *This, IMediaSample *pMediaSample)
 
typedef VOID(WINAPIBaseRenderer_OnRenderStart) (BaseRenderer *This, IMediaSample *pMediaSample)
 
typedef VOID(WINAPIBaseRenderer_OnStartStreaming) (BaseRenderer *This)
 
typedef VOID(WINAPIBaseRenderer_OnStopStreaming) (BaseRenderer *This)
 
typedef VOID(WINAPIBaseRenderer_OnWaitEnd) (BaseRenderer *This)
 
typedef VOID(WINAPIBaseRenderer_OnWaitStart) (BaseRenderer *This)
 
typedef VOID(WINAPIBaseRenderer_PrepareRender) (BaseRenderer *This)
 
typedef HRESULT(WINAPIBaseRenderer_ShouldDrawSampleNow) (BaseRenderer *This, IMediaSample *pMediaSample, REFERENCE_TIME *pStartTime, REFERENCE_TIME *pEndTime)
 
typedef HRESULT(WINAPIBaseRenderer_PrepareReceive) (BaseRenderer *This, IMediaSample *pMediaSample)
 
typedef HRESULT(WINAPIBaseRenderer_EndOfStream) (BaseRenderer *This)
 
typedef HRESULT(WINAPIBaseRenderer_BeginFlush) (BaseRenderer *This)
 
typedef HRESULT(WINAPIBaseRenderer_EndFlush) (BaseRenderer *This)
 
typedef HRESULT(WINAPIBaseRenderer_BreakConnect) (BaseRenderer *This)
 
typedef HRESULT(WINAPIBaseRenderer_CompleteConnect) (BaseRenderer *This, IPin *pReceivePin)
 
typedef struct BaseRendererFuncTable BaseRendererFuncTable
 

Functions

HRESULT WINAPI CopyMediaType (AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
 
void WINAPI FreeMediaType (AM_MEDIA_TYPE *pMediaType)
 
AM_MEDIA_TYPE *WINAPI CreateMediaType (AM_MEDIA_TYPE const *pSrc)
 
void WINAPI DeleteMediaType (AM_MEDIA_TYPE *pMediaType)
 
HRESULT WINAPI BasePinImpl_GetMediaType (BasePin *This, int iPosition, AM_MEDIA_TYPE *pmt)
 
LONG WINAPI BasePinImpl_GetMediaTypeVersion (BasePin *This)
 
ULONG WINAPI BasePinImpl_AddRef (IPin *iface)
 
HRESULT WINAPI BasePinImpl_Disconnect (IPin *iface)
 
HRESULT WINAPI BasePinImpl_ConnectedTo (IPin *iface, IPin **ppPin)
 
HRESULT WINAPI BasePinImpl_ConnectionMediaType (IPin *iface, AM_MEDIA_TYPE *pmt)
 
HRESULT WINAPI BasePinImpl_QueryPinInfo (IPin *iface, PIN_INFO *pInfo)
 
HRESULT WINAPI BasePinImpl_QueryDirection (IPin *iface, PIN_DIRECTION *pPinDir)
 
HRESULT WINAPI BasePinImpl_QueryId (IPin *iface, LPWSTR *Id)
 
HRESULT WINAPI BasePinImpl_QueryAccept (IPin *iface, const AM_MEDIA_TYPE *pmt)
 
HRESULT WINAPI BasePinImpl_EnumMediaTypes (IPin *iface, IEnumMediaTypes **ppEnum)
 
HRESULT WINAPI BasePinImpl_QueryInternalConnections (IPin *iface, IPin **apPin, ULONG *cPin)
 
HRESULT WINAPI BasePinImpl_NewSegment (IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
 
HRESULT WINAPI BaseOutputPinImpl_QueryInterface (IPin *iface, REFIID riid, LPVOID *ppv)
 
ULONG WINAPI BaseOutputPinImpl_Release (IPin *iface)
 
HRESULT WINAPI BaseOutputPinImpl_Connect (IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
 
HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection (IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
 
HRESULT WINAPI BaseOutputPinImpl_Disconnect (IPin *iface)
 
HRESULT WINAPI BaseOutputPinImpl_EndOfStream (IPin *iface)
 
HRESULT WINAPI BaseOutputPinImpl_BeginFlush (IPin *iface)
 
HRESULT WINAPI BaseOutputPinImpl_EndFlush (IPin *iface)
 
HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer (BaseOutputPin *This, IMediaSample **ppSample, REFERENCE_TIME *tStart, REFERENCE_TIME *tStop, DWORD dwFlags)
 
HRESULT WINAPI BaseOutputPinImpl_Deliver (BaseOutputPin *This, IMediaSample *pSample)
 
HRESULT WINAPI BaseOutputPinImpl_BreakConnect (BaseOutputPin *This)
 
HRESULT WINAPI BaseOutputPinImpl_Active (BaseOutputPin *This)
 
HRESULT WINAPI BaseOutputPinImpl_Inactive (BaseOutputPin *This)
 
HRESULT WINAPI BaseOutputPinImpl_InitAllocator (BaseOutputPin *This, IMemAllocator **pMemAlloc)
 
HRESULT WINAPI BaseOutputPinImpl_DecideAllocator (BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc)
 
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection (BasePin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
 
HRESULT WINAPI BaseOutputPin_Construct (const IPinVtbl *OutputPin_Vtbl, LONG outputpin_size, const PIN_INFO *pPinInfo, const BaseOutputPinFuncTable *pBaseOutputFuncsTable, LPCRITICAL_SECTION pCritSec, IPin **ppPin)
 
HRESULT WINAPI BaseOutputPin_Destroy (BaseOutputPin *This)
 
HRESULT WINAPI BaseInputPinImpl_QueryInterface (IPin *iface, REFIID riid, LPVOID *ppv)
 
ULONG WINAPI BaseInputPinImpl_Release (IPin *iface)
 
HRESULT WINAPI BaseInputPinImpl_Connect (IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
 
HRESULT WINAPI BaseInputPinImpl_ReceiveConnection (IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
 
HRESULT WINAPI BaseInputPinImpl_QueryAccept (IPin *iface, const AM_MEDIA_TYPE *pmt)
 
HRESULT WINAPI BaseInputPinImpl_EndOfStream (IPin *iface)
 
HRESULT WINAPI BaseInputPinImpl_BeginFlush (IPin *iface)
 
HRESULT WINAPI BaseInputPinImpl_EndFlush (IPin *iface)
 
HRESULT WINAPI BaseInputPinImpl_NewSegment (IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
 
HRESULT BaseInputPin_Construct (const IPinVtbl *InputPin_Vtbl, LONG inputpin_size, const PIN_INFO *pPinInfo, const BaseInputPinFuncTable *pBaseInputFuncsTable, LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin **ppPin)
 
HRESULT WINAPI BaseInputPin_Destroy (BaseInputPin *This)
 
HRESULT WINAPI BaseFilterImpl_QueryInterface (IBaseFilter *iface, REFIID riid, LPVOID *ppv)
 
ULONG WINAPI BaseFilterImpl_AddRef (IBaseFilter *iface)
 
ULONG WINAPI BaseFilterImpl_Release (IBaseFilter *iface)
 
HRESULT WINAPI BaseFilterImpl_GetClassID (IBaseFilter *iface, CLSID *pClsid)
 
HRESULT WINAPI BaseFilterImpl_GetState (IBaseFilter *iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
 
HRESULT WINAPI BaseFilterImpl_SetSyncSource (IBaseFilter *iface, IReferenceClock *pClock)
 
HRESULT WINAPI BaseFilterImpl_GetSyncSource (IBaseFilter *iface, IReferenceClock **ppClock)
 
HRESULT WINAPI BaseFilterImpl_EnumPins (IBaseFilter *iface, IEnumPins **ppEnum)
 
HRESULT WINAPI BaseFilterImpl_QueryFilterInfo (IBaseFilter *iface, FILTER_INFO *pInfo)
 
HRESULT WINAPI BaseFilterImpl_JoinFilterGraph (IBaseFilter *iface, IFilterGraph *pGraph, LPCWSTR pName)
 
HRESULT WINAPI BaseFilterImpl_QueryVendorInfo (IBaseFilter *iface, LPWSTR *pVendorInfo)
 
LONG WINAPI BaseFilterImpl_GetPinVersion (BaseFilter *This)
 
VOID WINAPI BaseFilterImpl_IncrementPinVersion (BaseFilter *This)
 
HRESULT WINAPI BaseFilter_Init (BaseFilter *This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable *pBaseFuncsTable)
 
HRESULT WINAPI BaseFilter_Destroy (BaseFilter *This)
 
HRESULT WINAPI EnumMediaTypes_Construct (BasePin *iface, BasePin_GetMediaType enumFunc, BasePin_GetMediaTypeVersion versionFunc, IEnumMediaTypes **ppEnum)
 
HRESULT WINAPI EnumPins_Construct (BaseFilter *base, BaseFilter_GetPin receive_pin, BaseFilter_GetPinCount receive_pincount, BaseFilter_GetPinVersion receive_version, IEnumPins **ppEnum)
 
HRESULT WINAPI TransformFilterImpl_QueryInterface (IBaseFilter *iface, REFIID riid, LPVOID *ppv)
 
ULONG WINAPI TransformFilterImpl_Release (IBaseFilter *iface)
 
HRESULT WINAPI TransformFilterImpl_Stop (IBaseFilter *iface)
 
HRESULT WINAPI TransformFilterImpl_Pause (IBaseFilter *iface)
 
HRESULT WINAPI TransformFilterImpl_Run (IBaseFilter *iface, REFERENCE_TIME tStart)
 
HRESULT WINAPI TransformFilterImpl_FindPin (IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
 
HRESULT WINAPI TransformFilterImpl_Notify (TransformFilter *iface, IBaseFilter *sender, Quality qm)
 
HRESULT TransformFilter_Construct (const IBaseFilterVtbl *filterVtbl, LONG filter_size, const CLSID *pClsid, const TransformFilterFuncTable *pFuncsTable, IBaseFilter **ppTransformFilter)
 
HRESULT SourceSeeking_Init (SourceSeeking *pSeeking, const IMediaSeekingVtbl *Vtbl, SourceSeeking_ChangeStop fnChangeStop, SourceSeeking_ChangeStart fnChangeStart, SourceSeeking_ChangeRate fnChangeRate, PCRITICAL_SECTION crit_sect)
 
HRESULT WINAPI SourceSeekingImpl_GetCapabilities (IMediaSeeking *iface, DWORD *pCapabilities)
 
HRESULT WINAPI SourceSeekingImpl_CheckCapabilities (IMediaSeeking *iface, DWORD *pCapabilities)
 
HRESULT WINAPI SourceSeekingImpl_IsFormatSupported (IMediaSeeking *iface, const GUID *pFormat)
 
HRESULT WINAPI SourceSeekingImpl_QueryPreferredFormat (IMediaSeeking *iface, GUID *pFormat)
 
HRESULT WINAPI SourceSeekingImpl_GetTimeFormat (IMediaSeeking *iface, GUID *pFormat)
 
HRESULT WINAPI SourceSeekingImpl_IsUsingTimeFormat (IMediaSeeking *iface, const GUID *pFormat)
 
HRESULT WINAPI SourceSeekingImpl_SetTimeFormat (IMediaSeeking *iface, const GUID *pFormat)
 
HRESULT WINAPI SourceSeekingImpl_GetDuration (IMediaSeeking *iface, LONGLONG *pDuration)
 
HRESULT WINAPI SourceSeekingImpl_GetStopPosition (IMediaSeeking *iface, LONGLONG *pStop)
 
HRESULT WINAPI SourceSeekingImpl_GetCurrentPosition (IMediaSeeking *iface, LONGLONG *pCurrent)
 
HRESULT WINAPI SourceSeekingImpl_ConvertTimeFormat (IMediaSeeking *iface, LONGLONG *pTarget, const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat)
 
HRESULT WINAPI SourceSeekingImpl_SetPositions (IMediaSeeking *iface, LONGLONG *pCurrent, DWORD dwCurrentFlags, LONGLONG *pStop, DWORD dwStopFlags)
 
HRESULT WINAPI SourceSeekingImpl_GetPositions (IMediaSeeking *iface, LONGLONG *pCurrent, LONGLONG *pStop)
 
HRESULT WINAPI SourceSeekingImpl_GetAvailable (IMediaSeeking *iface, LONGLONG *pEarliest, LONGLONG *pLatest)
 
HRESULT WINAPI SourceSeekingImpl_SetRate (IMediaSeeking *iface, double dRate)
 
HRESULT WINAPI SourceSeekingImpl_GetRate (IMediaSeeking *iface, double *dRate)
 
HRESULT WINAPI SourceSeekingImpl_GetPreroll (IMediaSeeking *iface, LONGLONG *pPreroll)
 
HRESULT WINAPI RendererPosPassThru_RegisterMediaTime (IUnknown *iface, REFERENCE_TIME start)
 
HRESULT WINAPI RendererPosPassThru_ResetMediaTime (IUnknown *iface)
 
HRESULT WINAPI RendererPosPassThru_EOS (IUnknown *iface)
 
HRESULT WINAPI CreatePosPassThru (IUnknown *pUnkOuter, BOOL bRenderer, IPin *pPin, IUnknown **ppPassThru)
 
HRESULT WINAPI PosPassThru_Construct (IUnknown *pUnkOuter, LPVOID *ppPassThru)
 
HRESULT WINAPI AMovieDllRegisterServer2 (BOOL bRegister)
 
HRESULT WINAPI AMovieSetupRegisterFilter2 (const AMOVIESETUP_FILTER *pFilter, IFilterMapper2 *pIFM2, BOOL bRegister)
 
HRESULT WINAPI OutputQueue_Construct (BaseOutputPin *pInputPin, BOOL bAuto, BOOL bQueue, LONG lBatchSize, BOOL bBatchExact, DWORD dwPriority, const OutputQueueFuncTable *pFuncsTable, OutputQueue **ppOutputQueue)
 
HRESULT WINAPI OutputQueue_Destroy (OutputQueue *pOutputQueue)
 
HRESULT WINAPI OutputQueue_ReceiveMultiple (OutputQueue *pOutputQueue, IMediaSample **ppSamples, LONG nSamples, LONG *nSamplesProcessed)
 
HRESULT WINAPI OutputQueue_Receive (OutputQueue *pOutputQueue, IMediaSample *pSample)
 
VOID WINAPI OutputQueue_EOS (OutputQueue *pOutputQueue)
 
VOID WINAPI OutputQueue_SendAnyway (OutputQueue *pOutputQueue)
 
DWORD WINAPI OutputQueueImpl_ThreadProc (OutputQueue *pOutputQueue)
 
HRESULT WINAPI BaseWindow_Init (BaseWindow *pBaseWindow, const BaseWindowFuncTable *pFuncsTable)
 
HRESULT WINAPI BaseWindow_Destroy (BaseWindow *pBaseWindow)
 
HRESULT WINAPI BaseWindowImpl_PrepareWindow (BaseWindow *This)
 
HRESULT WINAPI BaseWindowImpl_DoneWithWindow (BaseWindow *This)
 
RECT WINAPI BaseWindowImpl_GetDefaultRect (BaseWindow *This)
 
LRESULT WINAPI BaseWindowImpl_OnReceiveMessage (BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam)
 
BOOL WINAPI BaseWindowImpl_OnSize (BaseWindow *This, LONG Height, LONG Width)
 
HRESULT WINAPI BaseDispatch_Init (BaseDispatch *This, REFIID riid)
 
HRESULT WINAPI BaseDispatch_Destroy (BaseDispatch *This)
 
HRESULT WINAPI BaseDispatchImpl_GetIDsOfNames (BaseDispatch *This, REFIID riid, OLECHAR **rgszNames, UINT cNames, LCID lcid, DISPID *rgdispid)
 
HRESULT WINAPI BaseDispatchImpl_GetTypeInfo (BaseDispatch *This, REFIID riid, UINT itinfo, LCID lcid, ITypeInfo **pptinfo)
 
HRESULT WINAPI BaseDispatchImpl_GetTypeInfoCount (BaseDispatch *This, UINT *pctinfo)
 
HRESULT WINAPI BaseRendererImpl_QueryInterface (IBaseFilter *iface, REFIID riid, LPVOID *ppv)
 
ULONG WINAPI BaseRendererImpl_Release (IBaseFilter *iface)
 
HRESULT WINAPI BaseRendererImpl_Receive (BaseRenderer *This, IMediaSample *pSample)
 
HRESULT WINAPI BaseRendererImpl_FindPin (IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
 
HRESULT WINAPI BaseRendererImpl_Stop (IBaseFilter *iface)
 
HRESULT WINAPI BaseRendererImpl_Run (IBaseFilter *iface, REFERENCE_TIME tStart)
 
HRESULT WINAPI BaseRendererImpl_Pause (IBaseFilter *iface)
 
HRESULT WINAPI BaseRendererImpl_SetSyncSource (IBaseFilter *iface, IReferenceClock *clock)
 
HRESULT WINAPI BaseRendererImpl_GetState (IBaseFilter *iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
 
HRESULT WINAPI BaseRendererImpl_EndOfStream (BaseRenderer *iface)
 
HRESULT WINAPI BaseRendererImpl_BeginFlush (BaseRenderer *iface)
 
HRESULT WINAPI BaseRendererImpl_EndFlush (BaseRenderer *iface)
 
HRESULT WINAPI BaseRendererImpl_ClearPendingSample (BaseRenderer *iface)
 
HRESULT WINAPI BaseRenderer_Init (BaseRenderer *This, const IBaseFilterVtbl *Vtbl, IUnknown *pUnkOuter, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseRendererFuncTable *pBaseFuncsTable)
 
BOOL WINAPI STRMBASE_DllMain (HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
 
HRESULT WINAPI STRMBASE_DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 
HRESULT WINAPI STRMBASE_DllCanUnloadNow (void)
 

Typedef Documentation

◆ AMOVIESETUP_FILTER

◆ AMOVIESETUP_MEDIATYPE

Definition at line 319 of file strmbase.h.

◆ AMOVIESETUP_PIN

Definition at line 320 of file strmbase.h.

◆ BaseFilter

◆ BaseFilter_GetPin

typedef IPin *(WINAPI * BaseFilter_GetPin) (BaseFilter *iface, int iPosition)

Definition at line 177 of file strmbase.h.

◆ BaseFilter_GetPinCount

typedef LONG(WINAPI * BaseFilter_GetPinCount) (BaseFilter *iface)

Definition at line 178 of file strmbase.h.

◆ BaseFilter_GetPinVersion

typedef LONG(WINAPI * BaseFilter_GetPinVersion) (BaseFilter *iface)

Definition at line 179 of file strmbase.h.

◆ BaseFilterFuncTable

◆ BaseInputPin

◆ BaseInputPin_Receive

typedef HRESULT(WINAPI * BaseInputPin_Receive) (BaseInputPin *This, IMediaSample *pSample)

Definition at line 100 of file strmbase.h.

◆ BaseInputPinFuncTable

◆ BaseOutputPin

◆ BaseOutputPin_BreakConnect

typedef HRESULT(WINAPI * BaseOutputPin_BreakConnect) (BaseOutputPin *This)

Definition at line 75 of file strmbase.h.

◆ BaseOutputPin_DecideAllocator

typedef HRESULT(WINAPI * BaseOutputPin_DecideAllocator) (BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc)

Definition at line 74 of file strmbase.h.

◆ BaseOutputPin_DecideBufferSize

typedef HRESULT(WINAPI * BaseOutputPin_DecideBufferSize) (BaseOutputPin *This, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)

Definition at line 73 of file strmbase.h.

◆ BaseOutputPinFuncTable

◆ BasePin

◆ BasePin_AttemptConnection

typedef HRESULT(WINAPI * BasePin_AttemptConnection) (BasePin *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)

Definition at line 49 of file strmbase.h.

◆ BasePin_CheckMediaType

typedef HRESULT(WINAPI * BasePin_CheckMediaType) (BasePin *This, const AM_MEDIA_TYPE *pmt)

Definition at line 48 of file strmbase.h.

◆ BasePin_GetMediaType

typedef HRESULT(WINAPI * BasePin_GetMediaType) (BasePin *This, int iPosition, AM_MEDIA_TYPE *amt)

Definition at line 51 of file strmbase.h.

◆ BasePin_GetMediaTypeVersion

typedef LONG(WINAPI * BasePin_GetMediaTypeVersion) (BasePin *This)

Definition at line 50 of file strmbase.h.

◆ BasePinFuncTable

◆ BaseRenderer

◆ BaseRenderer_BeginFlush

typedef HRESULT(WINAPI * BaseRenderer_BeginFlush) (BaseRenderer *This)

Definition at line 609 of file strmbase.h.

◆ BaseRenderer_BreakConnect

typedef HRESULT(WINAPI * BaseRenderer_BreakConnect) (BaseRenderer *This)

Definition at line 611 of file strmbase.h.

◆ BaseRenderer_CheckMediaType

typedef HRESULT(WINAPI * BaseRenderer_CheckMediaType) (BaseRenderer *This, const AM_MEDIA_TYPE *pmt)

Definition at line 596 of file strmbase.h.

◆ BaseRenderer_CompleteConnect

typedef HRESULT(WINAPI * BaseRenderer_CompleteConnect) (BaseRenderer *This, IPin *pReceivePin)

Definition at line 612 of file strmbase.h.

◆ BaseRenderer_DoRenderSample

typedef HRESULT(WINAPI * BaseRenderer_DoRenderSample) (BaseRenderer *This, IMediaSample *pMediaSample)

Definition at line 597 of file strmbase.h.

◆ BaseRenderer_EndFlush

typedef HRESULT(WINAPI * BaseRenderer_EndFlush) (BaseRenderer *This)

Definition at line 610 of file strmbase.h.

◆ BaseRenderer_EndOfStream

typedef HRESULT(WINAPI * BaseRenderer_EndOfStream) (BaseRenderer *This)

Definition at line 608 of file strmbase.h.

◆ BaseRenderer_OnReceiveFirstSample

typedef VOID(WINAPI * BaseRenderer_OnReceiveFirstSample) (BaseRenderer *This, IMediaSample *pMediaSample)

Definition at line 598 of file strmbase.h.

◆ BaseRenderer_OnRenderEnd

typedef VOID(WINAPI * BaseRenderer_OnRenderEnd) (BaseRenderer *This, IMediaSample *pMediaSample)

Definition at line 599 of file strmbase.h.

◆ BaseRenderer_OnRenderStart

typedef VOID(WINAPI * BaseRenderer_OnRenderStart) (BaseRenderer *This, IMediaSample *pMediaSample)

Definition at line 600 of file strmbase.h.

◆ BaseRenderer_OnStartStreaming

typedef VOID(WINAPI * BaseRenderer_OnStartStreaming) (BaseRenderer *This)

Definition at line 601 of file strmbase.h.

◆ BaseRenderer_OnStopStreaming

typedef VOID(WINAPI * BaseRenderer_OnStopStreaming) (BaseRenderer *This)

Definition at line 602 of file strmbase.h.

◆ BaseRenderer_OnWaitEnd

typedef VOID(WINAPI * BaseRenderer_OnWaitEnd) (BaseRenderer *This)

Definition at line 603 of file strmbase.h.

◆ BaseRenderer_OnWaitStart

typedef VOID(WINAPI * BaseRenderer_OnWaitStart) (BaseRenderer *This)

Definition at line 604 of file strmbase.h.

◆ BaseRenderer_PrepareReceive

typedef HRESULT(WINAPI * BaseRenderer_PrepareReceive) (BaseRenderer *This, IMediaSample *pMediaSample)

Definition at line 607 of file strmbase.h.

◆ BaseRenderer_PrepareRender

typedef VOID(WINAPI * BaseRenderer_PrepareRender) (BaseRenderer *This)

Definition at line 605 of file strmbase.h.

◆ BaseRenderer_ShouldDrawSampleNow

typedef HRESULT(WINAPI * BaseRenderer_ShouldDrawSampleNow) (BaseRenderer *This, IMediaSample *pMediaSample, REFERENCE_TIME *pStartTime, REFERENCE_TIME *pEndTime)

Definition at line 606 of file strmbase.h.

◆ BaseRendererFuncTable

◆ BaseWindow

◆ BaseWindow_GetClassWindowStyles

typedef LPWSTR(WINAPI * BaseWindow_GetClassWindowStyles) (BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx)

Definition at line 395 of file strmbase.h.

◆ BaseWindow_GetDefaultRect

typedef RECT(WINAPI * BaseWindow_GetDefaultRect) (BaseWindow *This)

Definition at line 396 of file strmbase.h.

◆ BaseWindow_OnReceiveMessage

typedef LRESULT(WINAPI * BaseWindow_OnReceiveMessage) (BaseWindow *This, HWND hwnd, INT uMsg, WPARAM wParam, LPARAM lParam)

Definition at line 398 of file strmbase.h.

◆ BaseWindow_OnSize

typedef BOOL(WINAPI * BaseWindow_OnSize) (BaseWindow *This, LONG Height, LONG Width)

Definition at line 399 of file strmbase.h.

◆ BaseWindow_PossiblyEatMessage

typedef BOOL(WINAPI * BaseWindow_PossiblyEatMessage) (BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam)

Definition at line 397 of file strmbase.h.

◆ BaseWindowFuncTable

◆ FactoryTemplate

◆ LPAMOVIESETUP_FILTER

◆ LPFNInitRoutine

typedef void(CALLBACK * LPFNInitRoutine) (BOOL bLoading, const CLSID *rclsid)

Definition at line 331 of file strmbase.h.

◆ LPFNNewCOMObject

typedef IUnknown *(CALLBACK * LPFNNewCOMObject) (LPUNKNOWN pUnkOuter, HRESULT *phr)

Definition at line 330 of file strmbase.h.

◆ OutputQueue

◆ OutputQueue_ThreadProc

typedef DWORD(WINAPI * OutputQueue_ThreadProc) (OutputQueue *This)

Definition at line 363 of file strmbase.h.

◆ OutputQueueFuncTable

◆ SourceSeeking

◆ SourceSeeking_ChangeRate

typedef HRESULT(WINAPI * SourceSeeking_ChangeRate) (IMediaSeeking *iface)

Definition at line 270 of file strmbase.h.

◆ SourceSeeking_ChangeStart

typedef HRESULT(WINAPI * SourceSeeking_ChangeStart) (IMediaSeeking *iface)

Definition at line 271 of file strmbase.h.

◆ SourceSeeking_ChangeStop

typedef HRESULT(WINAPI * SourceSeeking_ChangeStop) (IMediaSeeking *iface)

Definition at line 272 of file strmbase.h.

◆ TransformFilter

◆ TransformFilter_BeginFlush

typedef HRESULT(WINAPI * TransformFilter_BeginFlush) (TransformFilter *iface)

Definition at line 235 of file strmbase.h.

◆ TransformFilter_BreakConnect

typedef HRESULT(WINAPI * TransformFilter_BreakConnect) (TransformFilter *iface, PIN_DIRECTION dir)

Definition at line 231 of file strmbase.h.

◆ TransformFilter_CheckInputType

typedef HRESULT(WINAPI * TransformFilter_CheckInputType) (TransformFilter *iface, const AM_MEDIA_TYPE *pMediaType)

Definition at line 233 of file strmbase.h.

◆ TransformFilter_CompleteConnect

typedef HRESULT(WINAPI * TransformFilter_CompleteConnect) (TransformFilter *iface, PIN_DIRECTION dir, IPin *pPin)

Definition at line 230 of file strmbase.h.

◆ TransformFilter_DecideBufferSize

typedef HRESULT(WINAPI * TransformFilter_DecideBufferSize) (TransformFilter *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest)

Definition at line 226 of file strmbase.h.

◆ TransformFilter_EndFlush

typedef HRESULT(WINAPI * TransformFilter_EndFlush) (TransformFilter *iface)

Definition at line 236 of file strmbase.h.

◆ TransformFilter_EndOfStream

typedef HRESULT(WINAPI * TransformFilter_EndOfStream) (TransformFilter *iface)

Definition at line 234 of file strmbase.h.

◆ TransformFilter_NewSegment

typedef HRESULT(WINAPI * TransformFilter_NewSegment) (TransformFilter *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)

Definition at line 237 of file strmbase.h.

◆ TransformFilter_Notify

typedef HRESULT(WINAPI * TransformFilter_Notify) (TransformFilter *iface, IBaseFilter *sender, Quality qm)

Definition at line 239 of file strmbase.h.

◆ TransformFilter_Receive

typedef HRESULT(WINAPI * TransformFilter_Receive) (TransformFilter *iface, IMediaSample *pIn)

Definition at line 229 of file strmbase.h.

◆ TransformFilter_SetMediaType

typedef HRESULT(WINAPI * TransformFilter_SetMediaType) (TransformFilter *iface, PIN_DIRECTION dir, const AM_MEDIA_TYPE *pMediaType)

Definition at line 232 of file strmbase.h.

◆ TransformFilter_StartStreaming

typedef HRESULT(WINAPI * TransformFilter_StartStreaming) (TransformFilter *iface)

Definition at line 227 of file strmbase.h.

◆ TransformFilter_StopStreaming

typedef HRESULT(WINAPI * TransformFilter_StopStreaming) (TransformFilter *iface)

Definition at line 228 of file strmbase.h.

◆ TransformFilterFuncTable

Function Documentation

◆ AMovieDllRegisterServer2()

HRESULT WINAPI AMovieDllRegisterServer2 ( BOOL  bRegister)

Definition at line 155 of file dllfunc.c.

156{
157 HRESULT hr;
158 int i;
159 IFilterMapper2 *pIFM2 = NULL;
160 WCHAR szFileName[MAX_PATH];
161
162 if (!GetModuleFileNameW(g_hInst, szFileName, MAX_PATH))
163 {
164 ERR("Failed to get module file name for registration\n");
165 return E_FAIL;
166 }
167
168 if (bRegister)
170
172
173 TRACE("Getting IFilterMapper2\r\n");
174 hr = CoCreateInstance(&CLSID_FilterMapper2, NULL, CLSCTX_INPROC_SERVER,
175 &IID_IFilterMapper2, (void **)&pIFM2);
176
177 for (i = 0; SUCCEEDED(hr) && i < g_cTemplates; i++)
178 hr = AMovieSetupRegisterFilter2(g_Templates[i].m_pAMovieSetup_Filter, pIFM2, bRegister);
179
180 /* release interface */
181 if (pIFM2)
182 IFilterMapper2_Release(pIFM2);
183
184 /* and clear up */
187
188 /* if unregistering, unregister all OLE servers */
189 if (SUCCEEDED(hr) && !bRegister)
191
192 return hr;
193}
#define ERR(fmt,...)
Definition: debug.h:110
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define MAX_PATH
Definition: compat.h:34
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
void WINAPI DECLSPEC_HOTPATCH CoFreeUnusedLibraries(void)
Definition: compobj.c:3701
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
static HRESULT SetupRegisterAllClasses(const FactoryTemplate *pList, int num, LPCWSTR szFileName, BOOL bRegister)
Definition: dllfunc.c:106
HRESULT WINAPI AMovieSetupRegisterFilter2(const AMOVIESETUP_FILTER *pFilter, IFilterMapper2 *pIFM2, BOOL bRegister)
Definition: dllfunc.c:134
const int g_cTemplates
Definition: qcap_main.c:145
const FactoryTemplate g_Templates[]
Definition: qcap_main.c:76
static HINSTANCE g_hInst
Definition: dllfunc.c:48
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by DllRegisterServer(), and DllUnregisterServer().

◆ AMovieSetupRegisterFilter2()

HRESULT WINAPI AMovieSetupRegisterFilter2 ( const AMOVIESETUP_FILTER pFilter,
IFilterMapper2 pIFM2,
BOOL  bRegister 
)

Definition at line 134 of file dllfunc.c.

135{
136 if (!pFilter)
137 return S_OK;
138
139 if (bRegister)
140 {
141 {
142 REGFILTER2 rf2;
143 rf2.dwVersion = 1;
144 rf2.dwMerit = pFilter->merit;
145 rf2.u.s1.cPins = pFilter->pins;
146 rf2.u.s1.rgPins = pFilter->pPin;
147
148 return IFilterMapper2_RegisterFilter(pIFM2, pFilter->clsid, pFilter->name, NULL, &CLSID_LegacyAmFilterCategory, NULL, &rf2);
149 }
150 }
151 else
152 return IFilterMapper2_UnregisterFilter(pIFM2, &CLSID_LegacyAmFilterCategory, NULL, pFilter->clsid);
153}
#define S_OK
Definition: intsafe.h:52
const CLSID * clsid
Definition: strmbase.h:323
const AMOVIESETUP_PIN * pPin
Definition: strmbase.h:327
const WCHAR * name
Definition: strmbase.h:324
DWORD dwVersion
Definition: axextend.idl:236
const REGFILTERPINS * rgPins
Definition: axextend.idl:244
ULONG cPins
Definition: axextend.idl:243
DWORD dwMerit
Definition: axextend.idl:237

Referenced by AMovieDllRegisterServer2().

◆ BaseDispatch_Destroy()

HRESULT WINAPI BaseDispatch_Destroy ( BaseDispatch This)

Definition at line 45 of file dispatch.c.

46{
47 if (This->pTypeInfo)
48 ITypeInfo_Release(This->pTypeInfo);
49 return S_OK;
50}

Referenced by BaseControlVideo_Destroy(), BaseControlWindow_Destroy(), BasicAudio_Destroy(), and SeekInner_Release().

◆ BaseDispatch_Init()

HRESULT WINAPI BaseDispatch_Init ( BaseDispatch This,
REFIID  riid 
)

Definition at line 30 of file dispatch.c.

31{
32 ITypeLib *pTypeLib;
33 HRESULT hr;
34
35 This->pTypeInfo = NULL;
36 hr = LoadRegTypeLib(&LIBID_QuartzTypeLib, 1, 0, LOCALE_SYSTEM_DEFAULT, &pTypeLib);
37 if (SUCCEEDED(hr))
38 {
39 hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, riid, &This->pTypeInfo);
40 ITypeLib_Release(pTypeLib);
41 }
42 return hr;
43}
HRESULT WINAPI LoadRegTypeLib(REFGUID rguid, WORD wVerMajor, WORD wVerMinor, LCID lcid, ITypeLib **ppTLib)
Definition: typelib.c:531
REFIID riid
Definition: atlbase.h:39
#define LOCALE_SYSTEM_DEFAULT

Referenced by BaseControlVideo_Init(), BaseControlWindow_Init(), BasicAudio_Init(), and PosPassThru_Construct().

◆ BaseDispatchImpl_GetIDsOfNames()

HRESULT WINAPI BaseDispatchImpl_GetIDsOfNames ( BaseDispatch This,
REFIID  riid,
OLECHAR **  rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgdispid 
)

Definition at line 52 of file dispatch.c.

53{
54 if (This->pTypeInfo)
55 return ITypeInfo_GetIDsOfNames(This->pTypeInfo, rgszNames, cNames, rgdispid);
56 return E_NOTIMPL;
57}
#define E_NOTIMPL
Definition: ddrawi.h:99

Referenced by BaseControlVideoImpl_GetIDsOfNames(), BaseControlWindowImpl_GetIDsOfNames(), BasicAudioImpl_GetIDsOfNames(), and MediaPositionPassThru_GetIDsOfNames().

◆ BaseDispatchImpl_GetTypeInfo()

HRESULT WINAPI BaseDispatchImpl_GetTypeInfo ( BaseDispatch This,
REFIID  riid,
UINT  itinfo,
LCID  lcid,
ITypeInfo **  pptinfo 
)

Definition at line 59 of file dispatch.c.

60{
61 if (This->pTypeInfo)
62 {
63 ITypeInfo_AddRef(This->pTypeInfo);
64 *pptinfo = This->pTypeInfo;
65 return S_OK;
66 }
67 return E_NOTIMPL;
68}

Referenced by BaseControlVideoImpl_GetTypeInfo(), BaseControlVideoImpl_Invoke(), BaseControlWindowImpl_GetTypeInfo(), BaseControlWindowImpl_Invoke(), BasicAudioImpl_GetTypeInfo(), BasicAudioImpl_Invoke(), MediaPositionPassThru_GetTypeInfo(), and MediaPositionPassThru_Invoke().

◆ BaseDispatchImpl_GetTypeInfoCount()

HRESULT WINAPI BaseDispatchImpl_GetTypeInfoCount ( BaseDispatch This,
UINT pctinfo 
)

Definition at line 70 of file dispatch.c.

71{
72 if (This->pTypeInfo)
73 *pctinfo = 1;
74 else
75 *pctinfo = 0;
76 return S_OK;
77}

Referenced by BaseControlVideoImpl_GetTypeInfoCount(), BaseControlWindowImpl_GetTypeInfoCount(), BasicAudioImpl_GetTypeInfoCount(), and MediaPositionPassThru_GetTypeInfoCount().

◆ BaseFilter_Destroy()

HRESULT WINAPI BaseFilter_Destroy ( BaseFilter This)

Definition at line 214 of file filter.c.

215{
216 if (This->pClock)
218
219 This->IBaseFilter_iface.lpVtbl = NULL;
220 This->csFilter.DebugInfo->Spare[0] = 0;
221 DeleteCriticalSection(&This->csFilter);
222
223 return S_OK;
224}
#define IReferenceClock_Release(p)
Definition: dmusicc.h:752
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)

Referenced by AsyncReader_Release(), BaseFilterImpl_Release(), BaseRendererImpl_Release(), MediaStreamFilterImpl_Release(), Parser_Destroy(), TransformFilterImpl_Release(), and unknown_inner_Release().

◆ BaseFilter_Init()

HRESULT WINAPI BaseFilter_Init ( BaseFilter This,
const IBaseFilterVtbl *  Vtbl,
const CLSID pClsid,
DWORD_PTR  DebugInfo,
const BaseFilterFuncTable pBaseFuncsTable 
)

Definition at line 196 of file filter.c.

197{
198 This->IBaseFilter_iface.lpVtbl = Vtbl;
199 This->refCount = 1;
201 This->state = State_Stopped;
202 This->rtStreamStart = 0;
203 This->pClock = NULL;
204 ZeroMemory(&This->filterInfo, sizeof(FILTER_INFO));
205 This->clsid = *pClsid;
206 This->csFilter.DebugInfo->Spare[0] = DebugInfo;
207 This->pinVersion = 1;
208
209 This->pFuncsTable = pBaseFuncsTable;
210
211 return S_OK;
212}
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
#define ZeroMemory
Definition: winbase.h:1670

Referenced by AsyncReader_create(), BaseRenderer_Init(), MediaStreamFilter_create(), Parser_Create(), QCAP_createAudioCaptureFilter(), QCAP_createAVICompressor(), QCAP_createAVIMux(), QCAP_createSmartTeeFilter(), QCAP_createVFWCaptureFilter(), SampleGrabber_create(), and TransformFilter_Init().

◆ BaseFilterImpl_AddRef()

ULONG WINAPI BaseFilterImpl_AddRef ( IBaseFilter iface)

Definition at line 54 of file filter.c.

55{
57 ULONG refCount = InterlockedIncrement(&This->refCount);
58
59 TRACE("(%p)->() AddRef from %d\n", This, refCount - 1);
60
61 return refCount;
62}
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1
static BaseFilter * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: filter.c:32

Referenced by AMDirectSound_AddRef(), Basicaudio_AddRef(), MediaStreamFilterImpl_AddRef(), NullRendererInner_AddRef(), Parser_AddRef(), ReferenceClock_AddRef(), SampleGrabber_AddRef(), Unknown_AddRef(), unknown_inner_AddRef(), VideoRendererInner_AddRef(), and VMR9Inner_AddRef().

◆ BaseFilterImpl_EnumPins()

HRESULT WINAPI BaseFilterImpl_EnumPins ( IBaseFilter iface,
IEnumPins **  ppEnum 
)

Definition at line 135 of file filter.c.

136{
138
139 TRACE("(%p)->(%p)\n", iface, ppEnum);
140
141 return EnumPins_Construct(This, This->pFuncsTable->pfnGetPin, This->pFuncsTable->pfnGetPinCount, BaseFilterImpl_GetPinVersion, ppEnum);
142}
LONG WINAPI BaseFilterImpl_GetPinVersion(BaseFilter *This)
Definition: filter.c:184
HRESULT WINAPI EnumPins_Construct(BaseFilter *base, BaseFilter_GetPin receive_pin, BaseFilter_GetPinCount receive_pincount, BaseFilter_GetPinVersion receive_version, IEnumPins **ppEnum)
Definition: enumpins.c:49

Referenced by AviMux_EnumPins(), MediaStreamFilterImpl_EnumPins(), and Parser_EnumPins().

◆ BaseFilterImpl_GetClassID()

HRESULT WINAPI BaseFilterImpl_GetClassID ( IBaseFilter iface,
CLSID pClsid 
)

Definition at line 77 of file filter.c.

78{
80 TRACE("(%p)->(%p)\n", This, pClsid);
81
82 *pClsid = This->clsid;
83
84 return S_OK;
85}

Referenced by MediaStreamFilterImpl_GetClassID().

◆ BaseFilterImpl_GetPinVersion()

LONG WINAPI BaseFilterImpl_GetPinVersion ( BaseFilter This)

Definition at line 184 of file filter.c.

185{
186 TRACE("(%p)\n", This);
187 return This->pinVersion;
188}

Referenced by BaseFilterImpl_EnumPins().

◆ BaseFilterImpl_GetState()

HRESULT WINAPI BaseFilterImpl_GetState ( IBaseFilter iface,
DWORD  dwMilliSecsTimeout,
FILTER_STATE *  pState 
)

Definition at line 87 of file filter.c.

88{
90 TRACE("(%p)->(%d, %p)\n", This, dwMilliSecsTimeout, pState);
91
92 EnterCriticalSection(&This->csFilter);
93 {
94 *pState = This->state;
95 }
96 LeaveCriticalSection(&This->csFilter);
97
98 return S_OK;
99}
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

Referenced by BaseRendererImpl_GetState(), and MediaStreamFilterImpl_GetState().

◆ BaseFilterImpl_GetSyncSource()

HRESULT WINAPI BaseFilterImpl_GetSyncSource ( IBaseFilter iface,
IReferenceClock **  ppClock 
)

Definition at line 119 of file filter.c.

120{
122 TRACE("(%p)->(%p)\n", This, ppClock);
123
124 EnterCriticalSection(&This->csFilter);
125 {
126 *ppClock = This->pClock;
127 if (This->pClock)
129 }
130 LeaveCriticalSection(&This->csFilter);
131
132 return S_OK;
133}
#define IReferenceClock_AddRef(p)
Definition: dmusicc.h:751

Referenced by MediaStreamFilterImpl_GetSyncSource(), and Parser_GetSyncSource().

◆ BaseFilterImpl_IncrementPinVersion()

VOID WINAPI BaseFilterImpl_IncrementPinVersion ( BaseFilter This)

Definition at line 190 of file filter.c.

191{
192 InterlockedIncrement(&This->pinVersion);
193 TRACE("(%p) -> New pinVersion %i\n", This,This->pinVersion);
194}

Referenced by FileSource_Load(), Parser_AddPin(), and Parser_RemoveOutputPins().

◆ BaseFilterImpl_JoinFilterGraph()

HRESULT WINAPI BaseFilterImpl_JoinFilterGraph ( IBaseFilter iface,
IFilterGraph pGraph,
LPCWSTR  pName 
)

Definition at line 159 of file filter.c.

160{
162
163 TRACE("(%p)->(%p, %s)\n", This, pGraph, debugstr_w(pName));
164
165 EnterCriticalSection(&This->csFilter);
166 {
167 if (pName)
168 strcpyW(This->filterInfo.achName, pName);
169 else
170 *This->filterInfo.achName = '\0';
171 This->filterInfo.pGraph = pGraph; /* NOTE: do NOT increase ref. count */
172 }
173 LeaveCriticalSection(&This->csFilter);
174
175 return S_OK;
176}
#define debugstr_w
Definition: kernel32.h:32
static LPSTR pName
Definition: security.c:75
#define strcpyW(d, s)
Definition: unicode.h:29

Referenced by MediaStreamFilterImpl_JoinFilterGraph(), Parser_JoinFilterGraph(), and SampleGrabber_IBaseFilter_JoinFilterGraph().

◆ BaseFilterImpl_QueryFilterInfo()

HRESULT WINAPI BaseFilterImpl_QueryFilterInfo ( IBaseFilter iface,
FILTER_INFO *  pInfo 
)

Definition at line 145 of file filter.c.

146{
148 TRACE("(%p)->(%p)\n", This, pInfo);
149
150 strcpyW(pInfo->achName, This->filterInfo.achName);
151 pInfo->pGraph = This->filterInfo.pGraph;
152
153 if (pInfo->pGraph)
154 IFilterGraph_AddRef(pInfo->pGraph);
155
156 return S_OK;
157}

Referenced by MediaStreamFilterImpl_QueryFilterInfo(), and Parser_QueryFilterInfo().

◆ BaseFilterImpl_QueryInterface()

HRESULT WINAPI BaseFilterImpl_QueryInterface ( IBaseFilter iface,
REFIID  riid,
LPVOID ppv 
)

Definition at line 37 of file filter.c.

38{
39 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv);
40
41 *ppv = NULL;
42
44 IsEqualIID(riid, &IID_IMediaFilter) || IsEqualIID(riid, &IID_IBaseFilter))
45 {
46 *ppv = iface;
47 IBaseFilter_AddRef(iface);
48 return S_OK;
49 }
50
51 return E_NOINTERFACE;
52}
const GUID IID_IUnknown
const GUID IID_IBaseFilter
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
const GUID IID_IPersist
Definition: proxy.cpp:14
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:2364

Referenced by BaseRendererImpl_QueryInterface(), and TransformFilterImpl_QueryInterface().

◆ BaseFilterImpl_QueryVendorInfo()

HRESULT WINAPI BaseFilterImpl_QueryVendorInfo ( IBaseFilter iface,
LPWSTR pVendorInfo 
)

Definition at line 178 of file filter.c.

179{
180 TRACE("(%p)->(%p)\n", iface, pVendorInfo);
181 return E_NOTIMPL;
182}

Referenced by MediaStreamFilterImpl_QueryVendorInfo(), and Parser_QueryVendorInfo().

◆ BaseFilterImpl_Release()

ULONG WINAPI BaseFilterImpl_Release ( IBaseFilter iface)

Definition at line 64 of file filter.c.

65{
67 ULONG refCount = InterlockedDecrement(&This->refCount);
68
69 TRACE("(%p)->() Release from %d\n", This, refCount + 1);
70
71 if (!refCount)
73
74 return refCount;
75}
#define InterlockedDecrement
Definition: armddk.h:52
HRESULT WINAPI BaseFilter_Destroy(BaseFilter *This)
Definition: filter.c:214

Referenced by AVICompressor_Release(), AviMux_Release(), Parser_Create(), QCAP_createAVIMux(), SampleGrabber_Release(), TransformFilter_Init(), and Unknown_Release().

◆ BaseFilterImpl_SetSyncSource()

HRESULT WINAPI BaseFilterImpl_SetSyncSource ( IBaseFilter iface,
IReferenceClock pClock 
)

Definition at line 101 of file filter.c.

102{
104 TRACE("(%p)->(%p)\n", This, pClock);
105
106 EnterCriticalSection(&This->csFilter);
107 {
108 if (This->pClock)
110 This->pClock = pClock;
111 if (This->pClock)
113 }
114 LeaveCriticalSection(&This->csFilter);
115
116 return S_OK;
117}

Referenced by BaseRendererImpl_SetSyncSource(), MediaStreamFilterImpl_SetSyncSource(), and Parser_SetSyncSource().

◆ BaseInputPin_Construct()

HRESULT BaseInputPin_Construct ( const IPinVtbl *  InputPin_Vtbl,
LONG  inputpin_size,
const PIN_INFO pPinInfo,
const BaseInputPinFuncTable pBaseInputFuncsTable,
LPCRITICAL_SECTION  pCritSec,
IMemAllocator allocator,
IPin **  ppPin 
)

Definition at line 1189 of file pin.c.

1192{
1193 BaseInputPin * pPinImpl;
1194
1195 *ppPin = NULL;
1196
1197 assert(inputpin_size >= sizeof(BaseInputPin));
1198 assert(vtbl->base.pfnCheckMediaType);
1199
1200 if (pPinInfo->dir != PINDIR_INPUT)
1201 {
1202 ERR("Pin direction(%x) != PINDIR_INPUT\n", pPinInfo->dir);
1203 return E_INVALIDARG;
1204 }
1205
1206 pPinImpl = CoTaskMemAlloc(inputpin_size);
1207
1208 if (!pPinImpl)
1209 return E_OUTOFMEMORY;
1210
1211 if (SUCCEEDED(InputPin_Init(InputPin_Vtbl, pPinInfo, vtbl, pCritSec, allocator, pPinImpl)))
1212 {
1213 *ppPin = &pPinImpl->pin.IPin_iface;
1214 return S_OK;
1215 }
1216
1217 CoTaskMemFree(pPinImpl);
1218 return E_FAIL;
1219}
@ PINDIR_INPUT
Definition: axcore.idl:41
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define assert(x)
Definition: debug.h:53
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
static HRESULT InputPin_Init(const IPinVtbl *InputPin_Vtbl, const PIN_INFO *pPinInfo, const BaseInputPinFuncTable *vtbl, LPCRITICAL_SECTION pCritSec, IMemAllocator *allocator, BaseInputPin *pPinImpl)
Definition: pin.c:1160
BasePin pin
Definition: strmbase.h:90
IPin IPin_iface
Definition: strmbase.h:35

Referenced by audiomediastream_create(), BaseRenderer_Init(), create_input_pin(), ddrawmediastream_create(), QCAP_createAVICompressor(), QCAP_createSmartTeeFilter(), and TransformFilter_Init().

◆ BaseInputPin_Destroy()

HRESULT WINAPI BaseInputPin_Destroy ( BaseInputPin This)

Definition at line 1221 of file pin.c.

1222{
1223 FreeMediaType(&This->pin.mtCurrent);
1224 if (This->pAllocator)
1225 IMemAllocator_Release(This->pAllocator);
1226 This->pAllocator = NULL;
1227 This->pin.IPin_iface.lpVtbl = NULL;
1229 return S_OK;
1230}
static void FreeMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: filtergraph.c:692

Referenced by AudioMediaStreamImpl_IAMMediaStream_Release(), BaseInputPinImpl_Release(), and DirectDrawMediaStreamImpl_IAMMediaStream_Release().

◆ BaseInputPinImpl_BeginFlush()

HRESULT WINAPI BaseInputPinImpl_BeginFlush ( IPin iface)

Definition at line 968 of file pin.c.

969{
971 HRESULT hr;
972 TRACE("() semi-stub\n");
973
974 EnterCriticalSection(This->pin.pCritSec);
975 This->flushing = TRUE;
976
978 LeaveCriticalSection(This->pin.pCritSec);
979
980 return hr;
981}
static HRESULT deliver_beginflush(IPin *pin, LPVOID unused)
Definition: pin.c:963
static HRESULT SendFurther(IPin *from, SendPinFunc fnMiddle, LPVOID arg, SendPinFunc fnEnd)
Definition: pin.c:67
static BaseInputPin * impl_BaseInputPin_from_IPin(IPin *iface)
Definition: pin.c:833

Referenced by AviMuxIn_BeginFlush(), BaseRenderer_InputPin_BeginFlush(), and TransformFilter_InputPin_BeginFlush().

◆ BaseInputPinImpl_Connect()

HRESULT WINAPI BaseInputPinImpl_Connect ( IPin iface,
IPin pConnector,
const AM_MEDIA_TYPE pmt 
)

Definition at line 881 of file pin.c.

882{
883 ERR("Outgoing connection on an input pin! (%p, %p)\n", pConnector, pmt);
884
885 return E_UNEXPECTED;
886}
#define E_UNEXPECTED
Definition: winerror.h:2456

Referenced by AviMuxIn_Connect().

◆ BaseInputPinImpl_EndFlush()

HRESULT WINAPI BaseInputPinImpl_EndFlush ( IPin iface)

Definition at line 988 of file pin.c.

989{
991 HRESULT hr;
992 TRACE("(%p)\n", This);
993
994 EnterCriticalSection(This->pin.pCritSec);
995 This->flushing = This->end_of_stream = FALSE;
996
998 LeaveCriticalSection(This->pin.pCritSec);
999
1000 return hr;
1001}
static HRESULT deliver_endflush(IPin *pin, LPVOID unused)
Definition: pin.c:983

Referenced by AviMuxIn_EndFlush(), BaseRenderer_InputPin_EndFlush(), and TransformFilter_InputPin_EndFlush().

◆ BaseInputPinImpl_EndOfStream()

HRESULT WINAPI BaseInputPinImpl_EndOfStream ( IPin iface)

Definition at line 944 of file pin.c.

945{
946 HRESULT hr = S_OK;
948
949 TRACE("(%p)\n", This);
950
951 EnterCriticalSection(This->pin.pCritSec);
952 if (This->flushing)
953 hr = S_FALSE;
954 else
955 This->end_of_stream = TRUE;
956 LeaveCriticalSection(This->pin.pCritSec);
957
958 if (hr == S_OK)
960 return hr;
961}
static HRESULT deliver_endofstream(IPin *pin, LPVOID unused)
Definition: pin.c:930
#define S_FALSE
Definition: winerror.h:2357

Referenced by AviMuxIn_EndOfStream(), and BaseRenderer_InputPin_EndOfStream().

◆ BaseInputPinImpl_NewSegment()

HRESULT WINAPI BaseInputPinImpl_NewSegment ( IPin iface,
REFERENCE_TIME  tStart,
REFERENCE_TIME  tStop,
double  dRate 
)

Definition at line 1015 of file pin.c.

1016{
1019
1020 TRACE("(%s, %s, %e)\n", wine_dbgstr_longlong(tStart), wine_dbgstr_longlong(tStop), dRate);
1021
1022 args.tStart = This->pin.tStart = tStart;
1023 args.tStop = This->pin.tStop = tStop;
1024 args.rate = This->pin.dRate = dRate;
1025
1026 return SendFurther( iface, deliver_newsegment, &args, NULL );
1027}
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
static HRESULT deliver_newsegment(IPin *pin, LPVOID data)
Definition: pin.c:1009
#define args
Definition: format.c:66
Definition: match.c:390

Referenced by TransformFilter_InputPin_NewSegment().

◆ BaseInputPinImpl_QueryAccept()

HRESULT WINAPI BaseInputPinImpl_QueryAccept ( IPin iface,
const AM_MEDIA_TYPE pmt 
)

Definition at line 935 of file pin.c.

936{
938
939 TRACE("(%p/%p)->(%p)\n", This, iface, pmt);
940
941 return (This->pin.pFuncsTable->pfnCheckMediaType(&This->pin, pmt) == S_OK ? S_OK : S_FALSE);
942}

◆ BaseInputPinImpl_QueryInterface()

HRESULT WINAPI BaseInputPinImpl_QueryInterface ( IPin iface,
REFIID  riid,
LPVOID ppv 
)

Definition at line 838 of file pin.c.

839{
841
842 TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ppv);
843
844 *ppv = NULL;
845
847 *ppv = iface;
848 else if (IsEqualIID(riid, &IID_IPin))
849 *ppv = iface;
850 else if (IsEqualIID(riid, &IID_IMemInputPin))
851 *ppv = &This->IMemInputPin_iface;
852 else if (IsEqualIID(riid, &IID_IMediaSeeking))
853 {
854 return IBaseFilter_QueryInterface(This->pin.pinInfo.pFilter, &IID_IMediaSeeking, ppv);
855 }
856
857 if (*ppv)
858 {
859 IUnknown_AddRef((IUnknown *)(*ppv));
860 return S_OK;
861 }
862
863 FIXME("No interface for %s!\n", debugstr_guid(riid));
864
865 return E_NOINTERFACE;
866}
#define FIXME(fmt,...)
Definition: debug.h:111
const GUID IID_IPin
Definition: pincontrol.cpp:15

Referenced by AVICompressorIn_QueryInterface(), and AVICompressorOut_QueryInterface().

◆ BaseInputPinImpl_ReceiveConnection()

HRESULT WINAPI BaseInputPinImpl_ReceiveConnection ( IPin iface,
IPin pReceivePin,
const AM_MEDIA_TYPE pmt 
)

Definition at line 889 of file pin.c.

890{
892 PIN_DIRECTION pindirReceive;
893 HRESULT hr = S_OK;
894
895 TRACE("(%p, %p)\n", pReceivePin, pmt);
897
898 EnterCriticalSection(This->pin.pCritSec);
899 {
900 if (This->pin.pConnectedTo)
902
903 if (SUCCEEDED(hr) && This->pin.pFuncsTable->pfnCheckMediaType(&This->pin, pmt) != S_OK)
904 hr = VFW_E_TYPE_NOT_ACCEPTED; /* FIXME: shouldn't we just map common errors onto
905 * VFW_E_TYPE_NOT_ACCEPTED and pass the value on otherwise? */
906
907 if (SUCCEEDED(hr))
908 {
909 IPin_QueryDirection(pReceivePin, &pindirReceive);
910
911 if (pindirReceive != PINDIR_OUTPUT)
912 {
913 ERR("Can't connect from non-output pin\n");
915 }
916 }
917
918 if (SUCCEEDED(hr))
919 {
920 CopyMediaType(&This->pin.mtCurrent, pmt);
921 This->pin.pConnectedTo = pReceivePin;
922 IPin_AddRef(pReceivePin);
923 }
924 }
925 LeaveCriticalSection(This->pin.pCritSec);
926
927 return hr;
928}
enum _PinDirection PIN_DIRECTION
@ PINDIR_OUTPUT
Definition: axcore.idl:42
static HRESULT CopyMediaType(AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
Definition: filtergraph.c:706
static void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: pin.c:157
#define VFW_E_ALREADY_CONNECTED
Definition: vfwmsgs.h:43
#define VFW_E_TYPE_NOT_ACCEPTED
Definition: vfwmsgs.h:81
#define VFW_E_INVALID_DIRECTION
Definition: vfwmsgs.h:47

Referenced by AVICompressorIn_ReceiveConnection(), AviMuxIn_ReceiveConnection(), BaseRenderer_InputPin_ReceiveConnection(), and TransformFilter_InputPin_ReceiveConnection().

◆ BaseInputPinImpl_Release()

ULONG WINAPI BaseInputPinImpl_Release ( IPin iface)

Definition at line 868 of file pin.c.

869{
871 ULONG refCount = InterlockedDecrement(&This->pin.refCount);
872
873 TRACE("(%p)->() Release from %d\n", iface, refCount + 1);
874
875 if (!refCount)
877
878 return refCount;
879}
HRESULT WINAPI BaseInputPin_Destroy(BaseInputPin *This)
Definition: pin.c:1221

Referenced by AVICompressor_Release(), AviMux_Release(), create_input_pin(), and Unknown_Release().

◆ BaseOutputPin_Construct()

HRESULT WINAPI BaseOutputPin_Construct ( const IPinVtbl *  OutputPin_Vtbl,
LONG  outputpin_size,
const PIN_INFO pPinInfo,
const BaseOutputPinFuncTable pBaseOutputFuncsTable,
LPCRITICAL_SECTION  pCritSec,
IPin **  ppPin 
)

Definition at line 791 of file pin.c.

792{
793 BaseOutputPin * pPinImpl;
794
795 *ppPin = NULL;
796
797 if (pPinInfo->dir != PINDIR_OUTPUT)
798 {
799 ERR("Pin direction(%x) != PINDIR_OUTPUT\n", pPinInfo->dir);
800 return E_INVALIDARG;
801 }
802
803 assert(outputpin_size >= sizeof(BaseOutputPin));
804 assert(vtbl->base.pfnAttemptConnection);
805
806 pPinImpl = CoTaskMemAlloc(outputpin_size);
807
808 if (!pPinImpl)
809 return E_OUTOFMEMORY;
810
811 if (SUCCEEDED(OutputPin_Init(OutputPin_Vtbl, pPinInfo, vtbl, pCritSec, pPinImpl)))
812 {
813 *ppPin = &pPinImpl->pin.IPin_iface;
814 return S_OK;
815 }
816
817 CoTaskMemFree(pPinImpl);
818 return E_FAIL;
819}
static HRESULT OutputPin_Init(const IPinVtbl *OutputPin_Vtbl, const PIN_INFO *pPinInfo, const BaseOutputPinFuncTable *vtbl, LPCRITICAL_SECTION pCritSec, BaseOutputPin *pPinImpl)
Definition: pin.c:767
BasePin pin
Definition: strmbase.h:66

Referenced by FileAsyncReader_Construct(), Parser_AddPin(), QCAP_createAVICompressor(), QCAP_createAVIMux(), QCAP_createSmartTeeFilter(), TransformFilter_Init(), and VfwPin_Construct().

◆ BaseOutputPin_Destroy()

HRESULT WINAPI BaseOutputPin_Destroy ( BaseOutputPin This)

Definition at line 821 of file pin.c.

822{
823 FreeMediaType(&This->pin.mtCurrent);
824 if (This->pAllocator)
825 IMemAllocator_Release(This->pAllocator);
826 This->pAllocator = NULL;
828 return S_OK;
829}

Referenced by BaseOutputPinImpl_Release(), FileAsyncReaderPin_Release(), and VfwPin_Release().

◆ BaseOutputPinImpl_Active()

HRESULT WINAPI BaseOutputPinImpl_Active ( BaseOutputPin This)

Definition at line 614 of file pin.c.

615{
616 HRESULT hr;
617
618 TRACE("(%p)->()\n", This);
619
620 EnterCriticalSection(This->pin.pCritSec);
621 {
622 if (!This->pin.pConnectedTo || !This->pMemInputPin)
624 else
625 hr = IMemAllocator_Commit(This->pAllocator);
626 }
627 LeaveCriticalSection(This->pin.pCritSec);
628
629 TRACE("--> %08x\n", hr);
630 return hr;
631}
#define VFW_E_NOT_CONNECTED
Definition: vfwmsgs.h:48

Referenced by Parser_Run(), and TransformFilterImpl_Run().

◆ BaseOutputPinImpl_AttemptConnection()

HRESULT WINAPI BaseOutputPinImpl_AttemptConnection ( BasePin This,
IPin pReceivePin,
const AM_MEDIA_TYPE pmt 
)

Definition at line 712 of file pin.c.

713{
715 HRESULT hr;
716 IMemAllocator * pMemAlloc = NULL;
717
718 TRACE("(%p, %p)\n", pReceivePin, pmt);
720
721 /* FIXME: call queryacceptproc */
722
723 This->pin.pConnectedTo = pReceivePin;
724 IPin_AddRef(pReceivePin);
725 CopyMediaType(&This->pin.mtCurrent, pmt);
726
727 hr = IPin_ReceiveConnection(pReceivePin, &iface->IPin_iface, pmt);
728
729 /* get the IMemInputPin interface we will use to deliver samples to the
730 * connected pin */
731 if (SUCCEEDED(hr))
732 {
733 This->pMemInputPin = NULL;
734 hr = IPin_QueryInterface(pReceivePin, &IID_IMemInputPin, (LPVOID)&This->pMemInputPin);
735
736 if (SUCCEEDED(hr))
737 {
738 hr = This->pFuncsTable->pfnDecideAllocator(This, This->pMemInputPin, &pMemAlloc);
739 if (SUCCEEDED(hr))
740 This->pAllocator = pMemAlloc;
741 else if (pMemAlloc)
742 IMemAllocator_Release(pMemAlloc);
743 }
744
745 /* break connection if we couldn't get the allocator */
746 if (FAILED(hr))
747 {
748 if (This->pMemInputPin)
749 IMemInputPin_Release(This->pMemInputPin);
750 This->pMemInputPin = NULL;
751
752 IPin_Disconnect(pReceivePin);
753 }
754 }
755
756 if (FAILED(hr))
757 {
758 IPin_Release(This->pin.pConnectedTo);
759 This->pin.pConnectedTo = NULL;
760 FreeMediaType(&This->pin.mtCurrent);
761 }
762
763 TRACE(" -- %x\n", hr);
764 return hr;
765}
#define FAILED(hr)
Definition: intsafe.h:51
static BaseOutputPin * impl_BaseOutputPin_from_BasePin(BasePin *iface)
Definition: pin.c:358

Referenced by AviMuxOut_AttemptConnection().

◆ BaseOutputPinImpl_BeginFlush()

HRESULT WINAPI BaseOutputPinImpl_BeginFlush ( IPin iface)

Definition at line 536 of file pin.c.

537{
538 TRACE("(%p)->()\n", iface);
539
540 /* not supposed to do anything in an output pin */
541
542 return E_UNEXPECTED;
543}

Referenced by AviMuxOut_BeginFlush().

◆ BaseOutputPinImpl_BreakConnect()

HRESULT WINAPI BaseOutputPinImpl_BreakConnect ( BaseOutputPin This)

Definition at line 654 of file pin.c.

655{
656 HRESULT hr;
657
658 TRACE("(%p)->()\n", This);
659
660 EnterCriticalSection(This->pin.pCritSec);
661 {
662 if (!This->pin.pConnectedTo || !This->pMemInputPin)
664 else
665 {
666 hr = IMemAllocator_Decommit(This->pAllocator);
667
668 if (SUCCEEDED(hr))
669 hr = IPin_Disconnect(This->pin.pConnectedTo);
670 }
671 IPin_Disconnect(&This->pin.IPin_iface);
672 }
673 LeaveCriticalSection(This->pin.pCritSec);
674
675 return hr;
676}

◆ BaseOutputPinImpl_Connect()

HRESULT WINAPI BaseOutputPinImpl_Connect ( IPin iface,
IPin pReceivePin,
const AM_MEDIA_TYPE pmt 
)

Definition at line 405 of file pin.c.

406{
407 HRESULT hr;
409
410 TRACE("(%p/%p)->(%p, %p)\n", This, iface, pReceivePin, pmt);
412
413 if (!pReceivePin)
414 return E_POINTER;
415
416 /* If we try to connect to ourselves, we will definitely deadlock.
417 * There are other cases where we could deadlock too, but this
418 * catches the obvious case */
419 assert(pReceivePin != iface);
420
421 EnterCriticalSection(This->pin.pCritSec);
422 {
423 /* if we have been a specific type to connect with, then we can either connect
424 * with that or fail. We cannot choose different AM_MEDIA_TYPE */
425 if (pmt && !IsEqualGUID(&pmt->majortype, &GUID_NULL) && !IsEqualGUID(&pmt->subtype, &GUID_NULL))
426 hr = This->pin.pFuncsTable->pfnAttemptConnection(&This->pin, pReceivePin, pmt);
427 else
428 {
429 /* negotiate media type */
430
431 IEnumMediaTypes * pEnumCandidates;
432 AM_MEDIA_TYPE * pmtCandidate = NULL; /* Candidate media type */
433
434 if (SUCCEEDED(hr = IPin_EnumMediaTypes(iface, &pEnumCandidates)))
435 {
436 hr = VFW_E_NO_ACCEPTABLE_TYPES; /* Assume the worst, but set to S_OK if connected successfully */
437
438 /* try this filter's media types first */
439 while (S_OK == IEnumMediaTypes_Next(pEnumCandidates, 1, &pmtCandidate, NULL))
440 {
441 assert(pmtCandidate);
442 dump_AM_MEDIA_TYPE(pmtCandidate);
443 if (!IsEqualGUID(&FORMAT_None, &pmtCandidate->formattype)
444 && !IsEqualGUID(&GUID_NULL, &pmtCandidate->formattype))
445 assert(pmtCandidate->pbFormat);
446 if (( !pmt || CompareMediaTypes(pmt, pmtCandidate, TRUE) ) &&
447 (This->pin.pFuncsTable->pfnAttemptConnection(&This->pin, pReceivePin, pmtCandidate) == S_OK))
448 {
449 hr = S_OK;
450 DeleteMediaType(pmtCandidate);
451 break;
452 }
453 DeleteMediaType(pmtCandidate);
454 pmtCandidate = NULL;
455 }
456 IEnumMediaTypes_Release(pEnumCandidates);
457 }
458
459 /* then try receiver filter's media types */
460 if (hr != S_OK && SUCCEEDED(hr = IPin_EnumMediaTypes(pReceivePin, &pEnumCandidates))) /* if we haven't already connected successfully */
461 {
462 ULONG fetched;
463
464 hr = VFW_E_NO_ACCEPTABLE_TYPES; /* Assume the worst, but set to S_OK if connected successfully */
465
466 while (S_OK == IEnumMediaTypes_Next(pEnumCandidates, 1, &pmtCandidate, &fetched))
467 {
468 assert(pmtCandidate);
469 dump_AM_MEDIA_TYPE(pmtCandidate);
470 if (( !pmt || CompareMediaTypes(pmt, pmtCandidate, TRUE) ) &&
471 (This->pin.pFuncsTable->pfnAttemptConnection(&This->pin, pReceivePin, pmtCandidate) == S_OK))
472 {
473 hr = S_OK;
474 DeleteMediaType(pmtCandidate);
475 break;
476 }
477 DeleteMediaType(pmtCandidate);
478 pmtCandidate = NULL;
479 } /* while */
480 IEnumMediaTypes_Release(pEnumCandidates);
481 } /* if not found */
482 } /* if negotiate media type */
483 } /* if succeeded */
484 LeaveCriticalSection(This->pin.pCritSec);
485
486 TRACE(" -- %x\n", hr);
487 return hr;
488}
#define GUID_NULL
Definition: ks.h:106
static void DeleteMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: filtergraph.c:741
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
static BaseOutputPin * impl_BaseOutputPin_from_IPin(IPin *iface)
Definition: pin.c:353
static BOOL CompareMediaTypes(const AM_MEDIA_TYPE *pmt1, const AM_MEDIA_TYPE *pmt2, BOOL bWildcards)
Definition: pin.c:164
#define VFW_E_NO_ACCEPTABLE_TYPES
Definition: vfwmsgs.h:46
#define E_POINTER
Definition: winerror.h:2365

Referenced by AviMuxOut_Connect(), and Parser_OutputPin_Connect().

◆ BaseOutputPinImpl_DecideAllocator()

HRESULT WINAPI BaseOutputPinImpl_DecideAllocator ( BaseOutputPin This,
IMemInputPin pPin,
IMemAllocator **  pAlloc 
)

Definition at line 683 of file pin.c.

684{
685 HRESULT hr;
686
687 hr = IMemInputPin_GetAllocator(pPin, pAlloc);
688
689 if (hr == VFW_E_NO_ALLOCATOR)
690 /* Input pin provides no allocator, use standard memory allocator */
692
693 if (SUCCEEDED(hr))
694 {
696 ZeroMemory(&rProps, sizeof(ALLOCATOR_PROPERTIES));
697
698 IMemInputPin_GetAllocatorRequirements(pPin, &rProps);
699 hr = This->pFuncsTable->pfnDecideBufferSize(This, *pAlloc, &rProps);
700 }
701
702 if (SUCCEEDED(hr))
703 hr = IMemInputPin_NotifyAllocator(pPin, *pAlloc, FALSE);
704
705 return hr;
706}
HRESULT WINAPI BaseOutputPinImpl_InitAllocator(BaseOutputPin *This, IMemAllocator **pMemAlloc)
Definition: pin.c:678
#define VFW_E_NO_ALLOCATOR
Definition: vfwmsgs.h:49

Referenced by AVICompressorOut_DecideAllocator().

◆ BaseOutputPinImpl_Deliver()

HRESULT WINAPI BaseOutputPinImpl_Deliver ( BaseOutputPin This,
IMediaSample pSample 
)

Definition at line 574 of file pin.c.

575{
576 IMemInputPin * pMemConnected = NULL;
577 PIN_INFO pinInfo;
578 HRESULT hr;
579
580 EnterCriticalSection(This->pin.pCritSec);
581 {
582 if (!This->pin.pConnectedTo || !This->pMemInputPin)
584 else
585 {
586 /* we don't have the lock held when using This->pMemInputPin,
587 * so we need to AddRef it to stop it being deleted while we are
588 * using it. Same with its filter. */
589 pMemConnected = This->pMemInputPin;
590 IMemInputPin_AddRef(pMemConnected);
591 hr = IPin_QueryPinInfo(This->pin.pConnectedTo, &pinInfo);
592 }
593 }
594 LeaveCriticalSection(This->pin.pCritSec);
595
596 if (SUCCEEDED(hr))
597 {
598 /* NOTE: if we are in a critical section when Receive is called
599 * then it causes some problems (most notably with the native Video
600 * Renderer) if we are re-entered for whatever reason */
601 hr = IMemInputPin_Receive(pMemConnected, pSample);
602
603 /* If the filter's destroyed, tell upstream to stop sending data */
604 if(IBaseFilter_Release(pinInfo.pFilter) == 0 && SUCCEEDED(hr))
605 hr = S_FALSE;
606 }
607 if (pMemConnected)
608 IMemInputPin_Release(pMemConnected);
609
610 return hr;
611}

Referenced by ACMWrapper_Receive(), AVICompressorIn_Receive(), AVIDec_Receive(), AVISplitter_Receive(), FillBuffer(), SmartTeeFilterInput_Receive(), and WAVEParser_Sample().

◆ BaseOutputPinImpl_Disconnect()

HRESULT WINAPI BaseOutputPinImpl_Disconnect ( IPin iface)

Definition at line 497 of file pin.c.

498{
499 HRESULT hr;
501
502 TRACE("()\n");
503
504 EnterCriticalSection(This->pin.pCritSec);
505 {
506 if (This->pMemInputPin)
507 {
508 IMemInputPin_Release(This->pMemInputPin);
509 This->pMemInputPin = NULL;
510 }
511 if (This->pin.pConnectedTo)
512 {
513 IPin_Release(This->pin.pConnectedTo);
514 This->pin.pConnectedTo = NULL;
515 FreeMediaType(&This->pin.mtCurrent);
516 ZeroMemory(&This->pin.mtCurrent, sizeof(This->pin.mtCurrent));
517 hr = S_OK;
518 }
519 else
520 hr = S_FALSE;
521 }
522 LeaveCriticalSection(This->pin.pCritSec);
523
524 return hr;
525}

Referenced by AviMuxOut_Connect(), and AviMuxOut_Disconnect().

◆ BaseOutputPinImpl_EndFlush()

HRESULT WINAPI BaseOutputPinImpl_EndFlush ( IPin iface)

Definition at line 545 of file pin.c.

546{
547 TRACE("(%p)->()\n", iface);
548
549 /* not supposed to do anything in an output pin */
550
551 return E_UNEXPECTED;
552}

Referenced by AviMuxOut_EndFlush().

◆ BaseOutputPinImpl_EndOfStream()

HRESULT WINAPI BaseOutputPinImpl_EndOfStream ( IPin iface)

Definition at line 527 of file pin.c.

528{
529 TRACE("()\n");
530
531 /* not supposed to do anything in an output pin */
532
533 return E_UNEXPECTED;
534}

Referenced by AviMuxOut_EndOfStream().

◆ BaseOutputPinImpl_GetDeliveryBuffer()

HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer ( BaseOutputPin This,
IMediaSample **  ppSample,
REFERENCE_TIME tStart,
REFERENCE_TIME tStop,
DWORD  dwFlags 
)

Definition at line 554 of file pin.c.

555{
556 HRESULT hr;
557
558 TRACE("(%p, %p, %p, %x)\n", ppSample, tStart, tStop, dwFlags);
559
560 if (!This->pin.pConnectedTo)
562 else
563 {
564 hr = IMemAllocator_GetBuffer(This->pAllocator, ppSample, tStart, tStop, dwFlags);
565
566 if (SUCCEEDED(hr))
567 hr = IMediaSample_SetTime(*ppSample, tStart, tStop);
568 }
569
570 return hr;
571}
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

Referenced by ACMWrapper_Receive(), AVICompressorIn_Receive(), and AVIDec_Receive().

◆ BaseOutputPinImpl_Inactive()

HRESULT WINAPI BaseOutputPinImpl_Inactive ( BaseOutputPin This)

Definition at line 634 of file pin.c.

635{
636 HRESULT hr;
637
638 TRACE("(%p)->()\n", This);
639
640 EnterCriticalSection(This->pin.pCritSec);
641 {
642 if (!This->pin.pConnectedTo || !This->pMemInputPin)
644 else
645 hr = IMemAllocator_Decommit(This->pAllocator);
646 }
647 LeaveCriticalSection(This->pin.pCritSec);
648
649 TRACE("--> %08x\n", hr);
650 return hr;
651}

Referenced by Parser_Stop(), and TransformFilterImpl_Stop().

◆ BaseOutputPinImpl_InitAllocator()

HRESULT WINAPI BaseOutputPinImpl_InitAllocator ( BaseOutputPin This,
IMemAllocator **  pMemAlloc 
)

Definition at line 678 of file pin.c.

679{
680 return CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (LPVOID*)pMemAlloc);
681}

Referenced by AviMuxOut_DecideAllocator(), and BaseOutputPinImpl_DecideAllocator().

◆ BaseOutputPinImpl_QueryInterface()

HRESULT WINAPI BaseOutputPinImpl_QueryInterface ( IPin iface,
REFIID  riid,
LPVOID ppv 
)

Definition at line 363 of file pin.c.

364{
366
367 TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppv);
368
369 *ppv = NULL;
370
372 *ppv = iface;
373 else if (IsEqualIID(riid, &IID_IPin))
374 *ppv = iface;
375 else if (IsEqualIID(riid, &IID_IMediaSeeking) ||
376 IsEqualIID(riid, &IID_IQualityControl))
377 {
378 return IBaseFilter_QueryInterface(This->pin.pinInfo.pFilter, riid, ppv);
379 }
380
381 if (*ppv)
382 {
383 IUnknown_AddRef((IUnknown *)(*ppv));
384 return S_OK;
385 }
386
387 FIXME("No interface for %s!\n", debugstr_guid(riid));
388
389 return E_NOINTERFACE;
390}

◆ BaseOutputPinImpl_ReceiveConnection()

HRESULT WINAPI BaseOutputPinImpl_ReceiveConnection ( IPin iface,
IPin pReceivePin,
const AM_MEDIA_TYPE pmt 
)

Definition at line 490 of file pin.c.

491{
492 ERR("Incoming connection on an output pin! (%p, %p)\n", pReceivePin, pmt);
493
494 return E_UNEXPECTED;
495}

Referenced by AviMuxOut_ReceiveConnection().

◆ BaseOutputPinImpl_Release()

ULONG WINAPI BaseOutputPinImpl_Release ( IPin iface)

Definition at line 392 of file pin.c.

393{
395 ULONG refCount = InterlockedDecrement(&This->pin.refCount);
396
397 TRACE("(%p)->() Release from %d\n", iface, refCount + 1);
398
399 if (!refCount)
401
402 return refCount;
403}
HRESULT WINAPI BaseOutputPin_Destroy(BaseOutputPin *This)
Definition: pin.c:821

Referenced by AVICompressor_Release(), AviMux_Release(), QCAP_createAVIMux(), and Unknown_Release().

◆ BasePinImpl_AddRef()

ULONG WINAPI BasePinImpl_AddRef ( IPin iface)

Definition at line 187 of file pin.c.

188{
189 BasePin *This = impl_from_IPin(iface);
190 ULONG refCount = InterlockedIncrement(&This->refCount);
191
192 TRACE("(%p)->() AddRef from %d\n", iface, refCount - 1);
193
194 return refCount;
195}
static BasePin * impl_from_IPin(IPin *iface)
Definition: pin.c:38

◆ BasePinImpl_ConnectedTo()

HRESULT WINAPI BasePinImpl_ConnectedTo ( IPin iface,
IPin **  ppPin 
)

Definition at line 222 of file pin.c.

223{
224 HRESULT hr;
225 BasePin *This = impl_from_IPin(iface);
226
227 TRACE("(%p)\n", ppPin);
228
229 EnterCriticalSection(This->pCritSec);
230 {
231 if (This->pConnectedTo)
232 {
233 *ppPin = This->pConnectedTo;
234 IPin_AddRef(*ppPin);
235 hr = S_OK;
236 }
237 else
238 {
240 *ppPin = NULL;
241 }
242 }
243 LeaveCriticalSection(This->pCritSec);
244
245 return hr;
246}

Referenced by AviMuxIn_ConnectedTo(), and AviMuxOut_ConnectedTo().

◆ BasePinImpl_ConnectionMediaType()

HRESULT WINAPI BasePinImpl_ConnectionMediaType ( IPin iface,
AM_MEDIA_TYPE pmt 
)

Definition at line 248 of file pin.c.

249{
250 HRESULT hr;
251 BasePin *This = impl_from_IPin(iface);
252
253 TRACE("(%p/%p)->(%p)\n", This, iface, pmt);
254
255 EnterCriticalSection(This->pCritSec);
256 {
257 if (This->pConnectedTo)
258 {
259 CopyMediaType(pmt, &This->mtCurrent);
260 hr = S_OK;
261 }
262 else
263 {
264 ZeroMemory(pmt, sizeof(*pmt));
266 }
267 }
268 LeaveCriticalSection(This->pCritSec);
269
270 return hr;
271}

Referenced by AviMuxIn_ConnectionMediaType(), and AviMuxOut_ConnectionMediaType().

◆ BasePinImpl_Disconnect()

HRESULT WINAPI BasePinImpl_Disconnect ( IPin iface)

Definition at line 197 of file pin.c.

198{
199 HRESULT hr;
200 BasePin *This = impl_from_IPin(iface);
201
202 TRACE("()\n");
203
204 EnterCriticalSection(This->pCritSec);
205 {
206 if (This->pConnectedTo)
207 {
208 IPin_Release(This->pConnectedTo);
209 This->pConnectedTo = NULL;
210 FreeMediaType(&This->mtCurrent);
211 ZeroMemory(&This->mtCurrent, sizeof(This->mtCurrent));
212 hr = S_OK;
213 }
214 else
215 hr = S_FALSE;
216 }
217 LeaveCriticalSection(This->pCritSec);
218
219 return hr;
220}

Referenced by AVICompressorIn_Disconnect(), AVICompressorIn_ReceiveConnection(), AviMuxIn_Disconnect(), AviMuxIn_ReceiveConnection(), BaseRenderer_InputPin_Disconnect(), and TransformFilter_InputPin_Disconnect().

◆ BasePinImpl_EnumMediaTypes()

HRESULT WINAPI BasePinImpl_EnumMediaTypes ( IPin iface,
IEnumMediaTypes **  ppEnum 
)

Definition at line 318 of file pin.c.

319{
320 BasePin *This = impl_from_IPin(iface);
321
322 TRACE("(%p/%p)->(%p)\n", This, iface, ppEnum);
323
324 /* override this method to allow enumeration of your types */
325
326 return EnumMediaTypes_Construct(This, This->pFuncsTable->pfnGetMediaType, This->pFuncsTable->pfnGetMediaTypeVersion , ppEnum);
327}
HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enumFunc, BasePin_GetMediaTypeVersion versionFunc, IEnumMediaTypes **ppEnum)
Definition: mediatype.c:108

Referenced by AviMuxIn_EnumMediaTypes(), AviMuxOut_EnumMediaTypes(), SmartTeeFilterCapture_EnumMediaTypes(), SmartTeeFilterPreview_EnumMediaTypes(), and VfwPin_EnumMediaTypes().

◆ BasePinImpl_GetMediaType()

HRESULT WINAPI BasePinImpl_GetMediaType ( BasePin This,
int  iPosition,
AM_MEDIA_TYPE pmt 
)

Definition at line 175 of file pin.c.

176{
177 if (iPosition < 0)
178 return E_INVALIDARG;
179 return VFW_S_NO_MORE_ITEMS;
180}
#define VFW_S_NO_MORE_ITEMS
Definition: vfwmsgs.h:19

Referenced by Parser_PullPin_EnumMediaTypes().

◆ BasePinImpl_GetMediaTypeVersion()

LONG WINAPI BasePinImpl_GetMediaTypeVersion ( BasePin This)

Definition at line 182 of file pin.c.

183{
184 return 1;
185}

Referenced by Parser_PullPin_EnumMediaTypes().

◆ BasePinImpl_NewSegment()

HRESULT WINAPI BasePinImpl_NewSegment ( IPin iface,
REFERENCE_TIME  tStart,
REFERENCE_TIME  tStop,
double  dRate 
)

Definition at line 338 of file pin.c.

339{
340 BasePin *This = impl_from_IPin(iface);
341
342 TRACE("(%s, %s, %e)\n", wine_dbgstr_longlong(tStart), wine_dbgstr_longlong(tStop), dRate);
343
344 This->tStart = tStart;
345 This->tStop = tStop;
346 This->dRate = dRate;
347
348 return S_OK;
349}

Referenced by AviMuxIn_NewSegment(), and AviMuxOut_NewSegment().

◆ BasePinImpl_QueryAccept()

HRESULT WINAPI BasePinImpl_QueryAccept ( IPin iface,
const AM_MEDIA_TYPE pmt 
)

Definition at line 311 of file pin.c.

312{
313 TRACE("(%p)->(%p)\n", iface, pmt);
314
315 return S_OK;
316}

Referenced by AviMuxIn_QueryAccept(), and AviMuxOut_QueryAccept().

◆ BasePinImpl_QueryDirection()

HRESULT WINAPI BasePinImpl_QueryDirection ( IPin iface,
PIN_DIRECTION pPinDir 
)

Definition at line 285 of file pin.c.

286{
287 BasePin *This = impl_from_IPin(iface);
288
289 TRACE("(%p/%p)->(%p)\n", This, iface, pPinDir);
290
291 *pPinDir = This->pinInfo.dir;
292
293 return S_OK;
294}

Referenced by AviMuxIn_QueryDirection(), and AviMuxOut_QueryDirection().

◆ BasePinImpl_QueryId()

HRESULT WINAPI BasePinImpl_QueryId ( IPin iface,
LPWSTR Id 
)

Definition at line 296 of file pin.c.

297{
298 BasePin *This = impl_from_IPin(iface);
299
300 TRACE("(%p/%p)->(%p)\n", This, iface, Id);
301
302 *Id = CoTaskMemAlloc((strlenW(This->pinInfo.achName) + 1) * sizeof(WCHAR));
303 if (!*Id)
304 return E_OUTOFMEMORY;
305
306 strcpyW(*Id, This->pinInfo.achName);
307
308 return S_OK;
309}
DWORD Id
#define strlenW(s)
Definition: unicode.h:28

Referenced by AviMuxIn_QueryId(), and AviMuxOut_QueryId().

◆ BasePinImpl_QueryInternalConnections()

HRESULT WINAPI BasePinImpl_QueryInternalConnections ( IPin iface,
IPin **  apPin,
ULONG cPin 
)

Definition at line 329 of file pin.c.

330{
331 BasePin *This = impl_from_IPin(iface);
332
333 TRACE("(%p/%p)->(%p, %p)\n", This, iface, apPin, cPin);
334
335 return E_NOTIMPL; /* to tell caller that all input pins connected to all output pins */
336}

Referenced by AviMuxIn_QueryInternalConnections().

◆ BasePinImpl_QueryPinInfo()

HRESULT WINAPI BasePinImpl_QueryPinInfo ( IPin iface,
PIN_INFO pInfo 
)

Definition at line 273 of file pin.c.

274{
275 BasePin *This = impl_from_IPin(iface);
276
277 TRACE("(%p/%p)->(%p)\n", This, iface, pInfo);
278
279 Copy_PinInfo(pInfo, &This->pinInfo);
280 IBaseFilter_AddRef(pInfo->pFilter);
281
282 return S_OK;
283}
static void Copy_PinInfo(PIN_INFO *pDest, const PIN_INFO *pSrc)
Definition: pin.c:146

Referenced by AviMuxIn_QueryPinInfo(), and AviMuxOut_QueryPinInfo().

◆ BaseRenderer_Init()

HRESULT WINAPI BaseRenderer_Init ( BaseRenderer This,
const IBaseFilterVtbl *  Vtbl,
IUnknown pUnkOuter,
const CLSID pClsid,
DWORD_PTR  DebugInfo,
const BaseRendererFuncTable pBaseFuncsTable 
)

Definition at line 241 of file renderer.c.

243{
244 PIN_INFO piInput;
245 HRESULT hr;
246
247 BaseFilter_Init(&This->filter, Vtbl, pClsid, DebugInfo, &RendererBaseFilterFuncTable);
248
249 This->pFuncsTable = pBaseFuncsTable;
250
251 /* construct input pin */
252 piInput.dir = PINDIR_INPUT;
253 piInput.pFilter = &This->filter.IBaseFilter_iface;
254 lstrcpynW(piInput.achName, wcsInputPinName, sizeof(piInput.achName) / sizeof(piInput.achName[0]));
255
257 &input_BaseInputFuncTable, &This->filter.csFilter, NULL, (IPin **)&This->pInputPin);
258
259 if (SUCCEEDED(hr))
260 {
261 hr = CreatePosPassThru(pUnkOuter ? pUnkOuter: (IUnknown *)&This->filter.IBaseFilter_iface, TRUE,
262 &This->pInputPin->pin.IPin_iface, &This->pPosition);
263 if (FAILED(hr))
264 return hr;
265
266 InitializeCriticalSection(&This->csRenderLock);
267 This->csRenderLock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": BaseRenderer.csRenderLock");
268 This->evComplete = CreateEventW(NULL, TRUE, TRUE, NULL);
269 This->ThreadSignal = CreateEventW(NULL, TRUE, TRUE, NULL);
270 This->RenderEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
271 This->pMediaSample = NULL;
272
273 QualityControlImpl_Create(&This->pInputPin->pin.IPin_iface, &This->filter.IBaseFilter_iface, &This->qcimpl);
274 This->qcimpl->IQualityControl_iface.lpVtbl = &Renderer_QualityControl_Vtbl;
275 }
276
277 return hr;
278}
#define lstrcpynW
Definition: compat.h:738
Definition: axcore.idl:92
HRESULT QualityControlImpl_Create(IPin *input, IBaseFilter *self, QualityControlImpl **ppv)
static const IPinVtbl BaseRenderer_InputPin_Vtbl
Definition: renderer.c:175
static const BaseFilterFuncTable RendererBaseFilterFuncTable
Definition: renderer.c:225
static const BaseInputPinFuncTable input_BaseInputFuncTable
Definition: renderer.c:230
static const IQualityControlVtbl Renderer_QualityControl_Vtbl
Definition: renderer.c:51
static const WCHAR wcsInputPinName[]
Definition: renderer.c:33
HRESULT BaseInputPin_Construct(const IPinVtbl *InputPin_Vtbl, LONG inputpin_size, const PIN_INFO *pPinInfo, const BaseInputPinFuncTable *pBaseInputFuncsTable, LPCRITICAL_SECTION pCritSec, IMemAllocator *, IPin **ppPin)
Definition: pin.c:1189
HRESULT WINAPI CreatePosPassThru(IUnknown *pUnkOuter, BOOL bRenderer, IPin *pPin, IUnknown **ppPassThru)
Definition: pospass.c:233
HRESULT WINAPI BaseFilter_Init(BaseFilter *This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable *pBaseFuncsTable)
Definition: filter.c:196
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
#define DWORD_PTR
Definition: treelist.c:76

Referenced by DSoundRender_create(), NullRenderer_create(), VideoRenderer_create(), and vmr_create().

◆ BaseRendererImpl_BeginFlush()

HRESULT WINAPI BaseRendererImpl_BeginFlush ( BaseRenderer iface)

Definition at line 590 of file renderer.c.

591{
592 TRACE("(%p)\n", iface);
594 SetEvent(iface->ThreadSignal);
595 SetEvent(iface->RenderEvent);
596 return S_OK;
597}
HRESULT WINAPI BaseRendererImpl_ClearPendingSample(BaseRenderer *iface)
Definition: renderer.c:609
HANDLE ThreadSignal
Definition: strmbase.h:586
HANDLE RenderEvent
Definition: strmbase.h:587
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733

Referenced by BaseRenderer_InputPin_BeginFlush(), and DSoundRender_BeginFlush().

◆ BaseRendererImpl_ClearPendingSample()

HRESULT WINAPI BaseRendererImpl_ClearPendingSample ( BaseRenderer iface)

Definition at line 609 of file renderer.c.

610{
611 if (iface->pMediaSample)
612 {
613 IMediaSample_Release(iface->pMediaSample);
614 iface->pMediaSample = NULL;
615 }
616 return S_OK;
617}
IMediaSample * pMediaSample
Definition: strmbase.h:588

Referenced by BaseRenderer_InputPin_Disconnect(), BaseRendererImpl_BeginFlush(), BaseRendererImpl_Pause(), BaseRendererImpl_Receive(), BaseRendererImpl_Release(), and BaseRendererImpl_Run().

◆ BaseRendererImpl_EndFlush()

HRESULT WINAPI BaseRendererImpl_EndFlush ( BaseRenderer iface)

Definition at line 599 of file renderer.c.

600{
601 TRACE("(%p)\n", iface);
604 ResetEvent(iface->ThreadSignal);
605 ResetEvent(iface->RenderEvent);
606 return S_OK;
607}
void QualityControlRender_Start(QualityControlImpl *This, REFERENCE_TIME tStart)
HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface)
Definition: pospass.c:611
REFERENCE_TIME rtStreamStart
Definition: strmbase.h:168
BaseFilter filter
Definition: strmbase.h:580
struct QualityControlImpl * qcimpl
Definition: strmbase.h:591
IUnknown * pPosition
Definition: strmbase.h:583
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
Definition: synch.c:714

Referenced by BaseRenderer_InputPin_EndFlush(), DSoundRender_EndFlush(), and VideoRenderer_EndFlush().

◆ BaseRendererImpl_EndOfStream()

HRESULT WINAPI BaseRendererImpl_EndOfStream ( BaseRenderer iface)

Definition at line 567 of file renderer.c.

568{
569 IMediaEventSink* pEventSink;
570 IFilterGraph *graph;
571 HRESULT hr = S_OK;
572
573 TRACE("(%p)\n", iface);
574
575 graph = iface->filter.filterInfo.pGraph;
576 if (graph)
577 { hr = IFilterGraph_QueryInterface(iface->filter.filterInfo.pGraph, &IID_IMediaEventSink, (LPVOID*)&pEventSink);
578 if (SUCCEEDED(hr))
579 {
580 hr = IMediaEventSink_Notify(pEventSink, EC_COMPLETE, S_OK, (LONG_PTR)iface);
581 IMediaEventSink_Release(pEventSink);
582 }
583 }
585 SetEvent(iface->evComplete);
586
587 return hr;
588}
#define EC_COMPLETE
Definition: evcode.h:17
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
HRESULT WINAPI RendererPosPassThru_EOS(IUnknown *iface)
Definition: pospass.c:620
FILTER_INFO filterInfo
Definition: strmbase.h:170
HANDLE evComplete
Definition: strmbase.h:585

Referenced by BaseRenderer_InputPin_EndOfStream(), and DSoundRender_EndOfStream().

◆ BaseRendererImpl_FindPin()

HRESULT WINAPI BaseRendererImpl_FindPin ( IBaseFilter iface,
LPCWSTR  Id,
IPin **  ppPin 
)

Definition at line 421 of file renderer.c.

422{
424
425 TRACE("(%p)->(%s,%p)\n", This, debugstr_w(Id), ppPin);
426
427 if (!Id || !ppPin)
428 return E_POINTER;
429
431 {
432 *ppPin = &This->pInputPin->pin.IPin_iface;
433 IPin_AddRef(*ppPin);
434 return S_OK;
435 }
436 *ppPin = NULL;
437 return VFW_E_NOT_FOUND;
438}
int WINAPI lstrcmpiW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:194
static const WCHAR wcsAltInputPinName[]
Definition: renderer.c:34
static BaseRenderer * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: renderer.c:41
#define VFW_E_NOT_FOUND
Definition: vfwmsgs.h:61

◆ BaseRendererImpl_GetState()

HRESULT WINAPI BaseRendererImpl_GetState ( IBaseFilter iface,
DWORD  dwMilliSecsTimeout,
FILTER_STATE *  pState 
)

Definition at line 550 of file renderer.c.

551{
552 HRESULT hr;
554
555 TRACE("(%p)->(%d, %p)\n", This, dwMilliSecsTimeout, pState);
556
557 if (WaitForSingleObject(This->evComplete, dwMilliSecsTimeout) == WAIT_TIMEOUT)
559 else
560 hr = S_OK;
561
562 BaseFilterImpl_GetState(iface, dwMilliSecsTimeout, pState);
563
564 return hr;
565}
#define WAIT_TIMEOUT
Definition: dderror.h:14
HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter *iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
Definition: filter.c:87
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
#define VFW_S_STATE_INTERMEDIATE
Definition: vfwmsgs.h:21

◆ BaseRendererImpl_Pause()

HRESULT WINAPI BaseRendererImpl_Pause ( IBaseFilter iface)

Definition at line 506 of file renderer.c.

507{
509
510 TRACE("(%p)->()\n", This);
511
512 EnterCriticalSection(&This->csRenderLock);
513 {
514 if (This->filter.state != State_Paused)
515 {
516 if (This->filter.state == State_Stopped)
517 {
518 if (This->pInputPin->pin.pConnectedTo)
519 ResetEvent(This->evComplete);
520 This->pInputPin->end_of_stream = FALSE;
521 }
522 else if (This->pFuncsTable->pfnOnStopStreaming)
523 This->pFuncsTable->pfnOnStopStreaming(This);
524
525 if (This->filter.state == State_Stopped)
527 ResetEvent(This->RenderEvent);
528 This->filter.state = State_Paused;
529 }
530 }
531 ResetEvent(This->ThreadSignal);
532 LeaveCriticalSection(&This->csRenderLock);
533
534 return S_OK;
535}

◆ BaseRendererImpl_QueryInterface()

HRESULT WINAPI BaseRendererImpl_QueryInterface ( IBaseFilter iface,
REFIID  riid,
LPVOID ppv 
)

Definition at line 280 of file renderer.c.

281{
283
284 if (IsEqualIID(riid, &IID_IMediaSeeking) || IsEqualIID(riid, &IID_IMediaPosition))
285 return IUnknown_QueryInterface(This->pPosition, riid, ppv);
286 else if (IsEqualIID(riid, &IID_IQualityControl))
287 {
288 *ppv = &This->qcimpl->IQualityControl_iface;
289 IUnknown_AddRef((IUnknown *)(*ppv));
290 return S_OK;
291 }
292 else
293 return BaseFilterImpl_QueryInterface(iface, riid, ppv);
294}
HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: filter.c:37

Referenced by DSoundRender_QueryInterface(), NullRendererInner_QueryInterface(), VideoRendererInner_QueryInterface(), and VMR9Inner_QueryInterface().

◆ BaseRendererImpl_Receive()

HRESULT WINAPI BaseRendererImpl_Receive ( BaseRenderer This,
IMediaSample pSample 
)

Definition at line 329 of file renderer.c.

330{
331 HRESULT hr = S_OK;
332 REFERENCE_TIME start, stop;
333 AM_MEDIA_TYPE *pmt;
334
335 TRACE("(%p)->%p\n", This, pSample);
336
337 if (This->pInputPin->end_of_stream || This->pInputPin->flushing)
338 return S_FALSE;
339
340 if (This->filter.state == State_Stopped)
341 return VFW_E_WRONG_STATE;
342
343 if (IMediaSample_GetMediaType(pSample, &pmt) == S_OK)
344 {
345 if (FAILED(This->pFuncsTable->pfnCheckMediaType(This, pmt)))
346 {
348 }
349 }
350
351 This->pMediaSample = pSample;
352 IMediaSample_AddRef(pSample);
353
354 if (This->pFuncsTable->pfnPrepareReceive)
355 hr = This->pFuncsTable->pfnPrepareReceive(This, pSample);
356 if (FAILED(hr))
357 {
359 return S_OK;
360 else
361 return hr;
362 }
363
364 if (This->pFuncsTable->pfnPrepareRender)
365 This->pFuncsTable->pfnPrepareRender(This);
366
367 EnterCriticalSection(&This->csRenderLock);
368 if ( This->filter.state == State_Paused )
369 {
370 if (This->pFuncsTable->pfnOnReceiveFirstSample)
371 This->pFuncsTable->pfnOnReceiveFirstSample(This, pSample);
372
373 SetEvent(This->evComplete);
374 }
375
376 /* Wait for render Time */
377 if (SUCCEEDED(IMediaSample_GetTime(pSample, &start, &stop)))
378 {
379 hr = S_FALSE;
381 if (This->pFuncsTable->pfnShouldDrawSampleNow)
382 hr = This->pFuncsTable->pfnShouldDrawSampleNow(This, pSample, &start, &stop);
383
384 if (hr == S_OK)
385 ;/* Do not wait: drop through */
386 else if (hr == S_FALSE)
387 {
388 if (This->pFuncsTable->pfnOnWaitStart)
389 This->pFuncsTable->pfnOnWaitStart(This);
390
391 LeaveCriticalSection(&This->csRenderLock);
392 hr = QualityControlRender_WaitFor(This->qcimpl, pSample, This->RenderEvent);
393 EnterCriticalSection(&This->csRenderLock);
394
395 if (This->pFuncsTable->pfnOnWaitEnd)
396 This->pFuncsTable->pfnOnWaitEnd(This);
397 }
398 else
399 {
400 LeaveCriticalSection(&This->csRenderLock);
401 /* Drop Sample */
402 return S_OK;
403 }
404 }
405
406 if (SUCCEEDED(hr))
407 {
409 hr = This->pFuncsTable->pfnDoRenderSample(This, pSample);
411 }
412
414
416 LeaveCriticalSection(&This->csRenderLock);
417
418 return hr;
419}
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
GLuint start
Definition: gl.h:1545
void QualityControlRender_EndRender(QualityControlImpl *This)
void QualityControlRender_BeginRender(QualityControlImpl *This)
void QualityControlRender_DoQOS(QualityControlImpl *priv)
HRESULT QualityControlRender_WaitFor(QualityControlImpl *This, IMediaSample *sample, HANDLE ev)
HRESULT WINAPI RendererPosPassThru_RegisterMediaTime(IUnknown *iface, REFERENCE_TIME start)
Definition: pospass.c:601
#define VFW_E_WRONG_STATE
Definition: vfwmsgs.h:78
#define VFW_E_SAMPLE_REJECTED
Definition: vfwmsgs.h:82

Referenced by BaseRenderer_Receive().

◆ BaseRendererImpl_Release()

ULONG WINAPI BaseRendererImpl_Release ( IBaseFilter iface)

Definition at line 296 of file renderer.c.

297{
299 ULONG refCount = InterlockedDecrement(&This->filter.refCount);
300
301 if (!refCount)
302 {
303 IPin *pConnectedTo;
304
305 if (SUCCEEDED(IPin_ConnectedTo(&This->pInputPin->pin.IPin_iface, &pConnectedTo)))
306 {
307 IPin_Disconnect(pConnectedTo);
308 IPin_Release(pConnectedTo);
309 }
310 IPin_Disconnect(&This->pInputPin->pin.IPin_iface);
311 IPin_Release(&This->pInputPin->pin.IPin_iface);
312
313 if (This->pPosition)
314 IUnknown_Release(This->pPosition);
315
316 This->csRenderLock.DebugInfo->Spare[0] = 0;
317 DeleteCriticalSection(&This->csRenderLock);
318
320 CloseHandle(This->evComplete);
321 CloseHandle(This->ThreadSignal);
322 CloseHandle(This->RenderEvent);
324 BaseFilter_Destroy(&This->filter);
325 }
326 return refCount;
327}
#define CloseHandle
Definition: compat.h:739
void QualityControlImpl_Destroy(QualityControlImpl *This)
HRESULT WINAPI BaseFilter_Destroy(BaseFilter *This)
Definition: filter.c:214

Referenced by DSoundRender_create(), DSoundRender_Release(), NullRenderer_create(), NullRendererInner_Release(), VideoRenderer_create(), VideoRendererInner_Release(), VMR9Inner_Release(), and vmr_create().

◆ BaseRendererImpl_Run()

HRESULT WINAPI BaseRendererImpl_Run ( IBaseFilter iface,
REFERENCE_TIME  tStart 
)

Definition at line 461 of file renderer.c.

462{
463 HRESULT hr = S_OK;
465 TRACE("(%p)->(%s)\n", This, wine_dbgstr_longlong(tStart));
466
467 EnterCriticalSection(&This->csRenderLock);
468 This->filter.rtStreamStart = tStart;
469 if (This->filter.state == State_Running)
470 goto out;
471
472 SetEvent(This->evComplete);
473 ResetEvent(This->ThreadSignal);
474
475 if (This->pInputPin->pin.pConnectedTo)
476 {
477 This->pInputPin->end_of_stream = FALSE;
478 }
479 else if (This->filter.filterInfo.pGraph)
480 {
481 IMediaEventSink *pEventSink;
482 hr = IFilterGraph_QueryInterface(This->filter.filterInfo.pGraph, &IID_IMediaEventSink, (LPVOID*)&pEventSink);
483 if (SUCCEEDED(hr))
484 {
485 hr = IMediaEventSink_Notify(pEventSink, EC_COMPLETE, S_OK, (LONG_PTR)This);
486 IMediaEventSink_Release(pEventSink);
487 }
488 hr = S_OK;
489 }
490 if (SUCCEEDED(hr))
491 {
492 QualityControlRender_Start(This->qcimpl, This->filter.rtStreamStart);
493 if (This->pFuncsTable->pfnOnStartStreaming)
494 This->pFuncsTable->pfnOnStartStreaming(This);
495 if (This->filter.state == State_Stopped)
497 SetEvent(This->RenderEvent);
498 This->filter.state = State_Running;
499 }
500out:
501 LeaveCriticalSection(&This->csRenderLock);
502
503 return hr;
504}
static FILE * out
Definition: regtests2xml.c:44

◆ BaseRendererImpl_SetSyncSource()

HRESULT WINAPI BaseRendererImpl_SetSyncSource ( IBaseFilter iface,
IReferenceClock clock 
)

Definition at line 537 of file renderer.c.

538{
540 HRESULT hr;
541
542 EnterCriticalSection(&This->filter.csFilter);
545 LeaveCriticalSection(&This->filter.csFilter);
546 return hr;
547}
void QualityControlRender_SetClock(QualityControlImpl *This, IReferenceClock *clock)
_Check_return_ _CRTIMP clock_t __cdecl clock(void)
Definition: clock.c:23
HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *pClock)
Definition: filter.c:101

◆ BaseRendererImpl_Stop()

HRESULT WINAPI BaseRendererImpl_Stop ( IBaseFilter iface)

Definition at line 440 of file renderer.c.

441{
443
444 TRACE("(%p)->()\n", This);
445
446 EnterCriticalSection(&This->csRenderLock);
447 {
449 if (This->pFuncsTable->pfnOnStopStreaming)
450 This->pFuncsTable->pfnOnStopStreaming(This);
451 This->filter.state = State_Stopped;
452 SetEvent(This->evComplete);
453 SetEvent(This->ThreadSignal);
454 SetEvent(This->RenderEvent);
455 }
456 LeaveCriticalSection(&This->csRenderLock);
457
458 return S_OK;
459}

◆ BaseWindow_Destroy()

HRESULT WINAPI BaseWindow_Destroy ( BaseWindow pBaseWindow)

Definition at line 91 of file window.c.

92{
93 if (This->hWnd)
95
97 return S_OK;
98}
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This)
Definition: window.c:143

◆ BaseWindow_Init()

HRESULT WINAPI BaseWindow_Init ( BaseWindow pBaseWindow,
const BaseWindowFuncTable pFuncsTable 
)

Definition at line 80 of file window.c.

81{
82 if (!pFuncsTable)
83 return E_INVALIDARG;
84
85 ZeroMemory(pBaseWindow,sizeof(BaseWindow));
86 pBaseWindow->pFuncsTable = pFuncsTable;
87
88 return S_OK;
89}
const struct BaseWindowFuncTable * pFuncsTable
Definition: strmbase.h:392

Referenced by BaseControlWindow_Init().

◆ BaseWindowImpl_DoneWithWindow()

HRESULT WINAPI BaseWindowImpl_DoneWithWindow ( BaseWindow This)

Definition at line 143 of file window.c.

144{
145 if (!This->hWnd)
146 return S_OK;
147
148 if (This->hDC)
149 ReleaseDC(This->hWnd, This->hDC);
150 This->hDC = NULL;
151
152 DestroyWindow(This->hWnd);
153 This->hWnd = NULL;
154
155 return S_OK;
156}
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI DestroyWindow(_In_ HWND)

Referenced by BaseControlWindow_Destroy(), BaseWindow_Destroy(), CreateRenderingWindow(), and VMR9_SurfaceAllocator_TerminateDevice().

◆ BaseWindowImpl_GetDefaultRect()

RECT WINAPI BaseWindowImpl_GetDefaultRect ( BaseWindow This)

Definition at line 158 of file window.c.

159{
160 static RECT defRect = {0, 0, 800, 600};
161 return defRect;
162}

◆ BaseWindowImpl_OnReceiveMessage()

LRESULT WINAPI BaseWindowImpl_OnReceiveMessage ( BaseWindow This,
HWND  hwnd,
INT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 56 of file window.c.

57{
58 if (This->pFuncsTable->pfnPossiblyEatMessage && This->pFuncsTable->pfnPossiblyEatMessage(This, uMsg, wParam, lParam))
59 return 0;
60
61 switch (uMsg)
62 {
63 case WM_SIZE:
64 if (This->pFuncsTable->pfnOnSize)
65 return This->pFuncsTable->pfnOnSize(This, LOWORD(lParam), HIWORD(lParam));
66 else
68 }
69
70 return DefWindowProcW(hwnd, uMsg, wParam, lParam);
71}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
BOOL WINAPI BaseWindowImpl_OnSize(BaseWindow *This, LONG Width, LONG Height)
Definition: window.c:73
#define HIWORD(l)
Definition: typedefs.h:247
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_SIZE
Definition: winuser.h:1601

Referenced by WndProcW().

◆ BaseWindowImpl_OnSize()

BOOL WINAPI BaseWindowImpl_OnSize ( BaseWindow This,
LONG  Height,
LONG  Width 
)

Definition at line 73 of file window.c.

74{
75 This->Width = Width;
76 This->Height = Height;
77 return TRUE;
78}
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:126
_In_ HFONT _Out_ PUINT Height
Definition: font.h:125

Referenced by BaseWindowImpl_OnReceiveMessage(), VideoRenderer_OnSize(), and VMR9_OnSize().

◆ BaseWindowImpl_PrepareWindow()

HRESULT WINAPI BaseWindowImpl_PrepareWindow ( BaseWindow This)

Definition at line 100 of file window.c.

101{
102 WNDCLASSW winclass;
103 static const WCHAR windownameW[] = { 'A','c','t','i','v','e','M','o','v','i','e',' ','W','i','n','d','o','w',0 };
104
105 This->pClassName = This->pFuncsTable->pfnGetClassWindowStyles(This, &This->ClassStyles, &This->WindowStyles, &This->WindowStylesEx);
106
107 winclass.style = This->ClassStyles;
108 winclass.lpfnWndProc = WndProcW;
109 winclass.cbClsExtra = 0;
110 winclass.cbWndExtra = sizeof(BaseWindow*);
111 winclass.hInstance = This->hInstance;
112 winclass.hIcon = NULL;
113 winclass.hCursor = NULL;
115 winclass.lpszMenuName = NULL;
116 winclass.lpszClassName = This->pClassName;
118 {
119 ERR("Unable to register window class: %u\n", GetLastError());
120 return E_FAIL;
121 }
122
123 This->hWnd = CreateWindowExW(This->WindowStylesEx,
124 This->pClassName, windownameW,
125 This->WindowStyles,
127 CW_USEDEFAULT, NULL, NULL, This->hInstance,
128 NULL);
129
130 if (!This->hWnd)
131 {
132 ERR("Unable to create window\n");
133 return E_FAIL;
134 }
135
137
138 This->hDC = GetDC(This->hWnd);
139
140 return S_OK;
141}
static LRESULT CALLBACK WndProcW(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: window.c:43
LPCWSTR lpszClassName
Definition: winuser.h:3175
LPCWSTR lpszMenuName
Definition: winuser.h:3174
HBRUSH hbrBackground
Definition: winuser.h:3173
HICON hIcon
Definition: winuser.h:3171
HINSTANCE hInstance
Definition: winuser.h:3170
int cbClsExtra
Definition: winuser.h:3168
UINT style
Definition: winuser.h:3166
WNDPROC lpfnWndProc
Definition: winuser.h:3167
int cbWndExtra
Definition: winuser.h:3169
HCURSOR hCursor
Definition: winuser.h:3172
DWORD WINAPI GetLastError(void)
Definition: except.c:1040
#define ERROR_CLASS_ALREADY_EXISTS
Definition: winerror.h:891
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define BLACK_BRUSH
Definition: wingdi.h:896
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
HDC WINAPI GetDC(_In_opt_ HWND)
#define CW_USEDEFAULT
Definition: winuser.h:225
#define SetWindowLongPtrW
Definition: winuser.h:5336

Referenced by MessageLoop().

◆ CopyMediaType()

HRESULT WINAPI CopyMediaType ( AM_MEDIA_TYPE pDest,
const AM_MEDIA_TYPE pSrc 
)

Definition at line 31 of file mediatype.c.

32{
33 *dest = *src;
34 if (src->pbFormat)
35 {
36 dest->pbFormat = CoTaskMemAlloc(src->cbFormat);
37 if (!dest->pbFormat)
38 return E_OUTOFMEMORY;
39 memcpy(dest->pbFormat, src->pbFormat, src->cbFormat);
40 }
41 if (dest->pUnk)
42 IUnknown_AddRef(dest->pUnk);
43 return S_OK;
44}
GLenum src
Definition: glext.h:6340
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static char * dest
Definition: rtl.c:135

Referenced by CreateMediaType(), and IEnumMediaTypesImpl_Reset().

◆ CreateMediaType()

AM_MEDIA_TYPE *WINAPI CreateMediaType ( AM_MEDIA_TYPE const pSrc)

Definition at line 60 of file mediatype.c.

61{
62 AM_MEDIA_TYPE * pDest;
63
64 pDest = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE));
65 if (!pDest)
66 return NULL;
67
68 if (FAILED(CopyMediaType(pDest, pSrc)))
69 {
70 CoTaskMemFree(pDest);
71 return NULL;
72 }
73
74 return pDest;
75}
HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE *dest, const AM_MEDIA_TYPE *src)
Definition: mediatype.c:31

Referenced by IEnumMediaTypesImpl_Next().

◆ CreatePosPassThru()

HRESULT WINAPI CreatePosPassThru ( IUnknown pUnkOuter,
BOOL  bRenderer,
IPin pPin,
IUnknown **  ppPassThru 
)

Definition at line 233 of file pospass.c.

234{
235 HRESULT hr;
236 ISeekingPassThru *passthru;
237
238 hr = CoCreateInstance(&CLSID_SeekingPassThru, pUnkOuter, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)ppPassThru);
239 if (FAILED(hr))
240 return hr;
241
242 IUnknown_QueryInterface(*ppPassThru, &IID_ISeekingPassThru, (void**)&passthru);
243 hr = ISeekingPassThru_Init(passthru, bRenderer, pPin);
244 ISeekingPassThru_Release(passthru);
245
246 return hr;
247}

Referenced by BaseRenderer_Init().

◆ DeleteMediaType()

void WINAPI DeleteMediaType ( AM_MEDIA_TYPE pMediaType)

Definition at line 77 of file mediatype.c.

78{
79 FreeMediaType(pMediaType);
80 CoTaskMemFree(pMediaType);
81}
void WINAPI FreeMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: mediatype.c:46

Referenced by IEnumMediaTypesImpl_Next().

◆ EnumMediaTypes_Construct()

HRESULT WINAPI EnumMediaTypes_Construct ( BasePin iface,
BasePin_GetMediaType  enumFunc,
BasePin_GetMediaTypeVersion  versionFunc,
IEnumMediaTypes **  ppEnum 
)

Definition at line 108 of file mediatype.c.

109{
110 ULONG i;
111 IEnumMediaTypesImpl * pEnumMediaTypes = CoTaskMemAlloc(sizeof(IEnumMediaTypesImpl));
112 AM_MEDIA_TYPE amt;
113
114 *ppEnum = NULL;
115
116 if (!pEnumMediaTypes)
117 return E_OUTOFMEMORY;
118
119 pEnumMediaTypes->IEnumMediaTypes_iface.lpVtbl = &IEnumMediaTypesImpl_Vtbl;
120 pEnumMediaTypes->refCount = 1;
121 pEnumMediaTypes->uIndex = 0;
122 pEnumMediaTypes->enumMediaFunction = enumFunc;
123 pEnumMediaTypes->mediaVersionFunction = versionFunc;
124 IPin_AddRef(&basePin->IPin_iface);
125 pEnumMediaTypes->basePin = basePin;
126
127 i = 0;
128 while (enumFunc(basePin, i, &amt) == S_OK)
129 {
130 FreeMediaType(&amt);
131 i++;
132 }
133
134 pEnumMediaTypes->enumMediaDetails.cMediaTypes = i;
135 pEnumMediaTypes->enumMediaDetails.pMediaTypes = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE) * i);
136 memset(pEnumMediaTypes->enumMediaDetails.pMediaTypes, 0, sizeof(AM_MEDIA_TYPE) * i);
137 for (i = 0; i < pEnumMediaTypes->enumMediaDetails.cMediaTypes; i++)
138 {
139 HRESULT hr;
140
141 if (FAILED(hr = enumFunc(basePin, i, &pEnumMediaTypes->enumMediaDetails.pMediaTypes[i])))
142 {
143 IEnumMediaTypes_Release(&pEnumMediaTypes->IEnumMediaTypes_iface);
144 return hr;
145 }
146 }
147 *ppEnum = &pEnumMediaTypes->IEnumMediaTypes_iface;
148 pEnumMediaTypes->currentVersion = versionFunc(basePin);
149 return S_OK;
150}
static const struct IEnumMediaTypesVtbl IEnumMediaTypesImpl_Vtbl
Definition: mediatype.c:106
#define memset(x, y, z)
Definition: compat.h:39
BasePin_GetMediaType enumMediaFunction
Definition: mediatype.c:94
BasePin_GetMediaTypeVersion mediaVersionFunction
Definition: mediatype.c:95
ENUMMEDIADETAILS enumMediaDetails
Definition: mediatype.c:97
BasePin * basePin
Definition: mediatype.c:93
IEnumMediaTypes IEnumMediaTypes_iface
Definition: filtergraph.c:749
AM_MEDIA_TYPE * pMediaTypes
Definition: mediatype.c:86

Referenced by BasePinImpl_EnumMediaTypes(), IEnumMediaTypesImpl_Clone(), and Parser_PullPin_EnumMediaTypes().

◆ EnumPins_Construct()

HRESULT WINAPI EnumPins_Construct ( BaseFilter base,
BaseFilter_GetPin  receive_pin,
BaseFilter_GetPinCount  receive_pincount,
BaseFilter_GetPinVersion  receive_version,
IEnumPins **  ppEnum 
)

Definition at line 49 of file enumpins.c.

50{
51 IEnumPinsImpl * pEnumPins;
52
53 if (!ppEnum)
54 return E_POINTER;
55
56 pEnumPins = CoTaskMemAlloc(sizeof(IEnumPinsImpl));
57 if (!pEnumPins)
58 {
59 *ppEnum = NULL;
60 return E_OUTOFMEMORY;
61 }
62 pEnumPins->IEnumPins_iface.lpVtbl = &IEnumPinsImpl_Vtbl;
63 pEnumPins->refCount = 1;
64 pEnumPins->uIndex = 0;
65 pEnumPins->receive_pin = receive_pin;
66 pEnumPins->receive_pincount = receive_pincount;
67 pEnumPins->receive_version = receive_version;
68 pEnumPins->base = base;
69 IBaseFilter_AddRef(&base->IBaseFilter_iface);
70 *ppEnum = &pEnumPins->IEnumPins_iface;
71 pEnumPins->Version = receive_version(base);
72
73 TRACE("Created new enumerator (%p)\n", *ppEnum);
74 return S_OK;
75}
static const struct IEnumPinsVtbl IEnumPinsImpl_Vtbl
Definition: enumpins.c:47
BaseFilter_GetPinVersion receive_version
Definition: enumpins.c:38
TestFilterImpl * base
Definition: filtergraph.c:1273
BaseFilter_GetPinCount receive_pincount
Definition: enumpins.c:37
FNOBTAINPIN receive_pin
Definition: filtergraph.c:1274
IEnumPins IEnumPins_iface
Definition: filtergraph.c:1270
DWORD Version
Definition: enumpins.c:39

Referenced by BaseFilterImpl_EnumPins(), and IEnumPinsImpl_Clone().

◆ FreeMediaType()

void WINAPI FreeMediaType ( AM_MEDIA_TYPE pMediaType)

Definition at line 46 of file mediatype.c.

47{
48 if (pMediaType->pbFormat)
49 {
50 CoTaskMemFree(pMediaType->pbFormat);
51 pMediaType->pbFormat = NULL;
52 }
53 if (pMediaType->pUnk)
54 {
55 IUnknown_Release(pMediaType->pUnk);
56 pMediaType->pUnk = NULL;
57 }
58}

Referenced by DeleteMediaType(), EnumMediaTypes_Construct(), IEnumMediaTypesImpl_Release(), and IEnumMediaTypesImpl_Reset().

◆ OutputQueue_Construct()

HRESULT WINAPI OutputQueue_Construct ( BaseOutputPin pInputPin,
BOOL  bAuto,
BOOL  bQueue,
LONG  lBatchSize,
BOOL  bBatchExact,
DWORD  dwPriority,
const OutputQueueFuncTable pFuncsTable,
OutputQueue **  ppOutputQueue 
)

Definition at line 60 of file outputqueue.c.

70{
71 BOOL threaded = FALSE;
72 DWORD tid;
73
75
76 if (!pInputPin || !pFuncsTable || !ppOutputQueue)
77 return E_INVALIDARG;
78
79 *ppOutputQueue = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(OutputQueue));
80 if (!*ppOutputQueue)
81 return E_OUTOFMEMORY;
82
83 This = *ppOutputQueue;
84 This->pFuncsTable = pFuncsTable;
85 This->lBatchSize = lBatchSize;
86 This->bBatchExact = bBatchExact;
88 This->csQueue.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": OutputQueue.csQueue");
89 list_init(&This->SampleList);
90
91 This->pInputPin = pInputPin;
92 IPin_AddRef(&pInputPin->pin.IPin_iface);
93
94 EnterCriticalSection(&This->csQueue);
95 if (bAuto && pInputPin->pMemInputPin)
96 threaded = IMemInputPin_ReceiveCanBlock(pInputPin->pMemInputPin) == S_OK;
97 else
98 threaded = bQueue;
99
100 if (threaded)
101 {
103 if (This->hThread)
104 {
105 SetThreadPriority(This->hThread, dwPriority);
106 This->hProcessQueue = CreateEventW(NULL, 0, 0, NULL);
107 }
108 }
109 LeaveCriticalSection(&This->csQueue);
110
111 return S_OK;
112}
static void list_init(struct list_entry *head)
Definition: list.h:51
#define HeapAlloc
Definition: compat.h:733
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
BOOL WINAPI SetThreadPriority(IN HANDLE hThread, IN int nPriority)
Definition: thread.c:700
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
static TfClientId tid
static DWORD WINAPI OutputQueue_InitialThreadProc(LPVOID data)
Definition: outputqueue.c:43
IMemInputPin * pMemInputPin
Definition: strmbase.h:67

◆ OutputQueue_Destroy()

HRESULT WINAPI OutputQueue_Destroy ( OutputQueue pOutputQueue)

Definition at line 114 of file outputqueue.c.

115{
116 EnterCriticalSection(&pOutputQueue->csQueue);
117 OutputQueue_FreeSamples(pOutputQueue);
118 pOutputQueue->bTerminate = TRUE;
119 SetEvent(pOutputQueue->hProcessQueue);
120 LeaveCriticalSection(&pOutputQueue->csQueue);
121
122 pOutputQueue->csQueue.DebugInfo->Spare[0] = 0;
123 DeleteCriticalSection(&pOutputQueue->csQueue);
124 CloseHandle(pOutputQueue->hProcessQueue);
125
126 IPin_Release(&pOutputQueue->pInputPin->pin.IPin_iface);
127 HeapFree(GetProcessHeap(),0,pOutputQueue);
128 return S_OK;
129}
static void OutputQueue_FreeSamples(OutputQueue *pOutputQueue)
Definition: outputqueue.c:49
DWORD_PTR Spare[8/sizeof(DWORD_PTR)]
Definition: winbase.h:887
PCRITICAL_SECTION_DEBUG DebugInfo
Definition: winbase.h:894
BaseOutputPin * pInputPin
Definition: strmbase.h:348
CRITICAL_SECTION csQueue
Definition: strmbase.h:346
BOOL bTerminate
Definition: strmbase.h:355
HANDLE hProcessQueue
Definition: strmbase.h:351

◆ OutputQueue_EOS()

VOID WINAPI OutputQueue_EOS ( OutputQueue pOutputQueue)

Definition at line 193 of file outputqueue.c.

194{
195 EnterCriticalSection(&pOutputQueue->csQueue);
196 if (pOutputQueue->hThread)
197 {
199 if (!qev)
200 {
201 ERR("Out of Memory\n");
202 LeaveCriticalSection(&pOutputQueue->csQueue);
203 return;
204 }
205 qev->type = EOS_PACKET;
206 qev->pSample = NULL;
207 list_add_tail(&pOutputQueue->SampleList, &qev->entry);
208 }
209 else
210 {
211 IPin* ppin = NULL;
212 IPin_ConnectedTo(&pOutputQueue->pInputPin->pin.IPin_iface, &ppin);
213 if (ppin)
214 {
215 IPin_EndOfStream(ppin);
216 IPin_Release(ppin);
217 }
218 }
219 LeaveCriticalSection(&pOutputQueue->csQueue);
220 /* Covers sending the Event to the worker Thread */
221 OutputQueue_SendAnyway(pOutputQueue);
222}
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
VOID WINAPI OutputQueue_SendAnyway(OutputQueue *pOutputQueue)
Definition: outputqueue.c:179
@ EOS_PACKET
Definition: outputqueue.c:34
struct list SampleList
Definition: strmbase.h:358
HANDLE hThread
Definition: strmbase.h:350
struct list entry
Definition: outputqueue.c:38
IMediaSample * pSample
Definition: outputqueue.c:40

◆ OutputQueue_Receive()

HRESULT WINAPI OutputQueue_Receive ( OutputQueue pOutputQueue,
IMediaSample pSample 
)

Definition at line 173 of file outputqueue.c.

174{
176 return OutputQueue_ReceiveMultiple(pOutputQueue,&pSample,1,&processed);
177}
HRESULT WINAPI OutputQueue_ReceiveMultiple(OutputQueue *pOutputQueue, IMediaSample **ppSamples, LONG nSamples, LONG *nSamplesProcessed)
Definition: outputqueue.c:131
long LONG
Definition: pedump.c:60
static int processed(const type_t *type)
Definition: typegen.c:2254

◆ OutputQueue_ReceiveMultiple()

HRESULT WINAPI OutputQueue_ReceiveMultiple ( OutputQueue pOutputQueue,
IMediaSample **  ppSamples,
LONG  nSamples,
LONG nSamplesProcessed 
)

Definition at line 131 of file outputqueue.c.

132{
133 HRESULT hr = S_OK;
134 int i;
135
136 if (!pOutputQueue->pInputPin->pin.pConnectedTo || !pOutputQueue->pInputPin->pMemInputPin)
137 return VFW_E_NOT_CONNECTED;
138
139 if (!pOutputQueue->hThread)
140 {
141 IMemInputPin_AddRef(pOutputQueue->pInputPin->pMemInputPin);
142 hr = IMemInputPin_ReceiveMultiple(pOutputQueue->pInputPin->pMemInputPin,ppSamples, nSamples, nSamplesProcessed);
143 IMemInputPin_Release(pOutputQueue->pInputPin->pMemInputPin);
144 }
145 else
146 {
147 EnterCriticalSection(&pOutputQueue->csQueue);
148 *nSamplesProcessed = 0;
149
150 for (i = 0; i < nSamples; i++)
151 {
153 if (!qev)
154 {
155 ERR("Out of Memory\n");
157 break;
158 }
159 qev->type = SAMPLE_PACKET;
160 qev->pSample = ppSamples[i];
161 IMediaSample_AddRef(ppSamples[i]);
162 list_add_tail(&pOutputQueue->SampleList, &qev->entry);
163 (*nSamplesProcessed)++;
164 }
165
166 if (!pOutputQueue->bBatchExact || list_count(&pOutputQueue->SampleList) >= pOutputQueue->lBatchSize)
167 SetEvent(pOutputQueue->hProcessQueue);
168 LeaveCriticalSection(&pOutputQueue->csQueue);
169 }
170 return hr;
171}
@ SAMPLE_PACKET
Definition: outputqueue.c:34
__WINE_SERVER_LIST_INLINE unsigned int list_count(const struct list *list)
Definition: list.h:155
IPin * pConnectedTo
Definition: strmbase.h:39
LONG lBatchSize
Definition: strmbase.h:353
BOOL bBatchExact
Definition: strmbase.h:354

Referenced by OutputQueue_Receive().

◆ OutputQueue_SendAnyway()

VOID WINAPI OutputQueue_SendAnyway ( OutputQueue pOutputQueue)

Definition at line 179 of file outputqueue.c.

180{
181 if (pOutputQueue->hThread)
182 {
183 EnterCriticalSection(&pOutputQueue->csQueue);
184 if (!list_empty(&pOutputQueue->SampleList))
185 {
186 pOutputQueue->bSendAnyway = TRUE;
187 SetEvent(pOutputQueue->hProcessQueue);
188 }
189 LeaveCriticalSection(&pOutputQueue->csQueue);
190 }
191}
static int list_empty(struct list_entry *head)
Definition: list.h:58
BOOL bSendAnyway
Definition: strmbase.h:356

Referenced by OutputQueue_EOS().

◆ OutputQueueImpl_ThreadProc()

DWORD WINAPI OutputQueueImpl_ThreadProc ( OutputQueue pOutputQueue)

Definition at line 224 of file outputqueue.c.

225{
226 do
227 {
228 EnterCriticalSection(&pOutputQueue->csQueue);
229 if (!list_empty(&pOutputQueue->SampleList) &&
230 (!pOutputQueue->bBatchExact ||
231 list_count(&pOutputQueue->SampleList) >= pOutputQueue->lBatchSize ||
232 pOutputQueue->bSendAnyway
233 )
234 )
235 {
236 while (!list_empty(&pOutputQueue->SampleList))
237 {
238 IMediaSample **ppSamples;
239 LONG nSamples;
240 LONG nSamplesProcessed;
241 struct list *cursor, *cursor2;
242 int i = 0;
243
244 /* First Pass Process Samples */
245 i = list_count(&pOutputQueue->SampleList);
246 ppSamples = HeapAlloc(GetProcessHeap(),0,sizeof(IMediaSample*) * i);
247 nSamples = 0;
248 LIST_FOR_EACH_SAFE(cursor, cursor2, &pOutputQueue->SampleList)
249 {
251 if (qev->type == SAMPLE_PACKET)
252 ppSamples[nSamples++] = qev->pSample;
253 else
254 break;
256 HeapFree(GetProcessHeap(),0,qev);
257 }
258
259 if (pOutputQueue->pInputPin->pin.pConnectedTo && pOutputQueue->pInputPin->pMemInputPin)
260 {
261 IMemInputPin_AddRef(pOutputQueue->pInputPin->pMemInputPin);
262 LeaveCriticalSection(&pOutputQueue->csQueue);
263 IMemInputPin_ReceiveMultiple(pOutputQueue->pInputPin->pMemInputPin, ppSamples, nSamples, &nSamplesProcessed);
264 EnterCriticalSection(&pOutputQueue->csQueue);
265 IMemInputPin_Release(pOutputQueue->pInputPin->pMemInputPin);
266 }
267 for (i = 0; i < nSamples; i++)
268 IMediaSample_Release(ppSamples[i]);
269 HeapFree(GetProcessHeap(),0,ppSamples);
270
271 /* Process Non-Samples */
272 LIST_FOR_EACH_SAFE(cursor, cursor2, &pOutputQueue->SampleList)
273 {
275 if (qev->type == EOS_PACKET)
276 {
277 IPin* ppin = NULL;
278 IPin_ConnectedTo(&pOutputQueue->pInputPin->pin.IPin_iface, &ppin);
279 if (ppin)
280 {
281 IPin_EndOfStream(ppin);
282 IPin_Release(ppin);
283 }
284 }
285 else if (qev->type == SAMPLE_PACKET)
286 break;
287 else
288 FIXME("Unhandled Event type %i\n",qev->type);
290 HeapFree(GetProcessHeap(),0,qev);
291 }
292 }
293 pOutputQueue->bSendAnyway = FALSE;
294 }
295 LeaveCriticalSection(&pOutputQueue->csQueue);
297 }
298 while (!pOutputQueue->bTerminate);
299 return S_OK;
300}
static void list_remove(struct list_entry *entry)
Definition: list.h:90
Definition: list.h:37
#define INFINITE
Definition: serial.h:102
const char cursor[]
Definition: icontest.c:13
uint32_t entry
Definition: isohybrid.c:63
#define LIST_FOR_EACH_SAFE(cursor, cursor2, list)
Definition: list.h:192
#define LIST_ENTRY(type)
Definition: queue.h:175

◆ PosPassThru_Construct()

HRESULT WINAPI PosPassThru_Construct ( IUnknown pUnkOuter,
LPVOID ppPassThru 
)

Definition at line 249 of file pospass.c.

250{
251 PassThruImpl *fimpl;
252
253 TRACE("(%p,%p)\n", pUnkOuter, ppPassThru);
254
255 *ppPassThru = fimpl = CoTaskMemAlloc(sizeof(*fimpl));
256 if (!fimpl)
257 return E_OUTOFMEMORY;
258
259 fimpl->outer_unk = pUnkOuter;
260 fimpl->bUnkOuterValid = FALSE;
261 fimpl->bAggregatable = FALSE;
262 fimpl->IUnknown_inner.lpVtbl = &IInner_VTable;
266 fimpl->ref = 1;
267 fimpl->pin = NULL;
268 fimpl->timevalid = FALSE;
270 fimpl->time_cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PassThruImpl.time_cs");
271 BaseDispatch_Init(&fimpl->baseDispatch, &IID_IMediaPosition);
272 return S_OK;
273}
static const ISeekingPassThruVtbl ISeekingPassThru_Vtbl
Definition: pospass.c:225
static const IMediaSeekingVtbl IMediaSeekingPassThru_Vtbl
Definition: pospass.c:35
static const IMediaPositionVtbl IMediaPositionPassThru_Vtbl
Definition: pospass.c:36
static const IUnknownVtbl IInner_VTable
Definition: pospass.c:133
HRESULT WINAPI BaseDispatch_Init(BaseDispatch *This, REFIID riid)
Definition: dispatch.c:30
BaseDispatch baseDispatch
Definition: pospass.c:43
LONG ref
Definition: pospass.c:45
BOOL bAggregatable
Definition: pospass.c:49
CRITICAL_SECTION time_cs
Definition: pospass.c:51
BOOL bUnkOuterValid
Definition: pospass.c:48
IUnknown IUnknown_inner
Definition: pospass.c:39
ISeekingPassThru ISeekingPassThru_iface
Definition: pospass.c:40
IUnknown * outer_unk
Definition: pospass.c:46
BOOL timevalid
Definition: pospass.c:52
IMediaPosition IMediaPosition_iface
Definition: pospass.c:42
IMediaSeeking IMediaSeeking_iface
Definition: pospass.c:41
IPin * pin
Definition: pospass.c:47

Referenced by SeekingPassThru_create().

◆ RendererPosPassThru_EOS()

HRESULT WINAPI RendererPosPassThru_EOS ( IUnknown iface)

Definition at line 620 of file pospass.c.

621{
624 HRESULT hr;
625 hr = IMediaSeeking_GetStopPosition(&This->IMediaSeeking_iface, &time);
626 EnterCriticalSection(&This->time_cs);
627 if (SUCCEEDED(hr)) {
628 This->timevalid = TRUE;
629 This->time_earliest = time;
630 } else
631 This->timevalid = FALSE;
632 LeaveCriticalSection(&This->time_cs);
633 return hr;
634}
__u16 time
Definition: mkdosfs.c:8
static PassThruImpl * impl_from_IUnknown_inner(IUnknown *iface)
Definition: pospass.c:56

Referenced by BaseRendererImpl_EndOfStream().

◆ RendererPosPassThru_RegisterMediaTime()

HRESULT WINAPI RendererPosPassThru_RegisterMediaTime ( IUnknown iface,
REFERENCE_TIME  start 
)

Definition at line 601 of file pospass.c.

602{
604 EnterCriticalSection(&This->time_cs);
605 This->time_earliest = start;
606 This->timevalid = TRUE;
607 LeaveCriticalSection(&This->time_cs);
608 return S_OK;
609}

Referenced by BaseRendererImpl_Receive().

◆ RendererPosPassThru_ResetMediaTime()

HRESULT WINAPI RendererPosPassThru_ResetMediaTime ( IUnknown iface)

Definition at line 611 of file pospass.c.

612{
614 EnterCriticalSection(&This->time_cs);
615 This->timevalid = FALSE;
616 LeaveCriticalSection(&This->time_cs);
617 return S_OK;
618}

Referenced by BaseRendererImpl_EndFlush(), and BaseRendererImpl_Stop().

◆ SourceSeeking_Init()

HRESULT SourceSeeking_Init ( SourceSeeking pSeeking,
const IMediaSeekingVtbl *  Vtbl,
SourceSeeking_ChangeStop  fnChangeStop,
SourceSeeking_ChangeStart  fnChangeStart,
SourceSeeking_ChangeRate  fnChangeRate,
PCRITICAL_SECTION  crit_sect 
)

Definition at line 40 of file seeking.c.

41{
42 assert(fnChangeStop && fnChangeStart && fnChangeRate);
43
44 pSeeking->IMediaSeeking_iface.lpVtbl = Vtbl;
45 pSeeking->refCount = 1;
46 pSeeking->fnChangeRate = fnChangeRate;
47 pSeeking->fnChangeStop = fnChangeStop;
48 pSeeking->fnChangeStart = fnChangeStart;
54 pSeeking->llCurrent = 0;
55 pSeeking->llStop = ((ULONGLONG)0x80000000) << 32;
56 pSeeking->llDuration = pSeeking->llStop;
57 pSeeking->dRate = 1.0;
58 pSeeking->timeformat = TIME_FORMAT_MEDIA_TIME;
59 pSeeking->crst = crit_sect;
60 return S_OK;
61}
@ AM_SEEKING_CanGetDuration
Definition: axcore.idl:609
@ AM_SEEKING_CanSeekBackwards
Definition: axcore.idl:606
@ AM_SEEKING_CanSeekForwards
Definition: axcore.idl:605
@ AM_SEEKING_CanSeekAbsolute
Definition: axcore.idl:604
@ AM_SEEKING_CanGetStopPos
Definition: axcore.idl:608
LONGLONG llCurrent
Definition: strmbase.h:284
PCRITICAL_SECTION crst
Definition: strmbase.h:286
LONGLONG llStop
Definition: strmbase.h:284
double dRate
Definition: strmbase.h:283
SourceSeeking_ChangeRate fnChangeRate
Definition: strmbase.h:281
LONGLONG llDuration
Definition: strmbase.h:284
DWORD dwCapabilities
Definition: strmbase.h:282
SourceSeeking_ChangeStart fnChangeStart
Definition: strmbase.h:280
ULONG refCount
Definition: strmbase.h:278
GUID timeformat
Definition: strmbase.h:285
SourceSeeking_ChangeStop fnChangeStop
Definition: strmbase.h:279
IMediaSeeking IMediaSeeking_iface
Definition: strmbase.h:276
uint64_t ULONGLONG
Definition: typedefs.h:67

Referenced by Parser_Create().

◆ SourceSeekingImpl_CheckCapabilities()

HRESULT WINAPI SourceSeekingImpl_CheckCapabilities ( IMediaSeeking iface,
DWORD pCapabilities 
)

Definition at line 74 of file seeking.c.

75{
77 HRESULT hr;
78 DWORD dwCommonCaps;
79
80 TRACE("(%p)\n", pCapabilities);
81
82 if (!pCapabilities)
83 return E_POINTER;
84
85 dwCommonCaps = *pCapabilities & This->dwCapabilities;
86
87 if (!dwCommonCaps)
88 hr = E_FAIL;
89 else
90 hr = (*pCapabilities == dwCommonCaps) ? S_OK : S_FALSE;
91 *pCapabilities = dwCommonCaps;
92 return hr;
93}
static SourceSeeking * impl_from_IMediaSeeking(IMediaSeeking *iface)
Definition: seeking.c:35

◆ SourceSeekingImpl_ConvertTimeFormat()

HRESULT WINAPI SourceSeekingImpl_ConvertTimeFormat ( IMediaSeeking iface,
LONGLONG pTarget,
const GUID pTargetFormat,
LONGLONG  Source,
const GUID pSourceFormat 
)

Definition at line 185 of file seeking.c.

186{
188 if (!pTargetFormat)
189 pTargetFormat = &This->timeformat;
190 if (!pSourceFormat)
191 pSourceFormat = &This->timeformat;
192 if (IsEqualIID(pTargetFormat, &TIME_FORMAT_MEDIA_TIME) && IsEqualIID(pSourceFormat, &TIME_FORMAT_MEDIA_TIME))
193 {
194 *pTarget = Source;
195 return S_OK;
196 }
197 /* FIXME: clear pTarget? */
198 return E_INVALIDARG;
199}
FxIoTarget * pTarget
Definition: fxdeviceapi.cpp:97
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169

◆ SourceSeekingImpl_GetAvailable()

HRESULT WINAPI SourceSeekingImpl_GetAvailable ( IMediaSeeking iface,
LONGLONG pEarliest,
LONGLONG pLatest 
)

Definition at line 268 of file seeking.c.

269{
271
272 TRACE("(%p, %p)\n", pEarliest, pLatest);
273
275 *pEarliest = 0;
276 *pLatest = This->llDuration;
278
279 return S_OK;
280}

◆ SourceSeekingImpl_GetCapabilities()

HRESULT WINAPI SourceSeekingImpl_GetCapabilities ( IMediaSeeking iface,
DWORD pCapabilities 
)

Definition at line 63 of file seeking.c.

64{
66
67 TRACE("(%p)\n", pCapabilities);
68
69 *pCapabilities = This->dwCapabilities;
70
71 return S_OK;
72}

◆ SourceSeekingImpl_GetCurrentPosition()

HRESULT WINAPI SourceSeekingImpl_GetCurrentPosition ( IMediaSeeking iface,
LONGLONG pCurrent 
)

Definition at line 172 of file seeking.c.

173{
175
176 TRACE("(%p)\n", pCurrent);
177
179 *pCurrent = This->llCurrent;
181
182 return S_OK;
183}

◆ SourceSeekingImpl_GetDuration()

HRESULT WINAPI SourceSeekingImpl_GetDuration ( IMediaSeeking iface,
LONGLONG pDuration 
)

Definition at line 145 of file seeking.c.

146{
148
149 TRACE("(%p)\n", pDuration);
150
152 *pDuration = This->llDuration;
154
155 return S_OK;
156}

◆ SourceSeekingImpl_GetPositions()

HRESULT WINAPI SourceSeekingImpl_GetPositions ( IMediaSeeking iface,
LONGLONG pCurrent,
LONGLONG pStop 
)

Definition at line 254 of file seeking.c.

255{
257
258 TRACE("(%p, %p)\n", pCurrent, pStop);
259
261 IMediaSeeking_GetCurrentPosition(iface, pCurrent);
262 IMediaSeeking_GetStopPosition(iface, pStop);
264
265 return S_OK;
266}

◆ SourceSeekingImpl_GetPreroll()

HRESULT WINAPI SourceSeekingImpl_GetPreroll ( IMediaSeeking iface,
LONGLONG pPreroll 
)

Definition at line 319 of file seeking.c.

320{
321 TRACE("(%p)\n", pPreroll);
322
323 *pPreroll = 0;
324 return S_OK;
325}

◆ SourceSeekingImpl_GetRate()

HRESULT WINAPI SourceSeekingImpl_GetRate ( IMediaSeeking iface,
double dRate 
)

Definition at line 305 of file seeking.c.

306{
308
309 TRACE("(%p)\n", dRate);
310
312 /* Forward? */
313 *dRate = This->dRate;
315
316 return S_OK;
317}

◆ SourceSeekingImpl_GetStopPosition()

HRESULT WINAPI SourceSeekingImpl_GetStopPosition ( IMediaSeeking iface,
LONGLONG pStop 
)

Definition at line 158 of file seeking.c.

159{
161
162 TRACE("(%p)\n", pStop);
163
165 *pStop = This->llStop;
167
168 return S_OK;
169}

◆ SourceSeekingImpl_GetTimeFormat()

HRESULT WINAPI SourceSeekingImpl_GetTimeFormat ( IMediaSeeking iface,
GUID pFormat 
)

Definition at line 110 of file seeking.c.

111{
113 TRACE("(%s)\n", debugstr_guid(pFormat));
114
116 *pFormat = This->timeformat;
118
119 return S_OK;
120}

◆ SourceSeekingImpl_IsFormatSupported()

HRESULT WINAPI SourceSeekingImpl_IsFormatSupported ( IMediaSeeking iface,
const GUID pFormat 
)

Definition at line 95 of file seeking.c.

96{
97 TRACE("(%s)\n", debugstr_guid(pFormat));
98
99 return (IsEqualIID(pFormat, &TIME_FORMAT_MEDIA_TIME) ? S_OK : S_FALSE);
100}

◆ SourceSeekingImpl_IsUsingTimeFormat()

HRESULT WINAPI SourceSeekingImpl_IsUsingTimeFormat ( IMediaSeeking iface,
const GUID pFormat 
)

Definition at line 122 of file seeking.c.

123{
125 HRESULT hr = S_OK;
126
127 TRACE("(%s)\n", debugstr_guid(pFormat));
128
130 if (!IsEqualIID(pFormat, &This->timeformat))
131 hr = S_FALSE;
133
134 return hr;
135}

◆ SourceSeekingImpl_QueryPreferredFormat()

HRESULT WINAPI SourceSeekingImpl_QueryPreferredFormat ( IMediaSeeking iface,
GUID pFormat 
)

Definition at line 102 of file seeking.c.

103{
104 TRACE("(%s)\n", debugstr_guid(pFormat));
105
106 *pFormat = TIME_FORMAT_MEDIA_TIME;
107 return S_OK;
108}

◆ SourceSeekingImpl_SetPositions()

HRESULT WINAPI SourceSeekingImpl_SetPositions ( IMediaSeeking iface,
LONGLONG pCurrent,
DWORD  dwCurrentFlags,
LONGLONG pStop,
DWORD  dwStopFlags 
)

Definition at line 218 of file seeking.c.

219{
221 BOOL bChangeCurrent = FALSE, bChangeStop = FALSE;
222 LONGLONG llNewCurrent, llNewStop;
223
224 TRACE("(%p, %x, %p, %x)\n", pCurrent, dwCurrentFlags, pStop, dwStopFlags);
226
227 llNewCurrent = Adjust(This->llCurrent, pCurrent, dwCurrentFlags);
228 llNewStop = Adjust(This->llStop, pStop, dwStopFlags);
229
230 if (pCurrent)
231 bChangeCurrent = TRUE;
232 if (llNewStop != This->llStop)
233 bChangeStop = TRUE;
234
235 TRACE("Old: %u, New: %u\n", (DWORD)(This->llCurrent/10000000), (DWORD)(llNewCurrent/10000000));
236
237 This->llCurrent = llNewCurrent;
238 This->llStop = llNewStop;
239
240 if (pCurrent && (dwCurrentFlags & AM_SEEKING_ReturnTime))
241 *pCurrent = llNewCurrent;
242 if (pStop && (dwStopFlags & AM_SEEKING_ReturnTime))
243 *pStop = llNewStop;
245
246 if (bChangeCurrent)
247 This->fnChangeStart(iface);
248 if (bChangeStop)
249 This->fnChangeStop(iface);
250
251 return S_OK;
252}
@ AM_SEEKING_ReturnTime
Definition: axcore.idl:597
static LONGLONG Adjust(LONGLONG value, const LONGLONG *pModifier, DWORD dwFlags)
Definition: seeking.c:201
int64_t LONGLONG
Definition: typedefs.h:68

◆ SourceSeekingImpl_SetRate()

HRESULT WINAPI SourceSeekingImpl_SetRate ( IMediaSeeking iface,
double  dRate 
)

Definition at line 282 of file seeking.c.

283{
285 BOOL bChangeRate = (dRate != This->dRate);
286 HRESULT hr = S_OK;
287
288 TRACE("(%e)\n", dRate);
289
290 if (dRate > 100 || dRate < .001)
291 {
292 FIXME("Excessive rate %e, ignoring\n", dRate);
294 }
295
297 This->dRate = dRate;
298 if (bChangeRate)
299 hr = This->fnChangeRate(iface);
301
302 return hr;
303}
#define VFW_E_UNSUPPORTED_AUDIO
Definition: vfwmsgs.h:112

◆ SourceSeekingImpl_SetTimeFormat()

HRESULT WINAPI SourceSeekingImpl_SetTimeFormat ( IMediaSeeking iface,
const GUID pFormat 
)

Definition at line 137 of file seeking.c.

138{
140 TRACE("%p %s\n", This, debugstr_guid(pFormat));
141 return (IsEqualIID(pFormat, &TIME_FORMAT_MEDIA_TIME) ? S_OK : E_INVALIDARG);
142}

◆ STRMBASE_DllCanUnloadNow()

HRESULT WINAPI STRMBASE_DllCanUnloadNow ( void  )

Definition at line 393 of file dllfunc.c.

394{
395 TRACE("\n");
396
397 if (server_locks == 0)
398 return S_OK;
399 return S_FALSE;
400}
static LONG server_locks
Definition: dllfunc.c:49

Referenced by DllCanUnloadNow().

◆ STRMBASE_DllGetClassObject()

HRESULT WINAPI STRMBASE_DllGetClassObject ( REFCLSID  rclsid,
REFIID  riid,
LPVOID ppv 
)

Definition at line 340 of file dllfunc.c.

341{
344 int i;
345
346 TRACE("(%s,%s,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
347
348 if (!ppv)
349 return E_POINTER;
350
351 *ppv = NULL;
352
355 return E_NOINTERFACE;
356
357 for (i = 0; i < g_cTemplates; i++, pList++)
358 {
359 if (IsEqualGUID(pList->m_ClsID, rclsid))
360 break;
361 }
362
363 if (i == g_cTemplates)
364 {
365 char dllname[MAX_PATH];
366 if (!GetModuleFileNameA(g_hInst, dllname, sizeof(dllname)))
367 strcpy(dllname, "???");
368 ERR("%s: no class found in %s.\n", debugstr_guid(rclsid), dllname);
370 }
371 else if (!pList->m_lpfnNew)
372 {
373 FIXME("%s: class not implemented yet.\n", debugstr_guid(rclsid));
375 }
376
378 if (!factory)
379 return E_OUTOFMEMORY;
380
382 factory->ref = 1;
383
384 factory->pfnCreateInstance = pList->m_lpfnNew;
385
387 return S_OK;
388}
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
const GUID IID_IClassFactory
DWORD WINAPI GetModuleFileNameA(HINSTANCE hModule, LPSTR lpFilename, DWORD nSize)
Definition: loader.c:539
static const IClassFactoryVtbl DSCF_Vtbl
Definition: dllfunc.c:328
FxChildList * pList
Definition: main.c:439
IClassFactory IClassFactory_iface
Definition: main.c:440
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663

Referenced by DllGetClassObject().

◆ STRMBASE_DllMain()

BOOL WINAPI STRMBASE_DllMain ( HINSTANCE  hInstDLL,
DWORD  fdwReason,
LPVOID  lpv 
)

Definition at line 217 of file dllfunc.c.

218{
219 switch (fdwReason)
220 {
222 g_hInst = hInstDLL;
225 break;
228 break;
229 }
230 return TRUE;
231}
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
static void SetupInitializeServers(const FactoryTemplate *pList, int num, BOOL bLoading)
Definition: dllfunc.c:205

Referenced by DllMain().

◆ TransformFilter_Construct()

HRESULT TransformFilter_Construct ( const IBaseFilterVtbl *  filterVtbl,
LONG  filter_size,
const CLSID pClsid,
const TransformFilterFuncTable pFuncsTable,
IBaseFilter **  ppTransformFilter 
)

Definition at line 263 of file transform.c.

264{
265 TransformFilter* pTf;
266
267 *ppTransformFilter = NULL;
268
269 assert(filter_size >= sizeof(TransformFilter));
270
271 pTf = CoTaskMemAlloc(filter_size);
272
273 if (!pTf)
274 return E_OUTOFMEMORY;
275
276 ZeroMemory(pTf, filter_size);
277
278 if (SUCCEEDED(TransformFilter_Init(pVtbl, pClsid, pFuncsTable, pTf)))
279 {
280 *ppTransformFilter = &pTf->filter.IBaseFilter_iface;
281 return S_OK;
282 }
283
284 CoTaskMemFree(pTf);
285 return E_FAIL;
286}
static HRESULT TransformFilter_Init(const IBaseFilterVtbl *pVtbl, const CLSID *pClsid, const TransformFilterFuncTable *pFuncsTable, TransformFilter *pTransformFilter)
Definition: transform.c:199
IBaseFilter IBaseFilter_iface
Definition: strmbase.h:163
BaseFilter filter
Definition: strmbase.h:213

Referenced by ACMWrapper_create(), and AVIDec_create().

◆ TransformFilterImpl_FindPin()

HRESULT WINAPI TransformFilterImpl_FindPin ( IBaseFilter iface,
LPCWSTR  Id,
IPin **  ppPin 
)

IBaseFilter implementation

Definition at line 432 of file transform.c.

433{
435
436 TRACE("(%p/%p)->(%s,%p)\n", This, iface, debugstr_w(Id), ppPin);
437
438 return E_NOTIMPL;
439}
static TransformFilter * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: transform.c:69

◆ TransformFilterImpl_Notify()

HRESULT WINAPI TransformFilterImpl_Notify ( TransformFilter iface,
IBaseFilter sender,
Quality  qm 
)

Definition at line 425 of file transform.c.

426{
427 return QualityControlImpl_Notify((IQualityControl*)iface->qcimpl, sender, qm);
428}
HRESULT WINAPI QualityControlImpl_Notify(IQualityControl *iface, IBaseFilter *sender, Quality qm)<