1 /* DirectShow FilterGraph object (QUARTZ.DLL)
3 * Copyright 2002 Lionel Ulmer
4 * Copyright 2004 Christian Costa
6 * This file contains the (internal) driver registration functions,
7 * driver enumeration APIs and DirectDraw creation functions.
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2.1 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
33 #include "wine/debug.h"
34 #include "quartz_private.h"
35 #define COM_NO_WINDOWS_H
41 #include "wine/unicode.h"
44 WINE_DEFAULT_DEBUG_CHANNEL(quartz);
47 HWND hWnd; /* Target window */
48 long msg; /* User window message */
49 long instance; /* User data */
50 int disabled; /* Disabled messages posting */
54 long lEventCode; /* Event code */
55 LONG_PTR lParam1; /* Param1 */
56 LONG_PTR lParam2; /* Param2 */
59 /* messages ring implementation for queuing events (taken from winmm) */
60 #define EVENTS_RING_BUFFER_INCREMENT 64
66 CRITICAL_SECTION msg_crst;
67 HANDLE msg_event; /* Signaled for no empty queue */
70 static int EventsQueue_Init(EventsQueue* omr)
74 omr->msg_event = CreateEventW(NULL, TRUE, FALSE, NULL);
75 omr->ring_buffer_size = EVENTS_RING_BUFFER_INCREMENT;
76 omr->messages = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,omr->ring_buffer_size * sizeof(Event));
78 InitializeCriticalSection(&omr->msg_crst);
82 static int EventsQueue_Destroy(EventsQueue* omr)
84 CloseHandle(omr->msg_event);
85 HeapFree(GetProcessHeap(),0,omr->messages);
86 DeleteCriticalSection(&omr->msg_crst);
90 static int EventsQueue_PutEvent(EventsQueue* omr, Event* evt)
92 EnterCriticalSection(&omr->msg_crst);
93 if ((omr->msg_toget == ((omr->msg_tosave + 1) % omr->ring_buffer_size)))
95 int old_ring_buffer_size = omr->ring_buffer_size;
96 omr->ring_buffer_size += EVENTS_RING_BUFFER_INCREMENT;
97 TRACE("omr->ring_buffer_size=%d\n",omr->ring_buffer_size);
98 omr->messages = HeapReAlloc(GetProcessHeap(),0,omr->messages, omr->ring_buffer_size * sizeof(Event));
99 /* Now we need to rearrange the ring buffer so that the new
100 buffers just allocated are in between omr->msg_tosave and
103 if (omr->msg_tosave < omr->msg_toget)
105 memmove(&(omr->messages[omr->msg_toget + EVENTS_RING_BUFFER_INCREMENT]),
106 &(omr->messages[omr->msg_toget]),
107 sizeof(Event)*(old_ring_buffer_size - omr->msg_toget)
109 omr->msg_toget += EVENTS_RING_BUFFER_INCREMENT;
112 omr->messages[omr->msg_tosave] = *evt;
113 SetEvent(omr->msg_event);
114 omr->msg_tosave = (omr->msg_tosave + 1) % omr->ring_buffer_size;
115 LeaveCriticalSection(&omr->msg_crst);
119 static int EventsQueue_GetEvent(EventsQueue* omr, Event* evt, long msTimeOut)
121 if (WaitForSingleObject(omr->msg_event, msTimeOut) != WAIT_OBJECT_0)
124 EnterCriticalSection(&omr->msg_crst);
126 if (omr->msg_toget == omr->msg_tosave) /* buffer empty ? */
128 LeaveCriticalSection(&omr->msg_crst);
132 *evt = omr->messages[omr->msg_toget];
133 omr->msg_toget = (omr->msg_toget + 1) % omr->ring_buffer_size;
135 /* Mark the buffer as empty if needed */
136 if (omr->msg_toget == omr->msg_tosave) /* buffer empty ? */
137 ResetEvent(omr->msg_event);
139 LeaveCriticalSection(&omr->msg_crst);
143 typedef struct _IFilterGraphImpl {
144 IGraphBuilderVtbl *IGraphBuilder_vtbl;
145 IMediaControlVtbl *IMediaControl_vtbl;
146 IMediaSeekingVtbl *IMediaSeeking_vtbl;
147 IBasicAudioVtbl *IBasicAudio_vtbl;
148 IBasicVideoVtbl *IBasicVideo_vtbl;
149 IVideoWindowVtbl *IVideoWindow_vtbl;
150 IMediaEventExVtbl *IMediaEventEx_vtbl;
151 IMediaFilterVtbl *IMediaFilter_vtbl;
152 IMediaEventSinkVtbl *IMediaEventSink_vtbl;
153 /* IAMGraphStreams */
163 /* IRegisterServiceProvider */
164 /* IResourceMananger */
165 /* IServiceProvider */
166 /* IVideoFrameStep */
169 IFilterMapper2 * pFilterMapper2;
170 IBaseFilter ** ppFiltersInGraph;
171 LPWSTR * pFilterNames;
176 HANDLE hEventCompletion;
177 int CompletionStatus;
181 int HandleEcComplete;
186 static HRESULT Filtergraph_QueryInterface(IFilterGraphImpl *This,
189 TRACE("(%p)->(%s (%p), %p)\n", This, debugstr_guid(riid), riid, ppvObj);
191 if (IsEqualGUID(&IID_IUnknown, riid) ||
192 IsEqualGUID(&IID_IFilterGraph, riid) ||
193 IsEqualGUID(&IID_IGraphBuilder, riid)) {
194 *ppvObj = &(This->IGraphBuilder_vtbl);
195 TRACE(" returning IGraphBuilder interface (%p)\n", *ppvObj);
196 } else if (IsEqualGUID(&IID_IMediaControl, riid)) {
197 *ppvObj = &(This->IMediaControl_vtbl);
198 TRACE(" returning IMediaControl interface (%p)\n", *ppvObj);
199 } else if (IsEqualGUID(&IID_IMediaSeeking, riid)) {
200 *ppvObj = &(This->IMediaSeeking_vtbl);
201 TRACE(" returning IMediaSeeking interface (%p)\n", *ppvObj);
202 } else if (IsEqualGUID(&IID_IBasicAudio, riid)) {
203 *ppvObj = &(This->IBasicAudio_vtbl);
204 TRACE(" returning IBasicAudio interface (%p)\n", *ppvObj);
205 } else if (IsEqualGUID(&IID_IBasicVideo, riid)) {
206 *ppvObj = &(This->IBasicVideo_vtbl);
207 TRACE(" returning IBasicVideo interface (%p)\n", *ppvObj);
208 } else if (IsEqualGUID(&IID_IVideoWindow, riid)) {
209 *ppvObj = &(This->IVideoWindow_vtbl);
210 TRACE(" returning IVideoWindow interface (%p)\n", *ppvObj);
211 } else if (IsEqualGUID(&IID_IMediaEvent, riid) ||
212 IsEqualGUID(&IID_IMediaEventEx, riid)) {
213 *ppvObj = &(This->IMediaEventEx_vtbl);
214 TRACE(" returning IMediaEvent(Ex) interface (%p)\n", *ppvObj);
215 } else if (IsEqualGUID(&IID_IMediaFilter, riid) ||
216 IsEqualGUID(&IID_IPersist, riid)) {
217 *ppvObj = &(This->IMediaFilter_vtbl);
218 TRACE(" returning IMediaFilter interface (%p)\n", *ppvObj);
219 } else if (IsEqualGUID(&IID_IMediaEventSink, riid)) {
220 *ppvObj = &(This->IMediaEventSink_vtbl);
221 TRACE(" returning IMediaEventSink interface (%p)\n", *ppvObj);
224 FIXME("unknown interface %s\n", debugstr_guid(riid));
225 return E_NOINTERFACE;
232 static ULONG Filtergraph_AddRef(IFilterGraphImpl *This) {
233 TRACE("(%p)->(): new ref = %ld\n", This, This->ref + 1);
238 static ULONG Filtergraph_Release(IFilterGraphImpl *This) {
241 TRACE("(%p)->(): new ref = %ld\n", This, This->ref - 1);
245 IFilterMapper2_Release(This->pFilterMapper2);
246 CloseHandle(This->hEventCompletion);
247 EventsQueue_Destroy(&This->evqueue);
248 HeapFree(GetProcessHeap(), 0, This->ppFiltersInGraph);
249 HeapFree(GetProcessHeap(), 0, This->pFilterNames);
250 HeapFree(GetProcessHeap(), 0, This);
256 /*** IUnknown methods ***/
257 static HRESULT WINAPI Graphbuilder_QueryInterface(IGraphBuilder *iface,
260 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
262 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
263 return Filtergraph_QueryInterface(This, riid, ppvObj);
266 static ULONG WINAPI Graphbuilder_AddRef(IGraphBuilder *iface) {
267 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
269 TRACE("(%p/%p)->() calling FilterGraph AddRef\n", This, iface);
271 return Filtergraph_AddRef(This);
274 static ULONG WINAPI Graphbuilder_Release(IGraphBuilder *iface) {
275 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
277 TRACE("(%p/%p)->() calling FilterGraph Release\n", This, iface);
279 return Filtergraph_Release(This);
282 /*** IFilterGraph methods ***/
283 static HRESULT WINAPI Graphbuilder_AddFilter(IGraphBuilder *iface,
284 IBaseFilter *pFilter,
286 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
289 WCHAR* wszFilterName = NULL;
290 int duplicate_name = FALSE;
292 TRACE("(%p/%p)->(%p, %s (%p))\n", This, iface, pFilter, debugstr_w(pName), pName);
294 wszFilterName = (WCHAR*) CoTaskMemAlloc( (pName ? strlenW(pName) + 6 : 5) * sizeof(WCHAR) );
298 /* Check if name already exists */
299 for(i = 0; i < This->nFilters; i++)
300 if (!strcmpW(This->pFilterNames[i], pName))
302 duplicate_name = TRUE;
307 /* If no name given or name already existing, generate one */
308 if (!pName || duplicate_name)
310 static const WCHAR wszFmt1[] = {'%','s',' ','%','0','4','d',0};
311 static const WCHAR wszFmt2[] = {'%','0','4','d',0};
313 for (j = 0; j < 10000 ; j++)
317 sprintfW(wszFilterName, wszFmt1, pName, This->nameIndex);
319 sprintfW(wszFilterName, wszFmt2, This->nameIndex);
320 TRACE("Generated name %s\n", debugstr_w(wszFilterName));
322 /* Check if the generated name already exists */
323 for(i = 0; i < This->nFilters; i++)
324 if (!strcmpW(This->pFilterNames[i], wszFilterName))
327 /* Compute next index and exit if generated name is suitable */
328 if (This->nameIndex++ == 10000)
330 if (i == This->nFilters)
333 /* Unable to find a suitable name */
336 CoTaskMemFree(wszFilterName);
337 return VFW_E_DUPLICATE_NAME;
341 memcpy(wszFilterName, pName, (strlenW(pName) + 1) * sizeof(WCHAR));
343 if (This->nFilters + 1 > This->filterCapacity)
345 int newCapacity = 2*This->filterCapacity;
346 IBaseFilter ** ppNewFilters = CoTaskMemAlloc(newCapacity * sizeof(IBaseFilter*));
347 LPWSTR * pNewNames = CoTaskMemAlloc(newCapacity * sizeof(LPWSTR));
348 memcpy(ppNewFilters, This->ppFiltersInGraph, This->nFilters * sizeof(IBaseFilter*));
349 memcpy(pNewNames, This->pFilterNames, This->nFilters * sizeof(LPWSTR));
350 CoTaskMemFree(This->ppFiltersInGraph);
351 CoTaskMemFree(This->pFilterNames);
352 This->ppFiltersInGraph = ppNewFilters;
353 This->pFilterNames = pNewNames;
354 This->filterCapacity = newCapacity;
357 hr = IBaseFilter_JoinFilterGraph(pFilter, (IFilterGraph *)This, wszFilterName);
361 IBaseFilter_AddRef(pFilter);
362 This->ppFiltersInGraph[This->nFilters] = pFilter;
363 This->pFilterNames[This->nFilters] = wszFilterName;
367 CoTaskMemFree(wszFilterName);
369 if (SUCCEEDED(hr) && duplicate_name)
370 return VFW_S_DUPLICATE_NAME;
375 static HRESULT WINAPI Graphbuilder_RemoveFilter(IGraphBuilder *iface,
376 IBaseFilter *pFilter) {
377 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
381 TRACE("(%p/%p)->(%p)\n", This, iface, pFilter);
383 /* FIXME: check graph is stopped */
385 for (i = 0; i < This->nFilters; i++)
387 if (This->ppFiltersInGraph[i] == pFilter)
389 /* FIXME: disconnect pins */
390 hr = IBaseFilter_JoinFilterGraph(pFilter, NULL, This->pFilterNames[i]);
393 IPin_Release(pFilter);
394 CoTaskMemFree(This->pFilterNames[i]);
395 memmove(This->ppFiltersInGraph+i, This->ppFiltersInGraph+i+1, sizeof(IBaseFilter*)*(This->nFilters - 1 - i));
396 memmove(This->pFilterNames+i, This->pFilterNames+i+1, sizeof(LPWSTR)*(This->nFilters - 1 - i));
404 return hr; /* FIXME: check this error code */
407 static HRESULT WINAPI Graphbuilder_EnumFilters(IGraphBuilder *iface,
408 IEnumFilters **ppEnum) {
409 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
411 TRACE("(%p/%p)->(%p)\n", This, iface, ppEnum);
413 return IEnumFiltersImpl_Construct(This->ppFiltersInGraph, This->nFilters, ppEnum);
416 static HRESULT WINAPI Graphbuilder_FindFilterByName(IGraphBuilder *iface,
418 IBaseFilter **ppFilter) {
419 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
422 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_w(pName), pName, ppFilter);
426 for (i = 0; i < This->nFilters; i++)
428 if (!strcmpW(pName, This->pFilterNames[i]))
430 *ppFilter = This->ppFiltersInGraph[i];
431 IBaseFilter_AddRef(*ppFilter);
436 return E_FAIL; /* FIXME: check this error code */
439 /* NOTE: despite the implication, it doesn't matter which
440 * way round you put in the input and output pins */
441 static HRESULT WINAPI Graphbuilder_ConnectDirect(IGraphBuilder *iface,
444 const AM_MEDIA_TYPE *pmt) {
448 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
450 TRACE("(%p/%p)->(%p, %p, %p)\n", This, iface, ppinIn, ppinOut, pmt);
452 /* FIXME: check pins are in graph */
454 hr = IPin_QueryDirection(ppinIn, &dir);
457 if (dir == PINDIR_INPUT)
458 hr = IPin_Connect(ppinOut, ppinIn, pmt);
460 hr = IPin_Connect(ppinIn, ppinOut, pmt);
466 static HRESULT WINAPI Graphbuilder_Reconnect(IGraphBuilder *iface,
468 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
470 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, ppin);
475 static HRESULT WINAPI Graphbuilder_Disconnect(IGraphBuilder *iface,
477 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
479 TRACE("(%p/%p)->(%p)\n", This, iface, ppin);
481 return IPin_Disconnect(ppin);
484 static HRESULT WINAPI Graphbuilder_SetDefaultSyncSource(IGraphBuilder *iface) {
485 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
487 TRACE("(%p/%p)->(): stub !!!\n", iface, This);
492 static HRESULT GetFilterInfo(IMoniker* pMoniker, GUID* pclsid, VARIANT* pvar)
494 static const WCHAR wszClsidName[] = {'C','L','S','I','D',0};
495 static const WCHAR wszFriendlyName[] = {'F','r','i','e','n','d','l','y','N','a','m','e',0};
496 IPropertyBag * pPropBagCat = NULL;
500 V_VT(pvar) = VT_BSTR;
502 hr = IMoniker_BindToStorage(pMoniker, NULL, NULL, &IID_IPropertyBag, (LPVOID*)&pPropBagCat);
505 hr = IPropertyBag_Read(pPropBagCat, wszClsidName, pvar, NULL);
508 hr = CLSIDFromString(V_UNION(pvar, bstrVal), pclsid);
511 hr = IPropertyBag_Read(pPropBagCat, wszFriendlyName, pvar, NULL);
514 TRACE("Moniker = %s - %s\n", debugstr_guid(pclsid), debugstr_w(V_UNION(pvar, bstrVal)));
517 IPropertyBag_Release(pPropBagCat);
522 static HRESULT GetInternalConnections(IBaseFilter* pfilter, IPin* poutputpin, IPin*** pppins, ULONG* pnb)
528 hr = IPin_QueryInternalConnections(poutputpin, NULL, &nb);
531 } else if (hr == S_FALSE) {
532 *pppins = CoTaskMemAlloc(sizeof(IPin*)*nb);
533 hr = IPin_QueryInternalConnections(poutputpin, *pppins, &nb);
535 ERR("Error (%lx)\n", hr);
537 } else if (hr == E_NOTIMPL) {
538 /* Input connected to all outputs */
539 IEnumPins* penumpins;
542 TRACE("E_NOTIMPL\n");
543 hr = IBaseFilter_EnumPins(pfilter, &penumpins);
545 ERR("filter Enumpins failed (%lx)\n", hr);
549 /* Count output pins */
550 while(IEnumPins_Next(penumpins, 1, &ppin, &nb) == S_OK) {
551 PIN_DIRECTION pindir;
552 IPin_QueryDirection(ppin, &pindir);
553 if (pindir == PINDIR_OUTPUT)
558 *pppins = CoTaskMemAlloc(sizeof(IPin*)*i);
559 /* Retreive output pins */
560 IEnumPins_Reset(penumpins);
562 while(IEnumPins_Next(penumpins, 1, &ppin, &nb) == S_OK) {
563 PIN_DIRECTION pindir;
564 IPin_QueryDirection(ppin, &pindir);
565 if (pindir == PINDIR_OUTPUT)
566 (*pppins)[i++] = ppin;
572 ERR("Next failed (%lx)\n", hr);
575 IEnumPins_Release(penumpins);
576 } else if (FAILED(hr)) {
577 ERR("Cannot get internal connection (%lx)\n", hr);
585 /*** IGraphBuilder methods ***/
586 static HRESULT WINAPI Graphbuilder_Connect(IGraphBuilder *iface,
589 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
592 IEnumMediaTypes* penummt;
594 IEnumPins* penumpins;
595 IEnumMoniker* pEnumMoniker;
601 TRACE("(%p/%p)->(%p, %p)\n", This, iface, ppinOut, ppinIn);
603 /* Try direct connection first */
604 TRACE("Try direct connection first\n");
605 hr = IPin_Connect(ppinOut, ppinIn, NULL);
607 TRACE("Direct connection successfull\n");
610 TRACE("Direct connection failed, trying to insert other filters\n");
612 /* Find the appropriate transform filter than can transform the minor media type of output pin of the upstream
613 * filter to the minor mediatype of input pin of the renderer */
614 hr = IPin_EnumMediaTypes(ppinOut, &penummt);
616 ERR("EnumMediaTypes (%lx)\n", hr);
620 hr = IEnumMediaTypes_Next(penummt, 1, &mt, &nbmt);
622 ERR("IEnumMediaTypes_Next (%lx)\n", hr);
627 ERR("No media type found!\n");
630 TRACE("MajorType %s\n", debugstr_guid(&mt->majortype));
631 TRACE("SubType %s\n", debugstr_guid(&mt->subtype));
633 /* Try to find a suitable filter that can connect to the pin to render */
634 tab[0] = mt->majortype;
635 tab[1] = mt->subtype;
636 hr = IFilterMapper2_EnumMatchingFilters(This->pFilterMapper2, &pEnumMoniker, 0, FALSE, 0, TRUE, 1, tab, NULL, NULL, FALSE, FALSE, 0, NULL, NULL, NULL);
638 ERR("Unable to enum filters (%lx)\n", hr);
642 while(IEnumMoniker_Next(pEnumMoniker, 1, &pMoniker, &nb) == S_OK)
648 IBaseFilter* pfilter = NULL;
650 hr = GetFilterInfo(pMoniker, &clsid, &var);
651 IMoniker_Release(pMoniker);
653 ERR("Unable to retreive filter info (%lx)\n", hr);
657 hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)&pfilter);
659 ERR("Unable to create filter (%lx), trying next one\n", hr);
663 hr = IGraphBuilder_AddFilter(iface, pfilter, NULL);
665 ERR("Unable to add filter (%lx)\n", hr);
666 IBaseFilter_Release(pfilter);
671 hr = IBaseFilter_EnumPins(pfilter, &penumpins);
673 ERR("Enumpins (%lx)\n", hr);
676 hr = IEnumPins_Next(penumpins, 1, &ppinfilter, &pin);
678 ERR("Next (%lx)\n", hr);
685 IEnumPins_Release(penumpins);
687 hr = IPin_Connect(ppinOut, ppinfilter, NULL);
689 TRACE("Cannot connect to filter (%lx), trying next one\n", hr);
692 TRACE("Successfully connected to filter, follow chain...\n");
694 /* Render all output pins of the filter by calling IGraphBuilder_Render on each of them */
695 hr = GetInternalConnections(pfilter, ppinfilter, &ppins, &nb);
699 TRACE("pins to consider: %ld\n", nb);
700 for(i = 0; i < nb; i++) {
701 TRACE("Processing pin %d\n", i);
702 hr = IGraphBuilder_Connect(iface, ppins[0], ppinIn);
704 TRACE("Cannot render pin %p (%lx)\n", ppinfilter, hr);
708 CoTaskMemFree(ppins);
714 IGraphBuilder_RemoveFilter(iface, pfilter);
715 IBaseFilter_Release(pfilter);
719 IEnumMediaTypes_Release(penummt);
725 static HRESULT WINAPI Graphbuilder_Render(IGraphBuilder *iface,
727 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
728 IEnumMediaTypes* penummt;
733 IEnumMoniker* pEnumMoniker;
738 TRACE("(%p/%p)->(%p)\n", This, iface, ppinOut);
740 hr = IPin_EnumMediaTypes(ppinOut, &penummt);
742 ERR("EnumMediaTypes (%lx)\n", hr);
748 hr = IEnumMediaTypes_Next(penummt, 1, &mt, &nbmt);
750 ERR("IEnumMediaTypes_Next (%lx)\n", hr);
755 TRACE("MajorType %s\n", debugstr_guid(&mt->majortype));
756 TRACE("SubType %s\n", debugstr_guid(&mt->subtype));
758 /* Try to find a suitable renderer with the same media type */
759 tab[0] = mt->majortype;
761 hr = IFilterMapper2_EnumMatchingFilters(This->pFilterMapper2, &pEnumMoniker, 0, FALSE, 0, TRUE, 1, tab, NULL, NULL, TRUE, FALSE, 0, NULL, NULL, NULL);
763 ERR("Unable to enum filters (%lx)\n", hr);
767 while(IEnumMoniker_Next(pEnumMoniker, 1, &pMoniker, &nb) == S_OK)
772 IBaseFilter* pfilter = NULL;
773 IEnumPins* penumpins;
776 hr = GetFilterInfo(pMoniker, &clsid, &var);
777 IMoniker_Release(pMoniker);
779 ERR("Unable to retreive filter info (%lx)\n", hr);
783 hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)&pfilter);
785 ERR("Unable to create filter (%lx), trying next one\n", hr);
789 hr = IGraphBuilder_AddFilter(iface, pfilter, NULL);
791 ERR("Unable to add filter (%lx)\n", hr);
792 IBaseFilter_Release(pfilter);
797 hr = IBaseFilter_EnumPins(pfilter, &penumpins);
799 ERR("Splitter Enumpins (%lx)\n", hr);
802 hr = IEnumPins_Next(penumpins, 1, &ppinfilter, &pin);
804 ERR("Next (%lx)\n", hr);
811 IEnumPins_Release(penumpins);
813 /* Connect the pin to render to the renderer */
814 hr = IGraphBuilder_Connect(iface, ppinOut, ppinfilter);
816 TRACE("Unable to connect to renderer (%lx)\n", hr);
823 IGraphBuilder_RemoveFilter(iface, pfilter);
824 IBaseFilter_Release(pfilter);
832 IEnumMediaTypes_Release(penummt);
837 static HRESULT WINAPI Graphbuilder_RenderFile(IGraphBuilder *iface,
839 LPCWSTR lpcwstrPlayList) {
840 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
841 static const WCHAR string[] = {'R','e','a','d','e','r',0};
842 IBaseFilter* preader = NULL;
843 IBaseFilter* psplitter;
846 IEnumPins* penumpins;
849 IEnumMoniker* pEnumMoniker;
854 IFileSourceFilter* pfile = NULL;
858 TRACE("(%p/%p)->(%s, %s)\n", This, iface, debugstr_w(lpcwstrFile), debugstr_w(lpcwstrPlayList));
860 hr = IGraphBuilder_AddSourceFilter(iface, lpcwstrFile, string, &preader);
862 /* Retreive file media type */
864 hr = IBaseFilter_QueryInterface(preader, &IID_IFileSourceFilter, (LPVOID*)&pfile);
866 hr = IFileSourceFilter_GetCurFile(pfile, &filename, &mt);
867 IFileSourceFilter_Release(pfile);
871 tab[0] = mt.majortype;
873 hr = IFilterMapper2_EnumMatchingFilters(This->pFilterMapper2, &pEnumMoniker, 0, FALSE, 0, TRUE, 1, tab, NULL, NULL, FALSE, FALSE, 0, NULL, NULL, NULL);
876 IGraphBuilder_RemoveFilter(iface, preader);
877 IBaseFilter_Release(preader);
882 while(IEnumMoniker_Next(pEnumMoniker, 1, &pMoniker, &nb) == S_OK)
887 hr = GetFilterInfo(pMoniker, &clsid, &var);
888 IMoniker_Release(pMoniker);
890 ERR("Unable to retreive filter info (%lx)\n", hr);
894 hr = CoCreateInstance(&clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)&psplitter);
896 ERR("Unable to create filter (%lx), trying next one\n", hr);
900 hr = IGraphBuilder_AddFilter(iface, psplitter, NULL);
902 ERR("Unable add filter (%lx)\n", hr);
906 /* Connect file source and splitter filters together */
907 /* Make the splitter analyze incoming data */
908 hr = IBaseFilter_EnumPins(preader, &penumpins);
910 ERR("Enumpins (%lx)\n", hr);
913 hr = IEnumPins_Next(penumpins, 1, &ppinreader, &pin);
915 ERR("Next (%lx)\n", hr);
922 IEnumPins_Release(penumpins);
924 hr = IBaseFilter_EnumPins(psplitter, &penumpins);
926 ERR("Splitter Enumpins (%lx)\n", hr);
929 hr = IEnumPins_Next(penumpins, 1, &ppinsplitter, &pin);
931 ERR("Next (%lx)\n", hr);
938 IEnumPins_Release(penumpins);
940 hr = IPin_Connect(ppinreader, ppinsplitter, NULL);
942 IBaseFilter_Release(ppinsplitter);
944 TRACE("Cannot connect to filter (%lx), trying next one\n", hr);
947 TRACE("Successfully connected to filter\n");
951 /* Render all output pin of the splitter by calling IGraphBuilder_Render on each of them */
952 hr = GetInternalConnections(psplitter, ppinsplitter, &ppins, &nb);
956 TRACE("pins to consider: %ld\n", nb);
957 for(i = 0; i < nb; i++) {
958 TRACE("Processing pin %d\n", i);
959 hr = IGraphBuilder_Render(iface, ppins[i]);
961 ERR("Cannot render pin %p (%lx)\n", ppins[i], hr);
962 /* FIXME: We should clean created things properly */
967 CoTaskMemFree(ppins);
972 static HRESULT WINAPI Graphbuilder_AddSourceFilter(IGraphBuilder *iface,
973 LPCWSTR lpcwstrFileName,
974 LPCWSTR lpcwstrFilterName,
975 IBaseFilter **ppFilter) {
976 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
978 IBaseFilter* preader;
979 IFileSourceFilter* pfile = NULL;
983 TRACE("(%p/%p)->(%s, %s, %p)\n", This, iface, debugstr_w(lpcwstrFileName), debugstr_w(lpcwstrFilterName), ppFilter);
985 /* Instantiate a file source filter */
986 hr = CoCreateInstance(&CLSID_AsyncReader, NULL, CLSCTX_INPROC_SERVER, &IID_IBaseFilter, (LPVOID*)&preader);
988 ERR("Unable to create file source filter (%lx)\n", hr);
992 hr = IGraphBuilder_AddFilter(iface, preader, lpcwstrFilterName);
994 ERR("Unable add filter (%lx)\n", hr);
995 IBaseFilter_Release(preader);
999 hr = IBaseFilter_QueryInterface(preader, &IID_IFileSourceFilter, (LPVOID*)&pfile);
1001 ERR("Unable to get IFileSourceInterface (%lx)\n", hr);
1005 /* Load the file in the file source filter */
1006 hr = IFileSourceFilter_Load(pfile, lpcwstrFileName, NULL);
1008 ERR("Load (%lx)\n", hr);
1012 IFileSourceFilter_GetCurFile(pfile, &filename, &mt);
1014 ERR("GetCurFile (%lx)\n", hr);
1017 TRACE("File %s\n", debugstr_w(filename));
1018 TRACE("MajorType %s\n", debugstr_guid(&mt.majortype));
1019 TRACE("SubType %s\n", debugstr_guid(&mt.subtype));
1022 *ppFilter = preader;
1028 IFileSourceFilter_Release(pfile);
1029 IGraphBuilder_RemoveFilter(iface, preader);
1030 IBaseFilter_Release(preader);
1035 static HRESULT WINAPI Graphbuilder_SetLogFile(IGraphBuilder *iface,
1037 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
1039 TRACE("(%p/%p)->(%08lx): stub !!!\n", This, iface, (DWORD) hFile);
1044 static HRESULT WINAPI Graphbuilder_Abort(IGraphBuilder *iface) {
1045 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
1047 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1052 static HRESULT WINAPI Graphbuilder_ShouldOperationContinue(IGraphBuilder *iface) {
1053 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
1055 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1061 static IGraphBuilderVtbl IGraphBuilder_VTable =
1063 Graphbuilder_QueryInterface,
1064 Graphbuilder_AddRef,
1065 Graphbuilder_Release,
1066 Graphbuilder_AddFilter,
1067 Graphbuilder_RemoveFilter,
1068 Graphbuilder_EnumFilters,
1069 Graphbuilder_FindFilterByName,
1070 Graphbuilder_ConnectDirect,
1071 Graphbuilder_Reconnect,
1072 Graphbuilder_Disconnect,
1073 Graphbuilder_SetDefaultSyncSource,
1074 Graphbuilder_Connect,
1075 Graphbuilder_Render,
1076 Graphbuilder_RenderFile,
1077 Graphbuilder_AddSourceFilter,
1078 Graphbuilder_SetLogFile,
1080 Graphbuilder_ShouldOperationContinue
1083 /*** IUnknown methods ***/
1084 static HRESULT WINAPI Mediacontrol_QueryInterface(IMediaControl *iface,
1087 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1089 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
1091 return Filtergraph_QueryInterface(This, riid, ppvObj);
1094 static ULONG WINAPI Mediacontrol_AddRef(IMediaControl *iface) {
1095 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1097 TRACE("(%p/%p)->()\n", This, iface);
1099 return Filtergraph_AddRef(This);
1102 static ULONG WINAPI Mediacontrol_Release(IMediaControl *iface) {
1103 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1105 TRACE("(%p/%p)->()\n", This, iface);
1107 return Filtergraph_Release(This);
1111 /*** IDispatch methods ***/
1112 static HRESULT WINAPI Mediacontrol_GetTypeInfoCount(IMediaControl *iface,
1114 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1116 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
1121 static HRESULT WINAPI Mediacontrol_GetTypeInfo(IMediaControl *iface,
1124 ITypeInfo**ppTInfo) {
1125 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1127 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
1132 static HRESULT WINAPI Mediacontrol_GetIDsOfNames(IMediaControl *iface,
1138 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1140 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
1145 static HRESULT WINAPI Mediacontrol_Invoke(IMediaControl *iface,
1146 DISPID dispIdMember,
1150 DISPPARAMS*pDispParams,
1152 EXCEPINFO*pExepInfo,
1154 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1156 TRACE("(%p/%p)->(%ld, %s (%p), %ld, %04x, %p, %p, %p, %p): stub !!!\n", This, iface, dispIdMember, debugstr_guid(riid), riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
1161 /*** IMediaControl methods ***/
1162 static HRESULT WINAPI Mediacontrol_Run(IMediaControl *iface) {
1163 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1165 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1167 ResetEvent(This->hEventCompletion);
1172 static HRESULT WINAPI Mediacontrol_Pause(IMediaControl *iface) {
1173 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1175 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1180 static HRESULT WINAPI Mediacontrol_Stop(IMediaControl *iface) {
1181 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1183 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1188 static HRESULT WINAPI Mediacontrol_GetState(IMediaControl *iface,
1190 OAFilterState *pfs) {
1191 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1193 TRACE("(%p/%p)->(%ld, %p): stub !!!\n", This, iface, msTimeout, pfs);
1198 static HRESULT WINAPI Mediacontrol_RenderFile(IMediaControl *iface,
1200 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1202 TRACE("(%p/%p)->(%s (%p)): stub !!!\n", This, iface, debugstr_w(strFilename), strFilename);
1207 static HRESULT WINAPI Mediacontrol_AddSourceFilter(IMediaControl *iface,
1209 IDispatch **ppUnk) {
1210 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1212 TRACE("(%p/%p)->(%s (%p), %p): stub !!!\n", This, iface, debugstr_w(strFilename), strFilename, ppUnk);
1217 static HRESULT WINAPI Mediacontrol_get_FilterCollection(IMediaControl *iface,
1218 IDispatch **ppUnk) {
1219 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1221 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, ppUnk);
1226 static HRESULT WINAPI Mediacontrol_get_RegFilterCollection(IMediaControl *iface,
1227 IDispatch **ppUnk) {
1228 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1230 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, ppUnk);
1235 static HRESULT WINAPI Mediacontrol_StopWhenReady(IMediaControl *iface) {
1236 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
1238 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1244 static IMediaControlVtbl IMediaControl_VTable =
1246 Mediacontrol_QueryInterface,
1247 Mediacontrol_AddRef,
1248 Mediacontrol_Release,
1249 Mediacontrol_GetTypeInfoCount,
1250 Mediacontrol_GetTypeInfo,
1251 Mediacontrol_GetIDsOfNames,
1252 Mediacontrol_Invoke,
1256 Mediacontrol_GetState,
1257 Mediacontrol_RenderFile,
1258 Mediacontrol_AddSourceFilter,
1259 Mediacontrol_get_FilterCollection,
1260 Mediacontrol_get_RegFilterCollection,
1261 Mediacontrol_StopWhenReady
1265 /*** IUnknown methods ***/
1266 static HRESULT WINAPI Mediaseeking_QueryInterface(IMediaSeeking *iface,
1269 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1271 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
1273 return Filtergraph_QueryInterface(This, riid, ppvObj);
1276 static ULONG WINAPI Mediaseeking_AddRef(IMediaSeeking *iface) {
1277 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1279 TRACE("(%p/%p)->()\n", This, iface);
1281 return Filtergraph_AddRef(This);
1284 static ULONG WINAPI Mediaseeking_Release(IMediaSeeking *iface) {
1285 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1287 TRACE("(%p/%p)->()\n", This, iface);
1289 return Filtergraph_Release(This);
1292 /*** IMediaSeeking methods ***/
1293 static HRESULT WINAPI Mediaseeking_GetCapabilities(IMediaSeeking *iface,
1294 DWORD *pCapabilities) {
1295 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1297 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pCapabilities);
1302 static HRESULT WINAPI Mediaseeking_CheckCapabilities(IMediaSeeking *iface,
1303 DWORD *pCapabilities) {
1304 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1306 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pCapabilities);
1311 static HRESULT WINAPI Mediaseeking_IsFormatSupported(IMediaSeeking *iface,
1312 const GUID *pFormat) {
1313 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1315 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pFormat);
1320 static HRESULT WINAPI Mediaseeking_QueryPreferredFormat(IMediaSeeking *iface,
1322 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1324 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pFormat);
1329 static HRESULT WINAPI Mediaseeking_GetTimeFormat(IMediaSeeking *iface,
1331 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1333 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pFormat);
1338 static HRESULT WINAPI Mediaseeking_IsUsingTimeFormat(IMediaSeeking *iface,
1339 const GUID *pFormat) {
1340 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1342 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pFormat);
1347 static HRESULT WINAPI Mediaseeking_SetTimeFormat(IMediaSeeking *iface,
1348 const GUID *pFormat) {
1349 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1351 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pFormat);
1356 static HRESULT WINAPI Mediaseeking_GetDuration(IMediaSeeking *iface,
1357 LONGLONG *pDuration) {
1358 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1360 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pDuration);
1365 static HRESULT WINAPI Mediaseeking_GetStopPosition(IMediaSeeking *iface,
1367 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1369 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pStop);
1374 static HRESULT WINAPI Mediaseeking_GetCurrentPosition(IMediaSeeking *iface,
1375 LONGLONG *pCurrent) {
1376 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1378 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pCurrent);
1383 static HRESULT WINAPI Mediaseeking_ConvertTimeFormat(IMediaSeeking *iface,
1385 const GUID *pTargetFormat,
1387 const GUID *pSourceFormat) {
1388 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1390 TRACE("(%p/%p)->(%p, %p, %lld, %p): stub !!!\n", This, iface, pTarget, pTargetFormat, Source, pSourceFormat);
1395 static HRESULT WINAPI Mediaseeking_SetPositions(IMediaSeeking *iface,
1397 DWORD dwCurrentFlags,
1399 DWORD dwStopFlags) {
1400 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1402 TRACE("(%p/%p)->(%p, %08lx, %p, %08lx): stub !!!\n", This, iface, pCurrent, dwCurrentFlags, pStop, dwStopFlags);
1407 static HRESULT WINAPI Mediaseeking_GetPositions(IMediaSeeking *iface,
1410 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1412 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pCurrent, pStop);
1417 static HRESULT WINAPI Mediaseeking_GetAvailable(IMediaSeeking *iface,
1418 LONGLONG *pEarliest,
1419 LONGLONG *pLatest) {
1420 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1422 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pEarliest, pLatest);
1427 static HRESULT WINAPI Mediaseeking_SetRate(IMediaSeeking *iface,
1429 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1431 TRACE("(%p/%p)->(%f): stub !!!\n", This, iface, dRate);
1436 static HRESULT WINAPI Mediaseeking_GetRate(IMediaSeeking *iface,
1438 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1440 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pdRate);
1445 static HRESULT WINAPI Mediaseeking_GetPreroll(IMediaSeeking *iface,
1446 LONGLONG *pllPreroll) {
1447 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
1449 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pllPreroll);
1455 static IMediaSeekingVtbl IMediaSeeking_VTable =
1457 Mediaseeking_QueryInterface,
1458 Mediaseeking_AddRef,
1459 Mediaseeking_Release,
1460 Mediaseeking_GetCapabilities,
1461 Mediaseeking_CheckCapabilities,
1462 Mediaseeking_IsFormatSupported,
1463 Mediaseeking_QueryPreferredFormat,
1464 Mediaseeking_GetTimeFormat,
1465 Mediaseeking_IsUsingTimeFormat,
1466 Mediaseeking_SetTimeFormat,
1467 Mediaseeking_GetDuration,
1468 Mediaseeking_GetStopPosition,
1469 Mediaseeking_GetCurrentPosition,
1470 Mediaseeking_ConvertTimeFormat,
1471 Mediaseeking_SetPositions,
1472 Mediaseeking_GetPositions,
1473 Mediaseeking_GetAvailable,
1474 Mediaseeking_SetRate,
1475 Mediaseeking_GetRate,
1476 Mediaseeking_GetPreroll
1479 /*** IUnknown methods ***/
1480 static HRESULT WINAPI Basicaudio_QueryInterface(IBasicAudio *iface,
1483 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1485 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
1487 return Filtergraph_QueryInterface(This, riid, ppvObj);
1490 static ULONG WINAPI Basicaudio_AddRef(IBasicAudio *iface) {
1491 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1493 TRACE("(%p/%p)->()\n", This, iface);
1495 return Filtergraph_AddRef(This);
1498 static ULONG WINAPI Basicaudio_Release(IBasicAudio *iface) {
1499 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1501 TRACE("(%p/%p)->()\n", This, iface);
1503 return Filtergraph_Release(This);
1506 /*** IDispatch methods ***/
1507 static HRESULT WINAPI Basicaudio_GetTypeInfoCount(IBasicAudio *iface,
1509 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1511 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
1516 static HRESULT WINAPI Basicaudio_GetTypeInfo(IBasicAudio *iface,
1519 ITypeInfo**ppTInfo) {
1520 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1522 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
1527 static HRESULT WINAPI Basicaudio_GetIDsOfNames(IBasicAudio *iface,
1533 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1535 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
1540 static HRESULT WINAPI Basicaudio_Invoke(IBasicAudio *iface,
1541 DISPID dispIdMember,
1545 DISPPARAMS*pDispParams,
1547 EXCEPINFO*pExepInfo,
1549 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1551 TRACE("(%p/%p)->(%ld, %s (%p), %ld, %04x, %p, %p, %p, %p): stub !!!\n", This, iface, dispIdMember, debugstr_guid(riid), riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
1556 /*** IBasicAudio methods ***/
1557 static HRESULT WINAPI Basicaudio_put_Volume(IBasicAudio *iface,
1559 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1561 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, lVolume);
1566 static HRESULT WINAPI Basicaudio_get_Volume(IBasicAudio *iface,
1568 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1570 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, plVolume);
1575 static HRESULT WINAPI Basicaudio_put_Balance(IBasicAudio *iface,
1577 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1579 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, lBalance);
1584 static HRESULT WINAPI Basicaudio_get_Balance(IBasicAudio *iface,
1586 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1588 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, plBalance);
1593 static IBasicAudioVtbl IBasicAudio_VTable =
1595 Basicaudio_QueryInterface,
1598 Basicaudio_GetTypeInfoCount,
1599 Basicaudio_GetTypeInfo,
1600 Basicaudio_GetIDsOfNames,
1602 Basicaudio_put_Volume,
1603 Basicaudio_get_Volume,
1604 Basicaudio_put_Balance,
1605 Basicaudio_get_Balance
1608 /*** IUnknown methods ***/
1609 static HRESULT WINAPI Basicvideo_QueryInterface(IBasicVideo *iface,
1612 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1614 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
1616 return Filtergraph_QueryInterface(This, riid, ppvObj);
1619 static ULONG WINAPI Basicvideo_AddRef(IBasicVideo *iface) {
1620 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1622 TRACE("(%p/%p)->()\n", This, iface);
1624 return Filtergraph_AddRef(This);
1627 static ULONG WINAPI Basicvideo_Release(IBasicVideo *iface) {
1628 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1630 TRACE("(%p/%p)->()\n", This, iface);
1632 return Filtergraph_Release(This);
1635 /*** IDispatch methods ***/
1636 static HRESULT WINAPI Basicvideo_GetTypeInfoCount(IBasicVideo *iface,
1638 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1640 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
1645 static HRESULT WINAPI Basicvideo_GetTypeInfo(IBasicVideo *iface,
1648 ITypeInfo**ppTInfo) {
1649 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1651 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
1656 static HRESULT WINAPI Basicvideo_GetIDsOfNames(IBasicVideo *iface,
1662 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1664 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
1669 static HRESULT WINAPI Basicvideo_Invoke(IBasicVideo *iface,
1670 DISPID dispIdMember,
1674 DISPPARAMS*pDispParams,
1676 EXCEPINFO*pExepInfo,
1678 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1680 TRACE("(%p/%p)->(%ld, %s (%p), %ld, %04x, %p, %p, %p, %p): stub !!!\n", This, iface, dispIdMember, debugstr_guid(riid), riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
1685 /*** IBasicVideo methods ***/
1686 static HRESULT WINAPI Basicvideo_get_AvgTimePerFrame(IBasicVideo *iface,
1687 REFTIME *pAvgTimePerFrame) {
1688 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1690 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pAvgTimePerFrame);
1695 static HRESULT WINAPI Basicvideo_get_BitRate(IBasicVideo *iface,
1697 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1699 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pBitRate);
1704 static HRESULT WINAPI Basicvideo_get_BitErrorRate(IBasicVideo *iface,
1705 long *pBitErrorRate) {
1706 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1708 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pBitErrorRate);
1713 static HRESULT WINAPI Basicvideo_get_VideoWidth(IBasicVideo *iface,
1714 long *pVideoWidth) {
1715 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1717 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pVideoWidth);
1722 static HRESULT WINAPI Basicvideo_get_VideoHeight(IBasicVideo *iface,
1723 long *pVideoHeight) {
1724 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1726 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pVideoHeight);
1731 static HRESULT WINAPI Basicvideo_put_SourceLeft(IBasicVideo *iface,
1733 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1735 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, SourceLeft);
1740 static HRESULT WINAPI Basicvideo_get_SourceLeft(IBasicVideo *iface,
1741 long *pSourceLeft) {
1742 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1744 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pSourceLeft);
1749 static HRESULT WINAPI Basicvideo_put_SourceWidth(IBasicVideo *iface,
1751 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1753 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, SourceWidth);
1758 static HRESULT WINAPI Basicvideo_get_SourceWidth(IBasicVideo *iface,
1759 long *pSourceWidth) {
1760 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1762 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pSourceWidth);
1767 static HRESULT WINAPI Basicvideo_put_SourceTop(IBasicVideo *iface,
1769 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1771 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, SourceTop);
1776 static HRESULT WINAPI Basicvideo_get_SourceTop(IBasicVideo *iface,
1778 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1780 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pSourceTop);
1785 static HRESULT WINAPI Basicvideo_put_SourceHeight(IBasicVideo *iface,
1786 long SourceHeight) {
1787 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1789 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, SourceHeight);
1794 static HRESULT WINAPI Basicvideo_get_SourceHeight(IBasicVideo *iface,
1795 long *pSourceHeight) {
1796 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1798 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pSourceHeight);
1803 static HRESULT WINAPI Basicvideo_put_DestinationLeft(IBasicVideo *iface,
1804 long DestinationLeft) {
1805 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1807 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, DestinationLeft);
1812 static HRESULT WINAPI Basicvideo_get_DestinationLeft(IBasicVideo *iface,
1813 long *pDestinationLeft) {
1814 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1816 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pDestinationLeft);
1821 static HRESULT WINAPI Basicvideo_put_DestinationWidth(IBasicVideo *iface,
1822 long DestinationWidth) {
1823 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1825 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, DestinationWidth);
1830 static HRESULT WINAPI Basicvideo_get_DestinationWidth(IBasicVideo *iface,
1831 long *pDestinationWidth) {
1832 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1834 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pDestinationWidth);
1839 static HRESULT WINAPI Basicvideo_put_DestinationTop(IBasicVideo *iface,
1840 long DestinationTop) {
1841 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1843 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, DestinationTop);
1848 static HRESULT WINAPI Basicvideo_get_DestinationTop(IBasicVideo *iface,
1849 long *pDestinationTop) {
1850 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1852 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pDestinationTop);
1857 static HRESULT WINAPI Basicvideo_put_DestinationHeight(IBasicVideo *iface,
1858 long DestinationHeight) {
1859 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1861 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, DestinationHeight);
1866 static HRESULT WINAPI Basicvideo_get_DestinationHeight(IBasicVideo *iface,
1867 long *pDestinationHeight) {
1868 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1870 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pDestinationHeight);
1875 static HRESULT WINAPI Basicvideo_SetSourcePosition(IBasicVideo *iface,
1880 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1882 TRACE("(%p/%p)->(%ld, %ld, %ld, %ld): stub !!!\n", This, iface, Left, Top, Width, Height);
1887 static HRESULT WINAPI Basicvideo_GetSourcePosition(IBasicVideo *iface,
1892 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1894 TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This, iface, pLeft, pTop, pWidth, pHeight);
1899 static HRESULT WINAPI Basicvideo_SetDefaultSourcePosition(IBasicVideo *iface) {
1900 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1902 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1907 static HRESULT WINAPI Basicvideo_SetDestinationPosition(IBasicVideo *iface,
1912 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1914 TRACE("(%p/%p)->(%ld, %ld, %ld, %ld): stub !!!\n", This, iface, Left, Top, Width, Height);
1919 static HRESULT WINAPI Basicvideo_GetDestinationPosition(IBasicVideo *iface,
1924 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1926 TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This, iface, pLeft, pTop, pWidth, pHeight);
1931 static HRESULT WINAPI Basicvideo_SetDefaultDestinationPosition(IBasicVideo *iface) {
1932 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1934 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1939 static HRESULT WINAPI Basicvideo_GetVideoSize(IBasicVideo *iface,
1942 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1944 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pWidth, pHeight);
1949 static HRESULT WINAPI Basicvideo_GetVideoPaletteEntries(IBasicVideo *iface,
1954 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1956 TRACE("(%p/%p)->(%ld, %ld, %p, %p): stub !!!\n", This, iface, StartIndex, Entries, pRetrieved, pPalette);
1961 static HRESULT WINAPI Basicvideo_GetCurrentImage(IBasicVideo *iface,
1964 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1966 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pBufferSize, pDIBImage);
1971 static HRESULT WINAPI Basicvideo_IsUsingDefaultSource(IBasicVideo *iface) {
1972 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1974 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1979 static HRESULT WINAPI Basicvideo_IsUsingDefaultDestination(IBasicVideo *iface) {
1980 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1982 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1988 static IBasicVideoVtbl IBasicVideo_VTable =
1990 Basicvideo_QueryInterface,
1993 Basicvideo_GetTypeInfoCount,
1994 Basicvideo_GetTypeInfo,
1995 Basicvideo_GetIDsOfNames,
1997 Basicvideo_get_AvgTimePerFrame,
1998 Basicvideo_get_BitRate,
1999 Basicvideo_get_BitErrorRate,
2000 Basicvideo_get_VideoWidth,
2001 Basicvideo_get_VideoHeight,
2002 Basicvideo_put_SourceLeft,
2003 Basicvideo_get_SourceLeft,
2004 Basicvideo_put_SourceWidth,
2005 Basicvideo_get_SourceWidth,
2006 Basicvideo_put_SourceTop,
2007 Basicvideo_get_SourceTop,
2008 Basicvideo_put_SourceHeight,
2009 Basicvideo_get_SourceHeight,
2010 Basicvideo_put_DestinationLeft,
2011 Basicvideo_get_DestinationLeft,
2012 Basicvideo_put_DestinationWidth,
2013 Basicvideo_get_DestinationWidth,
2014 Basicvideo_put_DestinationTop,
2015 Basicvideo_get_DestinationTop,
2016 Basicvideo_put_DestinationHeight,
2017 Basicvideo_get_DestinationHeight,
2018 Basicvideo_SetSourcePosition,
2019 Basicvideo_GetSourcePosition,
2020 Basicvideo_SetDefaultSourcePosition,
2021 Basicvideo_SetDestinationPosition,
2022 Basicvideo_GetDestinationPosition,
2023 Basicvideo_SetDefaultDestinationPosition,
2024 Basicvideo_GetVideoSize,
2025 Basicvideo_GetVideoPaletteEntries,
2026 Basicvideo_GetCurrentImage,
2027 Basicvideo_IsUsingDefaultSource,
2028 Basicvideo_IsUsingDefaultDestination
2032 /*** IUnknown methods ***/
2033 static HRESULT WINAPI Videowindow_QueryInterface(IVideoWindow *iface,
2036 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2038 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
2040 return Filtergraph_QueryInterface(This, riid, ppvObj);
2043 static ULONG WINAPI Videowindow_AddRef(IVideoWindow *iface) {
2044 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2046 TRACE("(%p/%p)->()\n", This, iface);
2048 return Filtergraph_AddRef(This);
2051 static ULONG WINAPI Videowindow_Release(IVideoWindow *iface) {
2052 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2054 TRACE("(%p/%p)->()\n", This, iface);
2056 return Filtergraph_Release(This);
2059 /*** IDispatch methods ***/
2060 static HRESULT WINAPI Videowindow_GetTypeInfoCount(IVideoWindow *iface,
2062 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2064 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
2069 static HRESULT WINAPI Videowindow_GetTypeInfo(IVideoWindow *iface,
2072 ITypeInfo**ppTInfo) {
2073 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2075 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
2080 static HRESULT WINAPI Videowindow_GetIDsOfNames(IVideoWindow *iface,
2086 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2088 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
2093 static HRESULT WINAPI Videowindow_Invoke(IVideoWindow *iface,
2094 DISPID dispIdMember,
2098 DISPPARAMS*pDispParams,
2100 EXCEPINFO*pExepInfo,
2102 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2104 TRACE("(%p/%p)->(%ld, %s (%p), %ld, %04x, %p, %p, %p, %p): stub !!!\n", This, iface, dispIdMember, debugstr_guid(riid), riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
2109 /*** IVideoWindow methods ***/
2110 static HRESULT WINAPI Videowindow_put_Caption(IVideoWindow *iface,
2112 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2114 TRACE("(%p/%p)->(%s (%p)): stub !!!\n", This, iface, debugstr_w(strCaption), strCaption);
2119 static HRESULT WINAPI Videowindow_get_Caption(IVideoWindow *iface,
2121 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2123 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, strCaption);
2128 static HRESULT WINAPI Videowindow_put_WindowStyle(IVideoWindow *iface,
2130 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2132 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, WindowStyle);
2137 static HRESULT WINAPI Videowindow_get_WindowStyle(IVideoWindow *iface,
2138 long *WindowStyle) {
2139 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2141 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, WindowStyle);
2146 static HRESULT WINAPI Videowindow_put_WindowStyleEx(IVideoWindow *iface,
2147 long WindowStyleEx) {
2148 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2150 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, WindowStyleEx);
2155 static HRESULT WINAPI Videowindow_get_WindowStyleEx(IVideoWindow *iface,
2156 long *WindowStyleEx) {
2157 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2159 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, WindowStyleEx);
2164 static HRESULT WINAPI Videowindow_put_AutoShow(IVideoWindow *iface,
2166 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2168 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, AutoShow);
2173 static HRESULT WINAPI Videowindow_get_AutoShow(IVideoWindow *iface,
2175 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2177 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, AutoShow);
2182 static HRESULT WINAPI Videowindow_put_WindowState(IVideoWindow *iface,
2184 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2186 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, WindowState);
2191 static HRESULT WINAPI Videowindow_get_WindowState(IVideoWindow *iface,
2192 long *WindowState) {
2193 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2195 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, WindowState);
2200 static HRESULT WINAPI Videowindow_put_BackgroundPalette(IVideoWindow *iface,
2201 long BackgroundPalette) {
2202 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2204 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, BackgroundPalette);
2209 static HRESULT WINAPI Videowindow_get_BackgroundPalette(IVideoWindow *iface,
2210 long *pBackgroundPalette) {
2211 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2213 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pBackgroundPalette);
2218 static HRESULT WINAPI Videowindow_put_Visible(IVideoWindow *iface,
2220 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2222 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Visible);
2227 static HRESULT WINAPI Videowindow_get_Visible(IVideoWindow *iface,
2229 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2231 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pVisible);
2236 static HRESULT WINAPI Videowindow_put_Left(IVideoWindow *iface,
2238 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2240 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Left);
2245 static HRESULT WINAPI Videowindow_get_Left(IVideoWindow *iface,
2247 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2249 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pLeft);
2254 static HRESULT WINAPI Videowindow_put_Width(IVideoWindow *iface,
2256 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2258 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Width);
2263 static HRESULT WINAPI Videowindow_get_Width(IVideoWindow *iface,
2265 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2267 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pWidth);
2272 static HRESULT WINAPI Videowindow_put_Top(IVideoWindow *iface,
2274 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2276 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Top);
2281 static HRESULT WINAPI Videowindow_get_Top(IVideoWindow *iface,
2283 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2285 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pTop);
2290 static HRESULT WINAPI Videowindow_put_Height(IVideoWindow *iface,
2292 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2294 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Height);
2299 static HRESULT WINAPI Videowindow_get_Height(IVideoWindow *iface,
2301 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2303 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pHeight);
2308 static HRESULT WINAPI Videowindow_put_Owner(IVideoWindow *iface,
2310 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2312 TRACE("(%p/%p)->(%08lx): stub !!!\n", This, iface, (DWORD) Owner);
2317 static HRESULT WINAPI Videowindow_get_Owner(IVideoWindow *iface,
2319 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2321 TRACE("(%p/%p)->(%08lx): stub !!!\n", This, iface, (DWORD) Owner);
2326 static HRESULT WINAPI Videowindow_put_MessageDrain(IVideoWindow *iface,
2328 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2330 TRACE("(%p/%p)->(%08lx): stub !!!\n", This, iface, (DWORD) Drain);
2335 static HRESULT WINAPI Videowindow_get_MessageDrain(IVideoWindow *iface,
2337 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2339 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, Drain);
2344 static HRESULT WINAPI Videowindow_get_BorderColor(IVideoWindow *iface,
2346 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2348 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, Color);
2353 static HRESULT WINAPI Videowindow_put_BorderColor(IVideoWindow *iface,
2355 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2357 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Color);
2362 static HRESULT WINAPI Videowindow_get_FullScreenMode(IVideoWindow *iface,
2363 long *FullScreenMode) {
2364 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2366 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, FullScreenMode);
2371 static HRESULT WINAPI Videowindow_put_FullScreenMode(IVideoWindow *iface,
2372 long FullScreenMode) {
2373 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2375 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, FullScreenMode);
2380 static HRESULT WINAPI Videowindow_SetWindowForeground(IVideoWindow *iface,
2382 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2384 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Focus);
2389 static HRESULT WINAPI Videowindow_NotifyOwnerMessage(IVideoWindow *iface,
2394 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2396 TRACE("(%p/%p)->(%08lx, %ld, %08lx, %08lx): stub !!!\n", This, iface, (DWORD) hwnd, uMsg, wParam, lParam);
2401 static HRESULT WINAPI Videowindow_SetWindowPosition(IVideoWindow *iface,
2406 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2408 TRACE("(%p/%p)->(%ld, %ld, %ld, %ld): stub !!!\n", This, iface, Left, Top, Width, Height);
2413 static HRESULT WINAPI Videowindow_GetWindowPosition(IVideoWindow *iface,
2418 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2420 TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This, iface, pLeft, pTop, pWidth, pHeight);
2425 static HRESULT WINAPI Videowindow_GetMinIdealImageSize(IVideoWindow *iface,
2428 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2430 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pWidth, pHeight);
2435 static HRESULT WINAPI Videowindow_GetMaxIdealImageSize(IVideoWindow *iface,
2438 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2440 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pWidth, pHeight);
2445 static HRESULT WINAPI Videowindow_GetRestorePosition(IVideoWindow *iface,
2450 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2452 TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This, iface, pLeft, pTop, pWidth, pHeight);
2457 static HRESULT WINAPI Videowindow_HideCursor(IVideoWindow *iface,
2459 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2461 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, HideCursor);
2466 static HRESULT WINAPI Videowindow_IsCursorHidden(IVideoWindow *iface,
2467 long *CursorHidden) {
2468 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
2470 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, CursorHidden);
2476 static IVideoWindowVtbl IVideoWindow_VTable =
2478 Videowindow_QueryInterface,
2480 Videowindow_Release,
2481 Videowindow_GetTypeInfoCount,
2482 Videowindow_GetTypeInfo,
2483 Videowindow_GetIDsOfNames,
2485 Videowindow_put_Caption,
2486 Videowindow_get_Caption,
2487 Videowindow_put_WindowStyle,
2488 Videowindow_get_WindowStyle,
2489 Videowindow_put_WindowStyleEx,
2490 Videowindow_get_WindowStyleEx,
2491 Videowindow_put_AutoShow,
2492 Videowindow_get_AutoShow,
2493 Videowindow_put_WindowState,
2494 Videowindow_get_WindowState,
2495 Videowindow_put_BackgroundPalette,
2496 Videowindow_get_BackgroundPalette,
2497 Videowindow_put_Visible,
2498 Videowindow_get_Visible,
2499 Videowindow_put_Left,
2500 Videowindow_get_Left,
2501 Videowindow_put_Width,
2502 Videowindow_get_Width,
2503 Videowindow_put_Top,
2504 Videowindow_get_Top,
2505 Videowindow_put_Height,
2506 Videowindow_get_Height,
2507 Videowindow_put_Owner,
2508 Videowindow_get_Owner,
2509 Videowindow_put_MessageDrain,
2510 Videowindow_get_MessageDrain,
2511 Videowindow_get_BorderColor,
2512 Videowindow_put_BorderColor,
2513 Videowindow_get_FullScreenMode,
2514 Videowindow_put_FullScreenMode,
2515 Videowindow_SetWindowForeground,
2516 Videowindow_NotifyOwnerMessage,
2517 Videowindow_SetWindowPosition,
2518 Videowindow_GetWindowPosition,
2519 Videowindow_GetMinIdealImageSize,
2520 Videowindow_GetMaxIdealImageSize,
2521 Videowindow_GetRestorePosition,
2522 Videowindow_HideCursor,
2523 Videowindow_IsCursorHidden
2527 /*** IUnknown methods ***/
2528 static HRESULT WINAPI Mediaevent_QueryInterface(IMediaEventEx *iface,
2531 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2533 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
2535 return Filtergraph_QueryInterface(This, riid, ppvObj);
2538 static ULONG WINAPI Mediaevent_AddRef(IMediaEventEx *iface) {
2539 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2541 TRACE("(%p/%p)->()\n", This, iface);
2543 return Filtergraph_AddRef(This);
2546 static ULONG WINAPI Mediaevent_Release(IMediaEventEx *iface) {
2547 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2549 TRACE("(%p/%p)->()\n", This, iface);
2551 return Filtergraph_Release(This);
2554 /*** IDispatch methods ***/
2555 static HRESULT WINAPI Mediaevent_GetTypeInfoCount(IMediaEventEx *iface,
2557 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2559 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
2564 static HRESULT WINAPI Mediaevent_GetTypeInfo(IMediaEventEx *iface,
2567 ITypeInfo**ppTInfo) {
2568 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2570 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
2575 static HRESULT WINAPI Mediaevent_GetIDsOfNames(IMediaEventEx *iface,
2581 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2583 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
2588 static HRESULT WINAPI Mediaevent_Invoke(IMediaEventEx *iface,
2589 DISPID dispIdMember,
2593 DISPPARAMS*pDispParams,
2595 EXCEPINFO*pExepInfo,
2597 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2599 TRACE("(%p/%p)->(%ld, %s (%p), %ld, %04x, %p, %p, %p, %p): stub !!!\n", This, iface, dispIdMember, debugstr_guid(riid), riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
2604 /*** IMediaEvent methods ***/
2605 static HRESULT WINAPI Mediaevent_GetEventHandle(IMediaEventEx *iface,
2607 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2609 TRACE("(%p/%p)->(%p)\n", This, iface, hEvent);
2611 *hEvent = (OAEVENT)This->evqueue.msg_event;
2616 static HRESULT WINAPI Mediaevent_GetEvent(IMediaEventEx *iface,
2621 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2624 TRACE("(%p/%p)->(%p, %p, %p, %ld)\n", This, iface, lEventCode, lParam1, lParam2, msTimeout);
2626 if (EventsQueue_GetEvent(&This->evqueue, &evt, msTimeout))
2628 *lEventCode = evt.lEventCode;
2629 *lParam1 = evt.lParam1;
2630 *lParam2 = evt.lParam2;
2638 static HRESULT WINAPI Mediaevent_WaitForCompletion(IMediaEventEx *iface,
2641 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2643 TRACE("(%p/%p)->(%ld, %p)\n", This, iface, msTimeout, pEvCode);
2645 if (WaitForSingleObject(This->hEventCompletion, msTimeout) == WAIT_OBJECT_0)
2647 *pEvCode = This->CompletionStatus;
2655 static HRESULT WINAPI Mediaevent_CancelDefaultHandling(IMediaEventEx *iface,
2657 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2659 TRACE("(%p/%p)->(%ld)\n", This, iface, lEvCode);
2661 if (lEvCode == EC_COMPLETE)
2662 This->HandleEcComplete = FALSE;
2663 else if (lEvCode == EC_REPAINT)
2664 This->HandleEcRepaint = FALSE;
2671 static HRESULT WINAPI Mediaevent_RestoreDefaultHandling(IMediaEventEx *iface,
2673 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2675 TRACE("(%p/%p)->(%ld)\n", This, iface, lEvCode);
2677 if (lEvCode == EC_COMPLETE)
2678 This->HandleEcComplete = TRUE;
2679 else if (lEvCode == EC_REPAINT)
2680 This->HandleEcRepaint = TRUE;
2687 static HRESULT WINAPI Mediaevent_FreeEventParams(IMediaEventEx *iface,
2691 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2693 TRACE("(%p/%p)->(%ld, %08lx, %08lx): stub !!!\n", This, iface, lEvCode, lParam1, lParam2);
2698 /*** IMediaEventEx methods ***/
2699 static HRESULT WINAPI Mediaevent_SetNotifyWindow(IMediaEventEx *iface,
2702 LONG_PTR lInstanceData) {
2703 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2705 TRACE("(%p/%p)->(%08lx, %ld, %08lx)\n", This, iface, (DWORD) hwnd, lMsg, lInstanceData);
2707 This->notif.hWnd = (HWND)hwnd;
2708 This->notif.msg = lMsg;
2709 This->notif.instance = (long) lInstanceData;
2714 static HRESULT WINAPI Mediaevent_SetNotifyFlags(IMediaEventEx *iface,
2715 long lNoNotifyFlags) {
2716 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2718 TRACE("(%p/%p)->(%ld)\n", This, iface, lNoNotifyFlags);
2720 if ((lNoNotifyFlags != 0) || (lNoNotifyFlags != 1))
2721 return E_INVALIDARG;
2723 This->notif.disabled = lNoNotifyFlags;
2728 static HRESULT WINAPI Mediaevent_GetNotifyFlags(IMediaEventEx *iface,
2729 long *lplNoNotifyFlags) {
2730 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2732 TRACE("(%p/%p)->(%p)\n", This, iface, lplNoNotifyFlags);
2734 if (!lplNoNotifyFlags)
2737 *lplNoNotifyFlags = This->notif.disabled;
2743 static IMediaEventExVtbl IMediaEventEx_VTable =
2745 Mediaevent_QueryInterface,
2748 Mediaevent_GetTypeInfoCount,
2749 Mediaevent_GetTypeInfo,
2750 Mediaevent_GetIDsOfNames,
2752 Mediaevent_GetEventHandle,
2753 Mediaevent_GetEvent,
2754 Mediaevent_WaitForCompletion,
2755 Mediaevent_CancelDefaultHandling,
2756 Mediaevent_RestoreDefaultHandling,
2757 Mediaevent_FreeEventParams,
2758 Mediaevent_SetNotifyWindow,
2759 Mediaevent_SetNotifyFlags,
2760 Mediaevent_GetNotifyFlags
2764 static HRESULT WINAPI MediaFilter_QueryInterface(IMediaFilter *iface, REFIID riid, LPVOID *ppv)
2766 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2768 return Filtergraph_QueryInterface(This, riid, ppv);
2771 static ULONG WINAPI MediaFilter_AddRef(IMediaFilter *iface)
2773 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2775 return Filtergraph_AddRef(This);
2778 static ULONG WINAPI MediaFilter_Release(IMediaFilter *iface)
2780 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2782 return Filtergraph_Release(This);
2785 static HRESULT WINAPI MediaFilter_GetClassID(IMediaFilter *iface, CLSID * pClassID)
2787 FIXME("(%p): stub\n", pClassID);
2792 static HRESULT WINAPI MediaFilter_Stop(IMediaFilter *iface)
2794 FIXME("(): stub\n");
2799 static HRESULT WINAPI MediaFilter_Pause(IMediaFilter *iface)
2801 FIXME("(): stub\n");
2806 static HRESULT WINAPI MediaFilter_Run(IMediaFilter *iface, REFERENCE_TIME tStart)
2808 FIXME("(%lld): stub\n", tStart);
2813 static HRESULT WINAPI MediaFilter_GetState(IMediaFilter *iface, DWORD dwMsTimeout, FILTER_STATE * pState)
2815 FIXME("(%ld, %p): stub\n", dwMsTimeout, pState);
2820 static HRESULT WINAPI MediaFilter_SetSyncSource(IMediaFilter *iface, IReferenceClock *pClock)
2822 FIXME("(%p): stub\n", pClock);
2827 static HRESULT WINAPI MediaFilter_GetSyncSource(IMediaFilter *iface, IReferenceClock **ppClock)
2829 FIXME("(%p): stub\n", ppClock);
2834 static IMediaFilterVtbl IMediaFilter_VTable =
2836 MediaFilter_QueryInterface,
2838 MediaFilter_Release,
2839 MediaFilter_GetClassID,
2843 MediaFilter_GetState,
2844 MediaFilter_SetSyncSource,
2845 MediaFilter_GetSyncSource
2848 static HRESULT WINAPI MediaEventSink_QueryInterface(IMediaEventSink *iface, REFIID riid, LPVOID *ppv)
2850 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventSink_vtbl, iface);
2852 return Filtergraph_QueryInterface(This, riid, ppv);
2855 static ULONG WINAPI MediaEventSink_AddRef(IMediaEventSink *iface)
2857 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventSink_vtbl, iface);
2859 return Filtergraph_AddRef(This);
2862 static ULONG WINAPI MediaEventSink_Release(IMediaEventSink *iface)
2864 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventSink_vtbl, iface);
2866 return Filtergraph_Release(This);
2869 static HRESULT WINAPI MediaEventSink_Notify(IMediaEventSink *iface, long EventCode, LONG_PTR EventParam1, LONG_PTR EventParam2)
2871 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventSink_vtbl, iface);
2874 TRACE("(%p/%p)->(%ld, %ld, %ld)\n", This, iface, EventCode, EventParam1, EventParam2);
2876 /* We need thread safety here, let's use the events queue's one */
2877 EnterCriticalSection(&This->evqueue.msg_crst);
2879 if ((EventCode == EC_COMPLETE) && This->HandleEcComplete)
2881 if (++This->EcCompleteCount == This->nRenderers)
2883 evt.lEventCode = EC_COMPLETE;
2886 EventsQueue_PutEvent(&This->evqueue, &evt);
2887 if (!This->notif.disabled && This->notif.hWnd)
2888 PostMessageW(This->notif.hWnd, This->notif.msg, 0, This->notif.instance);
2889 This->CompletionStatus = EC_COMPLETE;
2890 SetEvent(This->hEventCompletion);
2893 else if ((EventCode == EC_REPAINT) && This->HandleEcRepaint)
2895 /* FIXME: Not handled yet */
2899 evt.lEventCode = EventCode;
2900 evt.lParam1 = EventParam1;
2901 evt.lParam2 = EventParam2;
2902 EventsQueue_PutEvent(&This->evqueue, &evt);
2903 if (!This->notif.disabled && This->notif.hWnd)
2904 PostMessageW(This->notif.hWnd, This->notif.msg, 0, This->notif.instance);
2907 LeaveCriticalSection(&This->evqueue.msg_crst);
2911 static IMediaEventSinkVtbl IMediaEventSink_VTable =
2913 MediaEventSink_QueryInterface,
2914 MediaEventSink_AddRef,
2915 MediaEventSink_Release,
2916 MediaEventSink_Notify
2919 /* This is the only function that actually creates a FilterGraph class... */
2920 HRESULT FILTERGRAPH_create(IUnknown *pUnkOuter, LPVOID *ppObj) {
2921 IFilterGraphImpl *fimpl;
2924 TRACE("(%p,%p)\n", pUnkOuter, ppObj);
2927 return CLASS_E_NOAGGREGATION;
2929 fimpl = (IFilterGraphImpl *) HeapAlloc(GetProcessHeap(), 0, sizeof(*fimpl));
2930 fimpl->IGraphBuilder_vtbl = &IGraphBuilder_VTable;
2931 fimpl->IMediaControl_vtbl = &IMediaControl_VTable;
2932 fimpl->IMediaSeeking_vtbl = &IMediaSeeking_VTable;
2933 fimpl->IBasicAudio_vtbl = &IBasicAudio_VTable;
2934 fimpl->IBasicVideo_vtbl = &IBasicVideo_VTable;
2935 fimpl->IVideoWindow_vtbl = &IVideoWindow_VTable;
2936 fimpl->IMediaEventEx_vtbl = &IMediaEventEx_VTable;
2937 fimpl->IMediaFilter_vtbl = &IMediaFilter_VTable;
2938 fimpl->IMediaEventSink_vtbl = &IMediaEventSink_VTable;
2940 fimpl->ppFiltersInGraph = NULL;
2941 fimpl->pFilterNames = NULL;
2942 fimpl->nFilters = 0;
2943 fimpl->filterCapacity = 0;
2944 fimpl->nameIndex = 1;
2945 fimpl->hEventCompletion = CreateEventW(0, TRUE, FALSE,0);
2946 fimpl->HandleEcComplete = TRUE;
2947 fimpl->HandleEcRepaint = TRUE;
2948 fimpl->notif.hWnd = 0;
2949 fimpl->notif.disabled = TRUE;
2950 fimpl->nRenderers = 0;
2951 fimpl->EcCompleteCount = 0;
2952 EventsQueue_Init(&fimpl->evqueue);
2954 hr = CoCreateInstance(&CLSID_FilterMapper, NULL, CLSCTX_INPROC_SERVER, &IID_IFilterMapper2, (LPVOID*)&fimpl->pFilterMapper2);
2956 ERR("Unable to create filter mapper (%lx)\n", hr);