ReactOS  0.4.14-dev-50-g13bb5e2
quartz_private.h File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "wtypes.h"
#include "wingdi.h"
#include "winuser.h"
#include "dshow.h"
#include "wine/strmbase.h"
#include "wine/list.h"
Include dependency graph for quartz_private.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define COBJMACROS
 
#define MEDIATIME_FROM_BYTES(x)   ((LONGLONG)(x) * 10000000)
 
#define SEC_FROM_MEDIATIME(time)   ((time) / 10000000)
 
#define BYTES_FROM_MEDIATIME(time)   SEC_FROM_MEDIATIME(time)
 
#define MSEC_FROM_MEDIATIME(time)   ((time) / 10000)
 

Functions

HRESULT FilterGraph_create (IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN
 
HRESULT FilterGraphNoThread_create (IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN
 
HRESULT FilterMapper2_create (IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN
 
HRESULT FilterMapper_create (IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN
 
HRESULT AsyncReader_create (IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN
 
HRESULT StdMemAllocator_create (IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN
 
HRESULT AVISplitter_create (IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN
 
HRESULT MPEGSplitter_create (IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN
 
HRESULT AVIDec_create (IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN
 
HRESULT DSoundRender_create (IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN
 
HRESULT VideoRenderer_create (IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN
 
HRESULT NullRenderer_create (IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN
 
HRESULT VideoRendererDefault_create (IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN
 
HRESULT QUARTZ_CreateSystemClock (IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN
 
HRESULT ACMWrapper_create (IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN
 
HRESULT WAVEParser_create (IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN
 
HRESULT VMR7Impl_create (IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN
 
HRESULT VMR9Impl_create (IUnknown *pUnkOuter, LPVOID *ppv) DECLSPEC_HIDDEN
 
HRESULT EnumMonikerImpl_Create (IMoniker **ppMoniker, ULONG nMonikerCount, IEnumMoniker **ppEnum) DECLSPEC_HIDDEN
 
HRESULT IEnumRegFiltersImpl_Construct (REGFILTER *pInRegFilters, const ULONG size, IEnumRegFilters **ppEnum) DECLSPEC_HIDDEN
 
HRESULT IEnumFiltersImpl_Construct (IGraphVersion *pVersionSource, IBaseFilter ***pppFilters, ULONG *pNumFilters, IEnumFilters **ppEnum) DECLSPEC_HIDDEN
 
const charqzdebugstr_guid (const GUID *id) DECLSPEC_HIDDEN
 
void video_unregister_windowclass (void) DECLSPEC_HIDDEN
 
BOOL CompareMediaTypes (const AM_MEDIA_TYPE *pmt1, const AM_MEDIA_TYPE *pmt2, BOOL bWildcards)
 
void dump_AM_MEDIA_TYPE (const AM_MEDIA_TYPE *pmt) DECLSPEC_HIDDEN
 
HRESULT GetClassMediaFile (IAsyncReader *pReader, LPCOLESTR pszFileName, GUID *majorType, GUID *minorType, GUID *sourceFilter)
 

Macro Definition Documentation

◆ BYTES_FROM_MEDIATIME

#define BYTES_FROM_MEDIATIME (   time)    SEC_FROM_MEDIATIME(time)

Definition at line 39 of file quartz_private.h.

◆ COBJMACROS

#define COBJMACROS

Definition at line 25 of file quartz_private.h.

◆ MEDIATIME_FROM_BYTES

#define MEDIATIME_FROM_BYTES (   x)    ((LONGLONG)(x) * 10000000)

Definition at line 37 of file quartz_private.h.

◆ MSEC_FROM_MEDIATIME

#define MSEC_FROM_MEDIATIME (   time)    ((time) / 10000)

Definition at line 40 of file quartz_private.h.

◆ SEC_FROM_MEDIATIME

#define SEC_FROM_MEDIATIME (   time)    ((time) / 10000000)

Definition at line 38 of file quartz_private.h.

Function Documentation

◆ ACMWrapper_create()

HRESULT ACMWrapper_create ( IUnknown pUnkOuter,
LPVOID ppv 
)

Definition at line 380 of file acmwrapper.c.

381 {
382  HRESULT hr;
384 
385  TRACE("(%p, %p)\n", pUnkOuter, ppv);
386 
387  *ppv = NULL;
388 
389  if (pUnkOuter)
390  return CLASS_E_NOAGGREGATION;
391 
393 
394  if (FAILED(hr))
395  return hr;
396 
397  *ppv = &This->tf.filter.IBaseFilter_iface;
398  This->lasttime_real = This->lasttime_sent = -1;
399 
400  return hr;
401 }
static const IBaseFilterVtbl ACMWrapper_Vtbl
Definition: acmwrapper.c:54
HRESULT hr
Definition: shlfolder.c:183
REFIID LPVOID * ppv
Definition: atlbase.h:39
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static const TransformFilterFuncTable ACMWrapper_FuncsTable
Definition: acmwrapper.c:365
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
HRESULT TransformFilter_Construct(const IBaseFilterVtbl *filterVtbl, LONG filter_size, const CLSID *pClsid, const TransformFilterFuncTable *pFuncsTable, IBaseFilter **ppTransformFilter)
Definition: transform.c:263

◆ AsyncReader_create()

HRESULT AsyncReader_create ( IUnknown pUnkOuter,
LPVOID ppv 
)

Definition at line 420 of file filesource.c.

421 {
422  AsyncReader *pAsyncRead;
423 
424  if( pUnkOuter )
425  return CLASS_E_NOAGGREGATION;
426 
427  pAsyncRead = CoTaskMemAlloc(sizeof(AsyncReader));
428 
429  if (!pAsyncRead)
430  return E_OUTOFMEMORY;
431 
432  BaseFilter_Init(&pAsyncRead->filter, &AsyncReader_Vtbl, &CLSID_AsyncReader, (DWORD_PTR)(__FILE__ ": AsyncReader.csFilter"), &BaseFuncTable);
433 
434  pAsyncRead->IFileSourceFilter_iface.lpVtbl = &FileSource_Vtbl;
436  pAsyncRead->pOutputPin = NULL;
437 
438  pAsyncRead->pszFileName = NULL;
439  pAsyncRead->pmt = NULL;
440 
441  *ppv = pAsyncRead;
442 
443  TRACE("-- created at %p\n", pAsyncRead);
444 
445  return S_OK;
446 }
AM_MEDIA_TYPE * pmt
Definition: filesource.c:48
BaseFilter filter
Definition: filesource.c:42
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
static const IBaseFilterVtbl AsyncReader_Vtbl
Definition: filesource.c:71
#define TRACE(s)
Definition: solgame.cpp:4
IPin * pOutputPin
Definition: filesource.c:46
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
uint32_t DWORD_PTR
Definition: typedefs.h:63
IFileSourceFilter IFileSourceFilter_iface
Definition: filesource.c:43
static const BaseFilterFuncTable BaseFuncTable
Definition: filesource.c:415
LPOLESTR pszFileName
Definition: filesource.c:47
#define S_OK
Definition: intsafe.h:59
IAMFilterMiscFlags IAMFilterMiscFlags_iface
Definition: filesource.c:44
static const IAMFilterMiscFlagsVtbl IAMFilterMiscFlags_Vtbl
Definition: filesource.c:74
HRESULT WINAPI BaseFilter_Init(BaseFilter *This, const IBaseFilterVtbl *Vtbl, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseFilterFuncTable *pBaseFuncsTable)
Definition: filter.c:196
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406
static const IFileSourceFilterVtbl FileSource_Vtbl
Definition: filesource.c:72

◆ AVIDec_create()

HRESULT AVIDec_create ( IUnknown pUnkOuter,
LPVOID ppv 
)

Definition at line 395 of file avidec.c.

396 {
397  HRESULT hr;
398  AVIDecImpl * This;
399 
400  TRACE("(%p, %p)\n", pUnkOuter, ppv);
401 
402  *ppv = NULL;
403 
404  if (pUnkOuter)
405  return CLASS_E_NOAGGREGATION;
406 
408 
409  if (FAILED(hr))
410  return hr;
411 
412  This->hvid = NULL;
413  This->pBihIn = NULL;
414  This->pBihOut = NULL;
415 
416  *ppv = &This->tf.filter.IBaseFilter_iface;
417 
418  return hr;
419 }
HRESULT hr
Definition: shlfolder.c:183
static const IBaseFilterVtbl AVIDec_Vtbl
Definition: avidec.c:53
static const TransformFilterFuncTable AVIDec_FuncsTable
Definition: avidec.c:379
REFIID LPVOID * ppv
Definition: atlbase.h:39
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
HRESULT TransformFilter_Construct(const IBaseFilterVtbl *filterVtbl, LONG filter_size, const CLSID *pClsid, const TransformFilterFuncTable *pFuncsTable, IBaseFilter **ppTransformFilter)
Definition: transform.c:263

◆ AVISplitter_create()

HRESULT AVISplitter_create ( IUnknown pUnkOuter,
LPVOID ppv 
)

Definition at line 1430 of file avisplit.c.

1431 {
1432  HRESULT hr;
1434 
1435  TRACE("(%p, %p)\n", pUnkOuter, ppv);
1436 
1437  *ppv = NULL;
1438 
1439  if (pUnkOuter)
1440  return CLASS_E_NOAGGREGATION;
1441 
1442  /* Note: This memory is managed by the transform filter once created */
1443  This = CoTaskMemAlloc(sizeof(AVISplitterImpl));
1444 
1445  This->streams = NULL;
1446  This->oldindex = NULL;
1447 
1449 
1450  if (FAILED(hr))
1451  return hr;
1452 
1453  *ppv = &This->Parser.filter.IBaseFilter_iface;
1454 
1455  return hr;
1456 }
HRESULT hr
Definition: shlfolder.c:183
static HRESULT AVISplitter_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE *pmt)
Definition: avisplit.c:545
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT WINAPI AVISplitter_seek(IMediaSeeking *iface)
Definition: avisplit.c:1285
static HRESULT AVISplitter_InputPin_PreConnect(IPin *iface, IPin *pConnectPin, ALLOCATOR_PROPERTIES *props)
Definition: avisplit.c:1027
static HRESULT AVISplitter_Sample(LPVOID iface, IMediaSample *pSample, DWORD_PTR cookie)
Definition: avisplit.c:394
static HRESULT AVISplitter_first_request(LPVOID iface)
Definition: avisplit.c:429
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static HRESULT AVISplitter_Disconnect(LPVOID iface)
Definition: avisplit.c:1241
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
static const IBaseFilterVtbl AVISplitterImpl_Vtbl
Definition: avisplit.c:1411
static HRESULT AVISplitter_Flush(LPVOID iface)
Definition: avisplit.c:1215
static HRESULT AVISplitter_done_process(LPVOID iface)
Definition: avisplit.c:514
HRESULT Parser_Create(ParserImpl *pParser, const IBaseFilterVtbl *Parser_Vtbl, const CLSID *pClsid, PFN_PROCESS_SAMPLE fnProcessSample, PFN_QUERY_ACCEPT fnQueryAccept, PFN_PRE_CONNECT fnPreConnect, PFN_CLEANUP fnCleanup, PFN_DISCONNECT fnDisconnect, REQUESTPROC fnRequest, STOPPROCESSPROC fnDone, SourceSeeking_ChangeStop stop, SourceSeeking_ChangeStart start, SourceSeeking_ChangeRate rate)
Definition: parser.c:96
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406

◆ CompareMediaTypes()

BOOL CompareMediaTypes ( const AM_MEDIA_TYPE pmt1,
const AM_MEDIA_TYPE pmt2,
BOOL  bWildcards 
)

◆ DSoundRender_create()

HRESULT DSoundRender_create ( IUnknown pUnkOuter,
LPVOID ppv 
)

Definition at line 618 of file dsoundrender.c.

619 {
620  HRESULT hr;
621  DSoundRenderImpl * pDSoundRender;
622 
623  TRACE("(%p, %p)\n", pUnkOuter, ppv);
624 
625  *ppv = NULL;
626 
627  if (pUnkOuter)
628  return CLASS_E_NOAGGREGATION;
629 
630  pDSoundRender = CoTaskMemAlloc(sizeof(DSoundRenderImpl));
631  if (!pDSoundRender)
632  return E_OUTOFMEMORY;
633  ZeroMemory(pDSoundRender, sizeof(DSoundRenderImpl));
634 
635  hr = BaseRenderer_Init(&pDSoundRender->renderer, &DSoundRender_Vtbl, (IUnknown*)pDSoundRender, &CLSID_DSoundRender, (DWORD_PTR)(__FILE__ ": DSoundRenderImpl.csFilter"), &BaseFuncTable);
636 
637  BasicAudio_Init(&pDSoundRender->basicAudio,&IBasicAudio_Vtbl);
638  pDSoundRender->IReferenceClock_iface.lpVtbl = &IReferenceClock_Vtbl;
639  pDSoundRender->IAMDirectSound_iface.lpVtbl = &IAMDirectSound_Vtbl;
640  pDSoundRender->IAMFilterMiscFlags_iface.lpVtbl = &IAMFilterMiscFlags_Vtbl;
641 
642  if (SUCCEEDED(hr))
643  {
644  hr = DirectSoundCreate8(NULL, &pDSoundRender->dsound, NULL);
645  if (FAILED(hr))
646  ERR("Cannot create Direct Sound object (%x)\n", hr);
647  else
649  if (SUCCEEDED(hr)) {
650  IDirectSoundBuffer *buf;
651  DSBUFFERDESC buf_desc;
652  memset(&buf_desc,0,sizeof(DSBUFFERDESC));
653  buf_desc.dwSize = sizeof(DSBUFFERDESC);
654  buf_desc.dwFlags = DSBCAPS_PRIMARYBUFFER;
655  hr = IDirectSound8_CreateSoundBuffer(pDSoundRender->dsound, &buf_desc, &buf, NULL);
656  if (SUCCEEDED(hr)) {
659  }
660  hr = S_OK;
661  }
662  }
663 
664  if (SUCCEEDED(hr))
665  {
666  pDSoundRender->blocked = CreateEventW(NULL, TRUE, TRUE, NULL);
667 
668  if (!pDSoundRender->blocked || FAILED(hr))
669  {
670  IBaseFilter_Release(&pDSoundRender->renderer.filter.IBaseFilter_iface);
672  }
673 
674  *ppv = pDSoundRender;
675  }
676  else
677  {
679  CoTaskMemFree(pDSoundRender);
680  }
681 
682  return hr;
683 }
#define IDirectSound8_SetCooperativeLevel(p, a, b)
Definition: dsound.h:512
HRESULT WINAPI BasicAudio_Init(BasicAudio *pBasicAudio, const IBasicAudioVtbl *lpVtbl)
Definition: audio.c:36
#define TRUE
Definition: types.h:120
HRESULT WINAPI DirectSoundCreate8(LPCGUID lpcGUID, LPDIRECTSOUND8 *ppDS, IUnknown *pUnkOuter)
Definition: directsound.c:504
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
HRESULT hr
Definition: shlfolder.c:183
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define IDirectSoundBuffer_Release(p)
Definition: dsound.h:574
REFIID LPVOID * ppv
Definition: atlbase.h:39
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define ZeroMemory
Definition: winbase.h:1635
static const IBasicAudioVtbl IBasicAudio_Vtbl
Definition: dsoundrender.c:47
BasicAudio basicAudio
Definition: dsoundrender.c:55
IDirectSound8 * dsound
Definition: dsoundrender.c:61
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
ULONG WINAPI BaseRendererImpl_Release(IBaseFilter *iface)
Definition: renderer.c:296
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
HRESULT WINAPI BaseRenderer_Init(BaseRenderer *This, const IBaseFilterVtbl *Vtbl, IUnknown *pUnkOuter, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseRendererFuncTable *pBaseFuncsTable)
Definition: renderer.c:241
smooth NULL
Definition: ftsmooth.c:416
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:652
static const IAMDirectSoundVtbl IAMDirectSound_Vtbl
Definition: dsoundrender.c:49
#define TRACE(s)
Definition: solgame.cpp:4
#define DSBCAPS_PRIMARYBUFFER
Definition: dsound.h:206
#define DSBPLAY_LOOPING
Definition: dsound.h:189
DWORD dwSize
Definition: dsound.h:288
LONG HRESULT
Definition: typedefs.h:77
IAMDirectSound IAMDirectSound_iface
Definition: dsoundrender.c:58
static const IAMFilterMiscFlagsVtbl IAMFilterMiscFlags_Vtbl
Definition: dsoundrender.c:50
IBaseFilter IBaseFilter_iface
Definition: strmbase.h:163
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
BaseFilter filter
Definition: strmbase.h:580
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define ERR(fmt,...)
Definition: debug.h:109
IAMFilterMiscFlags IAMFilterMiscFlags_iface
Definition: dsoundrender.c:59
#define S_OK
Definition: intsafe.h:59
static const IBaseFilterVtbl DSoundRender_Vtbl
Definition: dsoundrender.c:46
struct _DSBUFFERDESC DSBUFFERDESC
#define IDirectSound8_CreateSoundBuffer(p, a, b, c)
Definition: dsound.h:509
BaseRenderer renderer
Definition: dsoundrender.c:54
static const IReferenceClockVtbl IReferenceClock_Vtbl
Definition: dsoundrender.c:48
IReferenceClock IReferenceClock_iface
Definition: dsoundrender.c:57
DWORD dwFlags
Definition: dsound.h:289
#define IDirectSoundBuffer_Play(p, a, b, c)
Definition: dsound.h:585
static const BaseRendererFuncTable BaseFuncTable
Definition: dsoundrender.c:596
#define memset(x, y, z)
Definition: compat.h:39
#define DSSCL_PRIORITY
Definition: dsound.h:248
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ dump_AM_MEDIA_TYPE()

void dump_AM_MEDIA_TYPE ( const AM_MEDIA_TYPE pmt)

Definition at line 27 of file enummedia.c.

28 {
29  if (!pmt)
30  return;
31  TRACE("\t%s\n\t%s\n\t...\n\t%s\n", qzdebugstr_guid(&pmt->majortype), qzdebugstr_guid(&pmt->subtype), qzdebugstr_guid(&pmt->formattype));
32 }
const char * qzdebugstr_guid(const GUID *id)
Definition: main.c:279
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by AVISplitter_ProcessStreamList(), DSoundRender_CompleteConnect(), FileAsyncReaderPin_AttemptConnection(), MPEGSplitter_init_audio(), and Parser_OutputPin_CheckMediaType().

◆ EnumMonikerImpl_Create()

HRESULT EnumMonikerImpl_Create ( IMoniker **  ppMoniker,
ULONG  nMonikerCount,
IEnumMoniker **  ppEnum 
)

Definition at line 47 of file enummoniker.c.

48 {
49  /* NOTE: assumes that array of IMonikers has already been AddRef'd
50  * I.e. this function does not AddRef the array of incoming
51  * IMonikers */
53 
54  TRACE("(%p, %d, %p)\n", ppMoniker, nMonikerCount, ppEnum);
55 
56  *ppEnum = NULL;
57 
58  if (!pemi)
59  return E_OUTOFMEMORY;
60 
62  pemi->ref = 1;
63  pemi->ppMoniker = CoTaskMemAlloc(nMonikerCount * sizeof(IMoniker*));
64  memcpy(pemi->ppMoniker, ppMoniker, nMonikerCount*sizeof(IMoniker*));
65  pemi->nMonikerCount = nMonikerCount;
66  pemi->index = 0;
67 
68  *ppEnum = &pemi->IEnumMoniker_iface;
69 
70  return S_OK;
71 }
ULONG nMonikerCount
Definition: enummoniker.c:34
IMoniker ** ppMoniker
Definition: enummoniker.c:33
IEnumMoniker IEnumMoniker_iface
Definition: mediacatenum.c:35
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define S_OK
Definition: intsafe.h:59
static const IEnumMonikerVtbl EnumMonikerImpl_Vtbl
Definition: enummoniker.c:38
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406

Referenced by FilterMapper3_EnumMatchingFilters().

◆ 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;
5701  fimpl->IFilterGraph2_iface.lpVtbl = &IFilterGraph2_VTable;
5702  fimpl->IMediaControl_iface.lpVtbl = &IMediaControl_VTable;
5703  fimpl->IMediaSeeking_iface.lpVtbl = &IMediaSeeking_VTable;
5704  fimpl->IBasicAudio_iface.lpVtbl = &IBasicAudio_VTable;
5705  fimpl->IBasicVideo2_iface.lpVtbl = &IBasicVideo_VTable;
5706  fimpl->IVideoWindow_iface.lpVtbl = &IVideoWindow_VTable;
5707  fimpl->IMediaEventEx_iface.lpVtbl = &IMediaEventEx_VTable;
5708  fimpl->IMediaFilter_iface.lpVtbl = &IMediaFilter_VTable;
5710  fimpl->IGraphConfig_iface.lpVtbl = &IGraphConfig_VTable;
5713  fimpl->IGraphVersion_iface.lpVtbl = &IGraphVersion_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);
5733  InitializeCriticalSection(&fimpl->cs);
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);
5754  CloseHandle(fimpl->hEventCompletion);
5755  EventsQueue_Destroy(&fimpl->evqueue);
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 }
IUnknown * pSite
Definition: filtergraph.c:204
static const IMediaControlVtbl IMediaControl_VTable
Definition: filtergraph.c:2217
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
EventsQueue evqueue
Definition: filtergraph.c:186
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
static const IMediaFilterVtbl IMediaFilter_VTable
Definition: filtergraph.c:5388
#define DWORD_PTR
Definition: treelist.c:76
HRESULT hr
Definition: shlfolder.c:183
IMediaPosition IMediaPosition_iface
Definition: filtergraph.c:163
IObjectWithSite IObjectWithSite_iface
Definition: filtergraph.c:164
static const IBasicVideo2Vtbl IBasicVideo_VTable
Definition: filtergraph.c:4012
static int EventsQueue_Destroy(EventsQueue *omr)
Definition: filtergraph.c:82
OAFilterState state
Definition: filtergraph.c:195
IGraphVersion IGraphVersion_iface
Definition: filtergraph.c:165
IReferenceClock * refClock
Definition: filtergraph.c:184
IGraphConfig IGraphConfig_iface
Definition: filtergraph.c:162
static const IGraphConfigVtbl IGraphConfig_VTable
Definition: filtergraph.c:5617
IMediaSeeking IMediaSeeking_iface
Definition: filtergraph.c:155
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
HWND hWnd
Definition: filtergraph.c:45
IUnknown IUnknown_inner
Definition: filtergraph.c:152
IMediaFilter IMediaFilter_iface
Definition: filtergraph.c:160
static const IMediaSeekingVtbl IMediaSeeking_VTable
Definition: filtergraph.c:2660
IBaseFilter * refClockProvider
Definition: filtergraph.c:185
IUnknown * punkFilterMapper2
Definition: filtergraph.c:178
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
smooth NULL
Definition: ftsmooth.c:416
static const IUnknownVtbl IInner_VTable
Definition: filtergraph.c:5681
IUnknown * outer_unk
Definition: filtergraph.c:176
static const IBasicAudioVtbl IBasicAudio_VTable
Definition: filtergraph.c:3209
#define TRACE(s)
Definition: solgame.cpp:4
IVideoWindow IVideoWindow_iface
Definition: filtergraph.c:158
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
LONG HRESULT
Definition: typedefs.h:77
static const IMediaPositionVtbl IMediaPosition_VTable
Definition: filtergraph.c:2874
const GUID IID_IUnknown
IMediaControl IMediaControl_iface
Definition: filtergraph.c:154
PCRITICAL_SECTION_DEBUG DebugInfo
Definition: winbase.h:859
IBasicVideo2 IBasicVideo2_iface
Definition: filtergraph.c:157
static int EventsQueue_Init(EventsQueue *omr)
Definition: filtergraph.c:68
IFilterGraph2 IFilterGraph2_iface
Definition: filtergraph.c:153
CRITICAL_SECTION cs
Definition: filtergraph.c:196
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
IMediaEventSink IMediaEventSink_iface
Definition: filtergraph.c:161
static const IMediaEventSinkVtbl IMediaEventSink_VTable
Definition: filtergraph.c:5476
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3234
#define ERR(fmt,...)
Definition: debug.h:109
HANDLE hEventCompletion
Definition: filtergraph.c:187
#define S_OK
Definition: intsafe.h:59
REFERENCE_TIME start_time
Definition: filtergraph.c:201
IMediaEventEx IMediaEventEx_iface
Definition: filtergraph.c:159
static const IFilterGraph2Vtbl IFilterGraph2_VTable
Definition: filtergraph.c:1814
LPWSTR * pFilterNames
Definition: filtergraph.c:180
IBaseFilter ** ppFiltersInGraph
Definition: filtergraph.c:179
static const IObjectWithSiteVtbl IObjectWithSite_VTable
Definition: filtergraph.c:2955
IBasicAudio IBasicAudio_iface
Definition: filtergraph.c:156
static const IMediaEventExVtbl IMediaEventEx_VTable
Definition: filtergraph.c:5232
static const IVideoWindowVtbl IVideoWindow_VTable
Definition: filtergraph.c:4965
static const IGraphVersionVtbl IGraphVersion_VTable
Definition: filtergraph.c:5673
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406
DWORD_PTR Spare[8/sizeof(DWORD_PTR)]
Definition: winbase.h:852
int disabled
Definition: filtergraph.c:48
REFERENCE_TIME pause_time
Definition: filtergraph.c:202

Referenced by FilterGraphNoThread_create().

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:110
HRESULT FilterGraph_create(IUnknown *pUnkOuter, LPVOID *ppObj)
Definition: filtergraph.c:5689

◆ FilterMapper2_create()

HRESULT FilterMapper2_create ( IUnknown pUnkOuter,
LPVOID ppObj 
)

Definition at line 1696 of file filtermapper.c.

1697 {
1698  FilterMapper3Impl * pFM2impl;
1699 
1700  TRACE("(%p, %p)\n", pUnkOuter, ppObj);
1701 
1702  pFM2impl = CoTaskMemAlloc(sizeof(*pFM2impl));
1703  if (!pFM2impl)
1704  return E_OUTOFMEMORY;
1705 
1706  pFM2impl->IUnknown_inner.lpVtbl = &IInner_VTable;
1707  pFM2impl->IFilterMapper3_iface.lpVtbl = &fm3vtbl;
1708  pFM2impl->IFilterMapper_iface.lpVtbl = &fmvtbl;
1709  pFM2impl->IAMFilterData_iface.lpVtbl = &AMFilterDataVtbl;
1710  pFM2impl->ref = 1;
1711 
1712  if (pUnkOuter)
1713  pFM2impl->outer_unk = pUnkOuter;
1714  else
1715  pFM2impl->outer_unk = &pFM2impl->IUnknown_inner;
1716 
1717  *ppObj = &pFM2impl->IUnknown_inner;
1718 
1719  TRACE("-- created at %p\n", pFM2impl);
1720 
1721  return S_OK;
1722 }
static const IFilterMapperVtbl fmvtbl
static const IAMFilterDataVtbl AMFilterDataVtbl
IAMFilterData IAMFilterData_iface
Definition: filtermapper.c:54
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
static const IUnknownVtbl IInner_VTable
Definition: filtermapper.c:230
IFilterMapper3 IFilterMapper3_iface
Definition: filtermapper.c:52
IFilterMapper IFilterMapper_iface
Definition: filtermapper.c:53
#define TRACE(s)
Definition: solgame.cpp:4
IUnknown IUnknown_inner
Definition: filtermapper.c:51
#define S_OK
Definition: intsafe.h:59
static const IFilterMapper3Vtbl fm3vtbl
IUnknown * outer_unk
Definition: filtermapper.c:55
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406

Referenced by FilterMapper_create().

◆ FilterMapper_create()

HRESULT FilterMapper_create ( IUnknown pUnkOuter,
LPVOID ppObj 
)

Definition at line 1724 of file filtermapper.c.

1725 {
1726  FilterMapper3Impl *pFM2impl;
1727  HRESULT hr;
1728 
1729  TRACE("(%p, %p)\n", pUnkOuter, ppObj);
1730 
1731  hr = FilterMapper2_create(pUnkOuter, (LPVOID*)&pFM2impl);
1732  if (FAILED(hr))
1733  return hr;
1734 
1735  *ppObj = &pFM2impl->IFilterMapper_iface;
1736 
1737  return hr;
1738 }
HRESULT hr
Definition: shlfolder.c:183
IFilterMapper IFilterMapper_iface
Definition: filtermapper.c:53
HRESULT FilterMapper2_create(IUnknown *pUnkOuter, LPVOID *ppObj)
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77

◆ GetClassMediaFile()

HRESULT GetClassMediaFile ( IAsyncReader pReader,
LPCOLESTR  pszFileName,
GUID majorType,
GUID minorType,
GUID sourceFilter 
)

Definition at line 257 of file filesource.c.

258 {
259  HKEY hkeyMediaType = NULL;
260  LONG lRet;
261  HRESULT hr = S_OK;
262  BOOL bFound = FALSE;
263  static const WCHAR wszMediaType[] = {'M','e','d','i','a',' ','T','y','p','e',0};
264 
265  TRACE("(%p, %s, %p, %p)\n", pReader, debugstr_w(pszFileName), majorType, minorType);
266 
267  if(majorType)
268  *majorType = GUID_NULL;
269  if(minorType)
270  *minorType = GUID_NULL;
271  if(sourceFilter)
272  *sourceFilter = GUID_NULL;
273 
274  lRet = RegOpenKeyExW(HKEY_CLASSES_ROOT, wszMediaType, 0, KEY_READ, &hkeyMediaType);
275  hr = HRESULT_FROM_WIN32(lRet);
276 
277  if (SUCCEEDED(hr))
278  {
279  DWORD indexMajor;
280 
281  for (indexMajor = 0; !bFound; indexMajor++)
282  {
283  HKEY hkeyMajor;
284  WCHAR wszMajorKeyName[CHARS_IN_GUID];
285  DWORD dwKeyNameLength = sizeof(wszMajorKeyName) / sizeof(wszMajorKeyName[0]);
286  static const WCHAR wszExtensions[] = {'E','x','t','e','n','s','i','o','n','s',0};
287 
288  if (RegEnumKeyExW(hkeyMediaType, indexMajor, wszMajorKeyName, &dwKeyNameLength, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
289  break;
290  if (RegOpenKeyExW(hkeyMediaType, wszMajorKeyName, 0, KEY_READ, &hkeyMajor) != ERROR_SUCCESS)
291  break;
292  TRACE("%s\n", debugstr_w(wszMajorKeyName));
293  if (!strcmpW(wszExtensions, wszMajorKeyName))
294  {
295  if (process_extensions(hkeyMajor, pszFileName, majorType, minorType, sourceFilter) == S_OK)
296  bFound = TRUE;
297  }
298  /* We need a reader interface to check bytes */
299  else if (pReader)
300  {
301  DWORD indexMinor;
302 
303  for (indexMinor = 0; !bFound; indexMinor++)
304  {
305  HKEY hkeyMinor;
306  WCHAR wszMinorKeyName[CHARS_IN_GUID];
307  DWORD dwMinorKeyNameLen = sizeof(wszMinorKeyName) / sizeof(wszMinorKeyName[0]);
308  WCHAR wszSourceFilterKeyName[CHARS_IN_GUID];
309  DWORD dwSourceFilterKeyNameLen = sizeof(wszSourceFilterKeyName);
310  DWORD maxValueLen;
311  DWORD indexValue;
312 
313  if (RegEnumKeyExW(hkeyMajor, indexMinor, wszMinorKeyName, &dwMinorKeyNameLen, NULL, NULL, NULL, NULL) != ERROR_SUCCESS)
314  break;
315 
316  if (RegOpenKeyExW(hkeyMajor, wszMinorKeyName, 0, KEY_READ, &hkeyMinor) != ERROR_SUCCESS)
317  break;
318 
319  TRACE("\t%s\n", debugstr_w(wszMinorKeyName));
320 
321  if (RegQueryInfoKeyW(hkeyMinor, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &maxValueLen, NULL, NULL) != ERROR_SUCCESS)
322  break;
323 
324  for (indexValue = 0; !bFound; indexValue++)
325  {
326  DWORD dwType;
327  WCHAR wszValueName[14]; /* longest name we should encounter will be "Source Filter" */
328  LPWSTR wszPatternString = HeapAlloc(GetProcessHeap(), 0, maxValueLen);
329  DWORD dwValueNameLen = sizeof(wszValueName) / sizeof(wszValueName[0]); /* remember this is in chars */
330  DWORD dwDataLen = maxValueLen; /* remember this is in bytes */
331 
332  if (RegEnumValueW(hkeyMinor, indexValue, wszValueName, &dwValueNameLen, NULL, &dwType, (LPBYTE)wszPatternString, &dwDataLen) != ERROR_SUCCESS)
333  {
334  HeapFree(GetProcessHeap(), 0, wszPatternString);
335  break;
336  }
337 
338  if (strcmpW(wszValueName, source_filter_name)==0) {
339  HeapFree(GetProcessHeap(), 0, wszPatternString);
340  continue;
341  }
342 
343  /* if it is not the source filter value */
344  if (process_pattern_string(wszPatternString, pReader) == S_OK)
345  {
346  HeapFree(GetProcessHeap(), 0, wszPatternString);
347  if (majorType && FAILED(CLSIDFromString(wszMajorKeyName, majorType)))
348  break;
349  if (minorType && FAILED(CLSIDFromString(wszMinorKeyName, minorType)))
350  break;
351  if (sourceFilter)
352  {
353  /* Look up the source filter key */
354  if (RegQueryValueExW(hkeyMinor, source_filter_name, NULL, NULL, (LPBYTE)wszSourceFilterKeyName, &dwSourceFilterKeyNameLen))
355  break;
356  if (FAILED(CLSIDFromString(wszSourceFilterKeyName, sourceFilter)))
357  break;
358  }
359  bFound = TRUE;
360  } else
361  HeapFree(GetProcessHeap(), 0, wszPatternString);
362  }
363  CloseHandle(hkeyMinor);
364  }
365  }
366  CloseHandle(hkeyMajor);
367  }
368  }
369  CloseHandle(hkeyMediaType);
370 
371  if (SUCCEEDED(hr) && !bFound)
372  {
373  ERR("Media class not found\n");
374  hr = E_FAIL;
375  }
376  else if (bFound)
377  {
378  TRACE("Found file's class:\n");
379  if(majorType)
380  TRACE("\tmajor = %s\n", qzdebugstr_guid(majorType));
381  if(minorType)
382  TRACE("\tsubtype = %s\n", qzdebugstr_guid(minorType));
383  if(sourceFilter)
384  TRACE("\tsource filter = %s\n", qzdebugstr_guid(sourceFilter));
385  }
386 
387  return hr;
388 }
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:398
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define ERROR_SUCCESS
Definition: deptool.c:10
HRESULT hr
Definition: shlfolder.c:183
#define KEY_READ
Definition: nt_native.h:1023
const char * qzdebugstr_guid(const GUID *id)
Definition: main.c:279
#define CHARS_IN_GUID
static HRESULT process_extensions(HKEY hkeyExtensions, LPCOLESTR pszFileName, GUID *majorType, GUID *minorType, GUID *sourceFilter)
Definition: filesource.c:85
#define E_FAIL
Definition: ddrawi.h:102
unsigned char * LPBYTE
Definition: typedefs.h:52
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define debugstr_w
Definition: kernel32.h:32
WORD WORD PSZ PSZ pszFileName
Definition: vdmdbg.h:41
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
Definition: reg.c:2853
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
Definition: reg.c:3686
#define GUID_NULL
Definition: ks.h:106
static const WCHAR source_filter_name[]
Definition: filesource.c:82
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
static HRESULT process_pattern_string(LPCWSTR wszPatternString, IAsyncReader *pReader)
Definition: filesource.c:165
WINE_UNICODE_INLINE int strcmpW(const WCHAR *str1, const WCHAR *str2)
Definition: unicode.h:229
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
Definition: compobj.c:2247
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3366
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
Definition: reg.c:2527
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:394
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by FileSource_Load(), and GetFileSourceFilter().

◆ IEnumFiltersImpl_Construct()

HRESULT IEnumFiltersImpl_Construct ( IGraphVersion pVersionSource,
IBaseFilter ***  pppFilters,
ULONG pNumFilters,
IEnumFilters **  ppEnum 
)

Definition at line 45 of file enumfilters.c.

46 {
47  /* Note: The incoming IBaseFilter interfaces are not AddRef'd here as in Windows,
48  * they should have been previously AddRef'd. */
49  IEnumFiltersImpl * pEnumFilters = CoTaskMemAlloc(sizeof(IEnumFiltersImpl));
50  HRESULT hr;
51  LONG currentVersion;
52 
53  TRACE("(%p, %p, %p)\n", pppFilters, pNumFilters, ppEnum);
54 
55  *ppEnum = NULL;
56 
57  if (!pEnumFilters)
58  {
59  return E_OUTOFMEMORY;
60  }
61 
62  pEnumFilters->IEnumFilters_iface.lpVtbl = &IEnumFiltersImpl_Vtbl;
63  pEnumFilters->refCount = 1;
64  pEnumFilters->uIndex = 0;
65  pEnumFilters->pNumFilters = pNumFilters;
66  pEnumFilters->pppFilters = pppFilters;
67  IGraphVersion_AddRef(pVersionSource);
68  pEnumFilters->pVersionSource = pVersionSource;
69 
70  /* Store the current version of the graph */
71  hr = IGraphVersion_QueryVersion(pVersionSource, &currentVersion);
72  pEnumFilters->Version = (hr==S_OK) ? currentVersion : 0;
73 
74  *ppEnum = &pEnumFilters->IEnumFilters_iface;
75  return S_OK;
76 }
IEnumFilters IEnumFilters_iface
Definition: enumfilters.c:29
HRESULT hr
Definition: shlfolder.c:183
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:416
ULONG * pNumFilters
Definition: enumfilters.c:34
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
IGraphVersion * pVersionSource
Definition: enumfilters.c:31
static const struct IEnumFiltersVtbl IEnumFiltersImpl_Vtbl
Definition: enumfilters.c:38
IBaseFilter *** pppFilters
Definition: enumfilters.c:33
#define S_OK
Definition: intsafe.h:59
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406

Referenced by FilterGraph2_EnumFilters(), and IEnumFiltersImpl_Clone().

◆ IEnumRegFiltersImpl_Construct()

HRESULT IEnumRegFiltersImpl_Construct ( REGFILTER pInRegFilters,
const ULONG  size,
IEnumRegFilters **  ppEnum 
)

Definition at line 45 of file enumregfilters.c.

46 {
47  IEnumRegFiltersImpl* pEnumRegFilters;
48  REGFILTER* pRegFilters = NULL;
49  unsigned int i;
50 
51  TRACE("(%p, %d, %p)\n", pInRegFilters, size, ppEnum);
52 
53  pEnumRegFilters = CoTaskMemAlloc(sizeof(IEnumRegFiltersImpl));
54  if (!pEnumRegFilters)
55  {
56  *ppEnum = NULL;
57  return E_OUTOFMEMORY;
58  }
59 
60  /* Accept size of 0 */
61  if (size)
62  {
63  pRegFilters = CoTaskMemAlloc(sizeof(REGFILTER)*size);
64  if (!pRegFilters)
65  {
66  CoTaskMemFree(pEnumRegFilters);
67  *ppEnum = NULL;
68  return E_OUTOFMEMORY;
69  }
70  }
71 
72  for(i = 0; i < size; i++)
73  {
74  pRegFilters[i].Clsid = pInRegFilters[i].Clsid;
75  pRegFilters[i].Name = CoTaskMemAlloc((strlenW(pInRegFilters[i].Name)+1)*sizeof(WCHAR));
76  if (!pRegFilters[i].Name)
77  {
78  while(i)
79  CoTaskMemFree(pRegFilters[--i].Name);
80  CoTaskMemFree(pRegFilters);
81  CoTaskMemFree(pEnumRegFilters);
82  return E_OUTOFMEMORY;
83  }
84  CopyMemory(pRegFilters[i].Name, pInRegFilters[i].Name, (strlenW(pInRegFilters[i].Name)+1)*sizeof(WCHAR));
85  }
86 
87  pEnumRegFilters->IEnumRegFilters_iface.lpVtbl = &IEnumRegFiltersImpl_Vtbl;
88  pEnumRegFilters->refCount = 1;
89  pEnumRegFilters->uIndex = 0;
90  pEnumRegFilters->RegFilters = pRegFilters;
91  pEnumRegFilters->size = size;
92 
93  *ppEnum = &pEnumRegFilters->IEnumRegFilters_iface;
94 
95  return S_OK;
96 }
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
CLSID Clsid
Definition: axextend.idl:76
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const struct IEnumRegFiltersVtbl IEnumRegFiltersImpl_Vtbl
#define CopyMemory
Definition: winbase.h:1633
#define S_OK
Definition: intsafe.h:59
REGFILTER * RegFilters
LPWSTR Name
Definition: axextend.idl:77
IEnumRegFilters IEnumRegFilters_iface
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406

Referenced by FilterMapper_EnumMatchingFilters().

◆ MPEGSplitter_create()

HRESULT MPEGSplitter_create ( IUnknown pUnkOuter,
LPVOID ppv 
)

Definition at line 871 of file mpegsplit.c.

872 {
874  HRESULT hr = E_FAIL;
875 
876  TRACE("(%p, %p)\n", pUnkOuter, ppv);
877 
878  *ppv = NULL;
879 
880  if (pUnkOuter)
881  return CLASS_E_NOAGGREGATION;
882 
884  if (!This)
885  return E_OUTOFMEMORY;
886 
887  ZeroMemory(This, sizeof(MPEGSplitterImpl));
889  if (FAILED(hr))
890  {
892  return hr;
893  }
894  This->IAMStreamSelect_iface.lpVtbl = &AMStreamSelectVtbl;
895  This->seek = TRUE;
896 
897  /* Note: This memory is managed by the parser filter once created */
898  *ppv = &This->Parser.filter.IBaseFilter_iface;
899 
900  return hr;
901 }
#define TRUE
Definition: types.h:120
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
HRESULT hr
Definition: shlfolder.c:183
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define ZeroMemory
Definition: winbase.h:1635
#define E_FAIL
Definition: ddrawi.h:102
static const IBaseFilterVtbl MPEGSplitter_Vtbl
Definition: mpegsplit.c:794
static HRESULT MPEGSplitter_disconnect(LPVOID iface)
Definition: mpegsplit.c:708
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
static const IAMStreamSelectVtbl AMStreamSelectVtbl
Definition: mpegsplit.c:861
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT MPEGSplitter_cleanup(LPVOID iface)
Definition: mpegsplit.c:633
LONG HRESULT
Definition: typedefs.h:77
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
static HRESULT WINAPI MPEGSplitter_seek(IMediaSeeking *iface)
Definition: mpegsplit.c:642
static HRESULT MPEGSplitter_first_request(LPVOID iface)
Definition: mpegsplit.c:714
static HRESULT MPEGSplitter_query_accept(LPVOID iface, const AM_MEDIA_TYPE *pmt)
Definition: mpegsplit.c:343
HRESULT Parser_Create(ParserImpl *pParser, const IBaseFilterVtbl *Parser_Vtbl, const CLSID *pClsid, PFN_PROCESS_SAMPLE fnProcessSample, PFN_QUERY_ACCEPT fnQueryAccept, PFN_PRE_CONNECT fnPreConnect, PFN_CLEANUP fnCleanup, PFN_DISCONNECT fnDisconnect, REQUESTPROC fnRequest, STOPPROCESSPROC fnDone, SourceSeeking_ChangeStop stop, SourceSeeking_ChangeStart start, SourceSeeking_ChangeRate rate)
Definition: parser.c:96
static HRESULT MPEGSplitter_process_sample(LPVOID iface, IMediaSample *pSample, DWORD_PTR cookie)
Definition: mpegsplit.c:275
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406
static HRESULT MPEGSplitter_pre_connect(IPin *iface, IPin *pConnectPin, ALLOCATOR_PROPERTIES *props)
Definition: mpegsplit.c:485

◆ NullRenderer_create()

HRESULT NullRenderer_create ( IUnknown pUnkOuter,
LPVOID ppv 
)

◆ QUARTZ_CreateSystemClock()

HRESULT QUARTZ_CreateSystemClock ( IUnknown pUnkOuter,
LPVOID ppv 
)

Definition at line 377 of file systemclock.c.

377  {
379 
380  TRACE("(%p,%p)\n", ppv, pUnkOuter);
381 
383  if (NULL == obj) {
384  *ppv = NULL;
385  return E_OUTOFMEMORY;
386  }
387  ZeroMemory(obj, sizeof(SystemClockImpl));
388 
389  obj->IReferenceClock_iface.lpVtbl = &SystemClock_Vtbl;
390  obj->ref = 0; /* will be inited by QueryInterface */
391 
392  obj->lastTimeTickCount = GetTickCount();
394  obj->safe.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": SystemClockImpl.safe");
395 
396  return SystemClockImpl_QueryInterface(&obj->IReferenceClock_iface, &IID_IReferenceClock, ppv);
397 }
static const IReferenceClockVtbl SystemClock_Vtbl
Definition: systemclock.c:366
#define DWORD_PTR
Definition: treelist.c:76
REFIID LPVOID * ppv
Definition: atlbase.h:39
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:445
#define ZeroMemory
Definition: winbase.h:1635
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI SystemClockImpl_QueryInterface(IReferenceClock *iface, REFIID riid, void **ppobj)
Definition: systemclock.c:211
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406

◆ qzdebugstr_guid()

const char* qzdebugstr_guid ( const GUID id)

Definition at line 279 of file main.c.

280 {
281  int i;
282 
283  for (i=0; InterfaceDesc[i].name; i++)
284  if (IsEqualGUID(&InterfaceDesc[i].riid, id)) return InterfaceDesc[i].name;
285 
286  return debugstr_guid(id);
287 }
REFIID riid
Definition: precomp.h:44
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 debugstr_guid
Definition: kernel32.h:35
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
static const struct @250 InterfaceDesc[]

Referenced by AsyncReader_QueryInterface(), BaseMemAllocator_QueryInterface(), DSoundRender_QueryInterface(), dump_AM_MEDIA_TYPE(), FileAsyncReaderPin_QueryInterface(), GetClassMediaFile(), IEnumFiltersImpl_QueryInterface(), IEnumRegFiltersImpl_QueryInterface(), MPEGSplitter_QueryInterface(), NullRendererInner_QueryInterface(), Parser_OutputPin_QueryInterface(), Parser_PullPin_QueryInterface(), Parser_QueryInterface(), PullPin_QueryInterface(), StdMediaSample2_QueryInterface(), VideoRenderer_GetVideoFormat(), VideoRendererInner_QueryInterface(), VMR9_GetVideoFormat(), VMR9_ImagePresenter_QueryInterface(), and VMR9Inner_QueryInterface().

◆ StdMemAllocator_create()

HRESULT StdMemAllocator_create ( IUnknown pUnkOuter,
LPVOID ppv 
)

◆ video_unregister_windowclass()

void video_unregister_windowclass ( void  )

◆ VideoRenderer_create()

HRESULT VideoRenderer_create ( IUnknown pUnkOuter,
LPVOID ppv 
)

◆ VideoRendererDefault_create()

HRESULT VideoRendererDefault_create ( IUnknown pUnkOuter,
LPVOID ppv 
)

Definition at line 1075 of file videorenderer.c.

1076 {
1077  /* TODO: Attempt to use the VMR-7 renderer instead when possible */
1078  return VideoRenderer_create(pUnkOuter, ppv);
1079 }
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT VideoRenderer_create(IUnknown *pUnkOuter, void **ppv)

◆ VMR7Impl_create()

HRESULT VMR7Impl_create ( IUnknown pUnkOuter,
LPVOID ppv 
)

Definition at line 2446 of file vmr9.c.

2447 {
2448  return vmr_create(outer_unk, ppv, &CLSID_VideoMixingRenderer);
2449 }
static HRESULT vmr_create(IUnknown *outer_unk, LPVOID *ppv, const CLSID *clsid)
Definition: vmr9.c:2369
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ VMR9Impl_create()

HRESULT VMR9Impl_create ( IUnknown pUnkOuter,
LPVOID ppv 
)

Definition at line 2451 of file vmr9.c.

2452 {
2453  return vmr_create(outer_unk, ppv, &CLSID_VideoMixingRenderer9);
2454 }
static HRESULT vmr_create(IUnknown *outer_unk, LPVOID *ppv, const CLSID *clsid)
Definition: vmr9.c:2369
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ WAVEParser_create()

HRESULT WAVEParser_create ( IUnknown pUnkOuter,
LPVOID ppv 
)

Definition at line 419 of file waveparser.c.

420 {
421  HRESULT hr;
423 
424  TRACE("(%p, %p)\n", pUnkOuter, ppv);
425 
426  *ppv = NULL;
427 
428  if (pUnkOuter)
429  return CLASS_E_NOAGGREGATION;
430 
431  /* Note: This memory is managed by the transform filter once created */
433 
435 
436  if (FAILED(hr))
437  return hr;
438 
439  *ppv = &This->Parser.filter.IBaseFilter_iface;
440 
441  return hr;
442 }
static HRESULT WAVEParser_Cleanup(LPVOID iface)
Definition: waveparser.c:339
HRESULT hr
Definition: shlfolder.c:183
static HRESULT WAVEParser_first_request(LPVOID iface)
Definition: waveparser.c:348
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT WINAPI WAVEParserImpl_seek(IMediaSeeking *iface)
Definition: waveparser.c:195
static HRESULT WAVEParser_Sample(LPVOID iface, IMediaSample *pSample, DWORD_PTR cookie)
Definition: waveparser.c:82
smooth NULL
Definition: ftsmooth.c:416
static HRESULT WAVEParser_InputPin_PreConnect(IPin *iface, IPin *pConnectPin, ALLOCATOR_PROPERTIES *props)
Definition: waveparser.c:244
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
static HRESULT WAVEParser_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE *pmt)
Definition: waveparser.c:184
static const IBaseFilterVtbl WAVEParser_Vtbl
Definition: waveparser.c:400
HRESULT Parser_Create(ParserImpl *pParser, const IBaseFilterVtbl *Parser_Vtbl, const CLSID *pClsid, PFN_PROCESS_SAMPLE fnProcessSample, PFN_QUERY_ACCEPT fnQueryAccept, PFN_PRE_CONNECT fnPreConnect, PFN_CLEANUP fnCleanup, PFN_DISCONNECT fnDisconnect, REQUESTPROC fnRequest, STOPPROCESSPROC fnDone, SourceSeeking_ChangeStop stop, SourceSeeking_ChangeStart start, SourceSeeking_ChangeRate rate)
Definition: parser.c:96
static HRESULT WAVEParser_disconnect(LPVOID iface)
Definition: waveparser.c:394
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406