ReactOS  0.4.14-dev-614-gbfd8a84
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 */
186  CoUninitialize();
187 
188  /* if unregistering, unregister all OLE servers */
189  if (SUCCEEDED(hr) && !bRegister)
191 
192  return hr;
193 }
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:609
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
#define E_FAIL
Definition: ddrawi.h:102
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
void WINAPI DECLSPEC_HOTPATCH CoFreeUnusedLibraries(void)
Definition: compobj.c:3701
const int g_cTemplates
static HRESULT SetupRegisterAllClasses(const FactoryTemplate *pList, int num, LPCWSTR szFileName, BOOL bRegister)
Definition: dllfunc.c:106
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define MAX_PATH
Definition: compat.h:26
static HINSTANCE g_hInst
Definition: dllfunc.c:48
HRESULT WINAPI AMovieSetupRegisterFilter2(const AMOVIESETUP_FILTER *pFilter, IFilterMapper2 *pIFM2, BOOL bRegister)
Definition: dllfunc.c:134
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
#define ERR(fmt,...)
Definition: debug.h:109
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
const FactoryTemplate g_Templates[]
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ 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 }
const WCHAR * name
Definition: strmbase.h:324
const AMOVIESETUP_PIN * pPin
Definition: strmbase.h:327
DWORD dwMerit
Definition: axextend.idl:232
smooth NULL
Definition: ftsmooth.c:416
const REGFILTERPINS * rgPins
Definition: axextend.idl:239
ULONG cPins
Definition: axextend.idl:238
#define S_OK
Definition: intsafe.h:59
DWORD dwVersion
Definition: axextend.idl:231
const CLSID * clsid
Definition: strmbase.h:323

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 }
#define S_OK
Definition: intsafe.h:59

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 hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
#define LOCALE_SYSTEM_DEFAULT
HRESULT WINAPI LoadRegTypeLib(REFGUID rguid, WORD wVerMajor, WORD wVerMinor, LCID lcid, ITypeLib **ppTLib)
Definition: typelib.c:531
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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 }
#define S_OK
Definition: intsafe.h:59
#define E_NOTIMPL
Definition: ddrawi.h:99

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 }
#define S_OK
Definition: intsafe.h:59

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)
217  IReferenceClock_Release(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 }
smooth NULL
Definition: ftsmooth.c:416
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define S_OK
Definition: intsafe.h:59
#define IReferenceClock_Release(p)
Definition: dmusicc.h:752

Referenced by AsyncReader_Release(), BaseFilterImpl_Release(), BaseRendererImpl_Release(), MediaStreamFilterImpl_Release(), Parser_Destroy(), and TransformFilterImpl_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;
200  InitializeCriticalSection(&This->csFilter);
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 }
#define ZeroMemory
Definition: winbase.h:1642
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59

Referenced by AsyncReader_create(), BaseRenderer_Init(), MediaStreamFilter_create(), Parser_Create(), 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 }
static BaseFilter * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: filter.c:32
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

Referenced by AMDirectSound_AddRef(), Basicaudio_AddRef(), MediaStreamFilterImpl_AddRef(), NullRendererInner_AddRef(), Parser_AddRef(), ReferenceClock_AddRef(), SampleGrabber_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 }
static BaseFilter * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: filter.c:32
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI EnumPins_Construct(BaseFilter *base, BaseFilter_GetPin receive_pin, BaseFilter_GetPinCount receive_pincount, BaseFilter_GetPinVersion receive_version, IEnumPins **ppEnum)
Definition: enumpins.c:49
LONG WINAPI BaseFilterImpl_GetPinVersion(BaseFilter *This)
Definition: filter.c:184

Referenced by 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 }
static BaseFilter * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: filter.c:32
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

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 }
#define TRACE(s)
Definition: solgame.cpp:4

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 }
static BaseFilter * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: filter.c:32
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
void WINAPI LeaveCriticalSection(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)
128  IReferenceClock_AddRef(This->pClock);
129  }
130  LeaveCriticalSection(&This->csFilter);
131 
132  return S_OK;
133 }
static BaseFilter * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: filter.c:32
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
#define IReferenceClock_AddRef(p)
Definition: dmusicc.h:751
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

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 }
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53

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 }
static BaseFilter * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: filter.c:32
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
static LPSTR pName
Definition: security.c:75
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

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 }
static BaseFilter * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: filter.c:32
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219

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_IBaseFilter
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const GUID IID_IPersist
Definition: proxy.cpp:14
REFIID LPVOID * ppv
Definition: atlbase.h:39
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

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 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOTIMPL
Definition: ddrawi.h:99

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 }
HRESULT WINAPI BaseFilter_Destroy(BaseFilter *This)
Definition: filter.c:214
static BaseFilter * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: filter.c:32
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1

Referenced by Parser_Create(), SampleGrabber_Release(), and TransformFilter_Init().

◆ 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)
109  IReferenceClock_Release(This->pClock);
110  This->pClock = pClock;
111  if (This->pClock)
112  IReferenceClock_AddRef(This->pClock);
113  }
114  LeaveCriticalSection(&This->csFilter);
115 
116  return S_OK;
117 }
static BaseFilter * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: filter.c:32
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
#define IReferenceClock_Release(p)
Definition: dmusicc.h:752
#define IReferenceClock_AddRef(p)
Definition: dmusicc.h:751
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

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 ,
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 }
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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:420
IPin IPin_iface
Definition: strmbase.h:35
#define assert(x)
Definition: debug.h:53
BasePin pin
Definition: strmbase.h:90
#define E_FAIL
Definition: ddrawi.h:102
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:404
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by audiomediastream_create(), BaseRenderer_Init(), ddrawmediastream_create(), 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 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:420
static void FreeMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: filtergraph.c:692
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59

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 
977  hr = SendFurther( iface, deliver_beginflush, NULL, NULL );
978  LeaveCriticalSection(This->pin.pCritSec);
979 
980  return hr;
981 }
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static HRESULT SendFurther(IPin *from, SendPinFunc fnMiddle, LPVOID arg, SendPinFunc fnEnd)
Definition: pin.c:67
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
static HRESULT deliver_beginflush(IPin *pin, LPVOID unused)
Definition: pin.c:963
static BaseInputPin * impl_BaseInputPin_from_IPin(IPin *iface)
Definition: pin.c:833

Referenced by 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 ERR(fmt,...)
Definition: debug.h:109
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ 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 
997  hr = SendFurther( iface, deliver_endflush, NULL, NULL );
998  LeaveCriticalSection(This->pin.pCritSec);
999 
1000  return hr;
1001 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static HRESULT SendFurther(IPin *from, SendPinFunc fnMiddle, LPVOID arg, SendPinFunc fnEnd)
Definition: pin.c:67
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
static HRESULT deliver_endflush(IPin *pin, LPVOID unused)
Definition: pin.c:983
static BaseInputPin * impl_BaseInputPin_from_IPin(IPin *iface)
Definition: pin.c:833

Referenced by 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 }
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static HRESULT SendFurther(IPin *from, SendPinFunc fnMiddle, LPVOID arg, SendPinFunc fnEnd)
Definition: pin.c:67
#define S_OK
Definition: intsafe.h:59
static HRESULT deliver_endofstream(IPin *pin, LPVOID unused)
Definition: pin.c:930
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
static BaseInputPin * impl_BaseInputPin_from_IPin(IPin *iface)
Definition: pin.c:833

Referenced by 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 }
Definition: match.c:390
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT SendFurther(IPin *from, SendPinFunc fnMiddle, LPVOID arg, SendPinFunc fnEnd)
Definition: pin.c:67
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
static HRESULT deliver_newsegment(IPin *pin, LPVOID data)
Definition: pin.c:1009
#define args
Definition: format.c:66
static BaseInputPin * impl_BaseInputPin_from_IPin(IPin *iface)
Definition: pin.c:833

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 }
#define S_FALSE
Definition: winerror.h:2357
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static BaseInputPin * impl_BaseInputPin_from_IPin(IPin *iface)
Definition: pin.c:833

◆ 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 E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
const GUID IID_IPin
Definition: pincontrol.cpp:15
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
static BaseInputPin * impl_BaseInputPin_from_IPin(IPin *iface)
Definition: pin.c:833

◆ 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);
896  dump_AM_MEDIA_TYPE(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 }
static void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: pin.c:157
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define VFW_E_ALREADY_CONNECTED
Definition: vfwmsgs.h:43
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static HRESULT CopyMediaType(AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
Definition: filtergraph.c:706
#define VFW_E_TYPE_NOT_ACCEPTED
Definition: vfwmsgs.h:81
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
enum _PinDirection PIN_DIRECTION
#define VFW_E_INVALID_DIRECTION
Definition: vfwmsgs.h:47
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static BaseInputPin * impl_BaseInputPin_from_IPin(IPin *iface)
Definition: pin.c:833

Referenced by 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
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1
static BaseInputPin * impl_BaseInputPin_from_IPin(IPin *iface)
Definition: pin.c:833

◆ 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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:420
IPin IPin_iface
Definition: strmbase.h:35
#define assert(x)
Definition: debug.h:53
#define E_FAIL
Definition: ddrawi.h:102
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
BasePin pin
Definition: strmbase.h:66
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:404
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by FileAsyncReader_Construct(), Parser_AddPin(), and TransformFilter_Init().

◆ 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 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:420
static void FreeMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: filtergraph.c:692
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59

Referenced by BaseOutputPinImpl_Release(), and FileAsyncReaderPin_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 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define VFW_E_NOT_CONNECTED
Definition: vfwmsgs.h:48
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

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);
719  dump_AM_MEDIA_TYPE(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 }
static void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: pin.c:157
HRESULT hr
Definition: shlfolder.c:183
static void FreeMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: filtergraph.c:692
static BaseOutputPin * impl_BaseOutputPin_from_BasePin(BasePin *iface)
Definition: pin.c:358
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static HRESULT CopyMediaType(AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
Definition: filtergraph.c:706
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ 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 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ 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 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define VFW_E_NOT_CONNECTED
Definition: vfwmsgs.h:48
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ 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);
411  dump_AM_MEDIA_TYPE(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 }
static void dump_AM_MEDIA_TYPE(const AM_MEDIA_TYPE *pmt)
Definition: pin.c:157
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
#define assert(x)
Definition: debug.h:53
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
static void DeleteMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: filtergraph.c:741
static BaseOutputPin * impl_BaseOutputPin_from_IPin(IPin *iface)
Definition: pin.c:353
smooth NULL
Definition: ftsmooth.c:416
static BOOL CompareMediaTypes(const AM_MEDIA_TYPE *pmt1, const AM_MEDIA_TYPE *pmt2, BOOL bWildcards)
Definition: pin.c:164
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define GUID_NULL
Definition: ks.h:106
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
unsigned int ULONG
Definition: retypes.h:1
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define E_POINTER
Definition: winerror.h:2365
#define SUCCEEDED(hr)
Definition: intsafe.h:57
#define VFW_E_NO_ACCEPTABLE_TYPES
Definition: vfwmsgs.h:46

Referenced by 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  {
695  ALLOCATOR_PROPERTIES rProps;
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 hr
Definition: shlfolder.c:183
#define ZeroMemory
Definition: winbase.h:1642
LONG HRESULT
Definition: typedefs.h:77
#define VFW_E_NO_ALLOCATOR
Definition: vfwmsgs.h:49
HRESULT WINAPI BaseOutputPinImpl_InitAllocator(BaseOutputPin *This, IMemAllocator **pMemAlloc)
Definition: pin.c:678
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ 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 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
#define VFW_E_NOT_CONNECTED
Definition: vfwmsgs.h:48
LONG HRESULT
Definition: typedefs.h:77
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by ACMWrapper_Receive(), AVIDec_Receive(), AVISplitter_Receive(), FillBuffer(), 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 }
HRESULT hr
Definition: shlfolder.c:183
#define ZeroMemory
Definition: winbase.h:1642
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
static BaseOutputPin * impl_BaseOutputPin_from_IPin(IPin *iface)
Definition: pin.c:353
static void FreeMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: filtergraph.c:692
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

◆ 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 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ 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 }
#define TRACE(s)
Definition: solgame.cpp:4
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ 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 }
HRESULT hr
Definition: shlfolder.c:183
#define VFW_E_NOT_CONNECTED
Definition: vfwmsgs.h:48
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by ACMWrapper_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 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define VFW_E_NOT_CONNECTED
Definition: vfwmsgs.h:48
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

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 }
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325

Referenced by 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 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static BaseOutputPin * impl_BaseOutputPin_from_IPin(IPin *iface)
Definition: pin.c:353
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
#define S_OK
Definition: intsafe.h:59
const GUID IID_IPin
Definition: pincontrol.cpp:15
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ 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 }
#define ERR(fmt,...)
Definition: debug.h:109
#define E_UNEXPECTED
Definition: winerror.h:2456

◆ 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 }
static BaseOutputPin * impl_BaseOutputPin_from_IPin(IPin *iface)
Definition: pin.c:353
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI BaseOutputPin_Destroy(BaseOutputPin *This)
Definition: pin.c:821
#define InterlockedDecrement
Definition: armddk.h:52
unsigned int ULONG
Definition: retypes.h:1

◆ 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 }
#define TRACE(s)
Definition: solgame.cpp:4
static BasePin * impl_from_IPin(IPin *iface)
Definition: pin.c:38
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

◆ 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 }
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
smooth NULL
Definition: ftsmooth.c:416
#define VFW_E_NOT_CONNECTED
Definition: vfwmsgs.h:48
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static BasePin * impl_from_IPin(IPin *iface)
Definition: pin.c:38
#define S_OK
Definition: intsafe.h:59
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

◆ 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 }
HRESULT hr
Definition: shlfolder.c:183
#define ZeroMemory
Definition: winbase.h:1642
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define VFW_E_NOT_CONNECTED
Definition: vfwmsgs.h:48
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static HRESULT CopyMediaType(AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
Definition: filtergraph.c:706
static BasePin * impl_from_IPin(IPin *iface)
Definition: pin.c:38
#define S_OK
Definition: intsafe.h:59
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

◆ 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 }
HRESULT hr
Definition: shlfolder.c:183
#define ZeroMemory
Definition: winbase.h:1642
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
static void FreeMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: filtergraph.c:692
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static BasePin * impl_from_IPin(IPin *iface)
Definition: pin.c:38
#define S_OK
Definition: intsafe.h:59
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

Referenced by 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 }
#define TRACE(s)
Definition: solgame.cpp:4
static BasePin * impl_from_IPin(IPin *iface)
Definition: pin.c:38
HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enumFunc, BasePin_GetMediaTypeVersion versionFunc, IEnumMediaTypes **ppEnum)
Definition: mediatype.c:108

◆ 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
#define E_INVALIDARG
Definition: ddrawi.h:101

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 }
#define TRACE(s)
Definition: solgame.cpp:4
static BasePin * impl_from_IPin(IPin *iface)
Definition: pin.c:38
#define S_OK
Definition: intsafe.h:59
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41

◆ 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 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59

◆ 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 }
#define TRACE(s)
Definition: solgame.cpp:4
static BasePin * impl_from_IPin(IPin *iface)
Definition: pin.c:38
#define S_OK
Definition: intsafe.h:59

◆ 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 }
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
DWORD Id
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
static BasePin * impl_from_IPin(IPin *iface)
Definition: pin.c:38
#define S_OK
Definition: intsafe.h:59
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:219
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:404

◆ 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 }
#define TRACE(s)
Definition: solgame.cpp:4
static BasePin * impl_from_IPin(IPin *iface)
Definition: pin.c:38
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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
#define TRACE(s)
Definition: solgame.cpp:4
static BasePin * impl_from_IPin(IPin *iface)
Definition: pin.c:38
#define S_OK
Definition: intsafe.h:59

◆ 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 TRUE
Definition: types.h:120
#define DWORD_PTR
Definition: treelist.c:76
HRESULT hr
Definition: shlfolder.c:183
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 lstrcpynW
Definition: compat.h:405
HRESULT QualityControlImpl_Create(IPin *input, IBaseFilter *self, QualityControlImpl **ppv)
static const BaseFilterFuncTable RendererBaseFilterFuncTable
Definition: renderer.c:225
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
smooth NULL
Definition: ftsmooth.c:416
static const BaseInputPinFuncTable input_BaseInputFuncTable
Definition: renderer.c:230
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
static const IQualityControlVtbl Renderer_QualityControl_Vtbl
Definition: renderer.c:51
LONG HRESULT
Definition: typedefs.h:77
static const WCHAR wcsInputPinName[]
Definition: renderer.c:33
static const IPinVtbl BaseRenderer_InputPin_Vtbl
Definition: renderer.c:175
HRESULT WINAPI CreatePosPassThru(IUnknown *pUnkOuter, BOOL bRenderer, IPin *pPin, IUnknown **ppPassThru)
Definition: pospass.c:233
Definition: axcore.idl:91
HRESULT WINAPI BaseFilter_Init(BaseFilter *This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable *pBaseFuncsTable)
Definition: filter.c:196
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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 RenderEvent
Definition: strmbase.h:587
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
HANDLE ThreadSignal
Definition: strmbase.h:586

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
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59

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 }
HANDLE RenderEvent
Definition: strmbase.h:587
REFERENCE_TIME rtStreamStart
Definition: strmbase.h:168
IUnknown * pPosition
Definition: strmbase.h:583
struct QualityControlImpl * qcimpl
Definition: strmbase.h:591
void QualityControlRender_Start(QualityControlImpl *This, REFERENCE_TIME tStart)
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface)
Definition: pospass.c:611
BaseFilter filter
Definition: strmbase.h:580
#define S_OK
Definition: intsafe.h:59
HANDLE ThreadSignal
Definition: strmbase.h:586
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 }
FILTER_INFO filterInfo
Definition: strmbase.h:170
HANDLE evComplete
Definition: strmbase.h:585
HRESULT hr
Definition: shlfolder.c:183
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
IUnknown * pPosition
Definition: strmbase.h:583
#define EC_COMPLETE
Definition: evcode.h:17
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
HRESULT WINAPI RendererPosPassThru_EOS(IUnknown *iface)
Definition: pospass.c:620
BaseFilter filter
Definition: strmbase.h:580
#define S_OK
Definition: intsafe.h:59
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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
DWORD Id
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
#define VFW_E_NOT_FOUND
Definition: vfwmsgs.h:61
static BaseRenderer * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: renderer.c:41
#define TRACE(s)
Definition: solgame.cpp:4
static const WCHAR wcsInputPinName[]
Definition: renderer.c:33
#define S_OK
Definition: intsafe.h:59
static const WCHAR wcsAltInputPinName[]
Definition: renderer.c:34
#define E_POINTER
Definition: winerror.h:2365

◆ 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 }
HRESULT hr
Definition: shlfolder.c:183
#define VFW_S_STATE_INTERMEDIATE
Definition: vfwmsgs.h:21
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
static BaseRenderer * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: renderer.c:41
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define WAIT_TIMEOUT
Definition: dderror.h:14
#define S_OK
Definition: intsafe.h:59

◆ 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 }
HRESULT WINAPI BaseRendererImpl_ClearPendingSample(BaseRenderer *iface)
Definition: renderer.c:609
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
static BaseRenderer * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: renderer.c:41
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
Definition: synch.c:714
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

◆ 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 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: filter.c:37
static BaseRenderer * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: renderer.c:41
#define S_OK
Definition: intsafe.h:59
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

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  {
358  if (hr == VFW_E_SAMPLE_REJECTED)
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 }
HRESULT QualityControlRender_WaitFor(QualityControlImpl *This, IMediaSample *sample, HANDLE ev)
HRESULT WINAPI BaseRendererImpl_ClearPendingSample(BaseRenderer *iface)
Definition: renderer.c:609
HRESULT hr
Definition: shlfolder.c:183
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
void QualityControlRender_DoQOS(QualityControlImpl *priv)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void QualityControlRender_BeginRender(QualityControlImpl *This)
#define S_FALSE
Definition: winerror.h:2357
HRESULT WINAPI RendererPosPassThru_RegisterMediaTime(IUnknown *iface, REFERENCE_TIME start)
Definition: pospass.c:601
void QualityControlRender_EndRender(QualityControlImpl *This)
#define TRACE(s)
Definition: solgame.cpp:4
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
LONG HRESULT
Definition: typedefs.h:77
#define VFW_E_TYPE_NOT_ACCEPTED
Definition: vfwmsgs.h:81
#define S_OK
Definition: intsafe.h:59
GLuint start
Definition: gl.h:1545
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define VFW_E_WRONG_STATE
Definition: vfwmsgs.h:78
#define VFW_E_SAMPLE_REJECTED
Definition: vfwmsgs.h:82
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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:406
HRESULT WINAPI BaseRendererImpl_ClearPendingSample(BaseRenderer *iface)
Definition: renderer.c:609
void QualityControlImpl_Destroy(QualityControlImpl *This)
static BaseRenderer * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: renderer.c:41
HRESULT WINAPI BaseFilter_Destroy(BaseFilter *This)
Definition: filter.c:214
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define InterlockedDecrement
Definition: armddk.h:52
Definition: axcore.idl:91
unsigned int ULONG
Definition: retypes.h:1
#define SUCCEEDED(hr)
Definition: intsafe.h:57

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  }
500 out:
501  LeaveCriticalSection(&This->csRenderLock);
502 
503  return hr;
504 }
HRESULT WINAPI BaseRendererImpl_ClearPendingSample(BaseRenderer *iface)
Definition: renderer.c:609
HRESULT hr
Definition: shlfolder.c:183
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void QualityControlRender_Start(QualityControlImpl *This, REFERENCE_TIME tStart)
#define EC_COMPLETE
Definition: evcode.h:17
static BaseRenderer * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: renderer.c:41
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static FILE * out
Definition: regtests2xml.c:44
#define S_OK
Definition: intsafe.h:59
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
Definition: synch.c:714
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ 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 }
HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *pClock)
Definition: filter.c:101
HRESULT hr
Definition: shlfolder.c:183
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
static BaseRenderer * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: renderer.c:41
LONG HRESULT
Definition: typedefs.h:77
_Check_return_ _CRTIMP clock_t __cdecl clock(void)
Definition: clock.c:23
void QualityControlRender_SetClock(QualityControlImpl *This, IReferenceClock *clock)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

◆ 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 }
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
static BaseRenderer * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: renderer.c:41
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface)
Definition: pospass.c:611
#define S_OK
Definition: intsafe.h:59
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)

◆ 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 }
HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This)
Definition: window.c:143
#define GetProcessHeap()
Definition: compat.h:403
#define S_OK
Definition: intsafe.h:59
#define HeapFree(x, y, z)
Definition: compat.h:402

◆ 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 }
#define ZeroMemory
Definition: winbase.h:1642
#define E_INVALIDARG
Definition: ddrawi.h:101
#define S_OK
Definition: intsafe.h:59
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 }
BOOL WINAPI DestroyWindow(_In_ HWND)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59

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 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
WPARAM wParam
Definition: combotst.c:138
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_SIZE
Definition: winuser.h:1593
#define HIWORD(l)
Definition: typedefs.h:246
BOOL WINAPI BaseWindowImpl_OnSize(BaseWindow *This, LONG Width, LONG Height)
Definition: window.c:73
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82

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 }
#define TRUE
Definition: types.h:120

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 
136  SetWindowLongPtrW(This->hWnd, 0, (LONG_PTR)This);
137 
138  This->hDC = GetDC(This->hWnd);
139 
140  return S_OK;
141 }
HGDIOBJ WINAPI GetStockObject(_In_ int)
UINT style
Definition: winuser.h:3151
LPCWSTR lpszMenuName
Definition: winuser.h:3159
HDC WINAPI GetDC(_In_opt_ HWND)
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
int cbClsExtra
Definition: winuser.h:3153
#define E_FAIL
Definition: ddrawi.h:102
ATOM WINAPI RegisterClassW(_In_ CONST WNDCLASSW *)
WNDPROC lpfnWndProc
Definition: winuser.h:3152
#define CW_USEDEFAULT
Definition: winuser.h:225
smooth NULL
Definition: ftsmooth.c:416
#define ERROR_CLASS_ALREADY_EXISTS
Definition: winerror.h:891
LPCWSTR lpszClassName
Definition: winuser.h:3160
#define BLACK_BRUSH
Definition: wingdi.h:895
int cbWndExtra
Definition: winuser.h:3154
__wchar_t WCHAR
Definition: xmlstorage.h:180
HICON hIcon
Definition: winuser.h:3156
static LRESULT CALLBACK WndProcW(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: window.c:43
HCURSOR hCursor
Definition: winuser.h:3157
#define ERR(fmt,...)
Definition: debug.h:109
HWND WINAPI DECLSPEC_HOTPATCH CreateWindowExW(DWORD dwExStyle, LPCWSTR lpClassName, LPCWSTR lpWindowName, DWORD dwStyle, int x, int y, int nWidth, int nHeight, HWND hWndParent, HMENU hMenu, HINSTANCE hInstance, LPVOID lpParam)
Definition: window.c:503
#define S_OK
Definition: intsafe.h:59
HBRUSH hbrBackground
Definition: winuser.h:3158
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
HINSTANCE hInstance
Definition: winuser.h:3155
#define SetWindowLongPtrW
Definition: winuser.h:5321

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 }
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum src
Definition: glext.h:6340
#define S_OK
Definition: intsafe.h:59
static char * dest
Definition: rtl.c:135
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:404

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 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:420
HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE *dest, const AM_MEDIA_TYPE *src)
Definition: mediatype.c:31
smooth NULL
Definition: ftsmooth.c:416
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:404

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 }
HRESULT hr
Definition: shlfolder.c:183
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325

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 CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:420
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 }
HRESULT hr
Definition: shlfolder.c:183
BasePin * basePin
Definition: mediatype.c:93
static const struct IEnumMediaTypesVtbl IEnumMediaTypesImpl_Vtbl
Definition: mediatype.c:106
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 E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
void WINAPI FreeMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: mediatype.c:46
LONG HRESULT
Definition: typedefs.h:77
AM_MEDIA_TYPE * pMediaTypes
Definition: mediatype.c:86
BasePin_GetMediaType enumMediaFunction
Definition: mediatype.c:94
#define S_OK
Definition: intsafe.h:59
BasePin_GetMediaTypeVersion mediaVersionFunction
Definition: mediatype.c:95
ENUMMEDIADETAILS enumMediaDetails
Definition: mediatype.c:97
IEnumMediaTypes IEnumMediaTypes_iface
Definition: filtergraph.c:749
unsigned int ULONG
Definition: retypes.h:1
#define memset(x, y, z)
Definition: compat.h:39
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:404

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 }
BaseFilter_GetPinCount receive_pincount
Definition: enumpins.c:37
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
GLuint base
Definition: 3dtext.c:35
BaseFilter_GetPinVersion receive_version
Definition: enumpins.c:38
TestFilterImpl * base
Definition: filtergraph.c:1273
smooth NULL
Definition: ftsmooth.c:416
DWORD Version
Definition: enumpins.c:39
static const struct IEnumPinsVtbl IEnumPinsImpl_Vtbl
Definition: enumpins.c:47
FNOBTAINPIN receive_pin
Definition: filtergraph.c:1274
#define TRACE(s)
Definition: solgame.cpp:4
IEnumPins IEnumPins_iface
Definition: filtergraph.c:1270
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:404

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 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:420
smooth NULL
Definition: ftsmooth.c:416

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 }
#define DWORD_PTR
Definition: treelist.c:76
IPin IPin_iface
Definition: strmbase.h:35
static DWORD WINAPI OutputQueue_InitialThreadProc(LPVOID data)
Definition: outputqueue.c:43
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
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 E_OUTOFMEMORY
Definition: ddrawi.h:100
unsigned int BOOL
Definition: ntddk_ex.h:94
#define E_INVALIDARG
Definition: ddrawi.h:101
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:136
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI SetThreadPriority(IN HANDLE hThread, IN int nPriority)
Definition: thread.c:699
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
BasePin pin
Definition: strmbase.h:66
unsigned long DWORD
Definition: ntddk_ex.h:95
IMemInputPin * pMemInputPin
Definition: strmbase.h:67
#define S_OK
Definition: intsafe.h:59
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
__WINE_SERVER_LIST_INLINE void list_init(struct list *list)
Definition: list.h:149
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
static TfClientId tid

◆ 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 }
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:406
IPin IPin_iface
Definition: strmbase.h:35
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
CRITICAL_SECTION csQueue
Definition: strmbase.h:346
HANDLE hProcessQueue
Definition: strmbase.h:351
#define GetProcessHeap()
Definition: compat.h:403
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
BasePin pin
Definition: strmbase.h:66
PCRITICAL_SECTION_DEBUG DebugInfo
Definition: winbase.h:866
BaseOutputPin * pInputPin
Definition: strmbase.h:348
#define S_OK
Definition: intsafe.h:59
static void OutputQueue_FreeSamples(OutputQueue *pOutputQueue)
Definition: outputqueue.c:49
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define HeapFree(x, y, z)
Definition: compat.h:402
BOOL bTerminate
Definition: strmbase.h:355
DWORD_PTR Spare[8/sizeof(DWORD_PTR)]
Definition: winbase.h:859

◆ 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  {
198  QueuedEvent *qev = HeapAlloc(GetProcessHeap(),0,sizeof(QueuedEvent));
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_