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_IFilterGraph
, riid
) ||
186 IsEqualGUID(&IID_IGraphBuilder
, riid
)) {
187 *ppvObj
= &(This
->IGraphBuilder_vtbl
);
188 TRACE(" returning IGraphBuilder interface (%p)\n", *ppvObj
);
189 } else if (IsEqualGUID(&IID_IMediaControl
, riid
)) {
190 *ppvObj
= &(This
->IMediaControl_vtbl
);
191 TRACE(" returning IMediaControl interface (%p)\n", *ppvObj
);
192 } else if (IsEqualGUID(&IID_IMediaSeeking
, riid
)) {
193 *ppvObj
= &(This
->IMediaSeeking_vtbl
);
194 TRACE(" returning IMediaSeeking interface (%p)\n", *ppvObj
);
195 } else if (IsEqualGUID(&IID_IBasicAudio
, riid
)) {
196 *ppvObj
= &(This
->IBasicAudio_vtbl
);
197 TRACE(" returning IBasicAudio interface (%p)\n", *ppvObj
);
198 } else if (IsEqualGUID(&IID_IBasicVideo
, riid
)) {
199 *ppvObj
= &(This
->IBasicVideo_vtbl
);
200 TRACE(" returning IBasicVideo interface (%p)\n", *ppvObj
);
201 } else if (IsEqualGUID(&IID_IVideoWindow
, riid
)) {
202 *ppvObj
= &(This
->IVideoWindow_vtbl
);
203 TRACE(" returning IVideoWindow interface (%p)\n", *ppvObj
);
204 } else if (IsEqualGUID(&IID_IMediaEvent
, riid
) ||
205 IsEqualGUID(&IID_IMediaEventEx
, riid
)) {
206 *ppvObj
= &(This
->IMediaEventEx_vtbl
);
207 TRACE(" returning IMediaEvent(Ex) interface (%p)\n", *ppvObj
);
208 } else if (IsEqualGUID(&IID_IMediaFilter
, riid
) ||
209 IsEqualGUID(&IID_IPersist
, riid
)) {
210 *ppvObj
= &(This
->IMediaFilter_vtbl
);
211 TRACE(" returning IMediaFilter interface (%p)\n", *ppvObj
);
212 } else if (IsEqualGUID(&IID_IMediaEventSink
, riid
)) {
213 *ppvObj
= &(This
->IMediaEventSink_vtbl
);
214 TRACE(" returning IMediaEventSink interface (%p)\n", *ppvObj
);
217 FIXME("unknown interface %s\n", debugstr_guid(riid
));
218 return E_NOINTERFACE
;
225 static ULONG
Filtergraph_AddRef(IFilterGraphImpl
*This
) {
226 TRACE("(%p)->(): new ref = %ld\n", This
, This
->ref
+ 1);
231 static ULONG
Filtergraph_Release(IFilterGraphImpl
*This
) {
234 TRACE("(%p)->(): new ref = %ld\n", This
, This
->ref
- 1);
238 CloseHandle(This
->hEventCompletion
);
239 EventsQueue_Destroy(&This
->evqueue
);
240 HeapFree(GetProcessHeap(), 0, This
->ppFiltersInGraph
);
241 HeapFree(GetProcessHeap(), 0, This
->pFilterNames
);
242 HeapFree(GetProcessHeap(), 0, This
);
248 /*** IUnknown methods ***/
249 static HRESULT WINAPI
Graphbuilder_QueryInterface(IGraphBuilder
*iface
,
252 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
254 TRACE("(%p/%p)->(%s (%p), %p)\n", This
, iface
, debugstr_guid(riid
), riid
, ppvObj
);
255 return Filtergraph_QueryInterface(This
, riid
, ppvObj
);
258 static ULONG WINAPI
Graphbuilder_AddRef(IGraphBuilder
*iface
) {
259 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
261 TRACE("(%p/%p)->() calling FilterGraph AddRef\n", This
, iface
);
263 return Filtergraph_AddRef(This
);
266 static ULONG WINAPI
Graphbuilder_Release(IGraphBuilder
*iface
) {
267 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
269 TRACE("(%p/%p)->() calling FilterGraph Release\n", This
, iface
);
271 return Filtergraph_Release(This
);
274 /*** IFilterGraph methods ***/
275 static HRESULT WINAPI
Graphbuilder_AddFilter(IGraphBuilder
*iface
,
276 IBaseFilter
*pFilter
,
278 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
281 WCHAR
* wszFilterName
= NULL
;
282 int duplicate_name
= FALSE
;
284 TRACE("(%p/%p)->(%p, %s (%p))\n", This
, iface
, pFilter
, debugstr_w(pName
), pName
);
286 wszFilterName
= (WCHAR
*) CoTaskMemAlloc( (pName
? strlenW(pName
) + 6 : 5) * sizeof(WCHAR
) );
290 /* Check if name already exists */
291 for(i
= 0; i
< This
->nFilters
; i
++)
292 if (!strcmpW(This
->pFilterNames
[i
], pName
))
294 duplicate_name
= TRUE
;
299 /* If no name given or name already existing, generate one */
300 if (!pName
|| duplicate_name
)
302 static const WCHAR wszFmt1
[] = {'%','s',' ','%','0','4','d',0};
303 static const WCHAR wszFmt2
[] = {'%','0','4','d',0};
305 for (j
= 0; j
< 10000 ; j
++)
309 sprintfW(wszFilterName
, wszFmt1
, pName
, This
->nameIndex
);
311 sprintfW(wszFilterName
, wszFmt2
, This
->nameIndex
);
312 TRACE("Generated name %s\n", debugstr_w(wszFilterName
));
314 /* Check if the generated name already exists */
315 for(i
= 0; i
< This
->nFilters
; i
++)
316 if (!strcmpW(This
->pFilterNames
[i
], pName
))
319 /* Compute next index and exit if generated name is suitable */
320 if (This
->nameIndex
++ == 10000)
322 if (i
== This
->nFilters
)
325 /* Unable to find a suitable name */
328 CoTaskMemFree(wszFilterName
);
329 return VFW_E_DUPLICATE_NAME
;
333 memcpy(wszFilterName
, pName
, (strlenW(pName
) + 1) * sizeof(WCHAR
));
336 if (This
->nFilters
+ 1 > This
->filterCapacity
)
338 int newCapacity
= 2*This
->filterCapacity
;
339 IBaseFilter
** ppNewFilters
= CoTaskMemAlloc(newCapacity
* sizeof(IBaseFilter
*));
340 LPWSTR
* pNewNames
= CoTaskMemAlloc(newCapacity
* sizeof(LPWSTR
));
341 memcpy(ppNewFilters
, This
->ppFiltersInGraph
, This
->nFilters
* sizeof(IBaseFilter
*));
342 memcpy(pNewNames
, This
->pFilterNames
, This
->nFilters
* sizeof(LPWSTR
));
343 CoTaskMemFree(This
->ppFiltersInGraph
);
344 CoTaskMemFree(This
->pFilterNames
);
345 This
->ppFiltersInGraph
= ppNewFilters
;
346 This
->pFilterNames
= pNewNames
;
347 This
->filterCapacity
= newCapacity
;
350 hr
= IBaseFilter_JoinFilterGraph(pFilter
, (IFilterGraph
*)This
, wszFilterName
);
354 IBaseFilter_AddRef(pFilter
);
355 This
->ppFiltersInGraph
[This
->nFilters
] = pFilter
;
356 This
->pFilterNames
[This
->nFilters
] = wszFilterName
;
360 CoTaskMemFree(wszFilterName
);
362 if (SUCCEEDED(hr
) && duplicate_name
)
363 return VFW_S_DUPLICATE_NAME
;
368 static HRESULT WINAPI
Graphbuilder_RemoveFilter(IGraphBuilder
*iface
,
369 IBaseFilter
*pFilter
) {
370 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
374 TRACE("(%p/%p)->(%p)\n", This
, iface
, pFilter
);
376 /* FIXME: check graph is stopped */
378 for (i
= 0; i
< This
->nFilters
; i
++)
380 if (This
->ppFiltersInGraph
[i
] == pFilter
)
382 /* FIXME: disconnect pins */
383 hr
= IBaseFilter_JoinFilterGraph(pFilter
, NULL
, This
->pFilterNames
[i
]);
386 IPin_Release(pFilter
);
387 CoTaskMemFree(This
->pFilterNames
[i
]);
388 memmove(This
->ppFiltersInGraph
+i
, This
->ppFiltersInGraph
+i
+1, sizeof(IBaseFilter
*)*(This
->nFilters
- 1 - i
));
389 memmove(This
->pFilterNames
+i
, This
->pFilterNames
+i
+1, sizeof(LPWSTR
)*(This
->nFilters
- 1 - i
));
397 return hr
; /* FIXME: check this error code */
400 static HRESULT WINAPI
Graphbuilder_EnumFilters(IGraphBuilder
*iface
,
401 IEnumFilters
**ppEnum
) {
402 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
404 TRACE("(%p/%p)->(%p)\n", This
, iface
, ppEnum
);
406 return IEnumFiltersImpl_Construct(This
->ppFiltersInGraph
, This
->nFilters
, ppEnum
);
409 static HRESULT WINAPI
Graphbuilder_FindFilterByName(IGraphBuilder
*iface
,
411 IBaseFilter
**ppFilter
) {
412 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
415 TRACE("(%p/%p)->(%s (%p), %p)\n", This
, iface
, debugstr_w(pName
), pName
, ppFilter
);
419 for (i
= 0; i
< This
->nFilters
; i
++)
421 if (!strcmpW(pName
, This
->pFilterNames
[i
]))
423 *ppFilter
= This
->ppFiltersInGraph
[i
];
424 IBaseFilter_AddRef(*ppFilter
);
429 return E_FAIL
; /* FIXME: check this error code */
432 /* NOTE: despite the implication, it doesn't matter which
433 * way round you put in the input and output pins */
434 static HRESULT WINAPI
Graphbuilder_ConnectDirect(IGraphBuilder
*iface
,
437 const AM_MEDIA_TYPE
*pmt
) {
441 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
443 TRACE("(%p/%p)->(%p, %p, %p)\n", This
, iface
, ppinIn
, ppinOut
, pmt
);
445 /* FIXME: check pins are in graph */
447 hr
= IPin_QueryDirection(ppinIn
, &dir
);
450 if (dir
== PINDIR_INPUT
)
451 hr
= IPin_Connect(ppinOut
, ppinIn
, pmt
);
453 hr
= IPin_Connect(ppinIn
, ppinOut
, pmt
);
459 static HRESULT WINAPI
Graphbuilder_Reconnect(IGraphBuilder
*iface
,
461 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
463 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, ppin
);
468 static HRESULT WINAPI
Graphbuilder_Disconnect(IGraphBuilder
*iface
,
470 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
472 TRACE("(%p/%p)->(%p)\n", This
, iface
, ppin
);
474 return IPin_Disconnect(ppin
);
477 static HRESULT WINAPI
Graphbuilder_SetDefaultSyncSource(IGraphBuilder
*iface
) {
478 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
480 TRACE("(%p/%p)->(): stub !!!\n", iface
, This
);
485 /*** IGraphBuilder methods ***/
486 static HRESULT WINAPI
Graphbuilder_Connect(IGraphBuilder
*iface
,
489 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
491 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This
, iface
, ppinOut
, ppinIn
);
496 static HRESULT WINAPI
Graphbuilder_Render(IGraphBuilder
*iface
,
498 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
500 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, ppinOut
);
505 static HRESULT WINAPI
Graphbuilder_RenderFile(IGraphBuilder
*iface
,
507 LPCWSTR lpcwstrPlayList
) {
508 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
510 TRACE("(%p/%p)->(%s (%p), %s (%p)): stub !!!\n", This
, iface
, debugstr_w(lpcwstrFile
), lpcwstrFile
, debugstr_w(lpcwstrPlayList
), lpcwstrPlayList
);
515 static HRESULT WINAPI
Graphbuilder_AddSourceFilter(IGraphBuilder
*iface
,
516 LPCWSTR lpcwstrFileName
,
517 LPCWSTR lpcwstrFilterName
,
518 IBaseFilter
**ppFilter
) {
519 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
521 TRACE("(%p/%p)->(%s (%p), %s (%p), %p): stub !!!\n", This
, iface
, debugstr_w(lpcwstrFileName
), lpcwstrFileName
, debugstr_w(lpcwstrFilterName
), lpcwstrFilterName
, ppFilter
);
526 static HRESULT WINAPI
Graphbuilder_SetLogFile(IGraphBuilder
*iface
,
528 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
530 TRACE("(%p/%p)->(%08lx): stub !!!\n", This
, iface
, (DWORD
) hFile
);
535 static HRESULT WINAPI
Graphbuilder_Abort(IGraphBuilder
*iface
) {
536 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
538 TRACE("(%p/%p)->(): stub !!!\n", This
, iface
);
543 static HRESULT WINAPI
Graphbuilder_ShouldOperationContinue(IGraphBuilder
*iface
) {
544 ICOM_THIS_MULTI(IFilterGraphImpl
, IGraphBuilder_vtbl
, iface
);
546 TRACE("(%p/%p)->(): stub !!!\n", This
, iface
);
552 static ICOM_VTABLE(IGraphBuilder
) IGraphBuilder_VTable
=
554 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
555 Graphbuilder_QueryInterface
,
557 Graphbuilder_Release
,
558 Graphbuilder_AddFilter
,
559 Graphbuilder_RemoveFilter
,
560 Graphbuilder_EnumFilters
,
561 Graphbuilder_FindFilterByName
,
562 Graphbuilder_ConnectDirect
,
563 Graphbuilder_Reconnect
,
564 Graphbuilder_Disconnect
,
565 Graphbuilder_SetDefaultSyncSource
,
566 Graphbuilder_Connect
,
568 Graphbuilder_RenderFile
,
569 Graphbuilder_AddSourceFilter
,
570 Graphbuilder_SetLogFile
,
572 Graphbuilder_ShouldOperationContinue
575 /*** IUnknown methods ***/
576 static HRESULT WINAPI
Mediacontrol_QueryInterface(IMediaControl
*iface
,
579 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
581 TRACE("(%p/%p)->(%s (%p), %p)\n", This
, iface
, debugstr_guid(riid
), riid
, ppvObj
);
583 return Filtergraph_QueryInterface(This
, riid
, ppvObj
);
586 static ULONG WINAPI
Mediacontrol_AddRef(IMediaControl
*iface
) {
587 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
589 TRACE("(%p/%p)->()\n", This
, iface
);
591 return Filtergraph_AddRef(This
);
594 static ULONG WINAPI
Mediacontrol_Release(IMediaControl
*iface
) {
595 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
597 TRACE("(%p/%p)->()\n", This
, iface
);
599 return Filtergraph_Release(This
);
603 /*** IDispatch methods ***/
604 static HRESULT WINAPI
Mediacontrol_GetTypeInfoCount(IMediaControl
*iface
,
606 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
608 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pctinfo
);
613 static HRESULT WINAPI
Mediacontrol_GetTypeInfo(IMediaControl
*iface
,
616 ITypeInfo
**ppTInfo
) {
617 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
619 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This
, iface
, iTInfo
, lcid
, ppTInfo
);
624 static HRESULT WINAPI
Mediacontrol_GetIDsOfNames(IMediaControl
*iface
,
630 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
632 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This
, iface
, debugstr_guid(riid
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
637 static HRESULT WINAPI
Mediacontrol_Invoke(IMediaControl
*iface
,
642 DISPPARAMS
*pDispParams
,
646 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
648 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
);
653 /*** IMediaControl methods ***/
654 static HRESULT WINAPI
Mediacontrol_Run(IMediaControl
*iface
) {
655 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
657 TRACE("(%p/%p)->(): stub !!!\n", This
, iface
);
659 ResetEvent(This
->hEventCompletion
);
664 static HRESULT WINAPI
Mediacontrol_Pause(IMediaControl
*iface
) {
665 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
667 TRACE("(%p/%p)->(): stub !!!\n", This
, iface
);
672 static HRESULT WINAPI
Mediacontrol_Stop(IMediaControl
*iface
) {
673 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
675 TRACE("(%p/%p)->(): stub !!!\n", This
, iface
);
680 static HRESULT WINAPI
Mediacontrol_GetState(IMediaControl
*iface
,
682 OAFilterState
*pfs
) {
683 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
685 TRACE("(%p/%p)->(%ld, %p): stub !!!\n", This
, iface
, msTimeout
, pfs
);
690 static HRESULT WINAPI
Mediacontrol_RenderFile(IMediaControl
*iface
,
692 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
694 TRACE("(%p/%p)->(%s (%p)): stub !!!\n", This
, iface
, debugstr_w(strFilename
), strFilename
);
699 static HRESULT WINAPI
Mediacontrol_AddSourceFilter(IMediaControl
*iface
,
702 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
704 TRACE("(%p/%p)->(%s (%p), %p): stub !!!\n", This
, iface
, debugstr_w(strFilename
), strFilename
, ppUnk
);
709 static HRESULT WINAPI
Mediacontrol_get_FilterCollection(IMediaControl
*iface
,
711 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
713 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, ppUnk
);
718 static HRESULT WINAPI
Mediacontrol_get_RegFilterCollection(IMediaControl
*iface
,
720 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
722 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, ppUnk
);
727 static HRESULT WINAPI
Mediacontrol_StopWhenReady(IMediaControl
*iface
) {
728 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaControl_vtbl
, iface
);
730 TRACE("(%p/%p)->(): stub !!!\n", This
, iface
);
736 static ICOM_VTABLE(IMediaControl
) IMediaControl_VTable
=
738 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
739 Mediacontrol_QueryInterface
,
741 Mediacontrol_Release
,
742 Mediacontrol_GetTypeInfoCount
,
743 Mediacontrol_GetTypeInfo
,
744 Mediacontrol_GetIDsOfNames
,
749 Mediacontrol_GetState
,
750 Mediacontrol_RenderFile
,
751 Mediacontrol_AddSourceFilter
,
752 Mediacontrol_get_FilterCollection
,
753 Mediacontrol_get_RegFilterCollection
,
754 Mediacontrol_StopWhenReady
758 /*** IUnknown methods ***/
759 static HRESULT WINAPI
Mediaseeking_QueryInterface(IMediaSeeking
*iface
,
762 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
764 TRACE("(%p/%p)->(%s (%p), %p)\n", This
, iface
, debugstr_guid(riid
), riid
, ppvObj
);
766 return Filtergraph_QueryInterface(This
, riid
, ppvObj
);
769 static ULONG WINAPI
Mediaseeking_AddRef(IMediaSeeking
*iface
) {
770 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
772 TRACE("(%p/%p)->()\n", This
, iface
);
774 return Filtergraph_AddRef(This
);
777 static ULONG WINAPI
Mediaseeking_Release(IMediaSeeking
*iface
) {
778 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
780 TRACE("(%p/%p)->()\n", This
, iface
);
782 return Filtergraph_Release(This
);
785 /*** IMediaSeeking methods ***/
786 static HRESULT WINAPI
Mediaseeking_GetCapabilities(IMediaSeeking
*iface
,
787 DWORD
*pCapabilities
) {
788 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
790 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pCapabilities
);
795 static HRESULT WINAPI
Mediaseeking_CheckCapabilities(IMediaSeeking
*iface
,
796 DWORD
*pCapabilities
) {
797 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
799 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pCapabilities
);
804 static HRESULT WINAPI
Mediaseeking_IsFormatSupported(IMediaSeeking
*iface
,
805 const GUID
*pFormat
) {
806 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
808 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pFormat
);
813 static HRESULT WINAPI
Mediaseeking_QueryPreferredFormat(IMediaSeeking
*iface
,
815 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
817 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pFormat
);
822 static HRESULT WINAPI
Mediaseeking_GetTimeFormat(IMediaSeeking
*iface
,
824 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
826 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pFormat
);
831 static HRESULT WINAPI
Mediaseeking_IsUsingTimeFormat(IMediaSeeking
*iface
,
832 const GUID
*pFormat
) {
833 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
835 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pFormat
);
840 static HRESULT WINAPI
Mediaseeking_SetTimeFormat(IMediaSeeking
*iface
,
841 const GUID
*pFormat
) {
842 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
844 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pFormat
);
849 static HRESULT WINAPI
Mediaseeking_GetDuration(IMediaSeeking
*iface
,
850 LONGLONG
*pDuration
) {
851 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
853 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pDuration
);
858 static HRESULT WINAPI
Mediaseeking_GetStopPosition(IMediaSeeking
*iface
,
860 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
862 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pStop
);
867 static HRESULT WINAPI
Mediaseeking_GetCurrentPosition(IMediaSeeking
*iface
,
868 LONGLONG
*pCurrent
) {
869 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
871 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pCurrent
);
876 static HRESULT WINAPI
Mediaseeking_ConvertTimeFormat(IMediaSeeking
*iface
,
878 const GUID
*pTargetFormat
,
880 const GUID
*pSourceFormat
) {
881 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
883 TRACE("(%p/%p)->(%p, %p, %lld, %p): stub !!!\n", This
, iface
, pTarget
, pTargetFormat
, Source
, pSourceFormat
);
888 static HRESULT WINAPI
Mediaseeking_SetPositions(IMediaSeeking
*iface
,
890 DWORD dwCurrentFlags
,
893 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
895 TRACE("(%p/%p)->(%p, %08lx, %p, %08lx): stub !!!\n", This
, iface
, pCurrent
, dwCurrentFlags
, pStop
, dwStopFlags
);
900 static HRESULT WINAPI
Mediaseeking_GetPositions(IMediaSeeking
*iface
,
903 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
905 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This
, iface
, pCurrent
, pStop
);
910 static HRESULT WINAPI
Mediaseeking_GetAvailable(IMediaSeeking
*iface
,
913 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
915 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This
, iface
, pEarliest
, pLatest
);
920 static HRESULT WINAPI
Mediaseeking_SetRate(IMediaSeeking
*iface
,
922 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
924 TRACE("(%p/%p)->(%f): stub !!!\n", This
, iface
, dRate
);
929 static HRESULT WINAPI
Mediaseeking_GetRate(IMediaSeeking
*iface
,
931 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
933 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pdRate
);
938 static HRESULT WINAPI
Mediaseeking_GetPreroll(IMediaSeeking
*iface
,
939 LONGLONG
*pllPreroll
) {
940 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaSeeking_vtbl
, iface
);
942 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pllPreroll
);
948 static ICOM_VTABLE(IMediaSeeking
) IMediaSeeking_VTable
=
950 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
951 Mediaseeking_QueryInterface
,
953 Mediaseeking_Release
,
954 Mediaseeking_GetCapabilities
,
955 Mediaseeking_CheckCapabilities
,
956 Mediaseeking_IsFormatSupported
,
957 Mediaseeking_QueryPreferredFormat
,
958 Mediaseeking_GetTimeFormat
,
959 Mediaseeking_IsUsingTimeFormat
,
960 Mediaseeking_SetTimeFormat
,
961 Mediaseeking_GetDuration
,
962 Mediaseeking_GetStopPosition
,
963 Mediaseeking_GetCurrentPosition
,
964 Mediaseeking_ConvertTimeFormat
,
965 Mediaseeking_SetPositions
,
966 Mediaseeking_GetPositions
,
967 Mediaseeking_GetAvailable
,
968 Mediaseeking_SetRate
,
969 Mediaseeking_GetRate
,
970 Mediaseeking_GetPreroll
973 /*** IUnknown methods ***/
974 static HRESULT WINAPI
Basicaudio_QueryInterface(IBasicAudio
*iface
,
977 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicAudio_vtbl
, iface
);
979 TRACE("(%p/%p)->(%s (%p), %p)\n", This
, iface
, debugstr_guid(riid
), riid
, ppvObj
);
981 return Filtergraph_QueryInterface(This
, riid
, ppvObj
);
984 static ULONG WINAPI
Basicaudio_AddRef(IBasicAudio
*iface
) {
985 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicAudio_vtbl
, iface
);
987 TRACE("(%p/%p)->()\n", This
, iface
);
989 return Filtergraph_AddRef(This
);
992 static ULONG WINAPI
Basicaudio_Release(IBasicAudio
*iface
) {
993 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicAudio_vtbl
, iface
);
995 TRACE("(%p/%p)->()\n", This
, iface
);
997 return Filtergraph_Release(This
);
1000 /*** IDispatch methods ***/
1001 static HRESULT WINAPI
Basicaudio_GetTypeInfoCount(IBasicAudio
*iface
,
1003 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicAudio_vtbl
, iface
);
1005 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pctinfo
);
1010 static HRESULT WINAPI
Basicaudio_GetTypeInfo(IBasicAudio
*iface
,
1013 ITypeInfo
**ppTInfo
) {
1014 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicAudio_vtbl
, iface
);
1016 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This
, iface
, iTInfo
, lcid
, ppTInfo
);
1021 static HRESULT WINAPI
Basicaudio_GetIDsOfNames(IBasicAudio
*iface
,
1027 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicAudio_vtbl
, iface
);
1029 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This
, iface
, debugstr_guid(riid
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
1034 static HRESULT WINAPI
Basicaudio_Invoke(IBasicAudio
*iface
,
1035 DISPID dispIdMember
,
1039 DISPPARAMS
*pDispParams
,
1041 EXCEPINFO
*pExepInfo
,
1043 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicAudio_vtbl
, iface
);
1045 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
);
1050 /*** IBasicAudio methods ***/
1051 static HRESULT WINAPI
Basicaudio_put_Volume(IBasicAudio
*iface
,
1053 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicAudio_vtbl
, iface
);
1055 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, lVolume
);
1060 static HRESULT WINAPI
Basicaudio_get_Volume(IBasicAudio
*iface
,
1062 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicAudio_vtbl
, iface
);
1064 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, plVolume
);
1069 static HRESULT WINAPI
Basicaudio_put_Balance(IBasicAudio
*iface
,
1071 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicAudio_vtbl
, iface
);
1073 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, lBalance
);
1078 static HRESULT WINAPI
Basicaudio_get_Balance(IBasicAudio
*iface
,
1080 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicAudio_vtbl
, iface
);
1082 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, plBalance
);
1087 static ICOM_VTABLE(IBasicAudio
) IBasicAudio_VTable
=
1089 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1090 Basicaudio_QueryInterface
,
1093 Basicaudio_GetTypeInfoCount
,
1094 Basicaudio_GetTypeInfo
,
1095 Basicaudio_GetIDsOfNames
,
1097 Basicaudio_put_Volume
,
1098 Basicaudio_get_Volume
,
1099 Basicaudio_put_Balance
,
1100 Basicaudio_get_Balance
1103 /*** IUnknown methods ***/
1104 static HRESULT WINAPI
Basicvideo_QueryInterface(IBasicVideo
*iface
,
1107 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1109 TRACE("(%p/%p)->(%s (%p), %p)\n", This
, iface
, debugstr_guid(riid
), riid
, ppvObj
);
1111 return Filtergraph_QueryInterface(This
, riid
, ppvObj
);
1114 static ULONG WINAPI
Basicvideo_AddRef(IBasicVideo
*iface
) {
1115 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1117 TRACE("(%p/%p)->()\n", This
, iface
);
1119 return Filtergraph_AddRef(This
);
1122 static ULONG WINAPI
Basicvideo_Release(IBasicVideo
*iface
) {
1123 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1125 TRACE("(%p/%p)->()\n", This
, iface
);
1127 return Filtergraph_Release(This
);
1130 /*** IDispatch methods ***/
1131 static HRESULT WINAPI
Basicvideo_GetTypeInfoCount(IBasicVideo
*iface
,
1133 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1135 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pctinfo
);
1140 static HRESULT WINAPI
Basicvideo_GetTypeInfo(IBasicVideo
*iface
,
1143 ITypeInfo
**ppTInfo
) {
1144 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1146 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This
, iface
, iTInfo
, lcid
, ppTInfo
);
1151 static HRESULT WINAPI
Basicvideo_GetIDsOfNames(IBasicVideo
*iface
,
1157 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1159 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This
, iface
, debugstr_guid(riid
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
1164 static HRESULT WINAPI
Basicvideo_Invoke(IBasicVideo
*iface
,
1165 DISPID dispIdMember
,
1169 DISPPARAMS
*pDispParams
,
1171 EXCEPINFO
*pExepInfo
,
1173 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1175 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
);
1180 /*** IBasicVideo methods ***/
1181 static HRESULT WINAPI
Basicvideo_get_AvgTimePerFrame(IBasicVideo
*iface
,
1182 REFTIME
*pAvgTimePerFrame
) {
1183 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1185 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pAvgTimePerFrame
);
1190 static HRESULT WINAPI
Basicvideo_get_BitRate(IBasicVideo
*iface
,
1192 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1194 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pBitRate
);
1199 static HRESULT WINAPI
Basicvideo_get_BitErrorRate(IBasicVideo
*iface
,
1200 long *pBitErrorRate
) {
1201 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1203 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pBitErrorRate
);
1208 static HRESULT WINAPI
Basicvideo_get_VideoWidth(IBasicVideo
*iface
,
1209 long *pVideoWidth
) {
1210 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1212 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pVideoWidth
);
1217 static HRESULT WINAPI
Basicvideo_get_VideoHeight(IBasicVideo
*iface
,
1218 long *pVideoHeight
) {
1219 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1221 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pVideoHeight
);
1226 static HRESULT WINAPI
Basicvideo_put_SourceLeft(IBasicVideo
*iface
,
1228 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1230 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, SourceLeft
);
1235 static HRESULT WINAPI
Basicvideo_get_SourceLeft(IBasicVideo
*iface
,
1236 long *pSourceLeft
) {
1237 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1239 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pSourceLeft
);
1244 static HRESULT WINAPI
Basicvideo_put_SourceWidth(IBasicVideo
*iface
,
1246 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1248 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, SourceWidth
);
1253 static HRESULT WINAPI
Basicvideo_get_SourceWidth(IBasicVideo
*iface
,
1254 long *pSourceWidth
) {
1255 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1257 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pSourceWidth
);
1262 static HRESULT WINAPI
Basicvideo_put_SourceTop(IBasicVideo
*iface
,
1264 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1266 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, SourceTop
);
1271 static HRESULT WINAPI
Basicvideo_get_SourceTop(IBasicVideo
*iface
,
1273 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1275 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pSourceTop
);
1280 static HRESULT WINAPI
Basicvideo_put_SourceHeight(IBasicVideo
*iface
,
1281 long SourceHeight
) {
1282 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1284 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, SourceHeight
);
1289 static HRESULT WINAPI
Basicvideo_get_SourceHeight(IBasicVideo
*iface
,
1290 long *pSourceHeight
) {
1291 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1293 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pSourceHeight
);
1298 static HRESULT WINAPI
Basicvideo_put_DestinationLeft(IBasicVideo
*iface
,
1299 long DestinationLeft
) {
1300 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1302 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, DestinationLeft
);
1307 static HRESULT WINAPI
Basicvideo_get_DestinationLeft(IBasicVideo
*iface
,
1308 long *pDestinationLeft
) {
1309 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1311 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pDestinationLeft
);
1316 static HRESULT WINAPI
Basicvideo_put_DestinationWidth(IBasicVideo
*iface
,
1317 long DestinationWidth
) {
1318 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1320 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, DestinationWidth
);
1325 static HRESULT WINAPI
Basicvideo_get_DestinationWidth(IBasicVideo
*iface
,
1326 long *pDestinationWidth
) {
1327 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1329 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pDestinationWidth
);
1334 static HRESULT WINAPI
Basicvideo_put_DestinationTop(IBasicVideo
*iface
,
1335 long DestinationTop
) {
1336 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1338 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, DestinationTop
);
1343 static HRESULT WINAPI
Basicvideo_get_DestinationTop(IBasicVideo
*iface
,
1344 long *pDestinationTop
) {
1345 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1347 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pDestinationTop
);
1352 static HRESULT WINAPI
Basicvideo_put_DestinationHeight(IBasicVideo
*iface
,
1353 long DestinationHeight
) {
1354 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1356 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, DestinationHeight
);
1361 static HRESULT WINAPI
Basicvideo_get_DestinationHeight(IBasicVideo
*iface
,
1362 long *pDestinationHeight
) {
1363 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1365 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pDestinationHeight
);
1370 static HRESULT WINAPI
Basicvideo_SetSourcePosition(IBasicVideo
*iface
,
1375 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1377 TRACE("(%p/%p)->(%ld, %ld, %ld, %ld): stub !!!\n", This
, iface
, Left
, Top
, Width
, Height
);
1382 static HRESULT WINAPI
Basicvideo_GetSourcePosition(IBasicVideo
*iface
,
1387 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1389 TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This
, iface
, pLeft
, pTop
, pWidth
, pHeight
);
1394 static HRESULT WINAPI
Basicvideo_SetDefaultSourcePosition(IBasicVideo
*iface
) {
1395 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1397 TRACE("(%p/%p)->(): stub !!!\n", This
, iface
);
1402 static HRESULT WINAPI
Basicvideo_SetDestinationPosition(IBasicVideo
*iface
,
1407 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1409 TRACE("(%p/%p)->(%ld, %ld, %ld, %ld): stub !!!\n", This
, iface
, Left
, Top
, Width
, Height
);
1414 static HRESULT WINAPI
Basicvideo_GetDestinationPosition(IBasicVideo
*iface
,
1419 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1421 TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This
, iface
, pLeft
, pTop
, pWidth
, pHeight
);
1426 static HRESULT WINAPI
Basicvideo_SetDefaultDestinationPosition(IBasicVideo
*iface
) {
1427 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1429 TRACE("(%p/%p)->(): stub !!!\n", This
, iface
);
1434 static HRESULT WINAPI
Basicvideo_GetVideoSize(IBasicVideo
*iface
,
1437 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1439 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This
, iface
, pWidth
, pHeight
);
1444 static HRESULT WINAPI
Basicvideo_GetVideoPaletteEntries(IBasicVideo
*iface
,
1449 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1451 TRACE("(%p/%p)->(%ld, %ld, %p, %p): stub !!!\n", This
, iface
, StartIndex
, Entries
, pRetrieved
, pPalette
);
1456 static HRESULT WINAPI
Basicvideo_GetCurrentImage(IBasicVideo
*iface
,
1459 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1461 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This
, iface
, pBufferSize
, pDIBImage
);
1466 static HRESULT WINAPI
Basicvideo_IsUsingDefaultSource(IBasicVideo
*iface
) {
1467 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1469 TRACE("(%p/%p)->(): stub !!!\n", This
, iface
);
1474 static HRESULT WINAPI
Basicvideo_IsUsingDefaultDestination(IBasicVideo
*iface
) {
1475 ICOM_THIS_MULTI(IFilterGraphImpl
, IBasicVideo_vtbl
, iface
);
1477 TRACE("(%p/%p)->(): stub !!!\n", This
, iface
);
1483 static ICOM_VTABLE(IBasicVideo
) IBasicVideo_VTable
=
1485 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1486 Basicvideo_QueryInterface
,
1489 Basicvideo_GetTypeInfoCount
,
1490 Basicvideo_GetTypeInfo
,
1491 Basicvideo_GetIDsOfNames
,
1493 Basicvideo_get_AvgTimePerFrame
,
1494 Basicvideo_get_BitRate
,
1495 Basicvideo_get_BitErrorRate
,
1496 Basicvideo_get_VideoWidth
,
1497 Basicvideo_get_VideoHeight
,
1498 Basicvideo_put_SourceLeft
,
1499 Basicvideo_get_SourceLeft
,
1500 Basicvideo_put_SourceWidth
,
1501 Basicvideo_get_SourceWidth
,
1502 Basicvideo_put_SourceTop
,
1503 Basicvideo_get_SourceTop
,
1504 Basicvideo_put_SourceHeight
,
1505 Basicvideo_get_SourceHeight
,
1506 Basicvideo_put_DestinationLeft
,
1507 Basicvideo_get_DestinationLeft
,
1508 Basicvideo_put_DestinationWidth
,
1509 Basicvideo_get_DestinationWidth
,
1510 Basicvideo_put_DestinationTop
,
1511 Basicvideo_get_DestinationTop
,
1512 Basicvideo_put_DestinationHeight
,
1513 Basicvideo_get_DestinationHeight
,
1514 Basicvideo_SetSourcePosition
,
1515 Basicvideo_GetSourcePosition
,
1516 Basicvideo_SetDefaultSourcePosition
,
1517 Basicvideo_SetDestinationPosition
,
1518 Basicvideo_GetDestinationPosition
,
1519 Basicvideo_SetDefaultDestinationPosition
,
1520 Basicvideo_GetVideoSize
,
1521 Basicvideo_GetVideoPaletteEntries
,
1522 Basicvideo_GetCurrentImage
,
1523 Basicvideo_IsUsingDefaultSource
,
1524 Basicvideo_IsUsingDefaultDestination
1528 /*** IUnknown methods ***/
1529 static HRESULT WINAPI
Videowindow_QueryInterface(IVideoWindow
*iface
,
1532 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1534 TRACE("(%p/%p)->(%s (%p), %p)\n", This
, iface
, debugstr_guid(riid
), riid
, ppvObj
);
1536 return Filtergraph_QueryInterface(This
, riid
, ppvObj
);
1539 static ULONG WINAPI
Videowindow_AddRef(IVideoWindow
*iface
) {
1540 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1542 TRACE("(%p/%p)->()\n", This
, iface
);
1544 return Filtergraph_AddRef(This
);
1547 static ULONG WINAPI
Videowindow_Release(IVideoWindow
*iface
) {
1548 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1550 TRACE("(%p/%p)->()\n", This
, iface
);
1552 return Filtergraph_Release(This
);
1555 /*** IDispatch methods ***/
1556 static HRESULT WINAPI
Videowindow_GetTypeInfoCount(IVideoWindow
*iface
,
1558 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1560 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pctinfo
);
1565 static HRESULT WINAPI
Videowindow_GetTypeInfo(IVideoWindow
*iface
,
1568 ITypeInfo
**ppTInfo
) {
1569 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1571 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This
, iface
, iTInfo
, lcid
, ppTInfo
);
1576 static HRESULT WINAPI
Videowindow_GetIDsOfNames(IVideoWindow
*iface
,
1582 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1584 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This
, iface
, debugstr_guid(riid
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
1589 static HRESULT WINAPI
Videowindow_Invoke(IVideoWindow
*iface
,
1590 DISPID dispIdMember
,
1594 DISPPARAMS
*pDispParams
,
1596 EXCEPINFO
*pExepInfo
,
1598 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1600 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
);
1605 /*** IVideoWindow methods ***/
1606 static HRESULT WINAPI
Videowindow_put_Caption(IVideoWindow
*iface
,
1608 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1610 TRACE("(%p/%p)->(%s (%p)): stub !!!\n", This
, iface
, debugstr_w(strCaption
), strCaption
);
1615 static HRESULT WINAPI
Videowindow_get_Caption(IVideoWindow
*iface
,
1617 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1619 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, strCaption
);
1624 static HRESULT WINAPI
Videowindow_put_WindowStyle(IVideoWindow
*iface
,
1626 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1628 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, WindowStyle
);
1633 static HRESULT WINAPI
Videowindow_get_WindowStyle(IVideoWindow
*iface
,
1634 long *WindowStyle
) {
1635 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1637 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, WindowStyle
);
1642 static HRESULT WINAPI
Videowindow_put_WindowStyleEx(IVideoWindow
*iface
,
1643 long WindowStyleEx
) {
1644 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1646 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, WindowStyleEx
);
1651 static HRESULT WINAPI
Videowindow_get_WindowStyleEx(IVideoWindow
*iface
,
1652 long *WindowStyleEx
) {
1653 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1655 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, WindowStyleEx
);
1660 static HRESULT WINAPI
Videowindow_put_AutoShow(IVideoWindow
*iface
,
1662 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1664 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, AutoShow
);
1669 static HRESULT WINAPI
Videowindow_get_AutoShow(IVideoWindow
*iface
,
1671 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1673 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, AutoShow
);
1678 static HRESULT WINAPI
Videowindow_put_WindowState(IVideoWindow
*iface
,
1680 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1682 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, WindowState
);
1687 static HRESULT WINAPI
Videowindow_get_WindowState(IVideoWindow
*iface
,
1688 long *WindowState
) {
1689 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1691 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, WindowState
);
1696 static HRESULT WINAPI
Videowindow_put_BackgroundPalette(IVideoWindow
*iface
,
1697 long BackgroundPalette
) {
1698 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1700 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, BackgroundPalette
);
1705 static HRESULT WINAPI
Videowindow_get_BackgroundPalette(IVideoWindow
*iface
,
1706 long *pBackgroundPalette
) {
1707 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1709 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pBackgroundPalette
);
1714 static HRESULT WINAPI
Videowindow_put_Visible(IVideoWindow
*iface
,
1716 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1718 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, Visible
);
1723 static HRESULT WINAPI
Videowindow_get_Visible(IVideoWindow
*iface
,
1725 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1727 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pVisible
);
1732 static HRESULT WINAPI
Videowindow_put_Left(IVideoWindow
*iface
,
1734 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1736 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, Left
);
1741 static HRESULT WINAPI
Videowindow_get_Left(IVideoWindow
*iface
,
1743 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1745 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pLeft
);
1750 static HRESULT WINAPI
Videowindow_put_Width(IVideoWindow
*iface
,
1752 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1754 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, Width
);
1759 static HRESULT WINAPI
Videowindow_get_Width(IVideoWindow
*iface
,
1761 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1763 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pWidth
);
1768 static HRESULT WINAPI
Videowindow_put_Top(IVideoWindow
*iface
,
1770 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1772 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, Top
);
1777 static HRESULT WINAPI
Videowindow_get_Top(IVideoWindow
*iface
,
1779 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1781 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pTop
);
1786 static HRESULT WINAPI
Videowindow_put_Height(IVideoWindow
*iface
,
1788 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1790 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, Height
);
1795 static HRESULT WINAPI
Videowindow_get_Height(IVideoWindow
*iface
,
1797 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1799 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pHeight
);
1804 static HRESULT WINAPI
Videowindow_put_Owner(IVideoWindow
*iface
,
1806 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1808 TRACE("(%p/%p)->(%08lx): stub !!!\n", This
, iface
, (DWORD
) Owner
);
1813 static HRESULT WINAPI
Videowindow_get_Owner(IVideoWindow
*iface
,
1815 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1817 TRACE("(%p/%p)->(%08lx): stub !!!\n", This
, iface
, (DWORD
) Owner
);
1822 static HRESULT WINAPI
Videowindow_put_MessageDrain(IVideoWindow
*iface
,
1824 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1826 TRACE("(%p/%p)->(%08lx): stub !!!\n", This
, iface
, (DWORD
) Drain
);
1831 static HRESULT WINAPI
Videowindow_get_MessageDrain(IVideoWindow
*iface
,
1833 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1835 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, Drain
);
1840 static HRESULT WINAPI
Videowindow_get_BorderColor(IVideoWindow
*iface
,
1842 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1844 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, Color
);
1849 static HRESULT WINAPI
Videowindow_put_BorderColor(IVideoWindow
*iface
,
1851 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1853 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, Color
);
1858 static HRESULT WINAPI
Videowindow_get_FullScreenMode(IVideoWindow
*iface
,
1859 long *FullScreenMode
) {
1860 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1862 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, FullScreenMode
);
1867 static HRESULT WINAPI
Videowindow_put_FullScreenMode(IVideoWindow
*iface
,
1868 long FullScreenMode
) {
1869 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1871 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, FullScreenMode
);
1876 static HRESULT WINAPI
Videowindow_SetWindowForeground(IVideoWindow
*iface
,
1878 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1880 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, Focus
);
1885 static HRESULT WINAPI
Videowindow_NotifyOwnerMessage(IVideoWindow
*iface
,
1890 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1892 TRACE("(%p/%p)->(%08lx, %ld, %08lx, %08lx): stub !!!\n", This
, iface
, (DWORD
) hwnd
, uMsg
, wParam
, lParam
);
1897 static HRESULT WINAPI
Videowindow_SetWindowPosition(IVideoWindow
*iface
,
1902 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1904 TRACE("(%p/%p)->(%ld, %ld, %ld, %ld): stub !!!\n", This
, iface
, Left
, Top
, Width
, Height
);
1909 static HRESULT WINAPI
Videowindow_GetWindowPosition(IVideoWindow
*iface
,
1914 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1916 TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This
, iface
, pLeft
, pTop
, pWidth
, pHeight
);
1921 static HRESULT WINAPI
Videowindow_GetMinIdealImageSize(IVideoWindow
*iface
,
1924 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1926 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This
, iface
, pWidth
, pHeight
);
1931 static HRESULT WINAPI
Videowindow_GetMaxIdealImageSize(IVideoWindow
*iface
,
1934 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1936 TRACE("(%p/%p)->(%p, %p): stub !!!\n", This
, iface
, pWidth
, pHeight
);
1941 static HRESULT WINAPI
Videowindow_GetRestorePosition(IVideoWindow
*iface
,
1946 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1948 TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This
, iface
, pLeft
, pTop
, pWidth
, pHeight
);
1953 static HRESULT WINAPI
Videowindow_HideCursor(IVideoWindow
*iface
,
1955 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1957 TRACE("(%p/%p)->(%ld): stub !!!\n", This
, iface
, HideCursor
);
1962 static HRESULT WINAPI
Videowindow_IsCursorHidden(IVideoWindow
*iface
,
1963 long *CursorHidden
) {
1964 ICOM_THIS_MULTI(IFilterGraphImpl
, IVideoWindow_vtbl
, iface
);
1966 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, CursorHidden
);
1972 static ICOM_VTABLE(IVideoWindow
) IVideoWindow_VTable
=
1974 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1975 Videowindow_QueryInterface
,
1977 Videowindow_Release
,
1978 Videowindow_GetTypeInfoCount
,
1979 Videowindow_GetTypeInfo
,
1980 Videowindow_GetIDsOfNames
,
1982 Videowindow_put_Caption
,
1983 Videowindow_get_Caption
,
1984 Videowindow_put_WindowStyle
,
1985 Videowindow_get_WindowStyle
,
1986 Videowindow_put_WindowStyleEx
,
1987 Videowindow_get_WindowStyleEx
,
1988 Videowindow_put_AutoShow
,
1989 Videowindow_get_AutoShow
,
1990 Videowindow_put_WindowState
,
1991 Videowindow_get_WindowState
,
1992 Videowindow_put_BackgroundPalette
,
1993 Videowindow_get_BackgroundPalette
,
1994 Videowindow_put_Visible
,
1995 Videowindow_get_Visible
,
1996 Videowindow_put_Left
,
1997 Videowindow_get_Left
,
1998 Videowindow_put_Width
,
1999 Videowindow_get_Width
,
2000 Videowindow_put_Top
,
2001 Videowindow_get_Top
,
2002 Videowindow_put_Height
,
2003 Videowindow_get_Height
,
2004 Videowindow_put_Owner
,
2005 Videowindow_get_Owner
,
2006 Videowindow_put_MessageDrain
,
2007 Videowindow_get_MessageDrain
,
2008 Videowindow_get_BorderColor
,
2009 Videowindow_put_BorderColor
,
2010 Videowindow_get_FullScreenMode
,
2011 Videowindow_put_FullScreenMode
,
2012 Videowindow_SetWindowForeground
,
2013 Videowindow_NotifyOwnerMessage
,
2014 Videowindow_SetWindowPosition
,
2015 Videowindow_GetWindowPosition
,
2016 Videowindow_GetMinIdealImageSize
,
2017 Videowindow_GetMaxIdealImageSize
,
2018 Videowindow_GetRestorePosition
,
2019 Videowindow_HideCursor
,
2020 Videowindow_IsCursorHidden
2024 /*** IUnknown methods ***/
2025 static HRESULT WINAPI
Mediaevent_QueryInterface(IMediaEventEx
*iface
,
2028 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2030 TRACE("(%p/%p)->(%s (%p), %p)\n", This
, iface
, debugstr_guid(riid
), riid
, ppvObj
);
2032 return Filtergraph_QueryInterface(This
, riid
, ppvObj
);
2035 static ULONG WINAPI
Mediaevent_AddRef(IMediaEventEx
*iface
) {
2036 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2038 TRACE("(%p/%p)->()\n", This
, iface
);
2040 return Filtergraph_AddRef(This
);
2043 static ULONG WINAPI
Mediaevent_Release(IMediaEventEx
*iface
) {
2044 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2046 TRACE("(%p/%p)->()\n", This
, iface
);
2048 return Filtergraph_Release(This
);
2051 /*** IDispatch methods ***/
2052 static HRESULT WINAPI
Mediaevent_GetTypeInfoCount(IMediaEventEx
*iface
,
2054 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2056 TRACE("(%p/%p)->(%p): stub !!!\n", This
, iface
, pctinfo
);
2061 static HRESULT WINAPI
Mediaevent_GetTypeInfo(IMediaEventEx
*iface
,
2064 ITypeInfo
**ppTInfo
) {
2065 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2067 TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This
, iface
, iTInfo
, lcid
, ppTInfo
);
2072 static HRESULT WINAPI
Mediaevent_GetIDsOfNames(IMediaEventEx
*iface
,
2078 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2080 TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This
, iface
, debugstr_guid(riid
), riid
, rgszNames
, cNames
, lcid
, rgDispId
);
2085 static HRESULT WINAPI
Mediaevent_Invoke(IMediaEventEx
*iface
,
2086 DISPID dispIdMember
,
2090 DISPPARAMS
*pDispParams
,
2092 EXCEPINFO
*pExepInfo
,
2094 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2096 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
);
2101 /*** IMediaEvent methods ***/
2102 static HRESULT WINAPI
Mediaevent_GetEventHandle(IMediaEventEx
*iface
,
2104 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2106 TRACE("(%p/%p)->(%p)\n", This
, iface
, hEvent
);
2108 *hEvent
= (OAEVENT
)This
->evqueue
.msg_event
;
2113 static HRESULT WINAPI
Mediaevent_GetEvent(IMediaEventEx
*iface
,
2118 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2121 TRACE("(%p/%p)->(%p, %p, %p, %ld)\n", This
, iface
, lEventCode
, lParam1
, lParam2
, msTimeout
);
2123 if (EventsQueue_GetEvent(&This
->evqueue
, &evt
, msTimeout
))
2125 *lEventCode
= evt
.lEventCode
;
2126 *lParam1
= evt
.lParam1
;
2127 *lParam2
= evt
.lParam2
;
2135 static HRESULT WINAPI
Mediaevent_WaitForCompletion(IMediaEventEx
*iface
,
2138 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2140 TRACE("(%p/%p)->(%ld, %p)\n", This
, iface
, msTimeout
, pEvCode
);
2142 if (WaitForSingleObject(This
->hEventCompletion
, msTimeout
) == WAIT_OBJECT_0
)
2144 *pEvCode
= This
->CompletionStatus
;
2152 static HRESULT WINAPI
Mediaevent_CancelDefaultHandling(IMediaEventEx
*iface
,
2154 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2156 TRACE("(%p/%p)->(%ld)\n", This
, iface
, lEvCode
);
2158 if (lEvCode
== EC_COMPLETE
)
2159 This
->HandleEcComplete
= FALSE
;
2160 else if (lEvCode
== EC_REPAINT
)
2161 This
->HandleEcRepaint
= FALSE
;
2168 static HRESULT WINAPI
Mediaevent_RestoreDefaultHandling(IMediaEventEx
*iface
,
2170 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2172 TRACE("(%p/%p)->(%ld)\n", This
, iface
, lEvCode
);
2174 if (lEvCode
== EC_COMPLETE
)
2175 This
->HandleEcComplete
= TRUE
;
2176 else if (lEvCode
== EC_REPAINT
)
2177 This
->HandleEcRepaint
= TRUE
;
2184 static HRESULT WINAPI
Mediaevent_FreeEventParams(IMediaEventEx
*iface
,
2188 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2190 TRACE("(%p/%p)->(%ld, %08lx, %08lx): stub !!!\n", This
, iface
, lEvCode
, lParam1
, lParam2
);
2195 /*** IMediaEventEx methods ***/
2196 static HRESULT WINAPI
Mediaevent_SetNotifyWindow(IMediaEventEx
*iface
,
2199 LONG_PTR lInstanceData
) {
2200 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2202 TRACE("(%p/%p)->(%08lx, %ld, %08lx)\n", This
, iface
, (DWORD
) hwnd
, lMsg
, lInstanceData
);
2204 This
->notif
.hWnd
= (HWND
)hwnd
;
2205 This
->notif
.msg
= lMsg
;
2206 This
->notif
.instance
= (long) lInstanceData
;
2211 static HRESULT WINAPI
Mediaevent_SetNotifyFlags(IMediaEventEx
*iface
,
2212 long lNoNotifyFlags
) {
2213 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2215 TRACE("(%p/%p)->(%ld)\n", This
, iface
, lNoNotifyFlags
);
2217 if ((lNoNotifyFlags
!= 0) || (lNoNotifyFlags
!= 1))
2218 return E_INVALIDARG
;
2220 This
->notif
.disabled
= lNoNotifyFlags
;
2225 static HRESULT WINAPI
Mediaevent_GetNotifyFlags(IMediaEventEx
*iface
,
2226 long *lplNoNotifyFlags
) {
2227 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2229 TRACE("(%p/%p)->(%p)\n", This
, iface
, lplNoNotifyFlags
);
2231 if (!lplNoNotifyFlags
)
2234 *lplNoNotifyFlags
= This
->notif
.disabled
;
2240 static ICOM_VTABLE(IMediaEventEx
) IMediaEventEx_VTable
=
2242 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
2243 Mediaevent_QueryInterface
,
2246 Mediaevent_GetTypeInfoCount
,
2247 Mediaevent_GetTypeInfo
,
2248 Mediaevent_GetIDsOfNames
,
2250 Mediaevent_GetEventHandle
,
2251 Mediaevent_GetEvent
,
2252 Mediaevent_WaitForCompletion
,
2253 Mediaevent_CancelDefaultHandling
,
2254 Mediaevent_RestoreDefaultHandling
,
2255 Mediaevent_FreeEventParams
,
2256 Mediaevent_SetNotifyWindow
,
2257 Mediaevent_SetNotifyFlags
,
2258 Mediaevent_GetNotifyFlags
2262 static HRESULT WINAPI
MediaFilter_QueryInterface(IMediaFilter
*iface
, REFIID riid
, LPVOID
*ppv
)
2264 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2266 return Filtergraph_QueryInterface(This
, riid
, ppv
);
2269 static ULONG WINAPI
MediaFilter_AddRef(IMediaFilter
*iface
)
2271 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2273 return Filtergraph_AddRef(This
);
2276 static ULONG WINAPI
MediaFilter_Release(IMediaFilter
*iface
)
2278 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventEx_vtbl
, iface
);
2280 return Filtergraph_Release(This
);
2283 static HRESULT WINAPI
MediaFilter_GetClassID(IMediaFilter
*iface
, CLSID
* pClassID
)
2285 FIXME("(%p): stub\n", pClassID
);
2290 static HRESULT WINAPI
MediaFilter_Stop(IMediaFilter
*iface
)
2292 FIXME("(): stub\n");
2297 static HRESULT WINAPI
MediaFilter_Pause(IMediaFilter
*iface
)
2299 FIXME("(): stub\n");
2304 static HRESULT WINAPI
MediaFilter_Run(IMediaFilter
*iface
, REFERENCE_TIME tStart
)
2306 FIXME("(%lld): stub\n", tStart
);
2311 static HRESULT WINAPI
MediaFilter_GetState(IMediaFilter
*iface
, DWORD dwMsTimeout
, FILTER_STATE
* pState
)
2313 FIXME("(%ld, %p): stub\n", dwMsTimeout
, pState
);
2318 static HRESULT WINAPI
MediaFilter_SetSyncSource(IMediaFilter
*iface
, IReferenceClock
*pClock
)
2320 FIXME("(%p): stub\n", pClock
);
2325 static HRESULT WINAPI
MediaFilter_GetSyncSource(IMediaFilter
*iface
, IReferenceClock
**ppClock
)
2327 FIXME("(%p): stub\n", ppClock
);
2332 static ICOM_VTABLE(IMediaFilter
) IMediaFilter_VTable
=
2334 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
2335 MediaFilter_QueryInterface
,
2337 MediaFilter_Release
,
2338 MediaFilter_GetClassID
,
2342 MediaFilter_GetState
,
2343 MediaFilter_SetSyncSource
,
2344 MediaFilter_GetSyncSource
2347 static HRESULT WINAPI
MediaEventSink_QueryInterface(IMediaEventSink
*iface
, REFIID riid
, LPVOID
*ppv
)
2349 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventSink_vtbl
, iface
);
2351 return Filtergraph_QueryInterface(This
, riid
, ppv
);
2354 static ULONG WINAPI
MediaEventSink_AddRef(IMediaEventSink
*iface
)
2356 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventSink_vtbl
, iface
);
2358 return Filtergraph_AddRef(This
);
2361 static ULONG WINAPI
MediaEventSink_Release(IMediaEventSink
*iface
)
2363 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventSink_vtbl
, iface
);
2365 return Filtergraph_Release(This
);
2368 static HRESULT WINAPI
MediaEventSink_Notify(IMediaEventSink
*iface
, long EventCode
, LONG_PTR EventParam1
, LONG_PTR EventParam2
)
2370 ICOM_THIS_MULTI(IFilterGraphImpl
, IMediaEventSink_vtbl
, iface
);
2373 TRACE("(%p/%p)->(%ld, %ld, %ld)\n", This
, iface
, EventCode
, EventParam1
, EventParam2
);
2375 /* We need thread safety here, let's use the events queue's one */
2376 EnterCriticalSection(&This
->evqueue
.msg_crst
);
2378 if ((EventCode
== EC_COMPLETE
) && This
->HandleEcComplete
)
2380 if (++This
->EcCompleteCount
== This
->nRenderers
)
2382 evt
.lEventCode
= EC_COMPLETE
;
2385 EventsQueue_PutEvent(&This
->evqueue
, &evt
);
2386 if (!This
->notif
.disabled
&& This
->notif
.hWnd
)
2387 PostMessageW(This
->notif
.hWnd
, This
->notif
.msg
, 0, This
->notif
.instance
);
2388 This
->CompletionStatus
= EC_COMPLETE
;
2389 SetEvent(This
->hEventCompletion
);
2392 else if ((EventCode
== EC_REPAINT
) && This
->HandleEcRepaint
)
2394 /* FIXME: Not handled yet */
2398 evt
.lEventCode
= EventCode
;
2399 evt
.lParam1
= EventParam1
;
2400 evt
.lParam2
= EventParam2
;
2401 EventsQueue_PutEvent(&This
->evqueue
, &evt
);
2402 if (!This
->notif
.disabled
&& This
->notif
.hWnd
)
2403 PostMessageW(This
->notif
.hWnd
, This
->notif
.msg
, 0, This
->notif
.instance
);
2406 LeaveCriticalSection(&This
->evqueue
.msg_crst
);
2410 static ICOM_VTABLE(IMediaEventSink
) IMediaEventSink_VTable
=
2412 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
2413 MediaEventSink_QueryInterface
,
2414 MediaEventSink_AddRef
,
2415 MediaEventSink_Release
,
2416 MediaEventSink_Notify
2419 /* This is the only function that actually creates a FilterGraph class... */
2420 HRESULT
FILTERGRAPH_create(IUnknown
*pUnkOuter
, LPVOID
*ppObj
) {
2421 IFilterGraphImpl
*fimpl
;
2423 TRACE("(%p,%p)\n", pUnkOuter
, ppObj
);
2425 fimpl
= (IFilterGraphImpl
*) HeapAlloc(GetProcessHeap(), 0, sizeof(*fimpl
));
2426 fimpl
->IGraphBuilder_vtbl
= &IGraphBuilder_VTable
;
2427 fimpl
->IMediaControl_vtbl
= &IMediaControl_VTable
;
2428 fimpl
->IMediaSeeking_vtbl
= &IMediaSeeking_VTable
;
2429 fimpl
->IBasicAudio_vtbl
= &IBasicAudio_VTable
;
2430 fimpl
->IBasicVideo_vtbl
= &IBasicVideo_VTable
;
2431 fimpl
->IVideoWindow_vtbl
= &IVideoWindow_VTable
;
2432 fimpl
->IMediaEventEx_vtbl
= &IMediaEventEx_VTable
;
2433 fimpl
->IMediaFilter_vtbl
= &IMediaFilter_VTable
;
2434 fimpl
->IMediaEventSink_vtbl
= &IMediaEventSink_VTable
;
2436 fimpl
->ppFiltersInGraph
= NULL
;
2437 fimpl
->pFilterNames
= NULL
;
2438 fimpl
->nFilters
= 0;
2439 fimpl
->filterCapacity
= 0;
2440 fimpl
->nameIndex
= 1;
2441 fimpl
->hEventCompletion
= CreateEventW(0, TRUE
, FALSE
,0);
2442 fimpl
->HandleEcComplete
= TRUE
;
2443 fimpl
->HandleEcRepaint
= TRUE
;
2444 fimpl
->notif
.hWnd
= 0;
2445 fimpl
->notif
.disabled
= TRUE
;
2446 fimpl
->nRenderers
= 0;
2447 fimpl
->EcCompleteCount
= 0;
2448 EventsQueue_Init(&fimpl
->evqueue
);