ReactOS 0.4.16-dev-106-g10b08aa
filtergraph.c File Reference
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "shlwapi.h"
#include "dshow.h"
#include "wine/debug.h"
#include "quartz_private.h"
#include "ole2.h"
#include "olectl.h"
#include "strmif.h"
#include "vfwmsgs.h"
#include "evcode.h"
#include "wine/unicode.h"
Include dependency graph for filtergraph.c:

Go to the source code of this file.

Classes

struct  WndNotify
 
struct  Event
 
struct  EventsQueue
 
struct  _ITF_CACHE_ENTRY
 
struct  _IFilterGraphImpl
 
struct  pos_args
 

Macros

#define COBJMACROS
 
#define EVENTS_RING_BUFFER_INCREMENT   64
 
#define MAX_ITF_CACHE_ENTRIES   3
 

Typedefs

typedef struct _ITF_CACHE_ENTRY ITF_CACHE_ENTRY
 
typedef struct _IFilterGraphImpl IFilterGraphImpl
 
typedef HRESULT(WINAPIfnFoundFilter) (IBaseFilter *, DWORD_PTR data)
 
typedef HRESULT(WINAPIfnFoundSeek) (IFilterGraphImpl *This, IMediaSeeking *, DWORD_PTR arg)
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (quartz)
 
static int EventsQueue_Init (EventsQueue *omr)
 
static int EventsQueue_Destroy (EventsQueue *omr)
 
static BOOL EventsQueue_PutEvent (EventsQueue *omr, const Event *evt)
 
static BOOL EventsQueue_GetEvent (EventsQueue *omr, Event *evt, LONG msTimeOut)
 
static IFilterGraphImplimpl_from_IUnknown (IUnknown *iface)
 
static HRESULT WINAPI FilterGraphInner_QueryInterface (IUnknown *iface, REFIID riid, void **ppvObj)
 
static ULONG WINAPI FilterGraphInner_AddRef (IUnknown *iface)
 
static ULONG WINAPI FilterGraphInner_Release (IUnknown *iface)
 
static IFilterGraphImplimpl_from_IFilterGraph2 (IFilterGraph2 *iface)
 
static HRESULT WINAPI FilterGraph2_QueryInterface (IFilterGraph2 *iface, REFIID riid, void **ppvObj)
 
static ULONG WINAPI FilterGraph2_AddRef (IFilterGraph2 *iface)
 
static ULONG WINAPI FilterGraph2_Release (IFilterGraph2 *iface)
 
static HRESULT WINAPI FilterGraph2_AddFilter (IFilterGraph2 *iface, IBaseFilter *pFilter, LPCWSTR pName)
 
static HRESULT WINAPI FilterGraph2_RemoveFilter (IFilterGraph2 *iface, IBaseFilter *pFilter)
 
static HRESULT WINAPI FilterGraph2_EnumFilters (IFilterGraph2 *iface, IEnumFilters **ppEnum)
 
static HRESULT WINAPI FilterGraph2_FindFilterByName (IFilterGraph2 *iface, LPCWSTR pName, IBaseFilter **ppFilter)
 
static HRESULT CheckCircularConnection (IFilterGraphImpl *This, IPin *out, IPin *in)
 
static HRESULT WINAPI FilterGraph2_ConnectDirect (IFilterGraph2 *iface, IPin *ppinIn, IPin *ppinOut, const AM_MEDIA_TYPE *pmt)
 
static HRESULT WINAPI FilterGraph2_Reconnect (IFilterGraph2 *iface, IPin *ppin)
 
static HRESULT WINAPI FilterGraph2_Disconnect (IFilterGraph2 *iface, IPin *ppin)
 
static HRESULT WINAPI FilterGraph2_SetDefaultSyncSource (IFilterGraph2 *iface)
 
static HRESULT GetFilterInfo (IMoniker *pMoniker, VARIANT *pvar)
 
static HRESULT GetInternalConnections (IBaseFilter *pfilter, IPin *pinputpin, IPin ***pppins, ULONG *pnb)
 
static HRESULT WINAPI FilterGraph2_Connect (IFilterGraph2 *iface, IPin *ppinOut, IPin *ppinIn)
 
static HRESULT FilterGraph2_RenderRecurse (IFilterGraphImpl *This, IPin *ppinOut)
 
static HRESULT WINAPI FilterGraph2_Render (IFilterGraph2 *iface, IPin *ppinOut)
 
static HRESULT WINAPI FilterGraph2_RenderFile (IFilterGraph2 *iface, LPCWSTR lpcwstrFile, LPCWSTR lpcwstrPlayList)
 
static HRESULT CreateFilterInstanceAndLoadFile (GUID *clsid, LPCOLESTR pszFileName, IBaseFilter **filter)
 
static HRESULT GetFileSourceFilter (LPCOLESTR pszFileName, IBaseFilter **filter)
 
static HRESULT WINAPI FilterGraph2_AddSourceFilter (IFilterGraph2 *iface, LPCWSTR lpcwstrFileName, LPCWSTR lpcwstrFilterName, IBaseFilter **ppFilter)
 
static HRESULT WINAPI FilterGraph2_SetLogFile (IFilterGraph2 *iface, DWORD_PTR hFile)
 
static HRESULT WINAPI FilterGraph2_Abort (IFilterGraph2 *iface)
 
static HRESULT WINAPI FilterGraph2_ShouldOperationContinue (IFilterGraph2 *iface)
 
static HRESULT WINAPI FilterGraph2_AddSourceFilterForMoniker (IFilterGraph2 *iface, IMoniker *pMoniker, IBindCtx *pCtx, LPCWSTR lpcwstrFilterName, IBaseFilter **ppFilter)
 
static HRESULT WINAPI FilterGraph2_ReconnectEx (IFilterGraph2 *iface, IPin *ppin, const AM_MEDIA_TYPE *pmt)
 
static HRESULT WINAPI FilterGraph2_RenderEx (IFilterGraph2 *iface, IPin *pPinOut, DWORD dwFlags, DWORD *pvContext)
 
static IFilterGraphImplimpl_from_IMediaControl (IMediaControl *iface)
 
static HRESULT WINAPI MediaControl_QueryInterface (IMediaControl *iface, REFIID riid, void **ppvObj)
 
static ULONG WINAPI MediaControl_AddRef (IMediaControl *iface)
 
static ULONG WINAPI MediaControl_Release (IMediaControl *iface)
 
static HRESULT WINAPI MediaControl_GetTypeInfoCount (IMediaControl *iface, UINT *pctinfo)
 
static HRESULT WINAPI MediaControl_GetTypeInfo (IMediaControl *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI MediaControl_GetIDsOfNames (IMediaControl *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI MediaControl_Invoke (IMediaControl *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
 
static HRESULT ExploreGraph (IFilterGraphImpl *pGraph, IPin *pOutputPin, fnFoundFilter FoundFilter, DWORD_PTR data)
 
static HRESULT WINAPI SendRun (IBaseFilter *pFilter, DWORD_PTR data)
 
static HRESULT WINAPI SendPause (IBaseFilter *pFilter, DWORD_PTR data)
 
static HRESULT WINAPI SendStop (IBaseFilter *pFilter, DWORD_PTR data)
 
static HRESULT WINAPI SendGetState (IBaseFilter *pFilter, DWORD_PTR data)
 
static HRESULT SendFilterMessage (IFilterGraphImpl *This, fnFoundFilter FoundFilter, DWORD_PTR data)
 
static HRESULT WINAPI MediaControl_Run (IMediaControl *iface)
 
static HRESULT WINAPI MediaControl_Pause (IMediaControl *iface)
 
static HRESULT WINAPI MediaControl_Stop (IMediaControl *iface)
 
static HRESULT WINAPI MediaControl_GetState (IMediaControl *iface, LONG msTimeout, OAFilterState *pfs)
 
static HRESULT WINAPI MediaControl_RenderFile (IMediaControl *iface, BSTR strFilename)
 
static HRESULT WINAPI MediaControl_AddSourceFilter (IMediaControl *iface, BSTR strFilename, IDispatch **ppUnk)
 
static HRESULT WINAPI MediaControl_get_FilterCollection (IMediaControl *iface, IDispatch **ppUnk)
 
static HRESULT WINAPI MediaControl_get_RegFilterCollection (IMediaControl *iface, IDispatch **ppUnk)
 
static HRESULT WINAPI MediaControl_StopWhenReady (IMediaControl *iface)
 
static IFilterGraphImplimpl_from_IMediaSeeking (IMediaSeeking *iface)
 
static HRESULT WINAPI MediaSeeking_QueryInterface (IMediaSeeking *iface, REFIID riid, void **ppvObj)
 
static ULONG WINAPI MediaSeeking_AddRef (IMediaSeeking *iface)
 
static ULONG WINAPI MediaSeeking_Release (IMediaSeeking *iface)
 
static HRESULT all_renderers_seek (IFilterGraphImpl *This, fnFoundSeek FoundSeek, DWORD_PTR arg)
 
static HRESULT WINAPI FoundCapabilities (IFilterGraphImpl *This, IMediaSeeking *seek, DWORD_PTR pcaps)
 
static HRESULT WINAPI MediaSeeking_GetCapabilities (IMediaSeeking *iface, DWORD *pCapabilities)
 
static HRESULT WINAPI MediaSeeking_CheckCapabilities (IMediaSeeking *iface, DWORD *pCapabilities)
 
static HRESULT WINAPI MediaSeeking_IsFormatSupported (IMediaSeeking *iface, const GUID *pFormat)
 
static HRESULT WINAPI MediaSeeking_QueryPreferredFormat (IMediaSeeking *iface, GUID *pFormat)
 
static HRESULT WINAPI MediaSeeking_GetTimeFormat (IMediaSeeking *iface, GUID *pFormat)
 
static HRESULT WINAPI MediaSeeking_IsUsingTimeFormat (IMediaSeeking *iface, const GUID *pFormat)
 
static HRESULT WINAPI MediaSeeking_SetTimeFormat (IMediaSeeking *iface, const GUID *pFormat)
 
static HRESULT WINAPI FoundDuration (IFilterGraphImpl *This, IMediaSeeking *seek, DWORD_PTR pduration)
 
static HRESULT WINAPI MediaSeeking_GetDuration (IMediaSeeking *iface, LONGLONG *pDuration)
 
static HRESULT WINAPI MediaSeeking_ConvertTimeFormat (IMediaSeeking *iface, LONGLONG *pTarget, const GUID *pTargetFormat, LONGLONG Source, const GUID *pSourceFormat)
 
static HRESULT WINAPI found_setposition (IFilterGraphImpl *This, IMediaSeeking *seek, DWORD_PTR pargs)
 
static HRESULT WINAPI MediaSeeking_SetPositions (IMediaSeeking *iface, LONGLONG *pCurrent, DWORD dwCurrentFlags, LONGLONG *pStop, DWORD dwStopFlags)
 
static HRESULT WINAPI found_getposition (IFilterGraphImpl *This, IMediaSeeking *seek, DWORD_PTR pargs)
 
static HRESULT WINAPI MediaSeeking_GetPositions (IMediaSeeking *iface, LONGLONG *pCurrent, LONGLONG *pStop)
 
static HRESULT WINAPI MediaSeeking_GetCurrentPosition (IMediaSeeking *iface, LONGLONG *pCurrent)
 
static HRESULT WINAPI MediaSeeking_GetStopPosition (IMediaSeeking *iface, LONGLONG *pStop)
 
static HRESULT WINAPI MediaSeeking_GetAvailable (IMediaSeeking *iface, LONGLONG *pEarliest, LONGLONG *pLatest)
 
static HRESULT WINAPI MediaSeeking_SetRate (IMediaSeeking *iface, double dRate)
 
static HRESULT WINAPI MediaSeeking_GetRate (IMediaSeeking *iface, double *pdRate)
 
static HRESULT WINAPI MediaSeeking_GetPreroll (IMediaSeeking *iface, LONGLONG *pllPreroll)
 
static IFilterGraphImplimpl_from_IMediaPosition (IMediaPosition *iface)
 
static HRESULT WINAPI MediaPosition_QueryInterface (IMediaPosition *iface, REFIID riid, void **ppvObj)
 
static ULONG WINAPI MediaPosition_AddRef (IMediaPosition *iface)
 
static ULONG WINAPI MediaPosition_Release (IMediaPosition *iface)
 
static HRESULT WINAPI MediaPosition_GetTypeInfoCount (IMediaPosition *iface, UINT *pctinfo)
 
static HRESULT WINAPI MediaPosition_GetTypeInfo (IMediaPosition *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI MediaPosition_GetIDsOfNames (IMediaPosition *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI MediaPosition_Invoke (IMediaPosition *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT ConvertFromREFTIME (IMediaSeeking *seek, REFTIME time_in, LONGLONG *time_out)
 
static HRESULT ConvertToREFTIME (IMediaSeeking *seek, LONGLONG time_in, REFTIME *time_out)
 
static HRESULT WINAPI MediaPosition_get_Duration (IMediaPosition *iface, REFTIME *plength)
 
static HRESULT WINAPI MediaPosition_put_CurrentPosition (IMediaPosition *iface, REFTIME llTime)
 
static HRESULT WINAPI MediaPosition_get_CurrentPosition (IMediaPosition *iface, REFTIME *pllTime)
 
static HRESULT WINAPI MediaPosition_get_StopTime (IMediaPosition *iface, REFTIME *pllTime)
 
static HRESULT WINAPI MediaPosition_put_StopTime (IMediaPosition *iface, REFTIME llTime)
 
static HRESULT WINAPI MediaPosition_get_PrerollTime (IMediaPosition *iface, REFTIME *pllTime)
 
static HRESULT WINAPI MediaPosition_put_PrerollTime (IMediaPosition *iface, REFTIME llTime)
 
static HRESULT WINAPI MediaPosition_put_Rate (IMediaPosition *iface, double dRate)
 
static HRESULT WINAPI MediaPosition_get_Rate (IMediaPosition *iface, double *pdRate)
 
static HRESULT WINAPI MediaPosition_CanSeekForward (IMediaPosition *iface, LONG *pCanSeekForward)
 
static HRESULT WINAPI MediaPosition_CanSeekBackward (IMediaPosition *iface, LONG *pCanSeekBackward)
 
static IFilterGraphImplimpl_from_IObjectWithSite (IObjectWithSite *iface)
 
static HRESULT WINAPI ObjectWithSite_QueryInterface (IObjectWithSite *iface, REFIID riid, void **ppvObj)
 
static ULONG WINAPI ObjectWithSite_AddRef (IObjectWithSite *iface)
 
static ULONG WINAPI ObjectWithSite_Release (IObjectWithSite *iface)
 
static HRESULT WINAPI ObjectWithSite_SetSite (IObjectWithSite *iface, IUnknown *pUnkSite)
 
static HRESULT WINAPI ObjectWithSite_GetSite (IObjectWithSite *iface, REFIID riid, PVOID *ppvSite)
 
static HRESULT GetTargetInterface (IFilterGraphImpl *pGraph, REFIID riid, LPVOID *ppvObj)
 
static IFilterGraphImplimpl_from_IBasicAudio (IBasicAudio *iface)
 
static HRESULT WINAPI BasicAudio_QueryInterface (IBasicAudio *iface, REFIID riid, void **ppvObj)
 
static ULONG WINAPI BasicAudio_AddRef (IBasicAudio *iface)
 
static ULONG WINAPI BasicAudio_Release (IBasicAudio *iface)
 
static HRESULT WINAPI BasicAudio_GetTypeInfoCount (IBasicAudio *iface, UINT *pctinfo)
 
static HRESULT WINAPI BasicAudio_GetTypeInfo (IBasicAudio *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI BasicAudio_GetIDsOfNames (IBasicAudio *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI BasicAudio_Invoke (IBasicAudio *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
 
static HRESULT WINAPI BasicAudio_put_Volume (IBasicAudio *iface, LONG lVolume)
 
static HRESULT WINAPI BasicAudio_get_Volume (IBasicAudio *iface, LONG *plVolume)
 
static HRESULT WINAPI BasicAudio_put_Balance (IBasicAudio *iface, LONG lBalance)
 
static HRESULT WINAPI BasicAudio_get_Balance (IBasicAudio *iface, LONG *plBalance)
 
static IFilterGraphImplimpl_from_IBasicVideo2 (IBasicVideo2 *iface)
 
static HRESULT WINAPI BasicVideo_QueryInterface (IBasicVideo2 *iface, REFIID riid, void **ppvObj)
 
static ULONG WINAPI BasicVideo_AddRef (IBasicVideo2 *iface)
 
static ULONG WINAPI BasicVideo_Release (IBasicVideo2 *iface)
 
static HRESULT WINAPI BasicVideo_GetTypeInfoCount (IBasicVideo2 *iface, UINT *pctinfo)
 
static HRESULT WINAPI BasicVideo_GetTypeInfo (IBasicVideo2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI BasicVideo_GetIDsOfNames (IBasicVideo2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI BasicVideo_Invoke (IBasicVideo2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
 
static HRESULT WINAPI BasicVideo_get_AvgTimePerFrame (IBasicVideo2 *iface, REFTIME *pAvgTimePerFrame)
 
static HRESULT WINAPI BasicVideo_get_BitRate (IBasicVideo2 *iface, LONG *pBitRate)
 
static HRESULT WINAPI BasicVideo_get_BitErrorRate (IBasicVideo2 *iface, LONG *pBitErrorRate)
 
static HRESULT WINAPI BasicVideo_get_VideoWidth (IBasicVideo2 *iface, LONG *pVideoWidth)
 
static HRESULT WINAPI BasicVideo_get_VideoHeight (IBasicVideo2 *iface, LONG *pVideoHeight)
 
static HRESULT WINAPI BasicVideo_put_SourceLeft (IBasicVideo2 *iface, LONG SourceLeft)
 
static HRESULT WINAPI BasicVideo_get_SourceLeft (IBasicVideo2 *iface, LONG *pSourceLeft)
 
static HRESULT WINAPI BasicVideo_put_SourceWidth (IBasicVideo2 *iface, LONG SourceWidth)
 
static HRESULT WINAPI BasicVideo_get_SourceWidth (IBasicVideo2 *iface, LONG *pSourceWidth)
 
static HRESULT WINAPI BasicVideo_put_SourceTop (IBasicVideo2 *iface, LONG SourceTop)
 
static HRESULT WINAPI BasicVideo_get_SourceTop (IBasicVideo2 *iface, LONG *pSourceTop)
 
static HRESULT WINAPI BasicVideo_put_SourceHeight (IBasicVideo2 *iface, LONG SourceHeight)
 
static HRESULT WINAPI BasicVideo_get_SourceHeight (IBasicVideo2 *iface, LONG *pSourceHeight)
 
static HRESULT WINAPI BasicVideo_put_DestinationLeft (IBasicVideo2 *iface, LONG DestinationLeft)
 
static HRESULT WINAPI BasicVideo_get_DestinationLeft (IBasicVideo2 *iface, LONG *pDestinationLeft)
 
static HRESULT WINAPI BasicVideo_put_DestinationWidth (IBasicVideo2 *iface, LONG DestinationWidth)
 
static HRESULT WINAPI BasicVideo_get_DestinationWidth (IBasicVideo2 *iface, LONG *pDestinationWidth)
 
static HRESULT WINAPI BasicVideo_put_DestinationTop (IBasicVideo2 *iface, LONG DestinationTop)
 
static HRESULT WINAPI BasicVideo_get_DestinationTop (IBasicVideo2 *iface, LONG *pDestinationTop)
 
static HRESULT WINAPI BasicVideo_put_DestinationHeight (IBasicVideo2 *iface, LONG DestinationHeight)
 
static HRESULT WINAPI BasicVideo_get_DestinationHeight (IBasicVideo2 *iface, LONG *pDestinationHeight)
 
static HRESULT WINAPI BasicVideo_SetSourcePosition (IBasicVideo2 *iface, LONG Left, LONG Top, LONG Width, LONG Height)
 
static HRESULT WINAPI BasicVideo_GetSourcePosition (IBasicVideo2 *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight)
 
static HRESULT WINAPI BasicVideo_SetDefaultSourcePosition (IBasicVideo2 *iface)
 
static HRESULT WINAPI BasicVideo_SetDestinationPosition (IBasicVideo2 *iface, LONG Left, LONG Top, LONG Width, LONG Height)
 
static HRESULT WINAPI BasicVideo_GetDestinationPosition (IBasicVideo2 *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight)
 
static HRESULT WINAPI BasicVideo_SetDefaultDestinationPosition (IBasicVideo2 *iface)
 
static HRESULT WINAPI BasicVideo_GetVideoSize (IBasicVideo2 *iface, LONG *pWidth, LONG *pHeight)
 
static HRESULT WINAPI BasicVideo_GetVideoPaletteEntries (IBasicVideo2 *iface, LONG StartIndex, LONG Entries, LONG *pRetrieved, LONG *pPalette)
 
static HRESULT WINAPI BasicVideo_GetCurrentImage (IBasicVideo2 *iface, LONG *pBufferSize, LONG *pDIBImage)
 
static HRESULT WINAPI BasicVideo_IsUsingDefaultSource (IBasicVideo2 *iface)
 
static HRESULT WINAPI BasicVideo_IsUsingDefaultDestination (IBasicVideo2 *iface)
 
static HRESULT WINAPI BasicVideo2_GetPreferredAspectRatio (IBasicVideo2 *iface, LONG *plAspectX, LONG *plAspectY)
 
static IFilterGraphImplimpl_from_IVideoWindow (IVideoWindow *iface)
 
static HRESULT WINAPI VideoWindow_QueryInterface (IVideoWindow *iface, REFIID riid, void **ppvObj)
 
static ULONG WINAPI VideoWindow_AddRef (IVideoWindow *iface)
 
static ULONG WINAPI VideoWindow_Release (IVideoWindow *iface)
 
static HRESULT WINAPI VideoWindow_GetTypeInfoCount (IVideoWindow *iface, UINT *pctinfo)
 
static HRESULT WINAPI VideoWindow_GetTypeInfo (IVideoWindow *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI VideoWindow_GetIDsOfNames (IVideoWindow *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI VideoWindow_Invoke (IVideoWindow *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
 
static HRESULT WINAPI VideoWindow_put_Caption (IVideoWindow *iface, BSTR strCaption)
 
static HRESULT WINAPI VideoWindow_get_Caption (IVideoWindow *iface, BSTR *strCaption)
 
static HRESULT WINAPI VideoWindow_put_WindowStyle (IVideoWindow *iface, LONG WindowStyle)
 
static HRESULT WINAPI VideoWindow_get_WindowStyle (IVideoWindow *iface, LONG *WindowStyle)
 
static HRESULT WINAPI VideoWindow_put_WindowStyleEx (IVideoWindow *iface, LONG WindowStyleEx)
 
static HRESULT WINAPI VideoWindow_get_WindowStyleEx (IVideoWindow *iface, LONG *WindowStyleEx)
 
static HRESULT WINAPI VideoWindow_put_AutoShow (IVideoWindow *iface, LONG AutoShow)
 
static HRESULT WINAPI VideoWindow_get_AutoShow (IVideoWindow *iface, LONG *AutoShow)
 
static HRESULT WINAPI VideoWindow_put_WindowState (IVideoWindow *iface, LONG WindowState)
 
static HRESULT WINAPI VideoWindow_get_WindowState (IVideoWindow *iface, LONG *WindowState)
 
static HRESULT WINAPI VideoWindow_put_BackgroundPalette (IVideoWindow *iface, LONG BackgroundPalette)
 
static HRESULT WINAPI VideoWindow_get_BackgroundPalette (IVideoWindow *iface, LONG *pBackgroundPalette)
 
static HRESULT WINAPI VideoWindow_put_Visible (IVideoWindow *iface, LONG Visible)
 
static HRESULT WINAPI VideoWindow_get_Visible (IVideoWindow *iface, LONG *pVisible)
 
static HRESULT WINAPI VideoWindow_put_Left (IVideoWindow *iface, LONG Left)
 
static HRESULT WINAPI VideoWindow_get_Left (IVideoWindow *iface, LONG *pLeft)
 
static HRESULT WINAPI VideoWindow_put_Width (IVideoWindow *iface, LONG Width)
 
static HRESULT WINAPI VideoWindow_get_Width (IVideoWindow *iface, LONG *pWidth)
 
static HRESULT WINAPI VideoWindow_put_Top (IVideoWindow *iface, LONG Top)
 
static HRESULT WINAPI VideoWindow_get_Top (IVideoWindow *iface, LONG *pTop)
 
static HRESULT WINAPI VideoWindow_put_Height (IVideoWindow *iface, LONG Height)
 
static HRESULT WINAPI VideoWindow_get_Height (IVideoWindow *iface, LONG *pHeight)
 
static HRESULT WINAPI VideoWindow_put_Owner (IVideoWindow *iface, OAHWND Owner)
 
static HRESULT WINAPI VideoWindow_get_Owner (IVideoWindow *iface, OAHWND *Owner)
 
static HRESULT WINAPI VideoWindow_put_MessageDrain (IVideoWindow *iface, OAHWND Drain)
 
static HRESULT WINAPI VideoWindow_get_MessageDrain (IVideoWindow *iface, OAHWND *Drain)
 
static HRESULT WINAPI VideoWindow_get_BorderColor (IVideoWindow *iface, LONG *Color)
 
static HRESULT WINAPI VideoWindow_put_BorderColor (IVideoWindow *iface, LONG Color)
 
static HRESULT WINAPI VideoWindow_get_FullScreenMode (IVideoWindow *iface, LONG *FullScreenMode)
 
static HRESULT WINAPI VideoWindow_put_FullScreenMode (IVideoWindow *iface, LONG FullScreenMode)
 
static HRESULT WINAPI VideoWindow_SetWindowForeground (IVideoWindow *iface, LONG Focus)
 
static HRESULT WINAPI VideoWindow_NotifyOwnerMessage (IVideoWindow *iface, OAHWND hwnd, LONG uMsg, LONG_PTR wParam, LONG_PTR lParam)
 
static HRESULT WINAPI VideoWindow_SetWindowPosition (IVideoWindow *iface, LONG Left, LONG Top, LONG Width, LONG Height)
 
static HRESULT WINAPI VideoWindow_GetWindowPosition (IVideoWindow *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight)
 
static HRESULT WINAPI VideoWindow_GetMinIdealImageSize (IVideoWindow *iface, LONG *pWidth, LONG *pHeight)
 
static HRESULT WINAPI VideoWindow_GetMaxIdealImageSize (IVideoWindow *iface, LONG *pWidth, LONG *pHeight)
 
static HRESULT WINAPI VideoWindow_GetRestorePosition (IVideoWindow *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight)
 
static HRESULT WINAPI VideoWindow_HideCursor (IVideoWindow *iface, LONG HideCursor)
 
static HRESULT WINAPI VideoWindow_IsCursorHidden (IVideoWindow *iface, LONG *CursorHidden)
 
static IFilterGraphImplimpl_from_IMediaEventEx (IMediaEventEx *iface)
 
static HRESULT WINAPI MediaEvent_QueryInterface (IMediaEventEx *iface, REFIID riid, void **ppvObj)
 
static ULONG WINAPI MediaEvent_AddRef (IMediaEventEx *iface)
 
static ULONG WINAPI MediaEvent_Release (IMediaEventEx *iface)
 
static HRESULT WINAPI MediaEvent_GetTypeInfoCount (IMediaEventEx *iface, UINT *pctinfo)
 
static HRESULT WINAPI MediaEvent_GetTypeInfo (IMediaEventEx *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI MediaEvent_GetIDsOfNames (IMediaEventEx *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI MediaEvent_Invoke (IMediaEventEx *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
 
static HRESULT WINAPI MediaEvent_GetEventHandle (IMediaEventEx *iface, OAEVENT *hEvent)
 
static HRESULT WINAPI MediaEvent_GetEvent (IMediaEventEx *iface, LONG *lEventCode, LONG_PTR *lParam1, LONG_PTR *lParam2, LONG msTimeout)
 
static HRESULT WINAPI MediaEvent_WaitForCompletion (IMediaEventEx *iface, LONG msTimeout, LONG *pEvCode)
 
static HRESULT WINAPI MediaEvent_CancelDefaultHandling (IMediaEventEx *iface, LONG lEvCode)
 
static HRESULT WINAPI MediaEvent_RestoreDefaultHandling (IMediaEventEx *iface, LONG lEvCode)
 
static HRESULT WINAPI MediaEvent_FreeEventParams (IMediaEventEx *iface, LONG lEvCode, LONG_PTR lParam1, LONG_PTR lParam2)
 
static HRESULT WINAPI MediaEvent_SetNotifyWindow (IMediaEventEx *iface, OAHWND hwnd, LONG lMsg, LONG_PTR lInstanceData)
 
static HRESULT WINAPI MediaEvent_SetNotifyFlags (IMediaEventEx *iface, LONG lNoNotifyFlags)
 
static HRESULT WINAPI MediaEvent_GetNotifyFlags (IMediaEventEx *iface, LONG *lplNoNotifyFlags)
 
static IFilterGraphImplimpl_from_IMediaFilter (IMediaFilter *iface)
 
static HRESULT WINAPI MediaFilter_QueryInterface (IMediaFilter *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI MediaFilter_AddRef (IMediaFilter *iface)
 
static ULONG WINAPI MediaFilter_Release (IMediaFilter *iface)
 
static HRESULT WINAPI MediaFilter_GetClassID (IMediaFilter *iface, CLSID *pClassID)
 
static HRESULT WINAPI MediaFilter_Stop (IMediaFilter *iface)
 
static HRESULT WINAPI MediaFilter_Pause (IMediaFilter *iface)
 
static HRESULT WINAPI MediaFilter_Run (IMediaFilter *iface, REFERENCE_TIME tStart)
 
static HRESULT WINAPI MediaFilter_GetState (IMediaFilter *iface, DWORD dwMsTimeout, FILTER_STATE *pState)
 
static HRESULT WINAPI MediaFilter_SetSyncSource (IMediaFilter *iface, IReferenceClock *pClock)
 
static HRESULT WINAPI MediaFilter_GetSyncSource (IMediaFilter *iface, IReferenceClock **ppClock)
 
static IFilterGraphImplimpl_from_IMediaEventSink (IMediaEventSink *iface)
 
static HRESULT WINAPI MediaEventSink_QueryInterface (IMediaEventSink *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI MediaEventSink_AddRef (IMediaEventSink *iface)
 
static ULONG WINAPI MediaEventSink_Release (IMediaEventSink *iface)
 
static HRESULT WINAPI MediaEventSink_Notify (IMediaEventSink *iface, LONG EventCode, LONG_PTR EventParam1, LONG_PTR EventParam2)
 
static IFilterGraphImplimpl_from_IGraphConfig (IGraphConfig *iface)
 
static HRESULT WINAPI GraphConfig_QueryInterface (IGraphConfig *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI GraphConfig_AddRef (IGraphConfig *iface)
 
static ULONG WINAPI GraphConfig_Release (IGraphConfig *iface)
 
static HRESULT WINAPI GraphConfig_Reconnect (IGraphConfig *iface, IPin *pOutputPin, IPin *pInputPin, const AM_MEDIA_TYPE *pmtFirstConnection, IBaseFilter *pUsingFilter, HANDLE hAbortEvent, DWORD dwFlags)
 
static HRESULT WINAPI GraphConfig_Reconfigure (IGraphConfig *iface, IGraphConfigCallback *pCallback, void *pvContext, DWORD dwFlags, HANDLE hAbortEvent)
 
static HRESULT WINAPI GraphConfig_AddFilterToCache (IGraphConfig *iface, IBaseFilter *pFilter)
 
static HRESULT WINAPI GraphConfig_EnumCacheFilter (IGraphConfig *iface, IEnumFilters **pEnum)
 
static HRESULT WINAPI GraphConfig_RemoveFilterFromCache (IGraphConfig *iface, IBaseFilter *pFilter)
 
static HRESULT WINAPI GraphConfig_GetStartTime (IGraphConfig *iface, REFERENCE_TIME *prtStart)
 
static HRESULT WINAPI GraphConfig_PushThroughData (IGraphConfig *iface, IPin *pOutputPin, IPinConnection *pConnection, HANDLE hEventAbort)
 
static HRESULT WINAPI GraphConfig_SetFilterFlags (IGraphConfig *iface, IBaseFilter *pFilter, DWORD dwFlags)
 
static HRESULT WINAPI GraphConfig_GetFilterFlags (IGraphConfig *iface, IBaseFilter *pFilter, DWORD *dwFlags)
 
static HRESULT WINAPI GraphConfig_RemoveFilterEx (IGraphConfig *iface, IBaseFilter *pFilter, DWORD dwFlags)
 
static IFilterGraphImplimpl_from_IGraphVersion (IGraphVersion *iface)
 
static HRESULT WINAPI GraphVersion_QueryInterface (IGraphVersion *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI GraphVersion_AddRef (IGraphVersion *iface)
 
static ULONG WINAPI GraphVersion_Release (IGraphVersion *iface)
 
static HRESULT WINAPI GraphVersion_QueryVersion (IGraphVersion *iface, LONG *pVersion)
 
HRESULT FilterGraph_create (IUnknown *pUnkOuter, LPVOID *ppObj)
 
HRESULT FilterGraphNoThread_create (IUnknown *pUnkOuter, LPVOID *ppObj)
 

Variables

static const IFilterGraph2Vtbl IFilterGraph2_VTable
 
static const IMediaControlVtbl IMediaControl_VTable
 
static const IMediaSeekingVtbl IMediaSeeking_VTable
 
static const IMediaPositionVtbl IMediaPosition_VTable
 
static const IObjectWithSiteVtbl IObjectWithSite_VTable
 
static const IBasicAudioVtbl IBasicAudio_VTable
 
static const IBasicVideo2Vtbl IBasicVideo_VTable
 
static const IVideoWindowVtbl IVideoWindow_VTable
 
static const IMediaEventExVtbl IMediaEventEx_VTable
 
static const IMediaFilterVtbl IMediaFilter_VTable
 
static const IMediaEventSinkVtbl IMediaEventSink_VTable
 
static const IGraphConfigVtbl IGraphConfig_VTable
 
static const IGraphVersionVtbl IGraphVersion_VTable
 
static const IUnknownVtbl IInner_VTable
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 24 of file filtergraph.c.

◆ EVENTS_RING_BUFFER_INCREMENT

#define EVENTS_RING_BUFFER_INCREMENT   64

Definition at line 58 of file filtergraph.c.

◆ MAX_ITF_CACHE_ENTRIES

#define MAX_ITF_CACHE_ENTRIES   3

Definition at line 144 of file filtergraph.c.

Typedef Documentation

◆ fnFoundFilter

typedef HRESULT(WINAPI * fnFoundFilter) (IBaseFilter *, DWORD_PTR data)

Definition at line 1915 of file filtergraph.c.

◆ fnFoundSeek

typedef HRESULT(WINAPI * fnFoundSeek) (IFilterGraphImpl *This, IMediaSeeking *, DWORD_PTR arg)

Definition at line 2269 of file filtergraph.c.

◆ IFilterGraphImpl

◆ ITF_CACHE_ENTRY

Function Documentation

◆ all_renderers_seek()

static HRESULT all_renderers_seek ( IFilterGraphImpl This,
fnFoundSeek  FoundSeek,
DWORD_PTR  arg 
)
static

Definition at line 2271 of file filtergraph.c.

2271 {
2272 BOOL allnotimpl = TRUE;
2273 int i;
2274 HRESULT hr, hr_return = S_OK;
2275
2276 TRACE("(%p)->(%p %08lx)\n", This, FoundSeek, arg);
2277 /* Send a message to all renderers, they are responsible for broadcasting it further */
2278
2279 for(i = 0; i < This->nFilters; i++)
2280 {
2282 IBaseFilter* pfilter = This->ppFiltersInGraph[i];
2284 ULONG filterflags;
2285 IBaseFilter_QueryInterface(pfilter, &IID_IAMFilterMiscFlags, (void**)&flags);
2286 if (!flags)
2287 continue;
2288 filterflags = IAMFilterMiscFlags_GetMiscFlags(flags);
2289 IAMFilterMiscFlags_Release(flags);
2290 if (filterflags != AM_FILTER_MISC_FLAGS_IS_RENDERER)
2291 continue;
2292
2293 IBaseFilter_QueryInterface(pfilter, &IID_IMediaSeeking, (void**)&seek);
2294 if (!seek)
2295 continue;
2296 hr = FoundSeek(This, seek, arg);
2297 IMediaSeeking_Release(seek);
2298 if (hr_return != E_NOTIMPL)
2299 allnotimpl = FALSE;
2300 if (hr_return == S_OK || (FAILED(hr) && hr != E_NOTIMPL && SUCCEEDED(hr_return)))
2301 hr_return = hr;
2302 }
2303
2304 if (allnotimpl)
2305 return E_NOTIMPL;
2306 return hr_return;
2307}
@ AM_FILTER_MISC_FLAGS_IS_RENDERER
Definition: axextend.idl:1239
#define E_NOTIMPL
Definition: ddrawi.h:99
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
GLbitfield flags
Definition: glext.h:7161
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 S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
int seek(void *fd, ulong off, int mode)
Definition: pe.c:51
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
uint32_t ULONG
Definition: typedefs.h:59

Referenced by MediaSeeking_CheckCapabilities(), MediaSeeking_GetCapabilities(), MediaSeeking_GetDuration(), MediaSeeking_GetPositions(), and MediaSeeking_SetPositions().

◆ BasicAudio_AddRef()

static ULONG WINAPI BasicAudio_AddRef ( IBasicAudio *  iface)
static

Definition at line 3023 of file filtergraph.c.

3024{
3026
3027 TRACE("(%p/%p)->()\n", This, iface);
3028
3029 return IUnknown_AddRef(This->outer_unk);
3030}
static IFilterGraphImpl * impl_from_IBasicAudio(IBasicAudio *iface)
Definition: filtergraph.c:3009

◆ BasicAudio_get_Balance()

static HRESULT WINAPI BasicAudio_get_Balance ( IBasicAudio *  iface,
LONG plBalance 
)
static

Definition at line 3189 of file filtergraph.c.

3190{
3192 IBasicAudio* pBasicAudio;
3193 HRESULT hr;
3194
3195 TRACE("(%p/%p)->(%p)\n", This, iface, plBalance);
3196
3198
3199 hr = GetTargetInterface(This, &IID_IBasicAudio, (LPVOID*)&pBasicAudio);
3200
3201 if (hr == S_OK)
3202 hr = IBasicAudio_get_Balance(pBasicAudio, plBalance);
3203
3205
3206 return hr;
3207}
static HRESULT GetTargetInterface(IFilterGraphImpl *pGraph, REFIID riid, LPVOID *ppvObj)
Definition: filtergraph.c:2964
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

◆ BasicAudio_get_Volume()

static HRESULT WINAPI BasicAudio_get_Volume ( IBasicAudio *  iface,
LONG plVolume 
)
static

Definition at line 3149 of file filtergraph.c.

3150{
3152 IBasicAudio* pBasicAudio;
3153 HRESULT hr;
3154
3155 TRACE("(%p/%p)->(%p)\n", This, iface, plVolume);
3156
3158
3159 hr = GetTargetInterface(This, &IID_IBasicAudio, (LPVOID*)&pBasicAudio);
3160
3161 if (hr == S_OK)
3162 hr = IBasicAudio_get_Volume(pBasicAudio, plVolume);
3163
3165
3166 return hr;
3167}

◆ BasicAudio_GetIDsOfNames()

static HRESULT WINAPI BasicAudio_GetIDsOfNames ( IBasicAudio *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 3083 of file filtergraph.c.

3085{
3087 IBasicAudio* pBasicAudio;
3088 HRESULT hr;
3089
3090 TRACE("(%p/%p)->(%s, %p, %d, %d, %p)\n", This, iface, debugstr_guid(riid), rgszNames, cNames,
3091 lcid, rgDispId);
3092
3094
3095 hr = GetTargetInterface(This, &IID_IBasicAudio, (LPVOID*)&pBasicAudio);
3096
3097 if (hr == S_OK)
3098 hr = IBasicAudio_GetIDsOfNames(pBasicAudio, riid, rgszNames, cNames, lcid, rgDispId);
3099
3101
3102 return hr;
3103}
REFIID riid
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35

◆ BasicAudio_GetTypeInfo()

static HRESULT WINAPI BasicAudio_GetTypeInfo ( IBasicAudio *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 3062 of file filtergraph.c.

3064{
3066 IBasicAudio* pBasicAudio;
3067 HRESULT hr;
3068
3069 TRACE("(%p/%p)->(%d, %d, %p)\n", This, iface, iTInfo, lcid, ppTInfo);
3070
3072
3073 hr = GetTargetInterface(This, &IID_IBasicAudio, (LPVOID*)&pBasicAudio);
3074
3075 if (hr == S_OK)
3076 hr = IBasicAudio_GetTypeInfo(pBasicAudio, iTInfo, lcid, ppTInfo);
3077
3079
3080 return hr;
3081}

◆ BasicAudio_GetTypeInfoCount()

static HRESULT WINAPI BasicAudio_GetTypeInfoCount ( IBasicAudio *  iface,
UINT pctinfo 
)
static

Definition at line 3042 of file filtergraph.c.

3043{
3045 IBasicAudio* pBasicAudio;
3046 HRESULT hr;
3047
3048 TRACE("(%p/%p)->(%p)\n", This, iface, pctinfo);
3049
3051
3052 hr = GetTargetInterface(This, &IID_IBasicAudio, (LPVOID*)&pBasicAudio);
3053
3054 if (hr == S_OK)
3055 hr = IBasicAudio_GetTypeInfoCount(pBasicAudio, pctinfo);
3056
3058
3059 return hr;
3060}

◆ BasicAudio_Invoke()

static HRESULT WINAPI BasicAudio_Invoke ( IBasicAudio *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExepInfo,
UINT puArgErr 
)
static

Definition at line 3105 of file filtergraph.c.

3108{
3110 IBasicAudio* pBasicAudio;
3111 HRESULT hr;
3112
3113 TRACE("(%p/%p)->(%d, %s, %d, %04x, %p, %p, %p, %p)\n", This, iface, dispIdMember,
3114 debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
3115
3117
3118 hr = GetTargetInterface(This, &IID_IBasicAudio, (LPVOID*)&pBasicAudio);
3119
3120 if (hr == S_OK)
3121 hr = IBasicAudio_Invoke(pBasicAudio, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
3122
3124
3125 return hr;
3126}
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ BasicAudio_put_Balance()

static HRESULT WINAPI BasicAudio_put_Balance ( IBasicAudio *  iface,
LONG  lBalance 
)
static

Definition at line 3169 of file filtergraph.c.

3170{
3172 IBasicAudio* pBasicAudio;
3173 HRESULT hr;
3174
3175 TRACE("(%p/%p)->(%d)\n", This, iface, lBalance);
3176
3178
3179 hr = GetTargetInterface(This, &IID_IBasicAudio, (LPVOID*)&pBasicAudio);
3180
3181 if (hr == S_OK)
3182 hr = IBasicAudio_put_Balance(pBasicAudio, lBalance);
3183
3185
3186 return hr;
3187}

◆ BasicAudio_put_Volume()

static HRESULT WINAPI BasicAudio_put_Volume ( IBasicAudio *  iface,
LONG  lVolume 
)
static

Definition at line 3129 of file filtergraph.c.

3130{
3132 IBasicAudio* pBasicAudio;
3133 HRESULT hr;
3134
3135 TRACE("(%p/%p)->(%d)\n", This, iface, lVolume);
3136
3138
3139 hr = GetTargetInterface(This, &IID_IBasicAudio, (LPVOID*)&pBasicAudio);
3140
3141 if (hr == S_OK)
3142 hr = IBasicAudio_put_Volume(pBasicAudio, lVolume);
3143
3145
3146 return hr;
3147}

◆ BasicAudio_QueryInterface()

static HRESULT WINAPI BasicAudio_QueryInterface ( IBasicAudio *  iface,
REFIID  riid,
void **  ppvObj 
)
static

Definition at line 3014 of file filtergraph.c.

3015{
3017
3018 TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj);
3019
3020 return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj);
3021}

◆ BasicAudio_Release()

static ULONG WINAPI BasicAudio_Release ( IBasicAudio *  iface)
static

Definition at line 3032 of file filtergraph.c.

3033{
3035
3036 TRACE("(%p/%p)->()\n", This, iface);
3037
3038 return IUnknown_Release(This->outer_unk);
3039}

◆ BasicVideo2_GetPreferredAspectRatio()

static HRESULT WINAPI BasicVideo2_GetPreferredAspectRatio ( IBasicVideo2 *  iface,
LONG plAspectX,
LONG plAspectY 
)
static

Definition at line 3991 of file filtergraph.c.

3993{
3995 IBasicVideo2 *pBasicVideo2;
3996 HRESULT hr;
3997
3998 TRACE("(%p/%p)->()\n", This, iface);
3999
4001
4002 hr = GetTargetInterface(This, &IID_IBasicVideo2, (LPVOID*)&pBasicVideo2);
4003
4004 if (hr == S_OK)
4005 hr = BasicVideo2_GetPreferredAspectRatio(iface, plAspectX, plAspectY);
4006
4008
4009 return hr;
4010}
static HRESULT WINAPI BasicVideo2_GetPreferredAspectRatio(IBasicVideo2 *iface, LONG *plAspectX, LONG *plAspectY)
Definition: filtergraph.c:3991
static IFilterGraphImpl * impl_from_IBasicVideo2(IBasicVideo2 *iface)
Definition: filtergraph.c:3224

Referenced by BasicVideo2_GetPreferredAspectRatio().

◆ BasicVideo_AddRef()

static ULONG WINAPI BasicVideo_AddRef ( IBasicVideo2 *  iface)
static

Definition at line 3238 of file filtergraph.c.

3239{
3241
3242 TRACE("(%p/%p)->()\n", This, iface);
3243
3244 return IUnknown_AddRef(This->outer_unk);
3245}

◆ BasicVideo_get_AvgTimePerFrame()

static HRESULT WINAPI BasicVideo_get_AvgTimePerFrame ( IBasicVideo2 *  iface,
REFTIME pAvgTimePerFrame 
)
static

Definition at line 3344 of file filtergraph.c.

3345{
3347 IBasicVideo *pBasicVideo;
3348 HRESULT hr;
3349
3350 TRACE("(%p/%p)->(%p)\n", This, iface, pAvgTimePerFrame);
3351
3353
3354 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3355
3356 if (hr == S_OK)
3357 hr = IBasicVideo_get_AvgTimePerFrame(pBasicVideo, pAvgTimePerFrame);
3358
3360
3361 return hr;
3362}

◆ BasicVideo_get_BitErrorRate()

static HRESULT WINAPI BasicVideo_get_BitErrorRate ( IBasicVideo2 *  iface,
LONG pBitErrorRate 
)
static

Definition at line 3384 of file filtergraph.c.

3385{
3387 IBasicVideo *pBasicVideo;
3388 HRESULT hr;
3389
3390 TRACE("(%p/%p)->(%p)\n", This, iface, pBitErrorRate);
3391
3393
3394 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3395
3396 if (hr == S_OK)
3397 hr = IBasicVideo_get_BitErrorRate(pBasicVideo, pBitErrorRate);
3398
3400
3401 return hr;
3402}

◆ BasicVideo_get_BitRate()

static HRESULT WINAPI BasicVideo_get_BitRate ( IBasicVideo2 *  iface,
LONG pBitRate 
)
static

Definition at line 3364 of file filtergraph.c.

3365{
3367 IBasicVideo *pBasicVideo;
3368 HRESULT hr;
3369
3370 TRACE("(%p/%p)->(%p)\n", This, iface, pBitRate);
3371
3373
3374 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3375
3376 if (hr == S_OK)
3377 hr = IBasicVideo_get_BitRate(pBasicVideo, pBitRate);
3378
3380
3381 return hr;
3382}

◆ BasicVideo_get_DestinationHeight()

static HRESULT WINAPI BasicVideo_get_DestinationHeight ( IBasicVideo2 *  iface,
LONG pDestinationHeight 
)
static

Definition at line 3744 of file filtergraph.c.

3746{
3748 IBasicVideo *pBasicVideo;
3749 HRESULT hr;
3750
3751 TRACE("(%p/%p)->(%p)\n", This, iface, pDestinationHeight);
3752
3754
3755 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3756
3757 if (hr == S_OK)
3758 hr = IBasicVideo_get_DestinationHeight(pBasicVideo, pDestinationHeight);
3759
3761
3762 return hr;
3763}

◆ BasicVideo_get_DestinationLeft()

static HRESULT WINAPI BasicVideo_get_DestinationLeft ( IBasicVideo2 *  iface,
LONG pDestinationLeft 
)
static

Definition at line 3624 of file filtergraph.c.

3625{
3627 IBasicVideo *pBasicVideo;
3628 HRESULT hr;
3629
3630 TRACE("(%p/%p)->(%p)\n", This, iface, pDestinationLeft);
3631
3633
3634 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3635
3636 if (hr == S_OK)
3637 hr = IBasicVideo_get_DestinationLeft(pBasicVideo, pDestinationLeft);
3638
3640
3641 return hr;
3642}

◆ BasicVideo_get_DestinationTop()

static HRESULT WINAPI BasicVideo_get_DestinationTop ( IBasicVideo2 *  iface,
LONG pDestinationTop 
)
static

Definition at line 3704 of file filtergraph.c.

3705{
3707 IBasicVideo *pBasicVideo;
3708 HRESULT hr;
3709
3710 TRACE("(%p/%p)->(%p)\n", This, iface, pDestinationTop);
3711
3713
3714 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3715
3716 if (hr == S_OK)
3717 hr = IBasicVideo_get_DestinationTop(pBasicVideo, pDestinationTop);
3718
3720
3721 return hr;
3722}

◆ BasicVideo_get_DestinationWidth()

static HRESULT WINAPI BasicVideo_get_DestinationWidth ( IBasicVideo2 *  iface,
LONG pDestinationWidth 
)
static

Definition at line 3664 of file filtergraph.c.

3665{
3667 IBasicVideo *pBasicVideo;
3668 HRESULT hr;
3669
3670 TRACE("(%p/%p)->(%p)\n", This, iface, pDestinationWidth);
3671
3673
3674 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3675
3676 if (hr == S_OK)
3677 hr = IBasicVideo_get_DestinationWidth(pBasicVideo, pDestinationWidth);
3678
3680
3681 return hr;
3682}

◆ BasicVideo_get_SourceHeight()

static HRESULT WINAPI BasicVideo_get_SourceHeight ( IBasicVideo2 *  iface,
LONG pSourceHeight 
)
static

Definition at line 3584 of file filtergraph.c.

3585{
3587 IBasicVideo *pBasicVideo;
3588 HRESULT hr;
3589
3590 TRACE("(%p/%p)->(%p)\n", This, iface, pSourceHeight);
3591
3593
3594 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3595
3596 if (hr == S_OK)
3597 hr = IBasicVideo_get_SourceHeight(pBasicVideo, pSourceHeight);
3598
3600
3601 return hr;
3602}

◆ BasicVideo_get_SourceLeft()

static HRESULT WINAPI BasicVideo_get_SourceLeft ( IBasicVideo2 *  iface,
LONG pSourceLeft 
)
static

Definition at line 3464 of file filtergraph.c.

3465{
3467 IBasicVideo *pBasicVideo;
3468 HRESULT hr;
3469
3470 TRACE("(%p/%p)->(%p)\n", This, iface, pSourceLeft);
3471
3473
3474 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3475
3476 if (hr == S_OK)
3477 hr = IBasicVideo_get_SourceLeft(pBasicVideo, pSourceLeft);
3478
3480
3481 return hr;
3482}

◆ BasicVideo_get_SourceTop()

static HRESULT WINAPI BasicVideo_get_SourceTop ( IBasicVideo2 *  iface,
LONG pSourceTop 
)
static

Definition at line 3544 of file filtergraph.c.

3545{
3547 IBasicVideo *pBasicVideo;
3548 HRESULT hr;
3549
3550 TRACE("(%p/%p)->(%p)\n", This, iface, pSourceTop);
3551
3553
3554 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3555
3556 if (hr == S_OK)
3557 hr = IBasicVideo_get_SourceTop(pBasicVideo, pSourceTop);
3558
3560
3561 return hr;
3562}

◆ BasicVideo_get_SourceWidth()

static HRESULT WINAPI BasicVideo_get_SourceWidth ( IBasicVideo2 *  iface,
LONG pSourceWidth 
)
static

Definition at line 3504 of file filtergraph.c.

3505{
3507 IBasicVideo *pBasicVideo;
3508 HRESULT hr;
3509
3510 TRACE("(%p/%p)->(%p)\n", This, iface, pSourceWidth);
3511
3513
3514 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3515
3516 if (hr == S_OK)
3517 hr = IBasicVideo_get_SourceWidth(pBasicVideo, pSourceWidth);
3518
3520
3521 return hr;
3522}

◆ BasicVideo_get_VideoHeight()

static HRESULT WINAPI BasicVideo_get_VideoHeight ( IBasicVideo2 *  iface,
LONG pVideoHeight 
)
static

Definition at line 3424 of file filtergraph.c.

3425{
3427 IBasicVideo *pBasicVideo;
3428 HRESULT hr;
3429
3430 TRACE("(%p/%p)->(%p)\n", This, iface, pVideoHeight);
3431
3433
3434 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3435
3436 if (hr == S_OK)
3437 hr = IBasicVideo_get_VideoHeight(pBasicVideo, pVideoHeight);
3438
3440
3441 return hr;
3442}

◆ BasicVideo_get_VideoWidth()

static HRESULT WINAPI BasicVideo_get_VideoWidth ( IBasicVideo2 *  iface,
LONG pVideoWidth 
)
static

Definition at line 3404 of file filtergraph.c.

3405{
3407 IBasicVideo *pBasicVideo;
3408 HRESULT hr;
3409
3410 TRACE("(%p/%p)->(%p)\n", This, iface, pVideoWidth);
3411
3413
3414 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3415
3416 if (hr == S_OK)
3417 hr = IBasicVideo_get_VideoWidth(pBasicVideo, pVideoWidth);
3418
3420
3421 return hr;
3422}

◆ BasicVideo_GetCurrentImage()

static HRESULT WINAPI BasicVideo_GetCurrentImage ( IBasicVideo2 *  iface,
LONG pBufferSize,
LONG pDIBImage 
)
static

Definition at line 3930 of file filtergraph.c.

3932{
3934 IBasicVideo *pBasicVideo;
3935 HRESULT hr;
3936
3937 TRACE("(%p/%p)->(%p, %p)\n", This, iface, pBufferSize, pDIBImage);
3938
3940
3941 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3942
3943 if (hr == S_OK)
3944 hr = IBasicVideo_GetCurrentImage(pBasicVideo, pBufferSize, pDIBImage);
3945
3947
3948 return hr;
3949}
_Must_inspect_result_ _In_ ULONG _Out_writes_bytes_ pBufferSize PVOID _Inout_ PULONG pBufferSize
Definition: fsrtlfuncs.h:1165

◆ BasicVideo_GetDestinationPosition()

static HRESULT WINAPI BasicVideo_GetDestinationPosition ( IBasicVideo2 *  iface,
LONG pLeft,
LONG pTop,
LONG pWidth,
LONG pHeight 
)
static

Definition at line 3848 of file filtergraph.c.

3850{
3852 IBasicVideo *pBasicVideo;
3853 HRESULT hr;
3854
3855 TRACE("(%p/%p)->(%p, %p, %p, %p)\n", This, iface, pLeft, pTop, pWidth, pHeight);
3856
3858
3859 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3860
3861 if (hr == S_OK)
3862 hr = IBasicVideo_GetDestinationPosition(pBasicVideo, pLeft, pTop, pWidth, pHeight);
3863
3865
3866 return hr;
3867}

◆ BasicVideo_GetIDsOfNames()

static HRESULT WINAPI BasicVideo_GetIDsOfNames ( IBasicVideo2 *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 3298 of file filtergraph.c.

3300{
3302 IBasicVideo *pBasicVideo;
3303 HRESULT hr;
3304
3305 TRACE("(%p/%p)->(%s, %p, %d, %d, %p)\n", This, iface, debugstr_guid(riid), rgszNames, cNames,
3306 lcid, rgDispId);
3307
3309
3310 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3311
3312 if (hr == S_OK)
3313 hr = IBasicVideo_GetIDsOfNames(pBasicVideo, riid, rgszNames, cNames, lcid, rgDispId);
3314
3316
3317 return hr;
3318}

◆ BasicVideo_GetSourcePosition()

static HRESULT WINAPI BasicVideo_GetSourcePosition ( IBasicVideo2 *  iface,
LONG pLeft,
LONG pTop,
LONG pWidth,
LONG pHeight 
)
static

Definition at line 3786 of file filtergraph.c.

3788{
3790 IBasicVideo *pBasicVideo;
3791 HRESULT hr;
3792
3793 TRACE("(%p/%p)->(%p, %p, %p, %p)\n", This, iface, pLeft, pTop, pWidth, pHeight);
3794
3796
3797 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3798
3799 if (hr == S_OK)
3800 hr = IBasicVideo_GetSourcePosition(pBasicVideo, pLeft, pTop, pWidth, pHeight);
3801
3803
3804 return hr;
3805}

◆ BasicVideo_GetTypeInfo()

static HRESULT WINAPI BasicVideo_GetTypeInfo ( IBasicVideo2 *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 3277 of file filtergraph.c.

3279{
3281 IBasicVideo *pBasicVideo;
3282 HRESULT hr;
3283
3284 TRACE("(%p/%p)->(%d, %d, %p)\n", This, iface, iTInfo, lcid, ppTInfo);
3285
3287
3288 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3289
3290 if (hr == S_OK)
3291 hr = IBasicVideo_GetTypeInfo(pBasicVideo, iTInfo, lcid, ppTInfo);
3292
3294
3295 return hr;
3296}

◆ BasicVideo_GetTypeInfoCount()

static HRESULT WINAPI BasicVideo_GetTypeInfoCount ( IBasicVideo2 *  iface,
UINT pctinfo 
)
static

Definition at line 3257 of file filtergraph.c.

3258{
3260 IBasicVideo *pBasicVideo;
3261 HRESULT hr;
3262
3263 TRACE("(%p/%p)->(%p)\n", This, iface, pctinfo);
3264
3266
3267 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3268
3269 if (hr == S_OK)
3270 hr = IBasicVideo_GetTypeInfoCount(pBasicVideo, pctinfo);
3271
3273
3274 return hr;
3275}

◆ BasicVideo_GetVideoPaletteEntries()

static HRESULT WINAPI BasicVideo_GetVideoPaletteEntries ( IBasicVideo2 *  iface,
LONG  StartIndex,
LONG  Entries,
LONG pRetrieved,
LONG pPalette 
)
static

Definition at line 3909 of file filtergraph.c.

3911{
3913 IBasicVideo *pBasicVideo;
3914 HRESULT hr;
3915
3916 TRACE("(%p/%p)->(%d, %d, %p, %p)\n", This, iface, StartIndex, Entries, pRetrieved, pPalette);
3917
3919
3920 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3921
3922 if (hr == S_OK)
3923 hr = IBasicVideo_GetVideoPaletteEntries(pBasicVideo, StartIndex, Entries, pRetrieved, pPalette);
3924
3926
3927 return hr;
3928}
static const ENTRY Entries[]

◆ BasicVideo_GetVideoSize()

static HRESULT WINAPI BasicVideo_GetVideoSize ( IBasicVideo2 *  iface,
LONG pWidth,
LONG pHeight 
)
static

Definition at line 3889 of file filtergraph.c.

3890{
3892 IBasicVideo *pBasicVideo;
3893 HRESULT hr;
3894
3895 TRACE("(%p/%p)->(%p, %p)\n", This, iface, pWidth, pHeight);
3896
3898
3899 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3900
3901 if (hr == S_OK)
3902 hr = IBasicVideo_GetVideoSize(pBasicVideo, pWidth, pHeight);
3903
3905
3906 return hr;
3907}

◆ BasicVideo_Invoke()

static HRESULT WINAPI BasicVideo_Invoke ( IBasicVideo2 *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExepInfo,
UINT puArgErr 
)
static

Definition at line 3320 of file filtergraph.c.

3323{
3325 IBasicVideo *pBasicVideo;
3326 HRESULT hr;
3327
3328 TRACE("(%p/%p)->(%d, %s, %d, %04x, %p, %p, %p, %p)\n", This, iface, dispIdMember,
3329 debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
3330
3332
3333 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3334
3335 if (hr == S_OK)
3336 hr = IBasicVideo_Invoke(pBasicVideo, dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
3337
3339
3340 return hr;
3341}

◆ BasicVideo_IsUsingDefaultDestination()

static HRESULT WINAPI BasicVideo_IsUsingDefaultDestination ( IBasicVideo2 *  iface)
static

Definition at line 3971 of file filtergraph.c.

3972{
3974 IBasicVideo *pBasicVideo;
3975 HRESULT hr;
3976
3977 TRACE("(%p/%p)->()\n", This, iface);
3978
3980
3981 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3982
3983 if (hr == S_OK)
3984 hr = IBasicVideo_IsUsingDefaultDestination(pBasicVideo);
3985
3987
3988 return hr;
3989}

◆ BasicVideo_IsUsingDefaultSource()

static HRESULT WINAPI BasicVideo_IsUsingDefaultSource ( IBasicVideo2 *  iface)
static

Definition at line 3951 of file filtergraph.c.

3952{
3954 IBasicVideo *pBasicVideo;
3955 HRESULT hr;
3956
3957 TRACE("(%p/%p)->()\n", This, iface);
3958
3960
3961 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3962
3963 if (hr == S_OK)
3964 hr = IBasicVideo_IsUsingDefaultSource(pBasicVideo);
3965
3967
3968 return hr;
3969}

◆ BasicVideo_put_DestinationHeight()

static HRESULT WINAPI BasicVideo_put_DestinationHeight ( IBasicVideo2 *  iface,
LONG  DestinationHeight 
)
static

Definition at line 3724 of file filtergraph.c.

3725{
3727 IBasicVideo *pBasicVideo;
3728 HRESULT hr;
3729
3730 TRACE("(%p/%p)->(%d)\n", This, iface, DestinationHeight);
3731
3733
3734 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3735
3736 if (hr == S_OK)
3737 hr = IBasicVideo_put_DestinationHeight(pBasicVideo, DestinationHeight);
3738
3740
3741 return hr;
3742}

◆ BasicVideo_put_DestinationLeft()

static HRESULT WINAPI BasicVideo_put_DestinationLeft ( IBasicVideo2 *  iface,
LONG  DestinationLeft 
)
static

Definition at line 3604 of file filtergraph.c.

3605{
3607 IBasicVideo *pBasicVideo;
3608 HRESULT hr;
3609
3610 TRACE("(%p/%p)->(%d)\n", This, iface, DestinationLeft);
3611
3613
3614 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3615
3616 if (hr == S_OK)
3617 hr = IBasicVideo_put_DestinationLeft(pBasicVideo, DestinationLeft);
3618
3620
3621 return hr;
3622}

◆ BasicVideo_put_DestinationTop()

static HRESULT WINAPI BasicVideo_put_DestinationTop ( IBasicVideo2 *  iface,
LONG  DestinationTop 
)
static

Definition at line 3684 of file filtergraph.c.

3685{
3687 IBasicVideo *pBasicVideo;
3688 HRESULT hr;
3689
3690 TRACE("(%p/%p)->(%d)\n", This, iface, DestinationTop);
3691
3693
3694 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3695
3696 if (hr == S_OK)
3697 hr = IBasicVideo_put_DestinationTop(pBasicVideo, DestinationTop);
3698
3700
3701 return hr;
3702}

◆ BasicVideo_put_DestinationWidth()

static HRESULT WINAPI BasicVideo_put_DestinationWidth ( IBasicVideo2 *  iface,
LONG  DestinationWidth 
)
static

Definition at line 3644 of file filtergraph.c.

3645{
3647 IBasicVideo *pBasicVideo;
3648 HRESULT hr;
3649
3650 TRACE("(%p/%p)->(%d)\n", This, iface, DestinationWidth);
3651
3653
3654 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3655
3656 if (hr == S_OK)
3657 hr = IBasicVideo_put_DestinationWidth(pBasicVideo, DestinationWidth);
3658
3660
3661 return hr;
3662}

◆ BasicVideo_put_SourceHeight()

static HRESULT WINAPI BasicVideo_put_SourceHeight ( IBasicVideo2 *  iface,
LONG  SourceHeight 
)
static

Definition at line 3564 of file filtergraph.c.

3565{
3567 IBasicVideo *pBasicVideo;
3568 HRESULT hr;
3569
3570 TRACE("(%p/%p)->(%d)\n", This, iface, SourceHeight);
3571
3573
3574 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3575
3576 if (hr == S_OK)
3577 hr = IBasicVideo_put_SourceHeight(pBasicVideo, SourceHeight);
3578
3580
3581 return hr;
3582}

◆ BasicVideo_put_SourceLeft()

static HRESULT WINAPI BasicVideo_put_SourceLeft ( IBasicVideo2 *  iface,
LONG  SourceLeft 
)
static

Definition at line 3444 of file filtergraph.c.

3445{
3447 IBasicVideo *pBasicVideo;
3448 HRESULT hr;
3449
3450 TRACE("(%p/%p)->(%d)\n", This, iface, SourceLeft);
3451
3453
3454 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3455
3456 if (hr == S_OK)
3457 hr = IBasicVideo_put_SourceLeft(pBasicVideo, SourceLeft);
3458
3460
3461 return hr;
3462}

◆ BasicVideo_put_SourceTop()

static HRESULT WINAPI BasicVideo_put_SourceTop ( IBasicVideo2 *  iface,
LONG  SourceTop 
)
static

Definition at line 3524 of file filtergraph.c.

3525{
3527 IBasicVideo *pBasicVideo;
3528 HRESULT hr;
3529
3530 TRACE("(%p/%p)->(%d)\n", This, iface, SourceTop);
3531
3533
3534 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3535
3536 if (hr == S_OK)
3537 hr = IBasicVideo_put_SourceTop(pBasicVideo, SourceTop);
3538
3540
3541 return hr;
3542}

◆ BasicVideo_put_SourceWidth()

static HRESULT WINAPI BasicVideo_put_SourceWidth ( IBasicVideo2 *  iface,
LONG  SourceWidth 
)
static

Definition at line 3484 of file filtergraph.c.

3485{
3487 IBasicVideo *pBasicVideo;
3488 HRESULT hr;
3489
3490 TRACE("(%p/%p)->(%d)\n", This, iface, SourceWidth);
3491
3493
3494 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3495
3496 if (hr == S_OK)
3497 hr = IBasicVideo_put_SourceWidth(pBasicVideo, SourceWidth);
3498
3500
3501 return hr;
3502}

◆ BasicVideo_QueryInterface()

static HRESULT WINAPI BasicVideo_QueryInterface ( IBasicVideo2 *  iface,
REFIID  riid,
void **  ppvObj 
)
static

Definition at line 3229 of file filtergraph.c.

3230{
3232
3233 TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj);
3234
3235 return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj);
3236}

◆ BasicVideo_Release()

static ULONG WINAPI BasicVideo_Release ( IBasicVideo2 *  iface)
static

Definition at line 3247 of file filtergraph.c.

3248{
3250
3251 TRACE("(%p/%p)->()\n", This, iface);
3252
3253 return IUnknown_Release(This->outer_unk);
3254}

◆ BasicVideo_SetDefaultDestinationPosition()

static HRESULT WINAPI BasicVideo_SetDefaultDestinationPosition ( IBasicVideo2 *  iface)
static

Definition at line 3869 of file filtergraph.c.

3870{
3872 IBasicVideo *pBasicVideo;
3873 HRESULT hr;
3874
3875 TRACE("(%p/%p)->()\n", This, iface);
3876
3878
3879 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3880
3881 if (hr == S_OK)
3882 hr = IBasicVideo_SetDefaultDestinationPosition(pBasicVideo);
3883
3885
3886 return hr;
3887}

◆ BasicVideo_SetDefaultSourcePosition()

static HRESULT WINAPI BasicVideo_SetDefaultSourcePosition ( IBasicVideo2 *  iface)
static

Definition at line 3807 of file filtergraph.c.

3808{
3810 IBasicVideo *pBasicVideo;
3811 HRESULT hr;
3812
3813 TRACE("(%p/%p)->()\n", This, iface);
3814
3816
3817 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3818
3819 if (hr == S_OK)
3820 hr = IBasicVideo_SetDefaultSourcePosition(pBasicVideo);
3821
3823
3824 return hr;
3825}

◆ BasicVideo_SetDestinationPosition()

static HRESULT WINAPI BasicVideo_SetDestinationPosition ( IBasicVideo2 *  iface,
LONG  Left,
LONG  Top,
LONG  Width,
LONG  Height 
)
static

Definition at line 3827 of file filtergraph.c.

3829{
3831 IBasicVideo *pBasicVideo;
3832 HRESULT hr;
3833
3834 TRACE("(%p/%p)->(%d, %d, %d, %d)\n", This, iface, Left, Top, Width, Height);
3835
3837
3838 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3839
3840 if (hr == S_OK)
3841 hr = IBasicVideo_SetDestinationPosition(pBasicVideo, Left, Top, Width, Height);
3842
3844
3845 return hr;
3846}
static LPHIST_ENTRY Top
Definition: history.c:53
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88

◆ BasicVideo_SetSourcePosition()

static HRESULT WINAPI BasicVideo_SetSourcePosition ( IBasicVideo2 *  iface,
LONG  Left,
LONG  Top,
LONG  Width,
LONG  Height 
)
static

Definition at line 3765 of file filtergraph.c.

3767{
3769 IBasicVideo *pBasicVideo;
3770 HRESULT hr;
3771
3772 TRACE("(%p/%p)->(%d, %d, %d, %d)\n", This, iface, Left, Top, Width, Height);
3773
3775
3776 hr = GetTargetInterface(This, &IID_IBasicVideo, (LPVOID*)&pBasicVideo);
3777
3778 if (hr == S_OK)
3779 hr = IBasicVideo_SetSourcePosition(pBasicVideo, Left, Top, Width, Height);
3780
3782
3783 return hr;
3784}

◆ CheckCircularConnection()

static HRESULT CheckCircularConnection ( IFilterGraphImpl This,
IPin out,
IPin in 
)
static

Definition at line 597 of file filtergraph.c.

598{
599#if 1
600 HRESULT hr;
601 PIN_INFO info_out, info_in;
602
603 hr = IPin_QueryPinInfo(out, &info_out);
604 if (FAILED(hr))
605 return hr;
606 if (info_out.dir != PINDIR_OUTPUT)
607 {
608 IBaseFilter_Release(info_out.pFilter);
610 }
611
612 hr = IPin_QueryPinInfo(in, &info_in);
613 if (SUCCEEDED(hr))
614 IBaseFilter_Release(info_in.pFilter);
615 if (FAILED(hr))
616 goto out;
617 if (info_in.dir != PINDIR_INPUT)
618 {
620 goto out;
621 }
622
623 if (info_out.pFilter == info_in.pFilter)
625 else
626 {
627 IEnumPins *enumpins;
628 IPin *test;
629
630 hr = IBaseFilter_EnumPins(info_out.pFilter, &enumpins);
631 if (FAILED(hr))
632 goto out;
633
634 IEnumPins_Reset(enumpins);
635 while ((hr = IEnumPins_Next(enumpins, 1, &test, NULL)) == S_OK)
636 {
638 IPin_QueryDirection(test, &dir);
639 if (dir == PINDIR_INPUT)
640 {
641 IPin *victim = NULL;
642 IPin_ConnectedTo(test, &victim);
643 if (victim)
644 {
645 hr = CheckCircularConnection(This, victim, in);
646 IPin_Release(victim);
647 if (FAILED(hr))
648 {
649 IPin_Release(test);
650 break;
651 }
652 }
653 }
654 IPin_Release(test);
655 }
656 IEnumPins_Release(enumpins);
657 }
658
659out:
660 IBaseFilter_Release(info_out.pFilter);
661 if (FAILED(hr))
662 ERR("Checking filtergraph returned %08x, something's not right!\n", hr);
663 return hr;
664#else
665 /* Debugging filtergraphs not enabled */
666 return S_OK;
667#endif
668}
unsigned int dir
Definition: maze.c:112
enum _PinDirection PIN_DIRECTION
@ PINDIR_OUTPUT
Definition: axcore.idl:42
@ PINDIR_INPUT
Definition: axcore.idl:41
#define ERR(fmt,...)
Definition: precomp.h:57
static HRESULT CheckCircularConnection(IFilterGraphImpl *This, IPin *out, IPin *in)
Definition: filtergraph.c:597
GLuint in
Definition: glext.h:9616
Definition: axcore.idl:92
static FILE * out
Definition: regtests2xml.c:44
#define test
Definition: rosglue.h:37
#define VFW_E_CIRCULAR_GRAPH
Definition: vfwmsgs.h:88
#define VFW_E_CANNOT_CONNECT
Definition: vfwmsgs.h:62

Referenced by CheckCircularConnection(), FilterGraph2_Connect(), and FilterGraph2_ConnectDirect().

◆ ConvertFromREFTIME()

static HRESULT ConvertFromREFTIME ( IMediaSeeking seek,
REFTIME  time_in,
LONGLONG time_out 
)
static

Definition at line 2742 of file filtergraph.c.

2743{
2744 GUID time_format;
2745 HRESULT hr;
2746
2747 hr = MediaSeeking_GetTimeFormat(seek, &time_format);
2748 if (FAILED(hr))
2749 return hr;
2750 if (!IsEqualGUID(&TIME_FORMAT_MEDIA_TIME, &time_format))
2751 {
2752 FIXME("Unsupported time format.\n");
2753 return E_NOTIMPL;
2754 }
2755
2756 *time_out = (LONGLONG) (time_in * 10000000); /* convert from 1 second intervals to 100 ns intervals */
2757 return S_OK;
2758}
#define FIXME(fmt,...)
Definition: precomp.h:53
static HRESULT WINAPI MediaSeeking_GetTimeFormat(IMediaSeeking *iface, GUID *pFormat)
Definition: filtergraph.c:2401
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
int64_t LONGLONG
Definition: typedefs.h:68

Referenced by MediaPosition_put_CurrentPosition(), and MediaPosition_put_StopTime().

◆ ConvertToREFTIME()

static HRESULT ConvertToREFTIME ( IMediaSeeking seek,
LONGLONG  time_in,
REFTIME time_out 
)
static

Definition at line 2760 of file filtergraph.c.

2761{
2762 GUID time_format;
2763 HRESULT hr;
2764
2765 hr = MediaSeeking_GetTimeFormat(seek, &time_format);
2766 if (FAILED(hr))
2767 return hr;
2768 if (!IsEqualGUID(&TIME_FORMAT_MEDIA_TIME, &time_format))
2769 {
2770 FIXME("Unsupported time format.\n");
2771 return E_NOTIMPL;
2772 }
2773
2774 *time_out = (REFTIME)time_in / 10000000; /* convert from 100 ns intervals to 1 second intervals */
2775 return S_OK;
2776}
DOUBLE REFTIME
Definition: axcore.idl:57

Referenced by MediaPosition_get_CurrentPosition(), MediaPosition_get_Duration(), and MediaPosition_get_StopTime().

◆ CreateFilterInstanceAndLoadFile()

static HRESULT CreateFilterInstanceAndLoadFile ( GUID clsid,
LPCOLESTR  pszFileName,
IBaseFilter **  filter 
)
static

Definition at line 1585 of file filtergraph.c.

1586{
1588 HRESULT hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)filter);
1589 TRACE("CLSID: %s\n", debugstr_guid(clsid));
1590 if (FAILED(hr))
1591 return hr;
1592
1593 hr = IBaseFilter_QueryInterface(*filter, &IID_IFileSourceFilter, (LPVOID*)&source);
1594 if (FAILED(hr))
1595 {
1596 IBaseFilter_Release(*filter);
1597 return hr;
1598 }
1599
1600 /* Load the file in the file source filter */
1601 hr = IFileSourceFilter_Load(source, pszFileName, NULL);
1602 IFileSourceFilter_Release(source);
1603 if (FAILED(hr)) {
1604 WARN("Load (%x)\n", hr);
1605 IBaseFilter_Release(*filter);
1606 return hr;
1607 }
1608
1609 return hr;
1610}
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IBaseFilter
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005
REFCLSID clsid
Definition: msctf.c:82
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:44

Referenced by GetFileSourceFilter().

◆ EventsQueue_Destroy()

static int EventsQueue_Destroy ( EventsQueue omr)
static

Definition at line 82 of file filtergraph.c.

83{
86 omr->msg_crst.DebugInfo->Spare[0] = 0;
88 return TRUE;
89}
#define CloseHandle
Definition: compat.h:739
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
CRITICAL_SECTION msg_crst
Definition: filtergraph.c:64
Event * messages
Definition: filtergraph.c:60
HANDLE msg_event
Definition: filtergraph.c:65
DWORD_PTR Spare[8/sizeof(DWORD_PTR)]
Definition: winbase.h:887
PCRITICAL_SECTION_DEBUG DebugInfo
Definition: winbase.h:894
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)

Referenced by FilterGraph_create(), and FilterGraphInner_Release().

◆ EventsQueue_GetEvent()

static BOOL EventsQueue_GetEvent ( EventsQueue omr,
Event evt,
LONG  msTimeOut 
)
static

Definition at line 120 of file filtergraph.c.

121{
122 if (WaitForSingleObject(omr->msg_event, msTimeOut) != WAIT_OBJECT_0)
123 return FALSE;
124
126
127 if (omr->msg_toget == omr->msg_tosave) /* buffer empty ? */
128 {
130 return FALSE;
131 }
132
133 *evt = omr->messages[omr->msg_toget];
134 omr->msg_toget = (omr->msg_toget + 1) % omr->ring_buffer_size;
135
136 /* Mark the buffer as empty if needed */
137 if (omr->msg_toget == omr->msg_tosave) /* buffer empty ? */
138 ResetEvent(omr->msg_event);
139
141 return TRUE;
142}
if(dx< 0)
Definition: linetemp.h:194
int msg_tosave
Definition: filtergraph.c:62
int ring_buffer_size
Definition: filtergraph.c:61
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
Definition: synch.c:714
#define WAIT_OBJECT_0
Definition: winbase.h:406

Referenced by MediaEvent_GetEvent().

◆ EventsQueue_Init()

static int EventsQueue_Init ( EventsQueue omr)
static

Definition at line 68 of file filtergraph.c.

69{
70 omr->msg_toget = 0;
71 omr->msg_tosave = 0;
74 omr->messages = CoTaskMemAlloc(omr->ring_buffer_size * sizeof(Event));
75 ZeroMemory(omr->messages, omr->ring_buffer_size * sizeof(Event));
76
78 omr->msg_crst.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": EventsQueue.msg_crst");
79 return TRUE;
80}
#define EVENTS_RING_BUFFER_INCREMENT
Definition: filtergraph.c:58
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
#define DWORD_PTR
Definition: treelist.c:76
#define ZeroMemory
Definition: winbase.h:1712

Referenced by FilterGraph_create().

◆ EventsQueue_PutEvent()

static BOOL EventsQueue_PutEvent ( EventsQueue omr,
const Event evt 
)
static

Definition at line 91 of file filtergraph.c.

92{
94 if (omr->msg_toget == ((omr->msg_tosave + 1) % omr->ring_buffer_size))
95 {
96 int old_ring_buffer_size = omr->ring_buffer_size;
98 TRACE("omr->ring_buffer_size=%d\n",omr->ring_buffer_size);
99 omr->messages = CoTaskMemRealloc(omr->messages, omr->ring_buffer_size * sizeof(Event));
100 /* Now we need to rearrange the ring buffer so that the new
101 buffers just allocated are in between omr->msg_tosave and
102 omr->msg_toget.
103 */
104 if (omr->msg_tosave < omr->msg_toget)
105 {
107 &(omr->messages[omr->msg_toget]),
108 sizeof(Event)*(old_ring_buffer_size - omr->msg_toget)
109 );
111 }
112 }
113 omr->messages[omr->msg_tosave] = *evt;
114 SetEvent(omr->msg_event);
115 omr->msg_tosave = (omr->msg_tosave + 1) % omr->ring_buffer_size;
117 return TRUE;
118}
LPVOID WINAPI CoTaskMemRealloc(LPVOID pvOld, SIZE_T size)
Definition: ifs.c:460
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733

Referenced by MediaEventSink_Notify().

◆ ExploreGraph()

static HRESULT ExploreGraph ( IFilterGraphImpl pGraph,
IPin pOutputPin,
fnFoundFilter  FoundFilter,
DWORD_PTR  data 
)
static

Definition at line 1917 of file filtergraph.c.

1918{
1919 HRESULT hr;
1920 IPin* pInputPin;
1921 IPin** ppPins;
1922 ULONG nb;
1923 ULONG i;
1924 PIN_INFO PinInfo;
1925
1926 TRACE("%p %p\n", pGraph, pOutputPin);
1927 PinInfo.pFilter = NULL;
1928
1929 hr = IPin_ConnectedTo(pOutputPin, &pInputPin);
1930
1931 if (SUCCEEDED(hr))
1932 {
1933 hr = IPin_QueryPinInfo(pInputPin, &PinInfo);
1934 if (SUCCEEDED(hr))
1935 hr = GetInternalConnections(PinInfo.pFilter, pInputPin, &ppPins, &nb);
1936 IPin_Release(pInputPin);
1937 }
1938
1939 if (SUCCEEDED(hr))
1940 {
1941 if (nb == 0)
1942 {
1943 TRACE("Reached a renderer\n");
1944 /* Count renderers for end of stream notification */
1945 pGraph->nRenderers++;
1946 }
1947 else
1948 {
1949 for(i = 0; i < nb; i++)
1950 {
1951 /* Explore the graph downstream from this pin
1952 * FIXME: We should prevent exploring from a pin more than once. This can happens when
1953 * several input pins are connected to the same output (a MUX for instance). */
1954 ExploreGraph(pGraph, ppPins[i], FoundFilter, data);
1955 IPin_Release(ppPins[i]);
1956 }
1957
1958 CoTaskMemFree(ppPins);
1959 }
1960 TRACE("Doing stuff with filter %p\n", PinInfo.pFilter);
1961
1962 FoundFilter(PinInfo.pFilter, data);
1963 }
1964
1965 if (PinInfo.pFilter) IBaseFilter_Release(PinInfo.pFilter);
1966 return hr;
1967}
static HRESULT GetInternalConnections(IBaseFilter *pfilter, IPin *pinputpin, IPin ***pppins, ULONG *pnb)
Definition: filtergraph.c:831
static HRESULT ExploreGraph(IFilterGraphImpl *pGraph, IPin *pOutputPin, fnFoundFilter FoundFilter, DWORD_PTR data)
Definition: filtergraph.c:1917
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950

Referenced by ExploreGraph(), and SendFilterMessage().

◆ FilterGraph2_Abort()

static HRESULT WINAPI FilterGraph2_Abort ( IFilterGraph2 iface)
static

Definition at line 1745 of file filtergraph.c.

1746{
1748
1749 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1750
1751 return S_OK;
1752}
static IFilterGraphImpl * impl_from_IFilterGraph2(IFilterGraph2 *iface)
Definition: filtergraph.c:335

◆ FilterGraph2_AddFilter()

static HRESULT WINAPI FilterGraph2_AddFilter ( IFilterGraph2 iface,
IBaseFilter pFilter,
LPCWSTR  pName 
)
static

Definition at line 368 of file filtergraph.c.

370{
372 HRESULT hr;
373 int i,j;
374 WCHAR* wszFilterName = NULL;
375 BOOL duplicate_name = FALSE;
376
377 TRACE("(%p/%p)->(%p, %s (%p))\n", This, iface, pFilter, debugstr_w(pName), pName);
378
379 if (!pFilter)
380 return E_POINTER;
381
382 wszFilterName = CoTaskMemAlloc( (pName ? strlenW(pName) + 6 : 5) * sizeof(WCHAR) );
383
384 if (pName)
385 {
386 /* Check if name already exists */
387 for(i = 0; i < This->nFilters; i++)
388 if (!strcmpW(This->pFilterNames[i], pName))
389 {
390 duplicate_name = TRUE;
391 break;
392 }
393 }
394
395 /* If no name given or name already existing, generate one */
396 if (!pName || duplicate_name)
397 {
398 static const WCHAR wszFmt1[] = {'%','s',' ','%','0','4','d',0};
399 static const WCHAR wszFmt2[] = {'%','0','4','d',0};
400
401 for (j = 0; j < 10000 ; j++)
402 {
403 /* Create name */
404 if (pName)
405 sprintfW(wszFilterName, wszFmt1, pName, This->nameIndex);
406 else
407 sprintfW(wszFilterName, wszFmt2, This->nameIndex);
408 TRACE("Generated name %s\n", debugstr_w(wszFilterName));
409
410 /* Check if the generated name already exists */
411 for(i = 0; i < This->nFilters; i++)
412 if (!strcmpW(This->pFilterNames[i], wszFilterName))
413 break;
414
415 /* Compute next index and exit if generated name is suitable */
416 if (This->nameIndex++ == 10000)
417 This->nameIndex = 1;
418 if (i == This->nFilters)
419 break;
420 }
421 /* Unable to find a suitable name */
422 if (j == 10000)
423 {
424 CoTaskMemFree(wszFilterName);
426 }
427 }
428 else
429 memcpy(wszFilterName, pName, (strlenW(pName) + 1) * sizeof(WCHAR));
430
431 if (This->nFilters + 1 > This->filterCapacity)
432 {
433 int newCapacity = This->filterCapacity ? 2 * This->filterCapacity : 1;
434 IBaseFilter ** ppNewFilters = CoTaskMemAlloc(newCapacity * sizeof(IBaseFilter*));
435 LPWSTR * pNewNames = CoTaskMemAlloc(newCapacity * sizeof(LPWSTR));
436 memcpy(ppNewFilters, This->ppFiltersInGraph, This->nFilters * sizeof(IBaseFilter*));
437 memcpy(pNewNames, This->pFilterNames, This->nFilters * sizeof(LPWSTR));
438 if (This->filterCapacity)
439 {
440 CoTaskMemFree(This->ppFiltersInGraph);
441 CoTaskMemFree(This->pFilterNames);
442 }
443 This->ppFiltersInGraph = ppNewFilters;
444 This->pFilterNames = pNewNames;
445 This->filterCapacity = newCapacity;
446 }
447
448 hr = IBaseFilter_JoinFilterGraph(pFilter, (IFilterGraph *)&This->IFilterGraph2_iface, wszFilterName);
449
450 if (SUCCEEDED(hr))
451 {
452 IBaseFilter_AddRef(pFilter);
453 This->ppFiltersInGraph[This->nFilters] = pFilter;
454 This->pFilterNames[This->nFilters] = wszFilterName;
455 This->nFilters++;
456 This->version++;
457 IBaseFilter_SetSyncSource(pFilter, This->refClock);
458 }
459 else
460 CoTaskMemFree(wszFilterName);
461
462 if (SUCCEEDED(hr) && duplicate_name)
464
465 return hr;
466}
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 GLint GLint j
Definition: glfuncs.h:250
#define debugstr_w
Definition: kernel32.h:32
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static LPSTR pName
Definition: security.c:75
#define strcmpW(s1, s2)
Definition: unicode.h:44
#define strlenW(s)
Definition: unicode.h:34
#define sprintfW
Definition: unicode.h:64
#define VFW_E_DUPLICATE_NAME
Definition: vfwmsgs.h:84
#define VFW_S_DUPLICATE_NAME
Definition: vfwmsgs.h:20
#define E_POINTER
Definition: winerror.h:2365
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ FilterGraph2_AddRef()

static ULONG WINAPI FilterGraph2_AddRef ( IFilterGraph2 iface)
static

Definition at line 349 of file filtergraph.c.

350{
352
353 TRACE("(%p/%p)->()\n", This, iface);
354
355 return IUnknown_AddRef(This->outer_unk);
356}

◆ FilterGraph2_AddSourceFilter()

static HRESULT WINAPI FilterGraph2_AddSourceFilter ( IFilterGraph2 iface,
LPCWSTR  lpcwstrFileName,
LPCWSTR  lpcwstrFilterName,
IBaseFilter **  ppFilter 
)
static

Definition at line 1678 of file filtergraph.c.

1680{
1682 HRESULT hr;
1683 IBaseFilter* preader;
1684 IFileSourceFilter* pfile = NULL;
1685 AM_MEDIA_TYPE mt;
1686 WCHAR* filename;
1687
1688 TRACE("(%p/%p)->(%s, %s, %p)\n", This, iface, debugstr_w(lpcwstrFileName), debugstr_w(lpcwstrFilterName), ppFilter);
1689
1690 /* Try from file name first, then fall back to default asynchronous reader */
1691 hr = GetFileSourceFilter(lpcwstrFileName, &preader);
1692 if (FAILED(hr)) {
1693 WARN("Unable to create file source filter (%x)\n", hr);
1694 return hr;
1695 }
1696
1697 hr = IFilterGraph2_AddFilter(iface, preader, lpcwstrFilterName);
1698 if (FAILED(hr)) {
1699 WARN("Unable add filter (%x)\n", hr);
1700 IBaseFilter_Release(preader);
1701 return hr;
1702 }
1703
1704 hr = IBaseFilter_QueryInterface(preader, &IID_IFileSourceFilter, (LPVOID*)&pfile);
1705 if (FAILED(hr)) {
1706 WARN("Unable to get IFileSourceInterface (%x)\n", hr);
1707 goto error;
1708 }
1709
1710 /* The file has been already loaded */
1711 hr = IFileSourceFilter_GetCurFile(pfile, &filename, &mt);
1712 if (FAILED(hr)) {
1713 WARN("GetCurFile (%x)\n", hr);
1714 goto error;
1715 }
1716
1717 TRACE("File %s\n", debugstr_w(filename));
1718 TRACE("MajorType %s\n", debugstr_guid(&mt.majortype));
1719 TRACE("SubType %s\n", debugstr_guid(&mt.subtype));
1720
1721 if (ppFilter)
1722 *ppFilter = preader;
1723 IFileSourceFilter_Release(pfile);
1724
1725 return S_OK;
1726
1727error:
1728 if (pfile)
1729 IFileSourceFilter_Release(pfile);
1730 IFilterGraph2_RemoveFilter(iface, preader);
1731 IBaseFilter_Release(preader);
1732
1733 return hr;
1734}
static HRESULT GetFileSourceFilter(LPCOLESTR pszFileName, IBaseFilter **filter)
Definition: filtergraph.c:1613
const char * filename
Definition: ioapi.h:137
#define error(str)
Definition: mkdosfs.c:1605

◆ FilterGraph2_AddSourceFilterForMoniker()

static HRESULT WINAPI FilterGraph2_AddSourceFilterForMoniker ( IFilterGraph2 iface,
IMoniker pMoniker,
IBindCtx pCtx,
LPCWSTR  lpcwstrFilterName,
IBaseFilter **  ppFilter 
)
static

Definition at line 1764 of file filtergraph.c.

1766{
1768 HRESULT hr;
1769 IBaseFilter* pfilter;
1770
1771 TRACE("(%p/%p)->(%p %p %s %p)\n", This, iface, pMoniker, pCtx, debugstr_w(lpcwstrFilterName), ppFilter);
1772
1773 hr = IMoniker_BindToObject(pMoniker, pCtx, NULL, &IID_IBaseFilter, (void**)&pfilter);
1774 if(FAILED(hr)) {
1775 WARN("Unable to bind moniker to filter object (%x)\n", hr);
1776 return hr;
1777 }
1778
1779 hr = IFilterGraph2_AddFilter(iface, pfilter, lpcwstrFilterName);
1780 if (FAILED(hr)) {
1781 WARN("Unable to add filter (%x)\n", hr);
1782 IBaseFilter_Release(pfilter);
1783 return hr;
1784 }
1785
1786 if(ppFilter)
1787 *ppFilter = pfilter;
1788 else IBaseFilter_Release(pfilter);
1789
1790 return S_OK;
1791}

◆ FilterGraph2_Connect()

static HRESULT WINAPI FilterGraph2_Connect ( IFilterGraph2 iface,
IPin ppinOut,
IPin ppinIn 
)
static

Definition at line 894 of file filtergraph.c.

895{
897 HRESULT hr;
898 AM_MEDIA_TYPE* mt = NULL;
899 IEnumMediaTypes* penummt = NULL;
900 ULONG nbmt;
901 IEnumPins* penumpins;
902 IEnumMoniker* pEnumMoniker;
903 GUID tab[2];
904 ULONG nb = 0;
905 IMoniker* pMoniker;
906 ULONG pin;
907 PIN_INFO PinInfo;
908 CLSID FilterCLSID;
910 unsigned int i = 0;
911 IFilterMapper2 *pFilterMapper2 = NULL;
912
913 TRACE("(%p/%p)->(%p, %p)\n", This, iface, ppinOut, ppinIn);
914
915 if(!ppinOut || !ppinIn)
916 return E_POINTER;
917
918 if (TRACE_ON(quartz))
919 {
920 hr = IPin_QueryPinInfo(ppinIn, &PinInfo);
921 if (FAILED(hr))
922 return hr;
923
924 TRACE("Filter owning ppinIn(%p) => %p\n", ppinIn, PinInfo.pFilter);
925 IBaseFilter_Release(PinInfo.pFilter);
926
927 hr = IPin_QueryPinInfo(ppinOut, &PinInfo);
928 if (FAILED(hr))
929 return hr;
930
931 TRACE("Filter owning ppinOut(%p) => %p\n", ppinOut, PinInfo.pFilter);
932 IBaseFilter_Release(PinInfo.pFilter);
933 }
934
936 ++This->recursioncount;
937 if (This->recursioncount >= 5)
938 {
939 WARN("Recursion count has reached %d\n", This->recursioncount);
941 goto out;
942 }
943
944 hr = IPin_QueryDirection(ppinOut, &dir);
945 if (FAILED(hr))
946 goto out;
947
948 if (dir == PINDIR_INPUT)
949 {
950 IPin *temp;
951
952 TRACE("Directions seem backwards, swapping pins\n");
953
954 temp = ppinIn;
955 ppinIn = ppinOut;
956 ppinOut = temp;
957 }
958
959 hr = CheckCircularConnection(This, ppinOut, ppinIn);
960 if (FAILED(hr))
961 goto out;
962
963 /* Try direct connection first */
964 hr = IPin_Connect(ppinOut, ppinIn, NULL);
965 if (SUCCEEDED(hr))
966 goto out;
967
968 TRACE("Direct connection failed, trying to render using extra filters\n");
969
970 hr = IPin_QueryPinInfo(ppinIn, &PinInfo);
971 if (FAILED(hr))
972 goto out;
973
974 hr = IBaseFilter_GetClassID(PinInfo.pFilter, &FilterCLSID);
975 IBaseFilter_Release(PinInfo.pFilter);
976 if (FAILED(hr))
977 goto out;
978
979 /* Find the appropriate transform filter than can transform the minor media type of output pin of the upstream
980 * filter to the minor mediatype of input pin of the renderer */
981 hr = IPin_EnumMediaTypes(ppinOut, &penummt);
982 if (FAILED(hr))
983 {
984 WARN("EnumMediaTypes (%x)\n", hr);
985 goto out;
986 }
987
988 hr = IEnumMediaTypes_Next(penummt, 1, &mt, &nbmt);
989 if (FAILED(hr)) {
990 WARN("IEnumMediaTypes_Next (%x)\n", hr);
991 goto out;
992 }
993
994 if (!nbmt)
995 {
996 WARN("No media type found!\n");
998 goto out;
999 }
1000 TRACE("MajorType %s\n", debugstr_guid(&mt->majortype));
1001 TRACE("SubType %s\n", debugstr_guid(&mt->subtype));
1002
1003 hr = IUnknown_QueryInterface(This->punkFilterMapper2, &IID_IFilterMapper2, (void**)&pFilterMapper2);
1004 if (FAILED(hr)) {
1005 WARN("Unable to get IFilterMapper2 (%x)\n", hr);
1006 goto out;
1007 }
1008
1009 /* Try to find a suitable filter that can connect to the pin to render */
1010 tab[0] = mt->majortype;
1011 tab[1] = mt->subtype;
1012 hr = IFilterMapper2_EnumMatchingFilters(pFilterMapper2, &pEnumMoniker, 0, FALSE, MERIT_UNLIKELY, TRUE, 1, tab, NULL, NULL, FALSE, FALSE, 0, NULL, NULL, NULL);
1013 if (FAILED(hr)) {
1014 WARN("Unable to enum filters (%x)\n", hr);
1015 goto out;
1016 }
1017
1019 while(IEnumMoniker_Next(pEnumMoniker, 1, &pMoniker, &nb) == S_OK)
1020 {
1021 VARIANT var;
1022 GUID clsid;
1023 IPin** ppins = NULL;
1024 IPin* ppinfilter = NULL;
1025 IBaseFilter* pfilter = NULL;
1027
1028 hr = GetFilterInfo(pMoniker, &var);
1029 if (FAILED(hr)) {
1030 WARN("Unable to retrieve filter info (%x)\n", hr);
1031 goto error;
1032 }
1033
1034 hr = IMoniker_BindToObject(pMoniker, NULL, NULL, &IID_IBaseFilter, (LPVOID*)&pfilter);
1035 IMoniker_Release(pMoniker);
1036 if (FAILED(hr)) {
1037 WARN("Unable to create filter (%x), trying next one\n", hr);
1038 goto error;
1039 }
1040
1041 hr = IBaseFilter_GetClassID(pfilter, &clsid);
1042 if (FAILED(hr))
1043 {
1044 IBaseFilter_Release(pfilter);
1045 goto error;
1046 }
1047
1048 if (IsEqualGUID(&clsid, &FilterCLSID)) {
1049 /* Skip filter (same as the one the output pin belongs to) */
1050 IBaseFilter_Release(pfilter);
1051 pfilter = NULL;
1052 goto error;
1053 }
1054
1055 if (This->pSite)
1056 {
1057 IUnknown_QueryInterface(This->pSite, &IID_IAMGraphBuilderCallback, (LPVOID*)&callback);
1058 if (callback)
1059 {
1060 HRESULT rc;
1061 rc = IAMGraphBuilderCallback_SelectedFilter(callback, pMoniker);
1062 if (FAILED(rc))
1063 {
1064 TRACE("Filter rejected by IAMGraphBuilderCallback_SelectedFilter\n");
1065 IAMGraphBuilderCallback_Release(callback);
1066 goto error;
1067 }
1068 }
1069 }
1070
1071 if (callback)
1072 {
1073 HRESULT rc;
1074 rc = IAMGraphBuilderCallback_CreatedFilter(callback, pfilter);
1075 IAMGraphBuilderCallback_Release(callback);
1076 if (FAILED(rc))
1077 {
1078 IBaseFilter_Release(pfilter);
1079 pfilter = NULL;
1080 TRACE("Filter rejected by IAMGraphBuilderCallback_CreatedFilter\n");
1081 goto error;
1082 }
1083 }
1084
1085 hr = IFilterGraph2_AddFilter(iface, pfilter, V_BSTR(&var));
1086 if (FAILED(hr)) {
1087 WARN("Unable to add filter (%x)\n", hr);
1088 IBaseFilter_Release(pfilter);
1089 pfilter = NULL;
1090 goto error;
1091 }
1092
1093 VariantClear(&var);
1094
1095 hr = IBaseFilter_EnumPins(pfilter, &penumpins);
1096 if (FAILED(hr)) {
1097 WARN("Enumpins (%x)\n", hr);
1098 goto error;
1099 }
1100
1101 hr = IEnumPins_Next(penumpins, 1, &ppinfilter, &pin);
1102 IEnumPins_Release(penumpins);
1103
1104 if (FAILED(hr)) {
1105 WARN("Obtaining next pin: (%x)\n", hr);
1106 goto error;
1107 }
1108 if (pin == 0) {
1109 WARN("Cannot use this filter: no pins\n");
1110 goto error;
1111 }
1112
1113 hr = IPin_Connect(ppinOut, ppinfilter, NULL);
1114 if (FAILED(hr)) {
1115 TRACE("Cannot connect to filter (%x), trying next one\n", hr);
1116 goto error;
1117 }
1118 TRACE("Successfully connected to filter, follow chain...\n");
1119
1120 /* Render all output pins of the filter by calling IFilterGraph2_Connect on each of them */
1121 hr = GetInternalConnections(pfilter, ppinfilter, &ppins, &nb);
1122
1123 if (SUCCEEDED(hr)) {
1124 if (nb == 0) {
1125 IPin_Disconnect(ppinfilter);
1126 IPin_Disconnect(ppinOut);
1127 goto error;
1128 }
1129 TRACE("pins to consider: %d\n", nb);
1130 for(i = 0; i < nb; i++)
1131 {
1132 LPWSTR pinname = NULL;
1133
1134 TRACE("Processing pin %u\n", i);
1135
1136 hr = IPin_QueryId(ppins[i], &pinname);
1137 if (SUCCEEDED(hr))
1138 {
1139 if (pinname[0] == '~')
1140 {
1141 TRACE("Pinname=%s, skipping\n", debugstr_w(pinname));
1142 hr = E_FAIL;
1143 }
1144 else
1145 hr = IFilterGraph2_Connect(iface, ppins[i], ppinIn);
1146 CoTaskMemFree(pinname);
1147 }
1148
1149 if (FAILED(hr)) {
1150 TRACE("Cannot connect pin %p (%x)\n", ppinfilter, hr);
1151 }
1152 IPin_Release(ppins[i]);
1153 if (SUCCEEDED(hr)) break;
1154 }
1155 while (++i < nb) IPin_Release(ppins[i]);
1156 CoTaskMemFree(ppins);
1157 IPin_Release(ppinfilter);
1158 IBaseFilter_Release(pfilter);
1159 if (FAILED(hr))
1160 {
1161 IPin_Disconnect(ppinfilter);
1162 IPin_Disconnect(ppinOut);
1163 IFilterGraph2_RemoveFilter(iface, pfilter);
1164 continue;
1165 }
1166 break;
1167 }
1168
1169error:
1170 VariantClear(&var);
1171 if (ppinfilter) IPin_Release(ppinfilter);
1172 if (pfilter) {
1173 IFilterGraph2_RemoveFilter(iface, pfilter);
1174 IBaseFilter_Release(pfilter);
1175 }
1176 while (++i < nb) IPin_Release(ppins[i]);
1177 CoTaskMemFree(ppins);
1178 }
1179
1180 IEnumMoniker_Release(pEnumMoniker);
1181
1182out:
1183 if (pFilterMapper2)
1184 IFilterMapper2_Release(pFilterMapper2);
1185 if (penummt)
1186 IEnumMediaTypes_Release(penummt);
1187 if (mt)
1188 DeleteMediaType(mt);
1189 --This->recursioncount;
1191 TRACE("--> %08x\n", hr);
1192 return SUCCEEDED(hr) ? S_OK : hr;
1193}
#define E_FAIL
Definition: ddrawi.h:102
static HRESULT GetFilterInfo(IMoniker *pMoniker, VARIANT *pvar)
Definition: filtergraph.c:809
#define TRACE_ON(x)
Definition: compat.h:75
static IPrintDialogCallback callback
Definition: printdlg.c:326
const char * var
Definition: shader.c:5666
static void DeleteMediaType(AM_MEDIA_TYPE *pMediaType)
Definition: filtergraph.c:741
#define V_BSTR(A)
Definition: oleauto.h:226
static calc_node_t temp
Definition: rpn_ieee.c:38
Definition: regsvr.c:104
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
#define VFW_E_INVALIDMEDIATYPE
Definition: vfwmsgs.h:39
#define VFW_E_CANNOT_RENDER
Definition: vfwmsgs.h:63

◆ FilterGraph2_ConnectDirect()

static HRESULT WINAPI FilterGraph2_ConnectDirect ( IFilterGraph2 iface,
IPin ppinIn,
IPin ppinOut,
const AM_MEDIA_TYPE pmt 
)
static

Definition at line 673 of file filtergraph.c.

675{
678 HRESULT hr;
679
680 TRACE("(%p/%p)->(%p, %p, %p)\n", This, iface, ppinIn, ppinOut, pmt);
681
682 /* FIXME: check pins are in graph */
683
684 if (TRACE_ON(quartz))
685 {
686 PIN_INFO PinInfo;
687
688 hr = IPin_QueryPinInfo(ppinIn, &PinInfo);
689 if (FAILED(hr))
690 return hr;
691
692 TRACE("Filter owning ppinIn(%p) => %p\n", ppinIn, PinInfo.pFilter);
693 IBaseFilter_Release(PinInfo.pFilter);
694
695 hr = IPin_QueryPinInfo(ppinOut, &PinInfo);
696 if (FAILED(hr))
697 return hr;
698
699 TRACE("Filter owning ppinOut(%p) => %p\n", ppinOut, PinInfo.pFilter);
700 IBaseFilter_Release(PinInfo.pFilter);
701 }
702
703 hr = IPin_QueryDirection(ppinIn, &dir);
704 if (SUCCEEDED(hr))
705 {
706 if (dir == PINDIR_INPUT)
707 {
708 hr = CheckCircularConnection(This, ppinOut, ppinIn);
709 if (SUCCEEDED(hr))
710 hr = IPin_Connect(ppinOut, ppinIn, pmt);
711 }
712 else
713 {
714 hr = CheckCircularConnection(This, ppinIn, ppinOut);
715 if (SUCCEEDED(hr))
716 hr = IPin_Connect(ppinIn, ppinOut, pmt);
717 }
718 }
719
720 return hr;
721}

Referenced by FilterGraph2_Render().

◆ FilterGraph2_Disconnect()

static HRESULT WINAPI FilterGraph2_Disconnect ( IFilterGraph2 iface,
IPin ppin 
)
static

Definition at line 752 of file filtergraph.c.

753{
755
756 TRACE("(%p/%p)->(%p)\n", This, iface, ppin);
757
758 if (!ppin)
759 return E_POINTER;
760
761 return IPin_Disconnect(ppin);
762}

◆ FilterGraph2_EnumFilters()

static HRESULT WINAPI FilterGraph2_EnumFilters ( IFilterGraph2 iface,
IEnumFilters **  ppEnum 
)
static

Definition at line 560 of file filtergraph.c.

561{
563
564 TRACE("(%p/%p)->(%p)\n", This, iface, ppEnum);
565
566 return IEnumFiltersImpl_Construct(&This->IGraphVersion_iface, &This->ppFiltersInGraph, &This->nFilters, ppEnum);
567}
HRESULT IEnumFiltersImpl_Construct(IGraphVersion *pVersionSource, IBaseFilter ***pppFilters, ULONG *pNumFilters, IEnumFilters **ppEnum)
Definition: enumfilters.c:45

◆ FilterGraph2_FindFilterByName()

static HRESULT WINAPI FilterGraph2_FindFilterByName ( IFilterGraph2 iface,
LPCWSTR  pName,
IBaseFilter **  ppFilter 
)
static

Definition at line 569 of file filtergraph.c.

571{
573 int i;
574
575 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_w(pName), pName, ppFilter);
576
577 if (!ppFilter)
578 return E_POINTER;
579
580 for (i = 0; i < This->nFilters; i++)
581 {
582 if (!strcmpW(pName, This->pFilterNames[i]))
583 {
584 *ppFilter = This->ppFiltersInGraph[i];
585 IBaseFilter_AddRef(*ppFilter);
586 return S_OK;
587 }
588 }
589
590 *ppFilter = NULL;
591 return VFW_E_NOT_FOUND;
592}
#define VFW_E_NOT_FOUND
Definition: vfwmsgs.h:61

◆ FilterGraph2_QueryInterface()

static HRESULT WINAPI FilterGraph2_QueryInterface ( IFilterGraph2 iface,
REFIID  riid,
void **  ppvObj 
)
static

Definition at line 340 of file filtergraph.c.

341{
343
344 TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj);
345
346 return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj);
347}

◆ FilterGraph2_Reconnect()

static HRESULT WINAPI FilterGraph2_Reconnect ( IFilterGraph2 iface,
IPin ppin 
)
static

Definition at line 723 of file filtergraph.c.

724{
726 IPin *pConnectedTo = NULL;
727 HRESULT hr;
728 PIN_DIRECTION pindir;
729
730 IPin_QueryDirection(ppin, &pindir);
731 hr = IPin_ConnectedTo(ppin, &pConnectedTo);
732
733 TRACE("(%p/%p)->(%p) -- %p\n", This, iface, ppin, pConnectedTo);
734
735 if (FAILED(hr)) {
736 TRACE("Querying connected to failed: %x\n", hr);
737 return hr;
738 }
739 IPin_Disconnect(ppin);
740 IPin_Disconnect(pConnectedTo);
741 if (pindir == PINDIR_INPUT)
742 hr = IPin_Connect(pConnectedTo, ppin, NULL);
743 else
744 hr = IPin_Connect(ppin, pConnectedTo, NULL);
745 IPin_Release(pConnectedTo);
746 if (FAILED(hr))
747 WARN("Reconnecting pins failed, pins are not connected now..\n");
748 TRACE("-> %08x\n", hr);
749 return hr;
750}

◆ FilterGraph2_ReconnectEx()

static HRESULT WINAPI FilterGraph2_ReconnectEx ( IFilterGraph2 iface,
IPin ppin,
const AM_MEDIA_TYPE pmt 
)
static

Definition at line 1793 of file filtergraph.c.

1795{
1797
1798 TRACE("(%p/%p)->(%p %p): stub !!!\n", This, iface, ppin, pmt);
1799
1800 return S_OK;
1801}

◆ FilterGraph2_Release()

static ULONG WINAPI FilterGraph2_Release ( IFilterGraph2 iface)
static

Definition at line 358 of file filtergraph.c.

359{
361
362 TRACE("(%p/%p)->()\n", This, iface);
363
364 return IUnknown_Release(This->outer_unk);
365}

◆ FilterGraph2_RemoveFilter()

static HRESULT WINAPI FilterGraph2_RemoveFilter ( IFilterGraph2 iface,
IBaseFilter pFilter 
)
static

Definition at line 468 of file filtergraph.c.

469{
471 int i;
472 HRESULT hr = E_FAIL;
473
474 TRACE("(%p/%p)->(%p)\n", This, iface, pFilter);
475
476 /* FIXME: check graph is stopped */
477
478 for (i = 0; i < This->nFilters; i++)
479 {
480 if (This->ppFiltersInGraph[i] == pFilter)
481 {
482 IEnumPins *penumpins = NULL;
483 FILTER_STATE state;
484
485 if (This->defaultclock && This->refClockProvider == pFilter)
486 {
487 IMediaFilter_SetSyncSource(&This->IMediaFilter_iface, NULL);
488 This->defaultclock = TRUE;
489 }
490
491 TRACE("Removing filter %s\n", debugstr_w(This->pFilterNames[i]));
492 IBaseFilter_GetState(pFilter, 0, &state);
493 if (state == State_Running)
494 IBaseFilter_Pause(pFilter);
495 if (state != State_Stopped)
496 IBaseFilter_Stop(pFilter);
497
498 hr = IBaseFilter_EnumPins(pFilter, &penumpins);
499 if (SUCCEEDED(hr)) {
500 IPin *ppin;
501 while(IEnumPins_Next(penumpins, 1, &ppin, NULL) == S_OK)
502 {
503 IPin *victim = NULL;
504 HRESULT h;
505 IPin_ConnectedTo(ppin, &victim);
506 if (victim)
507 {
508 h = IPin_Disconnect(victim);
509 TRACE("Disconnect other side: %08x\n", h);
510 if (h == VFW_E_NOT_STOPPED)
511 {
512 PIN_INFO pinfo;
513 IPin_QueryPinInfo(victim, &pinfo);
514
515 IBaseFilter_GetState(pinfo.pFilter, 0, &state);
516 if (state == State_Running)
517 IBaseFilter_Pause(pinfo.pFilter);
518 IBaseFilter_Stop(pinfo.pFilter);
519 IBaseFilter_Release(pinfo.pFilter);
520 h = IPin_Disconnect(victim);
521 TRACE("Disconnect retry: %08x\n", h);
522 }
523 IPin_Release(victim);
524 }
525 h = IPin_Disconnect(ppin);
526 TRACE("Disconnect 2: %08x\n", h);
527
528 IPin_Release(ppin);
529 }
530 IEnumPins_Release(penumpins);
531 }
532
533 hr = IBaseFilter_JoinFilterGraph(pFilter, NULL, This->pFilterNames[i]);
534 if (SUCCEEDED(hr))
535 {
536 IBaseFilter_SetSyncSource(pFilter, NULL);
537 IBaseFilter_Release(pFilter);
538 CoTaskMemFree(This->pFilterNames[i]);
539 memmove(This->ppFiltersInGraph+i, This->ppFiltersInGraph+i+1, sizeof(IBaseFilter*)*(This->nFilters - 1 - i));
540 memmove(This->pFilterNames+i, This->pFilterNames+i+1, sizeof(LPWSTR)*(This->nFilters - 1 - i));
541 This->nFilters--;
542 This->version++;
543 /* Invalidate interfaces in the cache */
544 for (i = 0; i < This->nItfCacheEntries; i++)
545 if (pFilter == This->ItfCacheEntries[i].filter)
546 {
547 IUnknown_Release(This->ItfCacheEntries[i].iface);
548 This->ItfCacheEntries[i].iface = NULL;
549 This->ItfCacheEntries[i].filter = NULL;
550 }
551 return S_OK;
552 }
553 break;
554 }
555 }
556
557 return hr; /* FIXME: check this error code */
558}
static int state
Definition: maze.c:121
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define VFW_E_NOT_STOPPED
Definition: vfwmsgs.h:75

◆ FilterGraph2_Render()

static HRESULT WINAPI FilterGraph2_Render ( IFilterGraph2 iface,
IPin ppinOut 
)
static

Definition at line 1267 of file filtergraph.c.

1268{
1270 IEnumMediaTypes* penummt;
1271 AM_MEDIA_TYPE* mt;
1272 ULONG nbmt;
1273 HRESULT hr;
1274
1275 IEnumMoniker* pEnumMoniker;
1276 GUID tab[4];
1277 ULONG nb;
1278 IMoniker* pMoniker;
1279 INT x;
1280 IFilterMapper2 *pFilterMapper2 = NULL;
1281
1282 TRACE("(%p/%p)->(%p)\n", This, iface, ppinOut);
1283
1284 if (TRACE_ON(quartz))
1285 {
1286 PIN_INFO PinInfo;
1287
1288 hr = IPin_QueryPinInfo(ppinOut, &PinInfo);
1289 if (FAILED(hr))
1290 return hr;
1291
1292 TRACE("Filter owning pin => %p\n", PinInfo.pFilter);
1293 IBaseFilter_Release(PinInfo.pFilter);
1294 }
1295
1296 /* Try to find out if there is a renderer for the specified subtype already, and use that
1297 */
1299 for (x = 0; x < This->nFilters; ++x)
1300 {
1301 IEnumPins *enumpins = NULL;
1302 IPin *pin = NULL;
1303
1304 hr = IBaseFilter_EnumPins(This->ppFiltersInGraph[x], &enumpins);
1305
1306 if (FAILED(hr) || !enumpins)
1307 continue;
1308
1309 IEnumPins_Reset(enumpins);
1310 while (IEnumPins_Next(enumpins, 1, &pin, NULL) == S_OK)
1311 {
1312 IPin *to = NULL;
1314
1315 IPin_QueryDirection(pin, &dir);
1316 if (dir != PINDIR_INPUT)
1317 {
1318 IPin_Release(pin);
1319 continue;
1320 }
1321 IPin_ConnectedTo(pin, &to);
1322
1323 if (to == NULL)
1324 {
1325 hr = FilterGraph2_ConnectDirect(iface, ppinOut, pin, NULL);
1326 if (SUCCEEDED(hr))
1327 {
1328 TRACE("Connected successfully %p/%p, %08x look if we should render more!\n", ppinOut, pin, hr);
1329 IPin_Release(pin);
1330
1332 if (FAILED(hr))
1333 {
1334 IPin_Disconnect(ppinOut);
1335 IPin_Disconnect(pin);
1336 continue;
1337 }
1338 IEnumPins_Release(enumpins);
1340 return hr;
1341 }
1342 WARN("Could not connect!\n");
1343 }
1344 else
1345 IPin_Release(to);
1346
1347 IPin_Release(pin);
1348 }
1349 IEnumPins_Release(enumpins);
1350 }
1351
1353
1354 hr = IPin_EnumMediaTypes(ppinOut, &penummt);
1355 if (FAILED(hr)) {
1356 WARN("EnumMediaTypes (%x)\n", hr);
1357 return hr;
1358 }
1359
1360 IEnumMediaTypes_Reset(penummt);
1361
1362 /* Looks like no existing renderer of the kind exists
1363 * Try adding new ones
1364 */
1365 tab[0] = tab[1] = GUID_NULL;
1366 while (SUCCEEDED(hr))
1367 {
1368 hr = IEnumMediaTypes_Next(penummt, 1, &mt, &nbmt);
1369 if (FAILED(hr)) {
1370 WARN("IEnumMediaTypes_Next (%x)\n", hr);
1371 break;
1372 }
1373 if (!nbmt)
1374 {
1376 break;
1377 }
1378 else
1379 {
1380 TRACE("MajorType %s\n", debugstr_guid(&mt->majortype));
1381 TRACE("SubType %s\n", debugstr_guid(&mt->subtype));
1382
1383 /* Only enumerate once, this doesn't account for all previous ones, but this should be enough nonetheless */
1384 if (IsEqualIID(&tab[0], &mt->majortype) && IsEqualIID(&tab[1], &mt->subtype))
1385 {
1386 DeleteMediaType(mt);
1387 continue;
1388 }
1389
1390 if (pFilterMapper2 == NULL)
1391 {
1392 hr = IUnknown_QueryInterface(This->punkFilterMapper2, &IID_IFilterMapper2, (void**)&pFilterMapper2);
1393 if (FAILED(hr))
1394 {
1395 WARN("Unable to query IFilterMapper2 (%x)\n", hr);
1396 break;
1397 }
1398 }
1399
1400 /* Try to find a suitable renderer with the same media type */
1401 tab[0] = mt->majortype;
1402 tab[1] = mt->subtype;
1403 hr = IFilterMapper2_EnumMatchingFilters(pFilterMapper2, &pEnumMoniker, 0, FALSE, MERIT_UNLIKELY, TRUE, 1, tab, NULL, NULL, FALSE, FALSE, 0, NULL, NULL, NULL);
1404 if (FAILED(hr))
1405 {
1406 WARN("Unable to enum filters (%x)\n", hr);
1407 break;
1408 }
1409 }
1410 hr = E_FAIL;
1411
1412 while (IEnumMoniker_Next(pEnumMoniker, 1, &pMoniker, &nb) == S_OK)
1413 {
1414 VARIANT var;
1415 IPin* ppinfilter;
1416 IBaseFilter* pfilter = NULL;
1417 IEnumPins* penumpins = NULL;
1418 ULONG pin;
1419
1420 hr = GetFilterInfo(pMoniker, &var);
1421 if (FAILED(hr)) {
1422 WARN("Unable to retrieve filter info (%x)\n", hr);
1423 goto error;
1424 }
1425
1426 hr = IMoniker_BindToObject(pMoniker, NULL, NULL, &IID_IBaseFilter, (LPVOID*)&pfilter);
1427 IMoniker_Release(pMoniker);
1428 if (FAILED(hr))
1429 {
1430 WARN("Unable to create filter (%x), trying next one\n", hr);
1431 goto error;
1432 }
1433
1434 hr = IFilterGraph2_AddFilter(iface, pfilter, V_BSTR(&var));
1435 if (FAILED(hr)) {
1436 WARN("Unable to add filter (%x)\n", hr);
1437 IBaseFilter_Release(pfilter);
1438 pfilter = NULL;
1439 goto error;
1440 }
1441
1442 hr = IBaseFilter_EnumPins(pfilter, &penumpins);
1443 if (FAILED(hr)) {
1444 WARN("Splitter Enumpins (%x)\n", hr);
1445 goto error;
1446 }
1447
1448 while ((hr = IEnumPins_Next(penumpins, 1, &ppinfilter, &pin)) == S_OK)
1449 {
1451
1452 if (pin == 0) {
1453 WARN("No Pin\n");
1454 hr = E_FAIL;
1455 goto error;
1456 }
1457
1458 hr = IPin_QueryDirection(ppinfilter, &dir);
1459 if (FAILED(hr)) {
1460 IPin_Release(ppinfilter);
1461 WARN("QueryDirection failed (%x)\n", hr);
1462 goto error;
1463 }
1464 if (dir != PINDIR_INPUT) {
1465 IPin_Release(ppinfilter);
1466 continue; /* Wrong direction */
1467 }
1468
1469 /* Connect the pin to the "Renderer" */
1470 hr = IPin_Connect(ppinOut, ppinfilter, NULL);
1471 IPin_Release(ppinfilter);
1472
1473 if (FAILED(hr)) {
1474 WARN("Unable to connect %s to renderer (%x)\n", debugstr_w(V_BSTR(&var)), hr);
1475 goto error;
1476 }
1477 TRACE("Connected, recursing %s\n", debugstr_w(V_BSTR(&var)));
1478
1479 VariantClear(&var);
1480
1481 hr = FilterGraph2_RenderRecurse(This, ppinfilter);
1482 if (FAILED(hr)) {
1483 WARN("Unable to connect recursively (%x)\n", hr);
1484 goto error;
1485 }
1486 IBaseFilter_Release(pfilter);
1487 break;
1488 }
1489 if (SUCCEEDED(hr)) {
1490 IEnumPins_Release(penumpins);
1491 break; /* out of IEnumMoniker_Next loop */
1492 }
1493
1494 /* IEnumPins_Next failed, all other failure case caught by goto error */
1495 WARN("IEnumPins_Next (%x)\n", hr);
1496 /* goto error */
1497
1498error:
1499 VariantClear(&var);
1500 if (penumpins)
1501 IEnumPins_Release(penumpins);
1502 if (pfilter) {
1503 IFilterGraph2_RemoveFilter(iface, pfilter);
1504 IBaseFilter_Release(pfilter);
1505 }
1506 if (SUCCEEDED(hr)) DebugBreak();
1507 }
1508
1509 IEnumMoniker_Release(pEnumMoniker);
1510 if (nbmt)
1511 DeleteMediaType(mt);
1512 if (SUCCEEDED(hr))
1513 break;
1514 hr = S_OK;
1515 }
1516
1517 if (pFilterMapper2)
1518 IFilterMapper2_Release(pFilterMapper2);
1519
1520 IEnumMediaTypes_Release(penummt);
1521 return hr;
1522}
static HRESULT FilterGraph2_RenderRecurse(IFilterGraphImpl *This, IPin *ppinOut)
Definition: filtergraph.c:1195
static HRESULT WINAPI FilterGraph2_ConnectDirect(IFilterGraph2 *iface, IPin *ppinIn, IPin *ppinOut, const AM_MEDIA_TYPE *pmt)
Definition: filtergraph.c:673
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define GUID_NULL
Definition: ks.h:106
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
int32_t INT
Definition: typedefs.h:58
void WINAPI DebugBreak(void)

◆ FilterGraph2_RenderEx()

static HRESULT WINAPI FilterGraph2_RenderEx ( IFilterGraph2 iface,
IPin pPinOut,
DWORD  dwFlags,
DWORD pvContext 
)
static

Definition at line 1803 of file filtergraph.c.

1805{
1807
1808 TRACE("(%p/%p)->(%p %08x %p): stub !!!\n", This, iface, pPinOut, dwFlags, pvContext);
1809
1810 return S_OK;
1811}
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176

◆ FilterGraph2_RenderFile()

static HRESULT WINAPI FilterGraph2_RenderFile ( IFilterGraph2 iface,
LPCWSTR  lpcwstrFile,
LPCWSTR  lpcwstrPlayList 
)
static

Definition at line 1524 of file filtergraph.c.

1526{
1528 static const WCHAR string[] = {'R','e','a','d','e','r',0};
1529 IBaseFilter* preader = NULL;
1530 IPin* ppinreader = NULL;
1531 IEnumPins* penumpins = NULL;
1532 HRESULT hr;
1533 BOOL partial = FALSE;
1534 BOOL any = FALSE;
1535
1536 TRACE("(%p/%p)->(%s, %s)\n", This, iface, debugstr_w(lpcwstrFile), debugstr_w(lpcwstrPlayList));
1537
1538 if (lpcwstrPlayList != NULL)
1539 return E_INVALIDARG;
1540
1541 hr = IFilterGraph2_AddSourceFilter(iface, lpcwstrFile, string, &preader);
1542 if (FAILED(hr))
1543 return hr;
1544
1545 hr = IBaseFilter_EnumPins(preader, &penumpins);
1546 if (SUCCEEDED(hr))
1547 {
1548 while (IEnumPins_Next(penumpins, 1, &ppinreader, NULL) == S_OK)
1549 {
1551
1552 IPin_QueryDirection(ppinreader, &dir);
1553 if (dir == PINDIR_OUTPUT)
1554 {
1555 INT i;
1556
1557 hr = IFilterGraph2_Render(iface, ppinreader);
1558 TRACE("Render %08x\n", hr);
1559
1560 for (i = 0; i < This->nFilters; ++i)
1561 TRACE("Filters in chain: %s\n", debugstr_w(This->pFilterNames[i]));
1562
1563 if (SUCCEEDED(hr))
1564 any = TRUE;
1565 if (hr != S_OK)
1566 partial = TRUE;
1567 }
1568 IPin_Release(ppinreader);
1569 }
1570 IEnumPins_Release(penumpins);
1571
1572 if (!any)
1574 else if (partial)
1576 else
1577 hr = S_OK;
1578 }
1579 IBaseFilter_Release(preader);
1580
1581 TRACE("--> %08x\n", hr);
1582 return hr;
1583}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define VFW_S_PARTIAL_RENDER
Definition: vfwmsgs.h:22

◆ FilterGraph2_RenderRecurse()

static HRESULT FilterGraph2_RenderRecurse ( IFilterGraphImpl This,
IPin ppinOut 
)
static

Definition at line 1195 of file filtergraph.c.

1196{
1197 /* This pin has been connected now, try to call render on all pins that aren't connected */
1198 IPin *to = NULL;
1199 PIN_INFO info;
1200 IEnumPins *enumpins = NULL;
1201 BOOL renderany = FALSE;
1202 BOOL renderall = TRUE;
1203
1204 IPin_QueryPinInfo(ppinOut, &info);
1205
1206 IBaseFilter_EnumPins(info.pFilter, &enumpins);
1207 /* Don't need to hold a reference, IEnumPins does */
1208 IBaseFilter_Release(info.pFilter);
1209
1210 IEnumPins_Reset(enumpins);
1211 while (IEnumPins_Next(enumpins, 1, &to, NULL) == S_OK)
1212 {
1214
1215 IPin_QueryDirection(to, &dir);
1216
1217 if (dir == PINDIR_OUTPUT)
1218 {
1219 IPin *out = NULL;
1220
1221 IPin_ConnectedTo(to, &out);
1222 if (!out)
1223 {
1224 HRESULT hr;
1225 hr = IFilterGraph2_Render(&This->IFilterGraph2_iface, to);
1226 if (SUCCEEDED(hr))
1227 renderany = TRUE;
1228 else
1229 renderall = FALSE;
1230 }
1231 else
1232 IPin_Release(out);
1233 }
1234
1235 IPin_Release(to);
1236 }
1237
1238 IEnumPins_Release(enumpins);
1239
1240 if (renderall)
1241 return S_OK;
1242
1243 if (renderany)
1244 return VFW_S_PARTIAL_RENDER;
1245
1246 return VFW_E_CANNOT_RENDER;
1247}

Referenced by FilterGraph2_Render().

◆ FilterGraph2_SetDefaultSyncSource()

static HRESULT WINAPI FilterGraph2_SetDefaultSyncSource ( IFilterGraph2 iface)
static

Definition at line 764 of file filtergraph.c.

765{
767 IReferenceClock *pClock = NULL;
768 HRESULT hr = S_OK;
769 int i;
770
771 TRACE("(%p/%p)->() live sources not handled properly!\n", This, iface);
772
774
775 for (i = 0; i < This->nFilters; ++i)
776 {
777 DWORD miscflags;
779 IBaseFilter_QueryInterface(This->ppFiltersInGraph[i], &IID_IAMFilterMiscFlags, (void**)&flags);
780 if (!flags)
781 continue;
782 miscflags = IAMFilterMiscFlags_GetMiscFlags(flags);
783 IAMFilterMiscFlags_Release(flags);
784 if (miscflags == AM_FILTER_MISC_FLAGS_IS_RENDERER)
785 IBaseFilter_QueryInterface(This->ppFiltersInGraph[i], &IID_IReferenceClock, (void**)&pClock);
786 if (pClock)
787 break;
788 }
789
790 if (!pClock)
791 {
792 hr = CoCreateInstance(&CLSID_SystemClock, NULL, CLSCTX_INPROC_SERVER, &IID_IReferenceClock, (LPVOID*)&pClock);
793 This->refClockProvider = NULL;
794 }
795 else
796 This->refClockProvider = This->ppFiltersInGraph[i];
797
798 if (SUCCEEDED(hr))
799 {
800 hr = IMediaFilter_SetSyncSource(&This->IMediaFilter_iface, pClock);
801 This->defaultclock = TRUE;
803 }
805
806 return hr;
807}
#define IReferenceClock_Release(p)
Definition: dmusicc.h:752
unsigned long DWORD
Definition: ntddk_ex.h:95

◆ FilterGraph2_SetLogFile()

static HRESULT WINAPI FilterGraph2_SetLogFile ( IFilterGraph2 iface,
DWORD_PTR  hFile 
)
static

Definition at line 1736 of file filtergraph.c.

1737{
1739
1740 TRACE("(%p/%p)->(%08x): stub !!!\n", This, iface, (DWORD) hFile);
1741
1742 return S_OK;
1743}
_In_ HANDLE hFile
Definition: mswsock.h:90

◆ FilterGraph2_ShouldOperationContinue()

static HRESULT WINAPI FilterGraph2_ShouldOperationContinue ( IFilterGraph2 iface)
static

Definition at line 1754 of file filtergraph.c.

1755{
1757
1758 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1759
1760 return S_OK;
1761}

◆ FilterGraph_create()

HRESULT FilterGraph_create ( IUnknown pUnkOuter,
LPVOID ppObj 
)

Definition at line 5689 of file filtergraph.c.

5690{
5691 IFilterGraphImpl *fimpl;
5692 HRESULT hr;
5693
5694 TRACE("(%p,%p)\n", pUnkOuter, ppObj);
5695
5696 *ppObj = NULL;
5697
5698 fimpl = CoTaskMemAlloc(sizeof(*fimpl));
5699 fimpl->defaultclock = TRUE;
5700 fimpl->IUnknown_inner.lpVtbl = &IInner_VTable;
5704 fimpl->IBasicAudio_iface.lpVtbl = &IBasicAudio_VTable;
5705 fimpl->IBasicVideo2_iface.lpVtbl = &IBasicVideo_VTable;
5706 fimpl->IVideoWindow_iface.lpVtbl = &IVideoWindow_VTable;
5708 fimpl->IMediaFilter_iface.lpVtbl = &IMediaFilter_VTable;
5710 fimpl->IGraphConfig_iface.lpVtbl = &IGraphConfig_VTable;
5714 fimpl->ref = 1;
5715 fimpl->ppFiltersInGraph = NULL;
5716 fimpl->pFilterNames = NULL;
5717 fimpl->nFilters = 0;
5718 fimpl->filterCapacity = 0;
5719 fimpl->nameIndex = 1;
5720 fimpl->refClock = NULL;
5721 fimpl->hEventCompletion = CreateEventW(0, TRUE, FALSE, 0);
5722 fimpl->HandleEcComplete = TRUE;
5723 fimpl->HandleEcRepaint = TRUE;
5724 fimpl->HandleEcClockChanged = TRUE;
5725 fimpl->notif.hWnd = 0;
5726 fimpl->notif.disabled = FALSE;
5727 fimpl->nRenderers = 0;
5728 fimpl->EcCompleteCount = 0;
5729 fimpl->refClockProvider = NULL;
5730 fimpl->state = State_Stopped;
5731 fimpl->pSite = NULL;
5732 EventsQueue_Init(&fimpl->evqueue);
5734 fimpl->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": IFilterGraphImpl.cs");
5735 fimpl->nItfCacheEntries = 0;
5736 memcpy(&fimpl->timeformatseek, &TIME_FORMAT_MEDIA_TIME, sizeof(GUID));
5737 fimpl->start_time = fimpl->pause_time = 0;
5738 fimpl->punkFilterMapper2 = NULL;
5739 fimpl->recursioncount = 0;
5740 fimpl->version = 0;
5741
5742 if (pUnkOuter)
5743 fimpl->outer_unk = pUnkOuter;
5744 else
5745 fimpl->outer_unk = &fimpl->IUnknown_inner;
5746
5747 /* create Filtermapper aggregated. */
5748 hr = CoCreateInstance(&CLSID_FilterMapper2, fimpl->outer_unk, CLSCTX_INPROC_SERVER,
5749 &IID_IUnknown, (void**)&fimpl->punkFilterMapper2);
5750
5751 if (FAILED(hr)) {
5752 ERR("Unable to create filter mapper (%x)\n", hr);
5753 if (fimpl->punkFilterMapper2) IUnknown_Release(fimpl->punkFilterMapper2);
5756 fimpl->cs.DebugInfo->Spare[0] = 0;
5757 DeleteCriticalSection(&fimpl->cs);
5758 CoTaskMemFree(fimpl);
5759 return hr;
5760 }
5761
5762 *ppObj = &fimpl->IUnknown_inner;
5763 return S_OK;
5764}
const GUID IID_IUnknown
static const IMediaEventExVtbl IMediaEventEx_VTable
Definition: filtergraph.c:5232
static const IBasicAudioVtbl IBasicAudio_VTable
Definition: filtergraph.c:3209
static const IFilterGraph2Vtbl IFilterGraph2_VTable
Definition: filtergraph.c:1814
static int EventsQueue_Destroy(EventsQueue *omr)
Definition: filtergraph.c:82
static const IMediaSeekingVtbl IMediaSeeking_VTable
Definition: filtergraph.c:2660
static const IMediaControlVtbl IMediaControl_VTable
Definition: filtergraph.c:2217
static const IMediaEventSinkVtbl IMediaEventSink_VTable
Definition: filtergraph.c:5476
static int EventsQueue_Init(EventsQueue *omr)
Definition: filtergraph.c:68
static const IVideoWindowVtbl IVideoWindow_VTable
Definition: filtergraph.c:4965
static const IBasicVideo2Vtbl IBasicVideo_VTable
Definition: filtergraph.c:4012
static const IMediaPositionVtbl IMediaPosition_VTable
Definition: filtergraph.c:2874
static const IGraphVersionVtbl IGraphVersion_VTable
Definition: filtergraph.c:5673
static const IGraphConfigVtbl IGraphConfig_VTable
Definition: filtergraph.c:5617
static const IMediaFilterVtbl IMediaFilter_VTable
Definition: filtergraph.c:5388
static const IUnknownVtbl IInner_VTable
Definition: filtergraph.c:5681
static const IObjectWithSiteVtbl IObjectWithSite_VTable
Definition: filtergraph.c:2955
int disabled
Definition: filtergraph.c:48
HWND hWnd
Definition: filtergraph.c:45
IVideoWindow IVideoWindow_iface
Definition: filtergraph.c:158
IReferenceClock * refClock
Definition: filtergraph.c:184
EventsQueue evqueue
Definition: filtergraph.c:186
HANDLE hEventCompletion
Definition: filtergraph.c:187
IUnknown * outer_unk
Definition: filtergraph.c:176
IMediaControl IMediaControl_iface
Definition: filtergraph.c:154
IUnknown * punkFilterMapper2
Definition: filtergraph.c:178
REFERENCE_TIME pause_time
Definition: filtergraph.c:202
LPWSTR * pFilterNames
Definition: filtergraph.c:180
IUnknown IUnknown_inner
Definition: filtergraph.c:152
IBaseFilter * refClockProvider
Definition: filtergraph.c:185
IMediaPosition IMediaPosition_iface
Definition: filtergraph.c:163
IGraphVersion IGraphVersion_iface
Definition: filtergraph.c:165
REFERENCE_TIME start_time
Definition: filtergraph.c:201
IBaseFilter ** ppFiltersInGraph
Definition: filtergraph.c:179
IMediaEventSink IMediaEventSink_iface
Definition: filtergraph.c:161
IBasicAudio IBasicAudio_iface
Definition: filtergraph.c:156
IMediaSeeking IMediaSeeking_iface
Definition: filtergraph.c:155
IObjectWithSite IObjectWithSite_iface
Definition: filtergraph.c:164
IUnknown * pSite
Definition: filtergraph.c:204
IMediaFilter IMediaFilter_iface
Definition: filtergraph.c:160
IGraphConfig IGraphConfig_iface
Definition: filtergraph.c:162
IBasicVideo2 IBasicVideo2_iface
Definition: filtergraph.c:157
OAFilterState state
Definition: filtergraph.c:195
IMediaEventEx IMediaEventEx_iface
Definition: filtergraph.c:159
IFilterGraph2 IFilterGraph2_iface
Definition: filtergraph.c:153
CRITICAL_SECTION cs
Definition: filtergraph.c:196

Referenced by FilterGraphNoThread_create().

◆ FilterGraphInner_AddRef()

static ULONG WINAPI FilterGraphInner_AddRef ( IUnknown iface)
static

Definition at line 284 of file filtergraph.c.

285{
288
289 TRACE("(%p)->(): new ref = %d\n", This, ref);
290
291 return ref;
292}
#define InterlockedIncrement
Definition: armddk.h:53
static IFilterGraphImpl * impl_from_IUnknown(IUnknown *iface)
Definition: filtergraph.c:208
Definition: send.c:48

◆ FilterGraphInner_QueryInterface()

static HRESULT WINAPI FilterGraphInner_QueryInterface ( IUnknown iface,
REFIID  riid,
void **  ppvObj 
)
static

Definition at line 213 of file filtergraph.c.

214{
216 TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObj);
217
219 *ppvObj = &This->IUnknown_inner;
220 TRACE(" returning IUnknown interface (%p)\n", *ppvObj);
221 } else if (IsEqualGUID(&IID_IFilterGraph, riid) ||
222 IsEqualGUID(&IID_IFilterGraph2, riid) ||
223 IsEqualGUID(&IID_IGraphBuilder, riid)) {
224 *ppvObj = &This->IFilterGraph2_iface;
225 TRACE(" returning IGraphBuilder interface (%p)\n", *ppvObj);
226 } else if (IsEqualGUID(&IID_IMediaControl, riid)) {
227 *ppvObj = &This->IMediaControl_iface;
228 TRACE(" returning IMediaControl interface (%p)\n", *ppvObj);
229 } else if (IsEqualGUID(&IID_IMediaSeeking, riid)) {
230 *ppvObj = &This->IMediaSeeking_iface;
231 TRACE(" returning IMediaSeeking interface (%p)\n", *ppvObj);
232 } else if (IsEqualGUID(&IID_IBasicAudio, riid)) {
233 *ppvObj = &This->IBasicAudio_iface;
234 TRACE(" returning IBasicAudio interface (%p)\n", *ppvObj);
235 } else if (IsEqualGUID(&IID_IBasicVideo, riid) ||
236 IsEqualGUID(&IID_IBasicVideo2, riid)) {
237 *ppvObj = &This->IBasicVideo2_iface;
238 TRACE(" returning IBasicVideo2 interface (%p)\n", *ppvObj);
239 } else if (IsEqualGUID(&IID_IVideoWindow, riid)) {
240 *ppvObj = &This->IVideoWindow_iface;
241 TRACE(" returning IVideoWindow interface (%p)\n", *ppvObj);
242 } else if (IsEqualGUID(&IID_IMediaEvent, riid) ||
243 IsEqualGUID(&IID_IMediaEventEx, riid)) {
244 *ppvObj = &This->IMediaEventEx_iface;
245 TRACE(" returning IMediaEvent(Ex) interface (%p)\n", *ppvObj);
246 } else if (IsEqualGUID(&IID_IMediaFilter, riid) ||
248 *ppvObj = &This->IMediaFilter_iface;
249 TRACE(" returning IMediaFilter interface (%p)\n", *ppvObj);
250 } else if (IsEqualGUID(&IID_IMediaEventSink, riid)) {
251 *ppvObj = &This->IMediaEventSink_iface;
252 TRACE(" returning IMediaEventSink interface (%p)\n", *ppvObj);
253 } else if (IsEqualGUID(&IID_IGraphConfig, riid)) {
254 *ppvObj = &This->IGraphConfig_iface;
255 TRACE(" returning IGraphConfig interface (%p)\n", *ppvObj);
256 } else if (IsEqualGUID(&IID_IMediaPosition, riid)) {
257 *ppvObj = &This->IMediaPosition_iface;
258 TRACE(" returning IMediaPosition interface (%p)\n", *ppvObj);
259 } else if (IsEqualGUID(&IID_IObjectWithSite, riid)) {
260 *ppvObj = &This->IObjectWithSite_iface;
261 TRACE(" returning IObjectWithSite interface (%p)\n", *ppvObj);
262 } else if (IsEqualGUID(&IID_IFilterMapper, riid)) {
263 TRACE(" requesting IFilterMapper interface from aggregated filtermapper (%p)\n", *ppvObj);
264 return IUnknown_QueryInterface(This->punkFilterMapper2, riid, ppvObj);
265 } else if (IsEqualGUID(&IID_IFilterMapper2, riid)) {
266 TRACE(" returning IFilterMapper2 interface from aggregated filtermapper (%p)\n", *ppvObj);
267 return IUnknown_QueryInterface(This->punkFilterMapper2, riid, ppvObj);
268 } else if (IsEqualGUID(&IID_IFilterMapper3, riid)) {
269 TRACE(" returning IFilterMapper3 interface from aggregated filtermapper (%p)\n", *ppvObj);
270 return IUnknown_QueryInterface(This->punkFilterMapper2, riid, ppvObj);
271 } else if (IsEqualGUID(&IID_IGraphVersion, riid)) {
272 *ppvObj = &This->IGraphConfig_iface;
273 TRACE(" returning IGraphConfig interface (%p)\n", *ppvObj);
274 } else {
275 *ppvObj = NULL;
276 FIXME("unknown interface %s\n", debugstr_guid(riid));
277 return E_NOINTERFACE;
278 }
279
280 IUnknown_AddRef((IUnknown *)*ppvObj);
281 return S_OK;
282}
const IID IID_IObjectWithSite
const GUID IID_IPersist
Definition: proxy.cpp:14
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ FilterGraphInner_Release()

static ULONG WINAPI FilterGraphInner_Release ( IUnknown iface)
static

Definition at line 294 of file filtergraph.c.

295{
298
299 TRACE("(%p)->(): new ref = %d\n", This, ref);
300
301 if (ref == 0) {
302 int i;
303
304 This->ref = 1; /* guard against reentrancy (aggregation). */
305
306 IMediaControl_Stop(&This->IMediaControl_iface);
307
308 while (This->nFilters)
309 IFilterGraph2_RemoveFilter(&This->IFilterGraph2_iface, This->ppFiltersInGraph[0]);
310
311 if (This->refClock)
312 IReferenceClock_Release(This->refClock);
313
314 for (i = 0; i < This->nItfCacheEntries; i++)
315 {
316 if (This->ItfCacheEntries[i].iface)
317 IUnknown_Release(This->ItfCacheEntries[i].iface);
318 }
319
320 IUnknown_Release(This->punkFilterMapper2);
321
322 if (This->pSite) IUnknown_Release(This->pSite);
323
324 CloseHandle(This->hEventCompletion);
325 EventsQueue_Destroy(&This->evqueue);
326 This->cs.DebugInfo->Spare[0] = 0;
328 CoTaskMemFree(This->ppFiltersInGraph);
329 CoTaskMemFree(This->pFilterNames);
331 }
332 return ref;
333}
#define InterlockedDecrement
Definition: armddk.h:52

◆ FilterGraphNoThread_create()

HRESULT FilterGraphNoThread_create ( IUnknown pUnkOuter,
LPVOID ppObj 
)

Definition at line 5766 of file filtergraph.c.

5767{
5768 FIXME("CLSID_FilterGraphNoThread partially implemented - Forwarding to CLSID_FilterGraph\n");
5769 return FilterGraph_create(pUnkOuter, ppObj);
5770}
HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj)
Definition: filtergraph.c:5689

◆ found_getposition()

static HRESULT WINAPI found_getposition ( IFilterGraphImpl This,
IMediaSeeking seek,
DWORD_PTR  pargs 
)
static

Definition at line 2551 of file filtergraph.c.

2552{
2553 struct pos_args *args = (void*)pargs;
2554
2555 return IMediaSeeking_GetPositions(seek, args->current, args->stop);
2556}
Definition: match.c:390

Referenced by MediaSeeking_GetPositions().

◆ found_setposition()

static HRESULT WINAPI found_setposition ( IFilterGraphImpl This,
IMediaSeeking seek,
DWORD_PTR  pargs 
)
static

Definition at line 2509 of file filtergraph.c.

2510{
2511 struct pos_args *args = (void*)pargs;
2512
2513 return IMediaSeeking_SetPositions(seek, args->current, args->curflags, args->stop, args->stopflags);
2514}

Referenced by MediaSeeking_SetPositions().

◆ FoundCapabilities()

static HRESULT WINAPI FoundCapabilities ( IFilterGraphImpl This,
IMediaSeeking seek,
DWORD_PTR  pcaps 
)
static

Definition at line 2309 of file filtergraph.c.

2310{
2311 HRESULT hr;
2312 DWORD caps = 0;
2313
2314 hr = IMediaSeeking_GetCapabilities(seek, &caps);
2315 if (FAILED(hr))
2316 return hr;
2317
2318 /* Only add common capabilities everything supports */
2319 *(DWORD*)pcaps &= caps;
2320
2321 return hr;
2322}

Referenced by MediaSeeking_CheckCapabilities(), and MediaSeeking_GetCapabilities().

◆ FoundDuration()

static HRESULT WINAPI FoundDuration ( IFilterGraphImpl This,
IMediaSeeking seek,
DWORD_PTR  pduration 
)
static

Definition at line 2449 of file filtergraph.c.

2450{
2451 HRESULT hr;
2452 LONGLONG duration = 0, *pdur = (LONGLONG*)pduration;
2453
2454 hr = IMediaSeeking_GetDuration(seek, &duration);
2455 if (FAILED(hr))
2456 return hr;
2457
2458 if (*pdur < duration)
2459 *pdur = duration;
2460 return hr;
2461}

Referenced by MediaSeeking_GetDuration().

◆ GetFileSourceFilter()

static HRESULT GetFileSourceFilter ( LPCOLESTR  pszFileName,
IBaseFilter **  filter 
)
static

Definition at line 1613 of file filtergraph.c.

1614{
1615 HRESULT hr;
1616 GUID clsid;
1617 IAsyncReader * pReader = NULL;
1618 IFileSourceFilter* pSource = NULL;
1619 IPin * pOutputPin = NULL;
1620 static const WCHAR wszOutputPinName[] = { 'O','u','t','p','u','t',0 };
1621
1622 /* Try to find a match without reading the file first */
1624
1625 if (hr == S_OK)
1627
1628 /* Now create a AyncReader instance, to check for signature bytes in the file */
1629 hr = CoCreateInstance(&CLSID_AsyncReader, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)filter);
1630 if (FAILED(hr))
1631 return hr;
1632
1633 hr = IBaseFilter_QueryInterface(*filter, &IID_IFileSourceFilter, (LPVOID *)&pSource);
1634 if (FAILED(hr))
1635 {
1636 IBaseFilter_Release(*filter);
1637 return hr;
1638 }
1639
1640 hr = IFileSourceFilter_Load(pSource, pszFileName, NULL);
1641 IFileSourceFilter_Release(pSource);
1642 if (FAILED(hr))
1643 {
1644 IBaseFilter_Release(*filter);
1645 return hr;
1646 }
1647
1648 hr = IBaseFilter_FindPin(*filter, wszOutputPinName, &pOutputPin);
1649 if (FAILED(hr))
1650 {
1651 IBaseFilter_Release(*filter);
1652 return hr;
1653 }
1654
1655 hr = IPin_QueryInterface(pOutputPin, &IID_IAsyncReader, (LPVOID *)&pReader);
1656 IPin_Release(pOutputPin);
1657 if (FAILED(hr))
1658 {
1659 IBaseFilter_Release(*filter);
1660 return hr;
1661 }
1662
1663 /* Try again find a match */
1665 IAsyncReader_Release(pReader);
1666
1667 if (hr == S_OK)
1668 {
1669 /* Release the AsyncReader filter and create the matching one */
1670 IBaseFilter_Release(*filter);
1672 }
1673
1674 /* Return the AsyncReader filter */
1675 return S_OK;
1676}
const GUID IID_IAsyncReader
static HRESULT CreateFilterInstanceAndLoadFile(GUID *clsid, LPCOLESTR pszFileName, IBaseFilter **filter)
Definition: filtergraph.c:1585
HRESULT GetClassMediaFile(IAsyncReader *pReader, LPCOLESTR pszFileName, GUID *majorType, GUID *minorType, GUID *sourceFilter)
Definition: filesource.c:257
static const WCHAR wszOutputPinName[]
Definition: filesource.c:38

Referenced by FilterGraph2_AddSourceFilter().

◆ GetFilterInfo()

static HRESULT GetFilterInfo ( IMoniker pMoniker,
VARIANT pvar 
)
static

Definition at line 809 of file filtergraph.c.

810{
811 static const WCHAR wszFriendlyName[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0};
812