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
30 #include "wine/debug.h"
34 #include "wine/unicode.h"
36 #include "quartz_private.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(quartz);
41 HWND hWnd; /* Target window */
42 long msg; /* User window message */
43 long instance; /* User data */
44 int disabled; /* Disabled messages posting */
48 long lEventCode; /* Event code */
49 LONG_PTR lParam1; /* Param1 */
50 LONG_PTR lParam2; /* Param2 */
53 /* messages ring implementation for queuing events (taken from winmm) */
54 #define EVENTS_RING_BUFFER_INCREMENT 64
60 CRITICAL_SECTION msg_crst;
61 HANDLE msg_event; /* Signaled for no empty queue */
64 static int EventsQueue_Init(EventsQueue* omr)
68 omr->msg_event = CreateEventW(NULL, TRUE, FALSE, NULL);
69 omr->ring_buffer_size = EVENTS_RING_BUFFER_INCREMENT;
70 omr->messages = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,omr->ring_buffer_size * sizeof(Event));
72 InitializeCriticalSection(&omr->msg_crst);
76 static int EventsQueue_Destroy(EventsQueue* omr)
78 CloseHandle(omr->msg_event);
79 HeapFree(GetProcessHeap(),0,omr->messages);
80 DeleteCriticalSection(&omr->msg_crst);
84 static int EventsQueue_PutEvent(EventsQueue* omr, Event* evt)
86 EnterCriticalSection(&omr->msg_crst);
87 if ((omr->msg_toget == ((omr->msg_tosave + 1) % omr->ring_buffer_size)))
89 int old_ring_buffer_size = omr->ring_buffer_size;
90 omr->ring_buffer_size += EVENTS_RING_BUFFER_INCREMENT;
91 TRACE("omr->ring_buffer_size=%d\n",omr->ring_buffer_size);
92 omr->messages = HeapReAlloc(GetProcessHeap(),0,omr->messages, omr->ring_buffer_size * sizeof(Event));
93 /* Now we need to rearrange the ring buffer so that the new
94 buffers just allocated are in between omr->msg_tosave and
97 if (omr->msg_tosave < omr->msg_toget)
99 memmove(&(omr->messages[omr->msg_toget + EVENTS_RING_BUFFER_INCREMENT]),
100 &(omr->messages[omr->msg_toget]),
101 sizeof(Event)*(old_ring_buffer_size - omr->msg_toget)
103 omr->msg_toget += EVENTS_RING_BUFFER_INCREMENT;
106 omr->messages[omr->msg_tosave] = *evt;
107 SetEvent(omr->msg_event);
108 omr->msg_tosave = (omr->msg_tosave + 1) % omr->ring_buffer_size;
109 LeaveCriticalSection(&omr->msg_crst);
113 static int EventsQueue_GetEvent(EventsQueue* omr, Event* evt, long msTimeOut)
115 if (WaitForSingleObject(omr->msg_event, msTimeOut) != WAIT_OBJECT_0)
118 EnterCriticalSection(&omr->msg_crst);
120 if (omr->msg_toget == omr->msg_tosave) /* buffer empty ? */
122 LeaveCriticalSection(&omr->msg_crst);
126 *evt = omr->messages[omr->msg_toget];
127 omr->msg_toget = (omr->msg_toget + 1) % omr->ring_buffer_size;
129 /* Mark the buffer as empty if needed */
130 if (omr->msg_toget == omr->msg_tosave) /* buffer empty ? */
131 ResetEvent(omr->msg_event);
133 LeaveCriticalSection(&omr->msg_crst);
137 typedef struct _IFilterGraphImpl {
138 ICOM_VTABLE(IGraphBuilder) *IGraphBuilder_vtbl;
139 ICOM_VTABLE(IMediaControl) *IMediaControl_vtbl;
140 ICOM_VTABLE(IMediaSeeking) *IMediaSeeking_vtbl;
141 ICOM_VTABLE(IBasicAudio) *IBasicAudio_vtbl;
142 ICOM_VTABLE(IBasicVideo) *IBasicVideo_vtbl;
143 ICOM_VTABLE(IVideoWindow) *IVideoWindow_vtbl;
144 ICOM_VTABLE(IMediaEventEx) *IMediaEventEx_vtbl;
145 ICOM_VTABLE(IMediaFilter) *IMediaFilter_vtbl;
146 ICOM_VTABLE(IMediaEventSink) *IMediaEventSink_vtbl;
147 /* IAMGraphStreams */
157 /* IRegisterServiceProvider */
158 /* IResourceMananger */
159 /* IServiceProvider */
160 /* IVideoFrameStep */
163 IBaseFilter ** ppFiltersInGraph;
164 LPWSTR * pFilterNames;
169 HANDLE hEventCompletion;
170 int CompletionStatus;
174 int HandleEcComplete;
179 static HRESULT Filtergraph_QueryInterface(IFilterGraphImpl *This,
182 TRACE("(%p)->(%s (%p), %p)\n", This, debugstr_guid(riid), riid, ppvObj);
184 if (IsEqualGUID(&IID_IUnknown, riid) ||
185 IsEqualGUID(&IID_IGraphBuilder, riid)) {
186 *ppvObj = &(This->IGraphBuilder_vtbl);
187 TRACE(" returning IGraphBuilder interface (%p)\n", *ppvObj);
188 } else if (IsEqualGUID(&IID_IMediaControl, riid)) {
189 *ppvObj = &(This->IMediaControl_vtbl);
190 TRACE(" returning IMediaControl interface (%p)\n", *ppvObj);
191 } else if (IsEqualGUID(&IID_IMediaSeeking, riid)) {
192 *ppvObj = &(This->IMediaSeeking_vtbl);
193 TRACE(" returning IMediaSeeking interface (%p)\n", *ppvObj);
194 } else if (IsEqualGUID(&IID_IBasicAudio, riid)) {
195 *ppvObj = &(This->IBasicAudio_vtbl);
196 TRACE(" returning IBasicAudio interface (%p)\n", *ppvObj);
197 } else if (IsEqualGUID(&IID_IBasicVideo, riid)) {
198 *ppvObj = &(This->IBasicVideo_vtbl);
199 TRACE(" returning IBasicVideo interface (%p)\n", *ppvObj);
200 } else if (IsEqualGUID(&IID_IVideoWindow, riid)) {
201 *ppvObj = &(This->IVideoWindow_vtbl);
202 TRACE(" returning IVideoWindow interface (%p)\n", *ppvObj);
203 } else if (IsEqualGUID(&IID_IMediaEvent, riid) ||
204 IsEqualGUID(&IID_IMediaEventEx, riid)) {
205 *ppvObj = &(This->IMediaEventEx_vtbl);
206 TRACE(" returning IMediaEvent(Ex) interface (%p)\n", *ppvObj);
207 } else if (IsEqualGUID(&IID_IMediaFilter, riid) ||
208 IsEqualGUID(&IID_IPersist, riid)) {
209 *ppvObj = &(This->IMediaFilter_vtbl);
210 TRACE(" returning IMediaFilter interface (%p)\n", *ppvObj);
211 } else if (IsEqualGUID(&IID_IMediaEventSink, riid)) {
212 *ppvObj = &(This->IMediaEventSink_vtbl);
213 TRACE(" returning IMediaEventSink interface (%p)\n", *ppvObj);
216 FIXME("unknown interface %s\n", debugstr_guid(riid));
217 return E_NOINTERFACE;
224 static ULONG Filtergraph_AddRef(IFilterGraphImpl *This) {
225 TRACE("(%p)->(): new ref = %ld\n", This, This->ref + 1);
230 static ULONG Filtergraph_Release(IFilterGraphImpl *This) {
233 TRACE("(%p)->(): new ref = %ld\n", This, This->ref - 1);
237 CloseHandle(This->hEventCompletion);
238 EventsQueue_Destroy(&This->evqueue);
239 HeapFree(GetProcessHeap(), 0, This->ppFiltersInGraph);
240 HeapFree(GetProcessHeap(), 0, This->pFilterNames);
241 HeapFree(GetProcessHeap(), 0, This);
247 /*** IUnknown methods ***/
248 static HRESULT WINAPI Graphbuilder_QueryInterface(IGraphBuilder *iface,
251 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
253 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
254 return Filtergraph_QueryInterface(This, riid, ppvObj);
257 static ULONG WINAPI Graphbuilder_AddRef(IGraphBuilder *iface) {
258 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
260 TRACE("(%p/%p)->() calling FilterGraph AddRef\n", This, iface);
262 return Filtergraph_AddRef(This);
265 static ULONG WINAPI Graphbuilder_Release(IGraphBuilder *iface) {
266 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
268 TRACE("(%p/%p)->() calling FilterGraph Release\n", This, iface);
270 return Filtergraph_Release(This);
273 /*** IFilterGraph methods ***/
274 static HRESULT WINAPI Graphbuilder_AddFilter(IGraphBuilder *iface,
275 IBaseFilter *pFilter,
277 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
280 WCHAR* wszFilterName = NULL;
281 int duplicate_name = FALSE;
283 TRACE("(%p/%p)->(%p, %s (%p))\n", This, iface, pFilter, debugstr_w(pName), pName);
285 wszFilterName = (WCHAR*) CoTaskMemAlloc( (pName ? strlenW(pName) + 6 : 5) * sizeof(WCHAR) );
289 /* Check if name already exists */
290 for(i = 0; i < This->nFilters; i++)
291 if (!strcmpW(This->pFilterNames[i], pName))
293 duplicate_name = TRUE;
298 /* If no name given or name already existing, generate one */
299 if (!pName || duplicate_name)
301 static const WCHAR wszFmt1[] = {'%','s',' ','%','0','4','d',0};
302 static const WCHAR wszFmt2[] = {'%','0','4','d',0};
304 for (j = 0; j < 10000 ; j++)
308 sprintfW(wszFilterName, wszFmt1, pName, This->nameIndex);
310 sprintfW(wszFilterName, wszFmt2, This->nameIndex);
311 TRACE("Generated name %s\n", debugstr_w(wszFilterName));
313 /* Check if the generated name already exists */
314 for(i = 0; i < This->nFilters; i++)
315 if (!strcmpW(This->pFilterNames[i], pName))
318 /* Compute next index and exit if generated name is suitable */
319 if (This->nameIndex++ == 10000)
321 if (i == This->nFilters)
324 /* Unable to find a suitable name */
327 CoTaskMemFree(wszFilterName);
328 return VFW_E_DUPLICATE_NAME;
332 memcpy(wszFilterName, pName, (strlenW(pName) + 1) * sizeof(WCHAR));
335 if (This->nFilters + 1 > This->filterCapacity)
337 int newCapacity = 2*This->filterCapacity;
338 IBaseFilter ** ppNewFilters = CoTaskMemAlloc(newCapacity * sizeof(IBaseFilter*));
339 LPWSTR * pNewNames = CoTaskMemAlloc(newCapacity * sizeof(LPWSTR));
340 memcpy(ppNewFilters, This->ppFiltersInGraph, This->nFilters * sizeof(IBaseFilter*));
341 memcpy(pNewNames, This->pFilterNames, This->nFilters * sizeof(LPWSTR));
342 CoTaskMemFree(This->ppFiltersInGraph);
343 CoTaskMemFree(This->pFilterNames);
344 This->ppFiltersInGraph = ppNewFilters;
345 This->pFilterNames = pNewNames;
346 This->filterCapacity = newCapacity;
349 hr = IBaseFilter_JoinFilterGraph(pFilter, (IFilterGraph *)This, wszFilterName);
353 IBaseFilter_AddRef(pFilter);
354 This->ppFiltersInGraph[This->nFilters] = pFilter;
355 This->pFilterNames[This->nFilters] = wszFilterName;
359 CoTaskMemFree(wszFilterName);
361 if (SUCCEEDED(hr) && duplicate_name)
362 return VFW_S_DUPLICATE_NAME;
367 static HRESULT WINAPI Graphbuilder_RemoveFilter(IGraphBuilder *iface,
368 IBaseFilter *pFilter) {
369 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
373 TRACE("(%p/%p)->(%p)\n", This, iface, pFilter);
375 /* FIXME: check graph is stopped */
377 for (i = 0; i < This->nFilters; i++)
379 if (This->ppFiltersInGraph[i] == pFilter)
381 /* FIXME: disconnect pins */
382 hr = IBaseFilter_JoinFilterGraph(pFilter, NULL, This->pFilterNames[i]);
385 IPin_Release(pFilter);
386 CoTaskMemFree(This->pFilterNames[i]);
387 memmove(This->ppFiltersInGraph+i, This->ppFiltersInGraph+i+1, sizeof(IBaseFilter*)*(This->nFilters - 1 - i));
388 memmove(This->pFilterNames+i, This->pFilterNames+i+1, sizeof(LPWSTR)*(This->nFilters - 1 - i));
396 return hr; /* FIXME: check this error code */
399 static HRESULT WINAPI Graphbuilder_EnumFilters(IGraphBuilder *iface,
400 IEnumFilters **ppEnum) {
401 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
403 TRACE("(%p/%p)->(%p)\n", This, iface, ppEnum);
405 return IEnumFiltersImpl_Construct(This->ppFiltersInGraph, This->nFilters, ppEnum);
408 static HRESULT WINAPI Graphbuilder_FindFilterByName(IGraphBuilder *iface,
410 IBaseFilter **ppFilter) {
411 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
414 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_w(pName), pName, ppFilter);
418 for (i = 0; i < This->nFilters; i++)
420 if (!strcmpW(pName, This->pFilterNames[i]))
422 *ppFilter = This->ppFiltersInGraph[i];
423 IBaseFilter_AddRef(*ppFilter);
428 return E_FAIL; /* FIXME: check this error code */
431 /* NOTE: despite the implication, it doesn't matter which
432 * way round you put in the input and output pins */
433 static HRESULT WINAPI Graphbuilder_ConnectDirect(IGraphBuilder *iface,
436 const AM_MEDIA_TYPE *pmt) {
440 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
442 TRACE("(%p/%p)->(%p, %p, %p)\n", This, iface, ppinIn, ppinOut, pmt);
444 /* FIXME: check pins are in graph */
446 hr = IPin_QueryDirection(ppinIn, &dir);
449 if (dir == PINDIR_INPUT)
450 hr = IPin_Connect(ppinOut, ppinIn, pmt);
452 hr = IPin_Connect(ppinIn, ppinOut, pmt);
458 static HRESULT WINAPI Graphbuilder_Reconnect(IGraphBuilder *iface,
460 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
462 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, ppin);
467 static HRESULT WINAPI Graphbuilder_Disconnect(IGraphBuilder *iface,
469 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
471 TRACE("(%p/%p)->(%p)\n", This, iface, ppin);
473 return IPin_Disconnect(ppin);
476 static HRESULT WINAPI Graphbuilder_SetDefaultSyncSource(IGraphBuilder *iface) {
477 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
479 TRACE("(%p/%p)->(): stub !!!\n", iface, This);
484 /*** IGraphBuilder methods ***/
485 static HRESULT WINAPI Graphbuilder_Connect(IGraphBuilder *iface,
488 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
490 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, ppinOut, ppinIn);
495 static HRESULT WINAPI Graphbuilder_Render(IGraphBuilder *iface,
497 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
499 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, ppinOut);
504 static HRESULT WINAPI Graphbuilder_RenderFile(IGraphBuilder *iface,
506 LPCWSTR lpcwstrPlayList) {
507 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
509 TRACE("(%p/%p)->(%s (%p), %s (%p)): stub !!!\n", This, iface, debugstr_w(lpcwstrFile), lpcwstrFile, debugstr_w(lpcwstrPlayList), lpcwstrPlayList);
514 static HRESULT WINAPI Graphbuilder_AddSourceFilter(IGraphBuilder *iface,
515 LPCWSTR lpcwstrFileName,
516 LPCWSTR lpcwstrFilterName,
517 IBaseFilter **ppFilter) {
518 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
520 TRACE("(%p/%p)->(%s (%p), %s (%p), %p): stub !!!\n", This, iface, debugstr_w(lpcwstrFileName), lpcwstrFileName, debugstr_w(lpcwstrFilterName), lpcwstrFilterName, ppFilter);
525 static HRESULT WINAPI Graphbuilder_SetLogFile(IGraphBuilder *iface,
527 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
529 TRACE("(%p/%p)->(%08lx): stub !!!\n", This, iface, (DWORD) hFile);
534 static HRESULT WINAPI Graphbuilder_Abort(IGraphBuilder *iface) {
535 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
537 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
542 static HRESULT WINAPI Graphbuilder_ShouldOperationContinue(IGraphBuilder *iface) {
543 ICOM_THIS_MULTI(IFilterGraphImpl, IGraphBuilder_vtbl, iface);
545 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
551 static ICOM_VTABLE(IGraphBuilder) IGraphBuilder_VTable =
553 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
554 Graphbuilder_QueryInterface,
556 Graphbuilder_Release,
557 Graphbuilder_AddFilter,
558 Graphbuilder_RemoveFilter,
559 Graphbuilder_EnumFilters,
560 Graphbuilder_FindFilterByName,
561 Graphbuilder_ConnectDirect,
562 Graphbuilder_Reconnect,
563 Graphbuilder_Disconnect,
564 Graphbuilder_SetDefaultSyncSource,
565 Graphbuilder_Connect,
567 Graphbuilder_RenderFile,
568 Graphbuilder_AddSourceFilter,
569 Graphbuilder_SetLogFile,
571 Graphbuilder_ShouldOperationContinue
574 /*** IUnknown methods ***/
575 static HRESULT WINAPI Mediacontrol_QueryInterface(IMediaControl *iface,
578 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
580 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
582 return Filtergraph_QueryInterface(This, riid, ppvObj);
585 static ULONG WINAPI Mediacontrol_AddRef(IMediaControl *iface) {
586 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
588 TRACE("(%p/%p)->()\n", This, iface);
590 return Filtergraph_AddRef(This);
593 static ULONG WINAPI Mediacontrol_Release(IMediaControl *iface) {
594 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
596 TRACE("(%p/%p)->()\n", This, iface);
598 return Filtergraph_Release(This);
602 /*** IDispatch methods ***/
603 static HRESULT WINAPI Mediacontrol_GetTypeInfoCount(IMediaControl *iface,
605 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
607 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
612 static HRESULT WINAPI Mediacontrol_GetTypeInfo(IMediaControl *iface,
615 ITypeInfo**ppTInfo) {
616 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
618 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
623 static HRESULT WINAPI Mediacontrol_GetIDsOfNames(IMediaControl *iface,
629 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
631 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
636 static HRESULT WINAPI Mediacontrol_Invoke(IMediaControl *iface,
641 DISPPARAMS*pDispParams,
645 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
647 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);
652 /*** IMediaControl methods ***/
653 static HRESULT WINAPI Mediacontrol_Run(IMediaControl *iface) {
654 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
656 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
658 ResetEvent(This->hEventCompletion);
663 static HRESULT WINAPI Mediacontrol_Pause(IMediaControl *iface) {
664 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
666 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
671 static HRESULT WINAPI Mediacontrol_Stop(IMediaControl *iface) {
672 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
674 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
679 static HRESULT WINAPI Mediacontrol_GetState(IMediaControl *iface,
681 OAFilterState *pfs) {
682 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
684 TRACE("(%p/%p)->(%ld, %p): stub !!!\n", This, iface, msTimeout, pfs);
689 static HRESULT WINAPI Mediacontrol_RenderFile(IMediaControl *iface,
691 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
693 TRACE("(%p/%p)->(%s (%p)): stub !!!\n", This, iface, debugstr_w(strFilename), strFilename);
698 static HRESULT WINAPI Mediacontrol_AddSourceFilter(IMediaControl *iface,
701 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
703 TRACE("(%p/%p)->(%s (%p), %p): stub !!!\n", This, iface, debugstr_w(strFilename), strFilename, ppUnk);
708 static HRESULT WINAPI Mediacontrol_get_FilterCollection(IMediaControl *iface,
710 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
712 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, ppUnk);
717 static HRESULT WINAPI Mediacontrol_get_RegFilterCollection(IMediaControl *iface,
719 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
721 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, ppUnk);
726 static HRESULT WINAPI Mediacontrol_StopWhenReady(IMediaControl *iface) {
727 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaControl_vtbl, iface);
729 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
735 static ICOM_VTABLE(IMediaControl) IMediaControl_VTable =
737 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
738 Mediacontrol_QueryInterface,
740 Mediacontrol_Release,
741 Mediacontrol_GetTypeInfoCount,
742 Mediacontrol_GetTypeInfo,
743 Mediacontrol_GetIDsOfNames,
748 Mediacontrol_GetState,
749 Mediacontrol_RenderFile,
750 Mediacontrol_AddSourceFilter,
751 Mediacontrol_get_FilterCollection,
752 Mediacontrol_get_RegFilterCollection,
753 Mediacontrol_StopWhenReady
757 /*** IUnknown methods ***/
758 static HRESULT WINAPI Mediaseeking_QueryInterface(IMediaSeeking *iface,
761 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
763 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
765 return Filtergraph_QueryInterface(This, riid, ppvObj);
768 static ULONG WINAPI Mediaseeking_AddRef(IMediaSeeking *iface) {
769 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
771 TRACE("(%p/%p)->()\n", This, iface);
773 return Filtergraph_AddRef(This);
776 static ULONG WINAPI Mediaseeking_Release(IMediaSeeking *iface) {
777 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
779 TRACE("(%p/%p)->()\n", This, iface);
781 return Filtergraph_Release(This);
784 /*** IMediaSeeking methods ***/
785 static HRESULT WINAPI Mediaseeking_GetCapabilities(IMediaSeeking *iface,
786 DWORD *pCapabilities) {
787 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
789 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pCapabilities);
794 static HRESULT WINAPI Mediaseeking_CheckCapabilities(IMediaSeeking *iface,
795 DWORD *pCapabilities) {
796 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
798 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pCapabilities);
803 static HRESULT WINAPI Mediaseeking_IsFormatSupported(IMediaSeeking *iface,
804 const GUID *pFormat) {
805 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
807 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pFormat);
812 static HRESULT WINAPI Mediaseeking_QueryPreferredFormat(IMediaSeeking *iface,
814 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
816 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pFormat);
821 static HRESULT WINAPI Mediaseeking_GetTimeFormat(IMediaSeeking *iface,
823 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
825 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pFormat);
830 static HRESULT WINAPI Mediaseeking_IsUsingTimeFormat(IMediaSeeking *iface,
831 const GUID *pFormat) {
832 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
834 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pFormat);
839 static HRESULT WINAPI Mediaseeking_SetTimeFormat(IMediaSeeking *iface,
840 const GUID *pFormat) {
841 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
843 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pFormat);
848 static HRESULT WINAPI Mediaseeking_GetDuration(IMediaSeeking *iface,
849 LONGLONG *pDuration) {
850 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
852 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pDuration);
857 static HRESULT WINAPI Mediaseeking_GetStopPosition(IMediaSeeking *iface,
859 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
861 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pStop);
866 static HRESULT WINAPI Mediaseeking_GetCurrentPosition(IMediaSeeking *iface,
867 LONGLONG *pCurrent) {
868 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
870 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pCurrent);
875 static HRESULT WINAPI Mediaseeking_ConvertTimeFormat(IMediaSeeking *iface,
877 const GUID *pTargetFormat,
879 const GUID *pSourceFormat) {
880 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
882 TRACE("(%p/%p)->(%p, %p, %lld, %p): stub !!!\n", This, iface, pTarget, pTargetFormat, Source, pSourceFormat);
887 static HRESULT WINAPI Mediaseeking_SetPositions(IMediaSeeking *iface,
889 DWORD dwCurrentFlags,
892 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
894 TRACE("(%p/%p)->(%p, %08lx, %p, %08lx): stub !!!\n", This, iface, pCurrent, dwCurrentFlags, pStop, dwStopFlags);
899 static HRESULT WINAPI Mediaseeking_GetPositions(IMediaSeeking *iface,
902 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
904 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pCurrent, pStop);
909 static HRESULT WINAPI Mediaseeking_GetAvailable(IMediaSeeking *iface,
912 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
914 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pEarliest, pLatest);
919 static HRESULT WINAPI Mediaseeking_SetRate(IMediaSeeking *iface,
921 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
923 TRACE("(%p/%p)->(%f): stub !!!\n", This, iface, dRate);
928 static HRESULT WINAPI Mediaseeking_GetRate(IMediaSeeking *iface,
930 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
932 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pdRate);
937 static HRESULT WINAPI Mediaseeking_GetPreroll(IMediaSeeking *iface,
938 LONGLONG *pllPreroll) {
939 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaSeeking_vtbl, iface);
941 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pllPreroll);
947 static ICOM_VTABLE(IMediaSeeking) IMediaSeeking_VTable =
949 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
950 Mediaseeking_QueryInterface,
952 Mediaseeking_Release,
953 Mediaseeking_GetCapabilities,
954 Mediaseeking_CheckCapabilities,
955 Mediaseeking_IsFormatSupported,
956 Mediaseeking_QueryPreferredFormat,
957 Mediaseeking_GetTimeFormat,
958 Mediaseeking_IsUsingTimeFormat,
959 Mediaseeking_SetTimeFormat,
960 Mediaseeking_GetDuration,
961 Mediaseeking_GetStopPosition,
962 Mediaseeking_GetCurrentPosition,
963 Mediaseeking_ConvertTimeFormat,
964 Mediaseeking_SetPositions,
965 Mediaseeking_GetPositions,
966 Mediaseeking_GetAvailable,
967 Mediaseeking_SetRate,
968 Mediaseeking_GetRate,
969 Mediaseeking_GetPreroll
972 /*** IUnknown methods ***/
973 static HRESULT WINAPI Basicaudio_QueryInterface(IBasicAudio *iface,
976 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
978 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
980 return Filtergraph_QueryInterface(This, riid, ppvObj);
983 static ULONG WINAPI Basicaudio_AddRef(IBasicAudio *iface) {
984 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
986 TRACE("(%p/%p)->()\n", This, iface);
988 return Filtergraph_AddRef(This);
991 static ULONG WINAPI Basicaudio_Release(IBasicAudio *iface) {
992 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
994 TRACE("(%p/%p)->()\n", This, iface);
996 return Filtergraph_Release(This);
999 /*** IDispatch methods ***/
1000 static HRESULT WINAPI Basicaudio_GetTypeInfoCount(IBasicAudio *iface,
1002 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1004 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
1009 static HRESULT WINAPI Basicaudio_GetTypeInfo(IBasicAudio *iface,
1012 ITypeInfo**ppTInfo) {
1013 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1015 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
1020 static HRESULT WINAPI Basicaudio_GetIDsOfNames(IBasicAudio *iface,
1026 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1028 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
1033 static HRESULT WINAPI Basicaudio_Invoke(IBasicAudio *iface,
1034 DISPID dispIdMember,
1038 DISPPARAMS*pDispParams,
1040 EXCEPINFO*pExepInfo,
1042 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1044 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);
1049 /*** IBasicAudio methods ***/
1050 static HRESULT WINAPI Basicaudio_put_Volume(IBasicAudio *iface,
1052 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1054 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, lVolume);
1059 static HRESULT WINAPI Basicaudio_get_Volume(IBasicAudio *iface,
1061 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1063 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, plVolume);
1068 static HRESULT WINAPI Basicaudio_put_Balance(IBasicAudio *iface,
1070 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1072 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, lBalance);
1077 static HRESULT WINAPI Basicaudio_get_Balance(IBasicAudio *iface,
1079 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicAudio_vtbl, iface);
1081 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, plBalance);
1086 static ICOM_VTABLE(IBasicAudio) IBasicAudio_VTable =
1088 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1089 Basicaudio_QueryInterface,
1092 Basicaudio_GetTypeInfoCount,
1093 Basicaudio_GetTypeInfo,
1094 Basicaudio_GetIDsOfNames,
1096 Basicaudio_put_Volume,
1097 Basicaudio_get_Volume,
1098 Basicaudio_put_Balance,
1099 Basicaudio_get_Balance
1102 /*** IUnknown methods ***/
1103 static HRESULT WINAPI Basicvideo_QueryInterface(IBasicVideo *iface,
1106 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1108 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
1110 return Filtergraph_QueryInterface(This, riid, ppvObj);
1113 static ULONG WINAPI Basicvideo_AddRef(IBasicVideo *iface) {
1114 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1116 TRACE("(%p/%p)->()\n", This, iface);
1118 return Filtergraph_AddRef(This);
1121 static ULONG WINAPI Basicvideo_Release(IBasicVideo *iface) {
1122 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1124 TRACE("(%p/%p)->()\n", This, iface);
1126 return Filtergraph_Release(This);
1129 /*** IDispatch methods ***/
1130 static HRESULT WINAPI Basicvideo_GetTypeInfoCount(IBasicVideo *iface,
1132 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1134 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
1139 static HRESULT WINAPI Basicvideo_GetTypeInfo(IBasicVideo *iface,
1142 ITypeInfo**ppTInfo) {
1143 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1145 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
1150 static HRESULT WINAPI Basicvideo_GetIDsOfNames(IBasicVideo *iface,
1156 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1158 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
1163 static HRESULT WINAPI Basicvideo_Invoke(IBasicVideo *iface,
1164 DISPID dispIdMember,
1168 DISPPARAMS*pDispParams,
1170 EXCEPINFO*pExepInfo,
1172 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1174 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);
1179 /*** IBasicVideo methods ***/
1180 static HRESULT WINAPI Basicvideo_get_AvgTimePerFrame(IBasicVideo *iface,
1181 REFTIME *pAvgTimePerFrame) {
1182 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1184 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pAvgTimePerFrame);
1189 static HRESULT WINAPI Basicvideo_get_BitRate(IBasicVideo *iface,
1191 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1193 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pBitRate);
1198 static HRESULT WINAPI Basicvideo_get_BitErrorRate(IBasicVideo *iface,
1199 long *pBitErrorRate) {
1200 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1202 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pBitErrorRate);
1207 static HRESULT WINAPI Basicvideo_get_VideoWidth(IBasicVideo *iface,
1208 long *pVideoWidth) {
1209 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1211 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pVideoWidth);
1216 static HRESULT WINAPI Basicvideo_get_VideoHeight(IBasicVideo *iface,
1217 long *pVideoHeight) {
1218 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1220 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pVideoHeight);
1225 static HRESULT WINAPI Basicvideo_put_SourceLeft(IBasicVideo *iface,
1227 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1229 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, SourceLeft);
1234 static HRESULT WINAPI Basicvideo_get_SourceLeft(IBasicVideo *iface,
1235 long *pSourceLeft) {
1236 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1238 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pSourceLeft);
1243 static HRESULT WINAPI Basicvideo_put_SourceWidth(IBasicVideo *iface,
1245 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1247 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, SourceWidth);
1252 static HRESULT WINAPI Basicvideo_get_SourceWidth(IBasicVideo *iface,
1253 long *pSourceWidth) {
1254 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1256 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pSourceWidth);
1261 static HRESULT WINAPI Basicvideo_put_SourceTop(IBasicVideo *iface,
1263 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1265 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, SourceTop);
1270 static HRESULT WINAPI Basicvideo_get_SourceTop(IBasicVideo *iface,
1272 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1274 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pSourceTop);
1279 static HRESULT WINAPI Basicvideo_put_SourceHeight(IBasicVideo *iface,
1280 long SourceHeight) {
1281 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1283 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, SourceHeight);
1288 static HRESULT WINAPI Basicvideo_get_SourceHeight(IBasicVideo *iface,
1289 long *pSourceHeight) {
1290 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1292 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pSourceHeight);
1297 static HRESULT WINAPI Basicvideo_put_DestinationLeft(IBasicVideo *iface,
1298 long DestinationLeft) {
1299 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1301 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, DestinationLeft);
1306 static HRESULT WINAPI Basicvideo_get_DestinationLeft(IBasicVideo *iface,
1307 long *pDestinationLeft) {
1308 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1310 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pDestinationLeft);
1315 static HRESULT WINAPI Basicvideo_put_DestinationWidth(IBasicVideo *iface,
1316 long DestinationWidth) {
1317 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1319 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, DestinationWidth);
1324 static HRESULT WINAPI Basicvideo_get_DestinationWidth(IBasicVideo *iface,
1325 long *pDestinationWidth) {
1326 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1328 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pDestinationWidth);
1333 static HRESULT WINAPI Basicvideo_put_DestinationTop(IBasicVideo *iface,
1334 long DestinationTop) {
1335 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1337 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, DestinationTop);
1342 static HRESULT WINAPI Basicvideo_get_DestinationTop(IBasicVideo *iface,
1343 long *pDestinationTop) {
1344 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1346 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pDestinationTop);
1351 static HRESULT WINAPI Basicvideo_put_DestinationHeight(IBasicVideo *iface,
1352 long DestinationHeight) {
1353 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1355 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, DestinationHeight);
1360 static HRESULT WINAPI Basicvideo_get_DestinationHeight(IBasicVideo *iface,
1361 long *pDestinationHeight) {
1362 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1364 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pDestinationHeight);
1369 static HRESULT WINAPI Basicvideo_SetSourcePosition(IBasicVideo *iface,
1374 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1376 TRACE("(%p/%p)->(%ld, %ld, %ld, %ld): stub !!!\n", This, iface, Left, Top, Width, Height);
1381 static HRESULT WINAPI Basicvideo_GetSourcePosition(IBasicVideo *iface,
1386 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1388 TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This, iface, pLeft, pTop, pWidth, pHeight);
1393 static HRESULT WINAPI Basicvideo_SetDefaultSourcePosition(IBasicVideo *iface) {
1394 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1396 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1401 static HRESULT WINAPI Basicvideo_SetDestinationPosition(IBasicVideo *iface,
1406 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1408 TRACE("(%p/%p)->(%ld, %ld, %ld, %ld): stub !!!\n", This, iface, Left, Top, Width, Height);
1413 static HRESULT WINAPI Basicvideo_GetDestinationPosition(IBasicVideo *iface,
1418 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1420 TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This, iface, pLeft, pTop, pWidth, pHeight);
1425 static HRESULT WINAPI Basicvideo_SetDefaultDestinationPosition(IBasicVideo *iface) {
1426 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1428 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1433 static HRESULT WINAPI Basicvideo_GetVideoSize(IBasicVideo *iface,
1436 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1438 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pWidth, pHeight);
1443 static HRESULT WINAPI Basicvideo_GetVideoPaletteEntries(IBasicVideo *iface,
1448 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1450 TRACE("(%p/%p)->(%ld, %ld, %p, %p): stub !!!\n", This, iface, StartIndex, Entries, pRetrieved, pPalette);
1455 static HRESULT WINAPI Basicvideo_GetCurrentImage(IBasicVideo *iface,
1458 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1460 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pBufferSize, pDIBImage);
1465 static HRESULT WINAPI Basicvideo_IsUsingDefaultSource(IBasicVideo *iface) {
1466 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1468 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1473 static HRESULT WINAPI Basicvideo_IsUsingDefaultDestination(IBasicVideo *iface) {
1474 ICOM_THIS_MULTI(IFilterGraphImpl, IBasicVideo_vtbl, iface);
1476 TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1482 static ICOM_VTABLE(IBasicVideo) IBasicVideo_VTable =
1484 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1485 Basicvideo_QueryInterface,
1488 Basicvideo_GetTypeInfoCount,
1489 Basicvideo_GetTypeInfo,
1490 Basicvideo_GetIDsOfNames,
1492 Basicvideo_get_AvgTimePerFrame,
1493 Basicvideo_get_BitRate,
1494 Basicvideo_get_BitErrorRate,
1495 Basicvideo_get_VideoWidth,
1496 Basicvideo_get_VideoHeight,
1497 Basicvideo_put_SourceLeft,
1498 Basicvideo_get_SourceLeft,
1499 Basicvideo_put_SourceWidth,
1500 Basicvideo_get_SourceWidth,
1501 Basicvideo_put_SourceTop,
1502 Basicvideo_get_SourceTop,
1503 Basicvideo_put_SourceHeight,
1504 Basicvideo_get_SourceHeight,
1505 Basicvideo_put_DestinationLeft,
1506 Basicvideo_get_DestinationLeft,
1507 Basicvideo_put_DestinationWidth,
1508 Basicvideo_get_DestinationWidth,
1509 Basicvideo_put_DestinationTop,
1510 Basicvideo_get_DestinationTop,
1511 Basicvideo_put_DestinationHeight,
1512 Basicvideo_get_DestinationHeight,
1513 Basicvideo_SetSourcePosition,
1514 Basicvideo_GetSourcePosition,
1515 Basicvideo_SetDefaultSourcePosition,
1516 Basicvideo_SetDestinationPosition,
1517 Basicvideo_GetDestinationPosition,
1518 Basicvideo_SetDefaultDestinationPosition,
1519 Basicvideo_GetVideoSize,
1520 Basicvideo_GetVideoPaletteEntries,
1521 Basicvideo_GetCurrentImage,
1522 Basicvideo_IsUsingDefaultSource,
1523 Basicvideo_IsUsingDefaultDestination
1527 /*** IUnknown methods ***/
1528 static HRESULT WINAPI Videowindow_QueryInterface(IVideoWindow *iface,
1531 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1533 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
1535 return Filtergraph_QueryInterface(This, riid, ppvObj);
1538 static ULONG WINAPI Videowindow_AddRef(IVideoWindow *iface) {
1539 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1541 TRACE("(%p/%p)->()\n", This, iface);
1543 return Filtergraph_AddRef(This);
1546 static ULONG WINAPI Videowindow_Release(IVideoWindow *iface) {
1547 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1549 TRACE("(%p/%p)->()\n", This, iface);
1551 return Filtergraph_Release(This);
1554 /*** IDispatch methods ***/
1555 static HRESULT WINAPI Videowindow_GetTypeInfoCount(IVideoWindow *iface,
1557 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1559 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
1564 static HRESULT WINAPI Videowindow_GetTypeInfo(IVideoWindow *iface,
1567 ITypeInfo**ppTInfo) {
1568 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1570 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
1575 static HRESULT WINAPI Videowindow_GetIDsOfNames(IVideoWindow *iface,
1581 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1583 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
1588 static HRESULT WINAPI Videowindow_Invoke(IVideoWindow *iface,
1589 DISPID dispIdMember,
1593 DISPPARAMS*pDispParams,
1595 EXCEPINFO*pExepInfo,
1597 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1599 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);
1604 /*** IVideoWindow methods ***/
1605 static HRESULT WINAPI Videowindow_put_Caption(IVideoWindow *iface,
1607 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1609 TRACE("(%p/%p)->(%s (%p)): stub !!!\n", This, iface, debugstr_w(strCaption), strCaption);
1614 static HRESULT WINAPI Videowindow_get_Caption(IVideoWindow *iface,
1616 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1618 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, strCaption);
1623 static HRESULT WINAPI Videowindow_put_WindowStyle(IVideoWindow *iface,
1625 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1627 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, WindowStyle);
1632 static HRESULT WINAPI Videowindow_get_WindowStyle(IVideoWindow *iface,
1633 long *WindowStyle) {
1634 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1636 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, WindowStyle);
1641 static HRESULT WINAPI Videowindow_put_WindowStyleEx(IVideoWindow *iface,
1642 long WindowStyleEx) {
1643 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1645 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, WindowStyleEx);
1650 static HRESULT WINAPI Videowindow_get_WindowStyleEx(IVideoWindow *iface,
1651 long *WindowStyleEx) {
1652 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1654 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, WindowStyleEx);
1659 static HRESULT WINAPI Videowindow_put_AutoShow(IVideoWindow *iface,
1661 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1663 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, AutoShow);
1668 static HRESULT WINAPI Videowindow_get_AutoShow(IVideoWindow *iface,
1670 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1672 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, AutoShow);
1677 static HRESULT WINAPI Videowindow_put_WindowState(IVideoWindow *iface,
1679 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1681 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, WindowState);
1686 static HRESULT WINAPI Videowindow_get_WindowState(IVideoWindow *iface,
1687 long *WindowState) {
1688 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1690 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, WindowState);
1695 static HRESULT WINAPI Videowindow_put_BackgroundPalette(IVideoWindow *iface,
1696 long BackgroundPalette) {
1697 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1699 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, BackgroundPalette);
1704 static HRESULT WINAPI Videowindow_get_BackgroundPalette(IVideoWindow *iface,
1705 long *pBackgroundPalette) {
1706 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1708 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pBackgroundPalette);
1713 static HRESULT WINAPI Videowindow_put_Visible(IVideoWindow *iface,
1715 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1717 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Visible);
1722 static HRESULT WINAPI Videowindow_get_Visible(IVideoWindow *iface,
1724 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1726 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pVisible);
1731 static HRESULT WINAPI Videowindow_put_Left(IVideoWindow *iface,
1733 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1735 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Left);
1740 static HRESULT WINAPI Videowindow_get_Left(IVideoWindow *iface,
1742 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1744 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pLeft);
1749 static HRESULT WINAPI Videowindow_put_Width(IVideoWindow *iface,
1751 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1753 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Width);
1758 static HRESULT WINAPI Videowindow_get_Width(IVideoWindow *iface,
1760 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1762 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pWidth);
1767 static HRESULT WINAPI Videowindow_put_Top(IVideoWindow *iface,
1769 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1771 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Top);
1776 static HRESULT WINAPI Videowindow_get_Top(IVideoWindow *iface,
1778 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1780 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pTop);
1785 static HRESULT WINAPI Videowindow_put_Height(IVideoWindow *iface,
1787 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1789 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Height);
1794 static HRESULT WINAPI Videowindow_get_Height(IVideoWindow *iface,
1796 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1798 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pHeight);
1803 static HRESULT WINAPI Videowindow_put_Owner(IVideoWindow *iface,
1805 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1807 TRACE("(%p/%p)->(%08lx): stub !!!\n", This, iface, (DWORD) Owner);
1812 static HRESULT WINAPI Videowindow_get_Owner(IVideoWindow *iface,
1814 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1816 TRACE("(%p/%p)->(%08lx): stub !!!\n", This, iface, (DWORD) Owner);
1821 static HRESULT WINAPI Videowindow_put_MessageDrain(IVideoWindow *iface,
1823 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1825 TRACE("(%p/%p)->(%08lx): stub !!!\n", This, iface, (DWORD) Drain);
1830 static HRESULT WINAPI Videowindow_get_MessageDrain(IVideoWindow *iface,
1832 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1834 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, Drain);
1839 static HRESULT WINAPI Videowindow_get_BorderColor(IVideoWindow *iface,
1841 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1843 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, Color);
1848 static HRESULT WINAPI Videowindow_put_BorderColor(IVideoWindow *iface,
1850 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1852 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Color);
1857 static HRESULT WINAPI Videowindow_get_FullScreenMode(IVideoWindow *iface,
1858 long *FullScreenMode) {
1859 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1861 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, FullScreenMode);
1866 static HRESULT WINAPI Videowindow_put_FullScreenMode(IVideoWindow *iface,
1867 long FullScreenMode) {
1868 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1870 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, FullScreenMode);
1875 static HRESULT WINAPI Videowindow_SetWindowForeground(IVideoWindow *iface,
1877 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1879 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Focus);
1884 static HRESULT WINAPI Videowindow_NotifyOwnerMessage(IVideoWindow *iface,
1889 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1891 TRACE("(%p/%p)->(%08lx, %ld, %08lx, %08lx): stub !!!\n", This, iface, (DWORD) hwnd, uMsg, wParam, lParam);
1896 static HRESULT WINAPI Videowindow_SetWindowPosition(IVideoWindow *iface,
1901 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1903 TRACE("(%p/%p)->(%ld, %ld, %ld, %ld): stub !!!\n", This, iface, Left, Top, Width, Height);
1908 static HRESULT WINAPI Videowindow_GetWindowPosition(IVideoWindow *iface,
1913 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1915 TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This, iface, pLeft, pTop, pWidth, pHeight);
1920 static HRESULT WINAPI Videowindow_GetMinIdealImageSize(IVideoWindow *iface,
1923 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1925 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pWidth, pHeight);
1930 static HRESULT WINAPI Videowindow_GetMaxIdealImageSize(IVideoWindow *iface,
1933 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1935 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pWidth, pHeight);
1940 static HRESULT WINAPI Videowindow_GetRestorePosition(IVideoWindow *iface,
1945 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1947 TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This, iface, pLeft, pTop, pWidth, pHeight);
1952 static HRESULT WINAPI Videowindow_HideCursor(IVideoWindow *iface,
1954 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1956 TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, HideCursor);
1961 static HRESULT WINAPI Videowindow_IsCursorHidden(IVideoWindow *iface,
1962 long *CursorHidden) {
1963 ICOM_THIS_MULTI(IFilterGraphImpl, IVideoWindow_vtbl, iface);
1965 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, CursorHidden);
1971 static ICOM_VTABLE(IVideoWindow) IVideoWindow_VTable =
1973 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1974 Videowindow_QueryInterface,
1976 Videowindow_Release,
1977 Videowindow_GetTypeInfoCount,
1978 Videowindow_GetTypeInfo,
1979 Videowindow_GetIDsOfNames,
1981 Videowindow_put_Caption,
1982 Videowindow_get_Caption,
1983 Videowindow_put_WindowStyle,
1984 Videowindow_get_WindowStyle,
1985 Videowindow_put_WindowStyleEx,
1986 Videowindow_get_WindowStyleEx,
1987 Videowindow_put_AutoShow,
1988 Videowindow_get_AutoShow,
1989 Videowindow_put_WindowState,
1990 Videowindow_get_WindowState,
1991 Videowindow_put_BackgroundPalette,
1992 Videowindow_get_BackgroundPalette,
1993 Videowindow_put_Visible,
1994 Videowindow_get_Visible,
1995 Videowindow_put_Left,
1996 Videowindow_get_Left,
1997 Videowindow_put_Width,
1998 Videowindow_get_Width,
1999 Videowindow_put_Top,
2000 Videowindow_get_Top,
2001 Videowindow_put_Height,
2002 Videowindow_get_Height,
2003 Videowindow_put_Owner,
2004 Videowindow_get_Owner,
2005 Videowindow_put_MessageDrain,
2006 Videowindow_get_MessageDrain,
2007 Videowindow_get_BorderColor,
2008 Videowindow_put_BorderColor,
2009 Videowindow_get_FullScreenMode,
2010 Videowindow_put_FullScreenMode,
2011 Videowindow_SetWindowForeground,
2012 Videowindow_NotifyOwnerMessage,
2013 Videowindow_SetWindowPosition,
2014 Videowindow_GetWindowPosition,
2015 Videowindow_GetMinIdealImageSize,
2016 Videowindow_GetMaxIdealImageSize,
2017 Videowindow_GetRestorePosition,
2018 Videowindow_HideCursor,
2019 Videowindow_IsCursorHidden
2023 /*** IUnknown methods ***/
2024 static HRESULT WINAPI Mediaevent_QueryInterface(IMediaEventEx *iface,
2027 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2029 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
2031 return Filtergraph_QueryInterface(This, riid, ppvObj);
2034 static ULONG WINAPI Mediaevent_AddRef(IMediaEventEx *iface) {
2035 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2037 TRACE("(%p/%p)->()\n", This, iface);
2039 return Filtergraph_AddRef(This);
2042 static ULONG WINAPI Mediaevent_Release(IMediaEventEx *iface) {
2043 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2045 TRACE("(%p/%p)->()\n", This, iface);
2047 return Filtergraph_Release(This);
2050 /*** IDispatch methods ***/
2051 static HRESULT WINAPI Mediaevent_GetTypeInfoCount(IMediaEventEx *iface,
2053 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2055 TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
2060 static HRESULT WINAPI Mediaevent_GetTypeInfo(IMediaEventEx *iface,
2063 ITypeInfo**ppTInfo) {
2064 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2066 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
2071 static HRESULT WINAPI Mediaevent_GetIDsOfNames(IMediaEventEx *iface,
2077 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2079 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
2084 static HRESULT WINAPI Mediaevent_Invoke(IMediaEventEx *iface,
2085 DISPID dispIdMember,
2089 DISPPARAMS*pDispParams,
2091 EXCEPINFO*pExepInfo,
2093 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2095 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);
2100 /*** IMediaEvent methods ***/
2101 static HRESULT WINAPI Mediaevent_GetEventHandle(IMediaEventEx *iface,
2103 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2105 TRACE("(%p/%p)->(%p)\n", This, iface, hEvent);
2107 *hEvent = (OAEVENT)This->evqueue.msg_event;
2112 static HRESULT WINAPI Mediaevent_GetEvent(IMediaEventEx *iface,
2117 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2120 TRACE("(%p/%p)->(%p, %p, %p, %ld)\n", This, iface, lEventCode, lParam1, lParam2, msTimeout);
2122 if (EventsQueue_GetEvent(&This->evqueue, &evt, msTimeout))
2124 *lEventCode = evt.lEventCode;
2125 *lParam1 = evt.lParam1;
2126 *lParam2 = evt.lParam2;
2134 static HRESULT WINAPI Mediaevent_WaitForCompletion(IMediaEventEx *iface,
2137 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2139 TRACE("(%p/%p)->(%ld, %p)\n", This, iface, msTimeout, pEvCode);
2141 if (WaitForSingleObject(This->hEventCompletion, msTimeout) == WAIT_OBJECT_0)
2143 *pEvCode = This->CompletionStatus;
2151 static HRESULT WINAPI Mediaevent_CancelDefaultHandling(IMediaEventEx *iface,
2153 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2155 TRACE("(%p/%p)->(%ld)\n", This, iface, lEvCode);
2157 if (lEvCode == EC_COMPLETE)
2158 This->HandleEcComplete = FALSE;
2159 else if (lEvCode == EC_REPAINT)
2160 This->HandleEcRepaint = FALSE;
2167 static HRESULT WINAPI Mediaevent_RestoreDefaultHandling(IMediaEventEx *iface,
2169 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2171 TRACE("(%p/%p)->(%ld)\n", This, iface, lEvCode);
2173 if (lEvCode == EC_COMPLETE)
2174 This->HandleEcComplete = TRUE;
2175 else if (lEvCode == EC_REPAINT)
2176 This->HandleEcRepaint = TRUE;
2183 static HRESULT WINAPI Mediaevent_FreeEventParams(IMediaEventEx *iface,
2187 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2189 TRACE("(%p/%p)->(%ld, %08lx, %08lx): stub !!!\n", This, iface, lEvCode, lParam1, lParam2);
2194 /*** IMediaEventEx methods ***/
2195 static HRESULT WINAPI Mediaevent_SetNotifyWindow(IMediaEventEx *iface,
2198 LONG_PTR lInstanceData) {
2199 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2201 TRACE("(%p/%p)->(%08lx, %ld, %08lx)\n", This, iface, (DWORD) hwnd, lMsg, lInstanceData);
2203 This->notif.hWnd = (HWND)hwnd;
2204 This->notif.msg = lMsg;
2205 This->notif.instance = (long) lInstanceData;
2210 static HRESULT WINAPI Mediaevent_SetNotifyFlags(IMediaEventEx *iface,
2211 long lNoNotifyFlags) {
2212 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2214 TRACE("(%p/%p)->(%ld)\n", This, iface, lNoNotifyFlags);
2216 if ((lNoNotifyFlags != 0) || (lNoNotifyFlags != 1))
2217 return E_INVALIDARG;
2219 This->notif.disabled = lNoNotifyFlags;
2224 static HRESULT WINAPI Mediaevent_GetNotifyFlags(IMediaEventEx *iface,
2225 long *lplNoNotifyFlags) {
2226 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2228 TRACE("(%p/%p)->(%p)\n", This, iface, lplNoNotifyFlags);
2230 if (!lplNoNotifyFlags)
2233 *lplNoNotifyFlags = This->notif.disabled;
2239 static ICOM_VTABLE(IMediaEventEx) IMediaEventEx_VTable =
2241 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
2242 Mediaevent_QueryInterface,
2245 Mediaevent_GetTypeInfoCount,
2246 Mediaevent_GetTypeInfo,
2247 Mediaevent_GetIDsOfNames,
2249 Mediaevent_GetEventHandle,
2250 Mediaevent_GetEvent,
2251 Mediaevent_WaitForCompletion,
2252 Mediaevent_CancelDefaultHandling,
2253 Mediaevent_RestoreDefaultHandling,
2254 Mediaevent_FreeEventParams,
2255 Mediaevent_SetNotifyWindow,
2256 Mediaevent_SetNotifyFlags,
2257 Mediaevent_GetNotifyFlags
2261 static HRESULT WINAPI MediaFilter_QueryInterface(IMediaFilter *iface, REFIID riid, LPVOID *ppv)
2263 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2265 return Filtergraph_QueryInterface(This, riid, ppv);
2268 static ULONG WINAPI MediaFilter_AddRef(IMediaFilter *iface)
2270 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2272 return Filtergraph_AddRef(This);
2275 static ULONG WINAPI MediaFilter_Release(IMediaFilter *iface)
2277 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventEx_vtbl, iface);
2279 return Filtergraph_Release(This);
2282 static HRESULT WINAPI MediaFilter_GetClassID(IMediaFilter *iface, CLSID * pClassID)
2284 FIXME("(%p): stub\n", pClassID);
2289 static HRESULT WINAPI MediaFilter_Stop(IMediaFilter *iface)
2291 FIXME("(): stub\n");
2296 static HRESULT WINAPI MediaFilter_Pause(IMediaFilter *iface)
2298 FIXME("(): stub\n");
2303 static HRESULT WINAPI MediaFilter_Run(IMediaFilter *iface, REFERENCE_TIME tStart)
2305 FIXME("(%lld): stub\n", tStart);
2310 static HRESULT WINAPI MediaFilter_GetState(IMediaFilter *iface, DWORD dwMsTimeout, FILTER_STATE * pState)
2312 FIXME("(%ld, %p): stub\n", dwMsTimeout, pState);
2317 static HRESULT WINAPI MediaFilter_SetSyncSource(IMediaFilter *iface, IReferenceClock *pClock)
2319 FIXME("(%p): stub\n", pClock);
2324 static HRESULT WINAPI MediaFilter_GetSyncSource(IMediaFilter *iface, IReferenceClock **ppClock)
2326 FIXME("(%p): stub\n", ppClock);
2331 static ICOM_VTABLE(IMediaFilter) IMediaFilter_VTable =
2333 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
2334 MediaFilter_QueryInterface,
2336 MediaFilter_Release,
2337 MediaFilter_GetClassID,
2341 MediaFilter_GetState,
2342 MediaFilter_SetSyncSource,
2343 MediaFilter_GetSyncSource
2346 static HRESULT WINAPI MediaEventSink_QueryInterface(IMediaEventSink *iface, REFIID riid, LPVOID *ppv)
2348 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventSink_vtbl, iface);
2350 return Filtergraph_QueryInterface(This, riid, ppv);
2353 static ULONG WINAPI MediaEventSink_AddRef(IMediaEventSink *iface)
2355 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventSink_vtbl, iface);
2357 return Filtergraph_AddRef(This);
2360 static ULONG WINAPI MediaEventSink_Release(IMediaEventSink *iface)
2362 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventSink_vtbl, iface);
2364 return Filtergraph_Release(This);
2367 static HRESULT WINAPI MediaEventSink_Notify(IMediaEventSink *iface, long EventCode, LONG_PTR EventParam1, LONG_PTR EventParam2)
2369 ICOM_THIS_MULTI(IFilterGraphImpl, IMediaEventSink_vtbl, iface);
2372 TRACE("(%p/%p)->(%ld, %ld, %ld)\n", This, iface, EventCode, EventParam1, EventParam2);
2374 /* We need thread safety here, let's use the events queue's one */
2375 EnterCriticalSection(&This->evqueue.msg_crst);
2377 if ((EventCode == EC_COMPLETE) && This->HandleEcComplete)
2379 if (++This->EcCompleteCount == This->nRenderers)
2381 evt.lEventCode = EC_COMPLETE;
2384 EventsQueue_PutEvent(&This->evqueue, &evt);
2385 if (!This->notif.disabled && This->notif.hWnd)
2386 PostMessageW(This->notif.hWnd, This->notif.msg, 0, This->notif.instance);
2387 This->CompletionStatus = EC_COMPLETE;
2388 SetEvent(This->hEventCompletion);
2391 else if ((EventCode == EC_REPAINT) && This->HandleEcRepaint)
2393 /* FIXME: Not handled yet */
2397 evt.lEventCode = EventCode;
2398 evt.lParam1 = EventParam1;
2399 evt.lParam2 = EventParam2;
2400 EventsQueue_PutEvent(&This->evqueue, &evt);
2401 if (!This->notif.disabled && This->notif.hWnd)
2402 PostMessageW(This->notif.hWnd, This->notif.msg, 0, This->notif.instance);
2405 EnterCriticalSection(&This->evqueue.msg_crst);
2409 static ICOM_VTABLE(IMediaEventSink) IMediaEventSink_VTable =
2411 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
2412 MediaEventSink_QueryInterface,
2413 MediaEventSink_AddRef,
2414 MediaEventSink_Release,
2415 MediaEventSink_Notify
2418 /* This is the only function that actually creates a FilterGraph class... */
2419 HRESULT FILTERGRAPH_create(IUnknown *pUnkOuter, LPVOID *ppObj) {
2420 IFilterGraphImpl *fimpl;
2422 TRACE("(%p,%p)\n", pUnkOuter, ppObj);
2424 fimpl = (IFilterGraphImpl *) HeapAlloc(GetProcessHeap(), 0, sizeof(*fimpl));
2425 fimpl->IGraphBuilder_vtbl = &IGraphBuilder_VTable;
2426 fimpl->IMediaControl_vtbl = &IMediaControl_VTable;
2427 fimpl->IMediaSeeking_vtbl = &IMediaSeeking_VTable;
2428 fimpl->IBasicAudio_vtbl = &IBasicAudio_VTable;
2429 fimpl->IBasicVideo_vtbl = &IBasicVideo_VTable;
2430 fimpl->IVideoWindow_vtbl = &IVideoWindow_VTable;
2431 fimpl->IMediaEventEx_vtbl = &IMediaEventEx_VTable;
2432 fimpl->IMediaFilter_vtbl = &IMediaFilter_VTable;
2433 fimpl->IMediaEventSink_vtbl = &IMediaEventSink_VTable;
2435 fimpl->ppFiltersInGraph = NULL;
2436 fimpl->pFilterNames = NULL;
2437 fimpl->nFilters = 0;
2438 fimpl->filterCapacity = 0;
2439 fimpl->nameIndex = 1;
2440 fimpl->hEventCompletion = CreateEventW(0, TRUE, FALSE,0);
2441 fimpl->HandleEcComplete = TRUE;
2442 fimpl->HandleEcRepaint = TRUE;
2443 fimpl->notif.hWnd = 0;
2444 fimpl->notif.disabled = TRUE;
2445 fimpl->nRenderers = 0;
2446 fimpl->EcCompleteCount = 0;
2447 EventsQueue_Init(&fimpl->evqueue);