Assorted spelling fixes.
[wine] / dlls / quartz / videorenderer.c
1 /*
2  * Video Renderer (Fullscreen and Windowed using Direct Draw)
3  *
4  * Copyright 2004 Christian Costa
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #include "config.h"
22
23 #define NONAMELESSSTRUCT
24 #define NONAMELESSUNION
25 #include "quartz_private.h"
26 #include "control_private.h"
27 #include "pin.h"
28
29 #include "uuids.h"
30 #include "mmreg.h"
31 #include "vfwmsgs.h"
32 #include "amvideo.h"
33 #include "fourcc.h"
34 #include "windef.h"
35 #include "winbase.h"
36 #include "dshow.h"
37 #include "strmif.h"
38 #include "ddraw.h"
39
40 #include "wine/unicode.h"
41 #include "wine/debug.h"
42
43 WINE_DEFAULT_DEBUG_CHANNEL(quartz);
44
45 static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0};
46
47 static const IBaseFilterVtbl VideoRenderer_Vtbl;
48 static IBasicVideoVtbl IBasicVideo_VTable;
49 static IVideoWindowVtbl IVideoWindow_VTable;
50 static const IPinVtbl VideoRenderer_InputPin_Vtbl;
51
52 typedef struct VideoRendererImpl
53 {
54     const IBaseFilterVtbl * lpVtbl;
55     IBasicVideoVtbl * IBasicVideo_vtbl;
56     IVideoWindowVtbl * IVideoWindow_vtbl;
57
58     ULONG refCount;
59     CRITICAL_SECTION csFilter;
60     FILTER_STATE state;
61     REFERENCE_TIME rtStreamStart;
62     IReferenceClock * pClock;
63     FILTER_INFO filterInfo;
64
65     InputPin * pInputPin;
66     IPin ** ppPins;
67
68     LPDIRECTDRAW ddraw;
69     LPDIRECTDRAWSURFACE surface;
70     LPDIRECTDRAWSURFACE backbuffer;
71     int init;
72 } VideoRendererImpl;
73
74 static const IMemInputPinVtbl MemInputPin_Vtbl = 
75 {
76     MemInputPin_QueryInterface,
77     MemInputPin_AddRef,
78     MemInputPin_Release,
79     MemInputPin_GetAllocator,
80     MemInputPin_NotifyAllocator,
81     MemInputPin_GetAllocatorRequirements,
82     MemInputPin_Receive,
83     MemInputPin_ReceiveMultiple,
84     MemInputPin_ReceiveCanBlock
85 };
86
87 static HRESULT VideoRenderer_InputPin_Construct(const PIN_INFO * pPinInfo, SAMPLEPROC pSampleProc, LPVOID pUserData, QUERYACCEPTPROC pQueryAccept, LPCRITICAL_SECTION pCritSec, IPin ** ppPin)
88 {
89     InputPin * pPinImpl;
90
91     *ppPin = NULL;
92
93     if (pPinInfo->dir != PINDIR_INPUT)
94     {
95         ERR("Pin direction(%x) != PINDIR_INPUT\n", pPinInfo->dir);
96         return E_INVALIDARG;
97     }
98
99     pPinImpl = CoTaskMemAlloc(sizeof(*pPinImpl));
100
101     if (!pPinImpl)
102         return E_OUTOFMEMORY;
103
104     if (SUCCEEDED(InputPin_Init(pPinInfo, pSampleProc, pUserData, pQueryAccept, pCritSec, pPinImpl)))
105     {
106         pPinImpl->pin.lpVtbl = &VideoRenderer_InputPin_Vtbl;
107         pPinImpl->lpVtblMemInput = &MemInputPin_Vtbl;
108       
109         *ppPin = (IPin *)(&pPinImpl->pin.lpVtbl);
110         return S_OK;
111     }
112     return E_FAIL;
113 }
114
115 static HRESULT VideoRenderer_CreatePrimarySurface(IBaseFilter * iface)
116 {
117     HRESULT hr;
118     DDSURFACEDESC sdesc;
119     DDSCAPS ddscaps;
120     ICOM_THIS(VideoRendererImpl, iface);
121         
122     hr = DirectDrawCreate(NULL, &This->ddraw, NULL);
123
124     if (FAILED(hr)) {
125         ERR("Cannot create Direct Draw object\n");
126         return hr;
127     }
128
129     hr = IDirectDraw_SetCooperativeLevel(This->ddraw, NULL, DDSCL_FULLSCREEN|DDSCL_EXCLUSIVE);
130     if (FAILED(hr)) {
131         ERR("Cannot set fulscreen mode\n");
132         return hr;
133     }
134     
135     sdesc.dwSize = sizeof(sdesc);
136     sdesc.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;
137     sdesc.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_COMPLEX | DDSCAPS_FLIP;
138     sdesc.dwBackBufferCount = 1;
139
140     hr = IDirectDraw_CreateSurface(This->ddraw, &sdesc, &This->surface, NULL);
141     if (FAILED(hr)) {
142         ERR("Cannot create surface\n");
143         return hr;
144     }
145
146     hr = IDirectDrawSurface_GetSurfaceDesc(This->surface, &sdesc);
147     if (FAILED(hr)) {
148         ERR("Cannot get surface information\n");
149         return hr;
150     }
151     TRACE("Width = %ld\n", sdesc.dwWidth);
152     TRACE("Height = %ld\n", sdesc.dwHeight);
153     TRACE("Pitch = %ld\n", sdesc.u1.lPitch);
154     TRACE("Depth = %ld\n", sdesc.ddpfPixelFormat.u1.dwRGBBitCount);
155     
156     ddscaps.dwCaps = DDSCAPS_BACKBUFFER;
157     hr = IDirectDrawSurface_GetAttachedSurface(This->surface, &ddscaps, &This->backbuffer);
158     if (FAILED(hr)) {
159         ERR("Cannot get backbuffer\n");
160         return hr;
161     }
162
163     return S_OK;
164 }
165
166 static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data, DWORD size)
167 {
168     VIDEOINFOHEADER* format;
169     AM_MEDIA_TYPE amt;
170     HRESULT hr = S_OK;
171     int i = 0;
172     int j = 0;
173     LPBYTE ptr;
174     DDSURFACEDESC sdesc;
175     int width;
176     int height;
177     LPBYTE palette = NULL;
178
179     TRACE("%p %p %ld\n", This, data, size);
180
181     sdesc.dwSize = sizeof(sdesc);
182     hr = IPin_ConnectionMediaType(This->ppPins[0], &amt);
183     if (FAILED(hr)) {
184         ERR("Unable to retrieve media type\n");
185         return hr;
186     }
187     format = (VIDEOINFOHEADER*)amt.pbFormat;
188
189     TRACE("biSize = %ld\n", format->bmiHeader.biSize);
190     TRACE("biWidth = %ld\n", format->bmiHeader.biWidth);
191     TRACE("biHeigth = %ld\n", format->bmiHeader.biHeight);
192     TRACE("biPlanes = %d\n", format->bmiHeader.biPlanes);
193     TRACE("biBitCount = %d\n", format->bmiHeader.biBitCount);
194     TRACE("biCompression = %s\n", debugstr_an((LPSTR)&(format->bmiHeader.biCompression), 4));
195     TRACE("biSizeImage = %ld\n", format->bmiHeader.biSizeImage);
196
197     width = format->bmiHeader.biWidth;
198     height = format->bmiHeader.biHeight;
199     palette = ((LPBYTE)&format->bmiHeader) + format->bmiHeader.biSize;
200  
201     hr = IDirectDrawSurface_Lock(This->backbuffer, NULL, &sdesc, DDLOCK_WRITEONLY, NULL);
202     if (FAILED(hr)) {
203         ERR("Cannot lock backbuffer\n");
204         return hr;
205     }
206
207     ptr = sdesc.lpSurface;
208
209     /* FIXME: We may use Direct Draw services to do the conversion for us */
210     if ((sdesc.ddpfPixelFormat.u1.dwRGBBitCount == 24) || (sdesc.ddpfPixelFormat.u1.dwRGBBitCount == 32))
211     {
212         if (format->bmiHeader.biBitCount == 8)
213         {
214             int psz = sdesc.ddpfPixelFormat.u1.dwRGBBitCount == 32 ? 4 : 3;
215             for (j = 0; j < height; j++)
216                 for (i = 0; i < width; i++)
217                 {
218                     *(ptr + i*psz + 0 + j * sdesc.u1.lPitch) = palette[*(data + i + 0 + (height-1-j) * width)*4 + 0];
219                     *(ptr + i*psz + 1 + j * sdesc.u1.lPitch) = palette[*(data + i + 0 + (height-1-j) * width)*4 + 1];
220                     *(ptr + i*psz + 2 + j * sdesc.u1.lPitch) = palette[*(data + i + 0 + (height-1-j) * width)*4 + 2];
221                     if (psz == 4)
222                         *(ptr + i*psz + 3 + j * sdesc.u1.lPitch) = 0xFF;
223                 }
224         }
225         else
226             FIXME("Source size with a depths other than paletted 8 bits are not yet supported\n");
227     }
228     else
229         FIXME("Destination depths with a depth other than 24 or 32 bits are not yet supported\n");     
230
231     hr = IDirectDrawSurface_Unlock(This->backbuffer, NULL);
232     if (FAILED(hr)) {
233         ERR("Cannot unlock backbuffer\n");
234         return hr;
235     }
236
237     hr = IDirectDrawSurface_Flip(This->surface, NULL, DDFLIP_WAIT);
238     if (FAILED(hr)) {
239         ERR("Cannot unlock backbuffer\n");
240         return hr;
241     }
242     
243     return S_OK;
244 }
245
246 static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample)
247 {
248     ICOM_THIS(VideoRendererImpl, iface);
249     LPBYTE pbSrcStream = NULL;
250     long cbSrcStream = 0;
251     REFERENCE_TIME tStart, tStop;
252     HRESULT hr;
253
254     TRACE("%p %p\n", iface, pSample);
255     
256     hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
257     if (FAILED(hr))
258     {
259         ERR("Cannot get pointer to sample data (%lx)\n", hr);
260         return hr;
261     }
262
263     hr = IMediaSample_GetTime(pSample, &tStart, &tStop);
264     if (FAILED(hr))
265         ERR("Cannot get sample time (%lx)\n", hr);
266
267     cbSrcStream = IMediaSample_GetActualDataLength(pSample);
268
269     TRACE("val %p %ld\n", pbSrcStream, cbSrcStream);
270
271 #if 0 /* For debugging purpose */
272     {
273         int i;
274         for(i = 0; i < cbSrcStream; i++)
275         {
276             if ((i!=0) && !(i%16))
277                 DPRINTF("\n");
278             DPRINTF("%02x ", pbSrcStream[i]);
279         }
280         DPRINTF("\n");
281     }
282 #endif
283     
284     if (!This->init)
285     {
286         This->init = 1;
287         hr = VideoRenderer_CreatePrimarySurface(iface);
288         if (FAILED(hr))
289         {
290             ERR("Unable to create primary surface\n");
291         }
292     }
293
294     VideoRenderer_SendSampleData(This, pbSrcStream, cbSrcStream);
295
296     /* We have finished with the incoming sample, we must release it now */
297     IMediaSample_Release(pSample);
298     
299     return S_OK;
300 }
301
302 static HRESULT VideoRenderer_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE * pmt)
303 {
304     if ((IsEqualIID(&pmt->majortype, &MEDIATYPE_Video) && IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB32)) ||
305         (IsEqualIID(&pmt->majortype, &MEDIATYPE_Video) && IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB24)) ||
306         (IsEqualIID(&pmt->majortype, &MEDIATYPE_Video) && IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB565)) ||
307         (IsEqualIID(&pmt->majortype, &MEDIATYPE_Video) && IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB8)))
308         return S_OK;
309     return S_FALSE;
310 }
311
312 HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
313 {
314     HRESULT hr;
315     PIN_INFO piInput;
316     VideoRendererImpl * pVideoRenderer;
317
318     TRACE("(%p, %p)\n", pUnkOuter, ppv);
319
320     *ppv = NULL;
321
322     if (pUnkOuter)
323         return CLASS_E_NOAGGREGATION;
324     
325     pVideoRenderer = CoTaskMemAlloc(sizeof(VideoRendererImpl));
326
327     pVideoRenderer->lpVtbl = &VideoRenderer_Vtbl;
328     pVideoRenderer->IBasicVideo_vtbl = &IBasicVideo_VTable;
329     pVideoRenderer->IVideoWindow_vtbl = &IVideoWindow_VTable;
330     
331     pVideoRenderer->refCount = 1;
332     InitializeCriticalSection(&pVideoRenderer->csFilter);
333     pVideoRenderer->state = State_Stopped;
334     pVideoRenderer->pClock = NULL;
335     pVideoRenderer->init = 0;
336     ZeroMemory(&pVideoRenderer->filterInfo, sizeof(FILTER_INFO));
337
338     pVideoRenderer->ppPins = CoTaskMemAlloc(1 * sizeof(IPin *));
339
340     /* construct input pin */
341     piInput.dir = PINDIR_INPUT;
342     piInput.pFilter = (IBaseFilter *)pVideoRenderer;
343     strncpyW(piInput.achName, wcsInputPinName, sizeof(piInput.achName) / sizeof(piInput.achName[0]));
344
345     hr = VideoRenderer_InputPin_Construct(&piInput, VideoRenderer_Sample, (LPVOID)pVideoRenderer, VideoRenderer_QueryAccept, &pVideoRenderer->csFilter, (IPin **)&pVideoRenderer->pInputPin);
346
347     if (SUCCEEDED(hr))
348     {
349         pVideoRenderer->ppPins[0] = (IPin *)pVideoRenderer->pInputPin;
350         *ppv = (LPVOID)pVideoRenderer;
351     }
352     else
353     {
354         CoTaskMemFree(pVideoRenderer->ppPins);
355         DeleteCriticalSection(&pVideoRenderer->csFilter);
356         CoTaskMemFree(pVideoRenderer);
357     }
358
359     return hr;
360 }
361
362 static HRESULT WINAPI VideoRenderer_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv)
363 {
364     ICOM_THIS(VideoRendererImpl, iface);
365     TRACE("(%p/%p)->(%s, %p)\n", This, iface, qzdebugstr_guid(riid), ppv);
366
367     *ppv = NULL;
368
369     if (IsEqualIID(riid, &IID_IUnknown))
370         *ppv = (LPVOID)This;
371     else if (IsEqualIID(riid, &IID_IPersist))
372         *ppv = (LPVOID)This;
373     else if (IsEqualIID(riid, &IID_IMediaFilter))
374         *ppv = (LPVOID)This;
375     else if (IsEqualIID(riid, &IID_IBaseFilter))
376         *ppv = (LPVOID)This;
377     else if (IsEqualIID(riid, &IID_IBasicVideo))
378         *ppv = (LPVOID)&(This->IBasicVideo_vtbl);
379     else if (IsEqualIID(riid, &IID_IVideoWindow))
380         *ppv = (LPVOID)&(This->IVideoWindow_vtbl);
381
382     if (*ppv)
383     {
384         IUnknown_AddRef((IUnknown *)(*ppv));
385         return S_OK;
386     }
387
388     FIXME("No interface for %s!\n", qzdebugstr_guid(riid));
389
390     return E_NOINTERFACE;
391 }
392
393 static ULONG WINAPI VideoRenderer_AddRef(IBaseFilter * iface)
394 {
395     ICOM_THIS(VideoRendererImpl, iface);
396     TRACE("(%p/%p)->() AddRef from %ld\n", This, iface, This->refCount);
397     return InterlockedIncrement(&This->refCount);
398 }
399
400 static ULONG WINAPI VideoRenderer_Release(IBaseFilter * iface)
401 {
402     ICOM_THIS(VideoRendererImpl, iface);
403     TRACE("(%p/%p)->() Release from %ld\n", This, iface, This->refCount);
404     if (!InterlockedDecrement(&This->refCount))
405     {
406         DeleteCriticalSection(&This->csFilter);
407         IReferenceClock_Release(This->pClock);
408         
409         IPin_Release(This->ppPins[0]);
410         
411         HeapFree(GetProcessHeap(), 0, This->ppPins);
412         This->lpVtbl = NULL;
413         
414         TRACE("Destroying Video Renderer\n");
415         CoTaskMemFree(This);
416         
417         return 0;
418     }
419     else
420         return This->refCount;
421 }
422
423 /** IPersist methods **/
424
425 static HRESULT WINAPI VideoRenderer_GetClassID(IBaseFilter * iface, CLSID * pClsid)
426 {
427     ICOM_THIS(VideoRendererImpl, iface);
428
429     TRACE("(%p/%p)->(%p)\n", This, iface, pClsid);
430
431     *pClsid = CLSID_VideoRenderer;
432
433     return S_OK;
434 }
435
436 /** IMediaFilter methods **/
437
438 static HRESULT WINAPI VideoRenderer_Stop(IBaseFilter * iface)
439 {
440     ICOM_THIS(VideoRendererImpl, iface);
441
442     TRACE("(%p/%p)->()\n", This, iface);
443
444     EnterCriticalSection(&This->csFilter);
445     {
446         This->state = State_Stopped;
447     }
448     LeaveCriticalSection(&This->csFilter);
449     
450     return S_OK;
451 }
452
453 static HRESULT WINAPI VideoRenderer_Pause(IBaseFilter * iface)
454 {
455     ICOM_THIS(VideoRendererImpl, iface);
456     
457     TRACE("(%p/%p)->()\n", This, iface);
458
459     EnterCriticalSection(&This->csFilter);
460     {
461         This->state = State_Paused;
462     }
463     LeaveCriticalSection(&This->csFilter);
464
465     return S_OK;
466 }
467
468 static HRESULT WINAPI VideoRenderer_Run(IBaseFilter * iface, REFERENCE_TIME tStart)
469 {
470     ICOM_THIS(VideoRendererImpl, iface);
471
472     TRACE("(%p/%p)->(%s)\n", This, iface, wine_dbgstr_longlong(tStart));
473
474     EnterCriticalSection(&This->csFilter);
475     {
476         This->rtStreamStart = tStart;
477         This->state = State_Running;
478     }
479     LeaveCriticalSection(&This->csFilter);
480
481     return S_OK;
482 }
483
484 static HRESULT WINAPI VideoRenderer_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
485 {
486     ICOM_THIS(VideoRendererImpl, iface);
487
488     TRACE("(%p/%p)->(%ld, %p)\n", This, iface, dwMilliSecsTimeout, pState);
489
490     EnterCriticalSection(&This->csFilter);
491     {
492         *pState = This->state;
493     }
494     LeaveCriticalSection(&This->csFilter);
495
496     return S_OK;
497 }
498
499 static HRESULT WINAPI VideoRenderer_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock)
500 {
501     ICOM_THIS(VideoRendererImpl, iface);
502
503     TRACE("(%p/%p)->(%p)\n", This, iface, pClock);
504
505     EnterCriticalSection(&This->csFilter);
506     {
507         if (This->pClock)
508             IReferenceClock_Release(This->pClock);
509         This->pClock = pClock;
510         if (This->pClock)
511             IReferenceClock_AddRef(This->pClock);
512     }
513     LeaveCriticalSection(&This->csFilter);
514
515     return S_OK;
516 }
517
518 static HRESULT WINAPI VideoRenderer_GetSyncSource(IBaseFilter * iface, IReferenceClock **ppClock)
519 {
520     ICOM_THIS(VideoRendererImpl, iface);
521
522     TRACE("(%p/%p)->(%p)\n", This, iface, ppClock);
523
524     EnterCriticalSection(&This->csFilter);
525     {
526         *ppClock = This->pClock;
527         IReferenceClock_AddRef(This->pClock);
528     }
529     LeaveCriticalSection(&This->csFilter);
530     
531     return S_OK;
532 }
533
534 /** IBaseFilter implementation **/
535
536 static HRESULT WINAPI VideoRenderer_EnumPins(IBaseFilter * iface, IEnumPins **ppEnum)
537 {
538     ENUMPINDETAILS epd;
539     ICOM_THIS(VideoRendererImpl, iface);
540
541     TRACE("(%p/%p)->(%p)\n", This, iface, ppEnum);
542
543     epd.cPins = 1; /* input pin */
544     epd.ppPins = This->ppPins;
545     return IEnumPinsImpl_Construct(&epd, ppEnum);
546 }
547
548 static HRESULT WINAPI VideoRenderer_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin **ppPin)
549 {
550     ICOM_THIS(VideoRendererImpl, iface);
551
552     TRACE("(%p/%p)->(%p,%p)\n", This, iface, debugstr_w(Id), ppPin);
553
554     FIXME("VideoRenderer::FindPin(...)\n");
555
556     /* FIXME: critical section */
557
558     return E_NOTIMPL;
559 }
560
561 static HRESULT WINAPI VideoRenderer_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *pInfo)
562 {
563     ICOM_THIS(VideoRendererImpl, iface);
564
565     TRACE("(%p/%p)->(%p)\n", This, iface, pInfo);
566
567     strcpyW(pInfo->achName, This->filterInfo.achName);
568     pInfo->pGraph = This->filterInfo.pGraph;
569
570     if (pInfo->pGraph)
571         IFilterGraph_AddRef(pInfo->pGraph);
572     
573     return S_OK;
574 }
575
576 static HRESULT WINAPI VideoRenderer_JoinFilterGraph(IBaseFilter * iface, IFilterGraph *pGraph, LPCWSTR pName)
577 {
578     ICOM_THIS(VideoRendererImpl, iface);
579
580     TRACE("(%p/%p)->(%p, %s)\n", This, iface, pGraph, debugstr_w(pName));
581
582     EnterCriticalSection(&This->csFilter);
583     {
584         if (pName)
585             strcpyW(This->filterInfo.achName, pName);
586         else
587             *This->filterInfo.achName = '\0';
588         This->filterInfo.pGraph = pGraph; /* NOTE: do NOT increase ref. count */
589     }
590     LeaveCriticalSection(&This->csFilter);
591
592     return S_OK;
593 }
594
595 static HRESULT WINAPI VideoRenderer_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo)
596 {
597     ICOM_THIS(VideoRendererImpl, iface);
598     TRACE("(%p/%p)->(%p)\n", This, iface, pVendorInfo);
599     return E_NOTIMPL;
600 }
601
602 static const IBaseFilterVtbl VideoRenderer_Vtbl =
603 {
604     VideoRenderer_QueryInterface,
605     VideoRenderer_AddRef,
606     VideoRenderer_Release,
607     VideoRenderer_GetClassID,
608     VideoRenderer_Stop,
609     VideoRenderer_Pause,
610     VideoRenderer_Run,
611     VideoRenderer_GetState,
612     VideoRenderer_SetSyncSource,
613     VideoRenderer_GetSyncSource,
614     VideoRenderer_EnumPins,
615     VideoRenderer_FindPin,
616     VideoRenderer_QueryFilterInfo,
617     VideoRenderer_JoinFilterGraph,
618     VideoRenderer_QueryVendorInfo
619 };
620
621 static const IPinVtbl VideoRenderer_InputPin_Vtbl = 
622 {
623     InputPin_QueryInterface,
624     IPinImpl_AddRef,
625     InputPin_Release,
626     InputPin_Connect,
627     InputPin_ReceiveConnection,
628     IPinImpl_Disconnect,
629     IPinImpl_ConnectedTo,
630     IPinImpl_ConnectionMediaType,
631     IPinImpl_QueryPinInfo,
632     IPinImpl_QueryDirection,
633     IPinImpl_QueryId,
634     IPinImpl_QueryAccept,
635     IPinImpl_EnumMediaTypes,
636     IPinImpl_QueryInternalConnections,
637     InputPin_EndOfStream,
638     InputPin_BeginFlush,
639     InputPin_EndFlush,
640     InputPin_NewSegment
641 };
642
643 /*** IUnknown methods ***/
644 static HRESULT WINAPI Basicvideo_QueryInterface(IBasicVideo *iface,
645                                                 REFIID riid,
646                                                 LPVOID*ppvObj) {
647     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
648
649     TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
650
651     return VideoRenderer_QueryInterface((IBaseFilter*)This, riid, ppvObj);
652 }
653
654 static ULONG WINAPI Basicvideo_AddRef(IBasicVideo *iface) {
655     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
656
657     TRACE("(%p/%p)->()\n", This, iface);
658
659     return VideoRenderer_AddRef((IBaseFilter*)This);
660 }
661
662 static ULONG WINAPI Basicvideo_Release(IBasicVideo *iface) {
663     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
664
665     TRACE("(%p/%p)->()\n", This, iface);
666
667     return VideoRenderer_Release((IBaseFilter*)This);
668 }
669
670 /*** IDispatch methods ***/
671 static HRESULT WINAPI Basicvideo_GetTypeInfoCount(IBasicVideo *iface,
672                                                   UINT*pctinfo) {
673     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
674
675     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
676
677     return S_OK;
678 }
679
680 static HRESULT WINAPI Basicvideo_GetTypeInfo(IBasicVideo *iface,
681                                              UINT iTInfo,
682                                              LCID lcid,
683                                              ITypeInfo**ppTInfo) {
684     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
685
686     TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
687
688     return S_OK;
689 }
690
691 static HRESULT WINAPI Basicvideo_GetIDsOfNames(IBasicVideo *iface,
692                                                REFIID riid,
693                                                LPOLESTR*rgszNames,
694                                                UINT cNames,
695                                                LCID lcid,
696                                                DISPID*rgDispId) {
697     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
698
699     TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
700
701     return S_OK;
702 }
703
704 static HRESULT WINAPI Basicvideo_Invoke(IBasicVideo *iface,
705                                         DISPID dispIdMember,
706                                         REFIID riid,
707                                         LCID lcid,
708                                         WORD wFlags,
709                                         DISPPARAMS*pDispParams,
710                                         VARIANT*pVarResult,
711                                         EXCEPINFO*pExepInfo,
712                                         UINT*puArgErr) {
713     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
714
715     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);
716
717     return S_OK;
718 }
719
720 /*** IBasicVideo methods ***/
721 static HRESULT WINAPI Basicvideo_get_AvgTimePerFrame(IBasicVideo *iface,
722                                                      REFTIME *pAvgTimePerFrame) {
723     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
724
725     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pAvgTimePerFrame);
726
727     return S_OK;
728 }
729
730 static HRESULT WINAPI Basicvideo_get_BitRate(IBasicVideo *iface,
731                                              long *pBitRate) {
732     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
733
734     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pBitRate);
735
736     return S_OK;
737 }
738
739 static HRESULT WINAPI Basicvideo_get_BitErrorRate(IBasicVideo *iface,
740                                                   long *pBitErrorRate) {
741     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
742
743     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pBitErrorRate);
744
745     return S_OK;
746 }
747
748 static HRESULT WINAPI Basicvideo_get_VideoWidth(IBasicVideo *iface,
749                                                 long *pVideoWidth) {
750     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
751
752     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pVideoWidth);
753
754     return S_OK;
755 }
756
757 static HRESULT WINAPI Basicvideo_get_VideoHeight(IBasicVideo *iface,
758                                                  long *pVideoHeight) {
759     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
760
761     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pVideoHeight);
762
763     return S_OK;
764 }
765
766 static HRESULT WINAPI Basicvideo_put_SourceLeft(IBasicVideo *iface,
767                                                 long SourceLeft) {
768     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
769
770     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, SourceLeft);
771
772     return S_OK;
773 }
774
775 static HRESULT WINAPI Basicvideo_get_SourceLeft(IBasicVideo *iface,
776                                                 long *pSourceLeft) {
777     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
778
779     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pSourceLeft);
780
781     return S_OK;
782 }
783
784 static HRESULT WINAPI Basicvideo_put_SourceWidth(IBasicVideo *iface,
785                                                  long SourceWidth) {
786     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
787
788     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, SourceWidth);
789
790     return S_OK;
791 }
792
793 static HRESULT WINAPI Basicvideo_get_SourceWidth(IBasicVideo *iface,
794                                                  long *pSourceWidth) {
795     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
796
797     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pSourceWidth);
798
799     return S_OK;
800 }
801
802 static HRESULT WINAPI Basicvideo_put_SourceTop(IBasicVideo *iface,
803                                                long SourceTop) {
804     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
805
806     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, SourceTop);
807
808     return S_OK;
809 }
810
811 static HRESULT WINAPI Basicvideo_get_SourceTop(IBasicVideo *iface,
812                                                long *pSourceTop) {
813     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
814
815     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pSourceTop);
816
817     return S_OK;
818 }
819
820 static HRESULT WINAPI Basicvideo_put_SourceHeight(IBasicVideo *iface,
821                                                   long SourceHeight) {
822     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
823
824     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, SourceHeight);
825
826     return S_OK;
827 }
828
829 static HRESULT WINAPI Basicvideo_get_SourceHeight(IBasicVideo *iface,
830                                                   long *pSourceHeight) {
831     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
832
833     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pSourceHeight);
834
835     return S_OK;
836 }
837
838 static HRESULT WINAPI Basicvideo_put_DestinationLeft(IBasicVideo *iface,
839                                                      long DestinationLeft) {
840     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
841
842     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, DestinationLeft);
843
844     return S_OK;
845 }
846
847 static HRESULT WINAPI Basicvideo_get_DestinationLeft(IBasicVideo *iface,
848                                                      long *pDestinationLeft) {
849     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
850
851     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pDestinationLeft);
852
853     return S_OK;
854 }
855
856 static HRESULT WINAPI Basicvideo_put_DestinationWidth(IBasicVideo *iface,
857                                                       long DestinationWidth) {
858     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
859
860     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, DestinationWidth);
861
862     return S_OK;
863 }
864
865 static HRESULT WINAPI Basicvideo_get_DestinationWidth(IBasicVideo *iface,
866                                                       long *pDestinationWidth) {
867     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
868
869     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pDestinationWidth);
870
871     return S_OK;
872 }
873
874 static HRESULT WINAPI Basicvideo_put_DestinationTop(IBasicVideo *iface,
875                                                     long DestinationTop) {
876     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
877
878     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, DestinationTop);
879
880     return S_OK;
881 }
882
883 static HRESULT WINAPI Basicvideo_get_DestinationTop(IBasicVideo *iface,
884                                                     long *pDestinationTop) {
885     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
886
887     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pDestinationTop);
888
889     return S_OK;
890 }
891
892 static HRESULT WINAPI Basicvideo_put_DestinationHeight(IBasicVideo *iface,
893                                                        long DestinationHeight) {
894     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
895
896     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, DestinationHeight);
897
898     return S_OK;
899 }
900
901 static HRESULT WINAPI Basicvideo_get_DestinationHeight(IBasicVideo *iface,
902                                                        long *pDestinationHeight) {
903     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
904
905     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pDestinationHeight);
906
907     return S_OK;
908 }
909
910 static HRESULT WINAPI Basicvideo_SetSourcePosition(IBasicVideo *iface,
911                                                    long Left,
912                                                    long Top,
913                                                    long Width,
914                                                    long Height) {
915     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
916
917     TRACE("(%p/%p)->(%ld, %ld, %ld, %ld): stub !!!\n", This, iface, Left, Top, Width, Height);
918
919     return S_OK;
920 }
921
922 static HRESULT WINAPI Basicvideo_GetSourcePosition(IBasicVideo *iface,
923                                                    long *pLeft,
924                                                    long *pTop,
925                                                    long *pWidth,
926                                                    long *pHeight) {
927     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
928
929     TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This, iface, pLeft, pTop, pWidth, pHeight);
930
931     return S_OK;
932 }
933
934 static HRESULT WINAPI Basicvideo_SetDefaultSourcePosition(IBasicVideo *iface) {
935     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
936
937     TRACE("(%p/%p)->(): stub !!!\n", This, iface);
938
939     return S_OK;
940 }
941
942 static HRESULT WINAPI Basicvideo_SetDestinationPosition(IBasicVideo *iface,
943                                                         long Left,
944                                                         long Top,
945                                                         long Width,
946                                                         long Height) {
947     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
948
949     TRACE("(%p/%p)->(%ld, %ld, %ld, %ld): stub !!!\n", This, iface, Left, Top, Width, Height);
950
951     return S_OK;
952 }
953
954 static HRESULT WINAPI Basicvideo_GetDestinationPosition(IBasicVideo *iface,
955                                                         long *pLeft,
956                                                         long *pTop,
957                                                         long *pWidth,
958                                                         long *pHeight) {
959     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
960
961     TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This, iface, pLeft, pTop, pWidth, pHeight);
962
963     return S_OK;
964 }
965
966 static HRESULT WINAPI Basicvideo_SetDefaultDestinationPosition(IBasicVideo *iface) {
967     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
968
969     TRACE("(%p/%p)->(): stub !!!\n", This, iface);
970
971     return S_OK;
972 }
973
974 static HRESULT WINAPI Basicvideo_GetVideoSize(IBasicVideo *iface,
975                                               long *pWidth,
976                                               long *pHeight) {
977     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
978
979     TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pWidth, pHeight);
980
981     return S_OK;
982 }
983
984 static HRESULT WINAPI Basicvideo_GetVideoPaletteEntries(IBasicVideo *iface,
985                                                         long StartIndex,
986                                                         long Entries,
987                                                         long *pRetrieved,
988                                                         long *pPalette) {
989     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
990
991     TRACE("(%p/%p)->(%ld, %ld, %p, %p): stub !!!\n", This, iface, StartIndex, Entries, pRetrieved, pPalette);
992
993     return S_OK;
994 }
995
996 static HRESULT WINAPI Basicvideo_GetCurrentImage(IBasicVideo *iface,
997                                                  long *pBufferSize,
998                                                  long *pDIBImage) {
999     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1000
1001     TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pBufferSize, pDIBImage);
1002
1003     return S_OK;
1004 }
1005
1006 static HRESULT WINAPI Basicvideo_IsUsingDefaultSource(IBasicVideo *iface) {
1007     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1008
1009     TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1010
1011     return S_OK;
1012 }
1013
1014 static HRESULT WINAPI Basicvideo_IsUsingDefaultDestination(IBasicVideo *iface) {
1015     ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1016
1017     TRACE("(%p/%p)->(): stub !!!\n", This, iface);
1018
1019     return S_OK;
1020 }
1021
1022
1023 static IBasicVideoVtbl IBasicVideo_VTable =
1024 {
1025     Basicvideo_QueryInterface,
1026     Basicvideo_AddRef,
1027     Basicvideo_Release,
1028     Basicvideo_GetTypeInfoCount,
1029     Basicvideo_GetTypeInfo,
1030     Basicvideo_GetIDsOfNames,
1031     Basicvideo_Invoke,
1032     Basicvideo_get_AvgTimePerFrame,
1033     Basicvideo_get_BitRate,
1034     Basicvideo_get_BitErrorRate,
1035     Basicvideo_get_VideoWidth,
1036     Basicvideo_get_VideoHeight,
1037     Basicvideo_put_SourceLeft,
1038     Basicvideo_get_SourceLeft,
1039     Basicvideo_put_SourceWidth,
1040     Basicvideo_get_SourceWidth,
1041     Basicvideo_put_SourceTop,
1042     Basicvideo_get_SourceTop,
1043     Basicvideo_put_SourceHeight,
1044     Basicvideo_get_SourceHeight,
1045     Basicvideo_put_DestinationLeft,
1046     Basicvideo_get_DestinationLeft,
1047     Basicvideo_put_DestinationWidth,
1048     Basicvideo_get_DestinationWidth,
1049     Basicvideo_put_DestinationTop,
1050     Basicvideo_get_DestinationTop,
1051     Basicvideo_put_DestinationHeight,
1052     Basicvideo_get_DestinationHeight,
1053     Basicvideo_SetSourcePosition,
1054     Basicvideo_GetSourcePosition,
1055     Basicvideo_SetDefaultSourcePosition,
1056     Basicvideo_SetDestinationPosition,
1057     Basicvideo_GetDestinationPosition,
1058     Basicvideo_SetDefaultDestinationPosition,
1059     Basicvideo_GetVideoSize,
1060     Basicvideo_GetVideoPaletteEntries,
1061     Basicvideo_GetCurrentImage,
1062     Basicvideo_IsUsingDefaultSource,
1063     Basicvideo_IsUsingDefaultDestination
1064 };
1065
1066
1067 /*** IUnknown methods ***/
1068 static HRESULT WINAPI Videowindow_QueryInterface(IVideoWindow *iface,
1069                                                  REFIID riid,
1070                                                  LPVOID*ppvObj) {
1071     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1072
1073     TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
1074
1075     return VideoRenderer_QueryInterface((IBaseFilter*)This, riid, ppvObj);
1076 }
1077
1078 static ULONG WINAPI Videowindow_AddRef(IVideoWindow *iface) {
1079     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1080
1081     TRACE("(%p/%p)->()\n", This, iface);
1082
1083     return VideoRenderer_AddRef((IBaseFilter*)This);
1084 }
1085
1086 static ULONG WINAPI Videowindow_Release(IVideoWindow *iface) {
1087     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1088
1089     TRACE("(%p/%p)->()\n", This, iface);
1090
1091     return VideoRenderer_Release((IBaseFilter*)This);
1092 }
1093
1094 /*** IDispatch methods ***/
1095 static HRESULT WINAPI Videowindow_GetTypeInfoCount(IVideoWindow *iface,
1096                                                    UINT*pctinfo) {
1097     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1098
1099     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
1100
1101     return S_OK;
1102 }
1103
1104 static HRESULT WINAPI Videowindow_GetTypeInfo(IVideoWindow *iface,
1105                                               UINT iTInfo,
1106                                               LCID lcid,
1107                                               ITypeInfo**ppTInfo) {
1108     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1109
1110     TRACE("(%p/%p)->(%d, %ld, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
1111
1112     return S_OK;
1113 }
1114
1115 static HRESULT WINAPI Videowindow_GetIDsOfNames(IVideoWindow *iface,
1116                                                 REFIID riid,
1117                                                 LPOLESTR*rgszNames,
1118                                                 UINT cNames,
1119                                                 LCID lcid,
1120                                                 DISPID*rgDispId) {
1121     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1122
1123     TRACE("(%p/%p)->(%s (%p), %p, %d, %ld, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
1124
1125     return S_OK;
1126 }
1127
1128 static HRESULT WINAPI Videowindow_Invoke(IVideoWindow *iface,
1129                                          DISPID dispIdMember,
1130                                          REFIID riid,
1131                                          LCID lcid,
1132                                          WORD wFlags,
1133                                          DISPPARAMS*pDispParams,
1134                                          VARIANT*pVarResult,
1135                                          EXCEPINFO*pExepInfo,
1136                                          UINT*puArgErr) {
1137     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1138
1139     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);
1140
1141     return S_OK;
1142 }
1143
1144 /*** IVideoWindow methods ***/
1145 static HRESULT WINAPI Videowindow_put_Caption(IVideoWindow *iface,
1146                                               BSTR strCaption) {
1147     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1148
1149     TRACE("(%p/%p)->(%s (%p)): stub !!!\n", This, iface, debugstr_w(strCaption), strCaption);
1150
1151     return S_OK;
1152 }
1153
1154 static HRESULT WINAPI Videowindow_get_Caption(IVideoWindow *iface,
1155                                               BSTR *strCaption) {
1156     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1157
1158     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, strCaption);
1159
1160     return S_OK;
1161 }
1162
1163 static HRESULT WINAPI Videowindow_put_WindowStyle(IVideoWindow *iface,
1164                                                   long WindowStyle) {
1165     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1166
1167     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, WindowStyle);
1168
1169     return S_OK;
1170 }
1171
1172 static HRESULT WINAPI Videowindow_get_WindowStyle(IVideoWindow *iface,
1173                                                   long *WindowStyle) {
1174     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1175
1176     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, WindowStyle);
1177
1178     return S_OK;
1179 }
1180
1181 static HRESULT WINAPI Videowindow_put_WindowStyleEx(IVideoWindow *iface,
1182                                                     long WindowStyleEx) {
1183     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1184
1185     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, WindowStyleEx);
1186
1187     return S_OK;
1188 }
1189
1190 static HRESULT WINAPI Videowindow_get_WindowStyleEx(IVideoWindow *iface,
1191                                                     long *WindowStyleEx) {
1192     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1193
1194     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, WindowStyleEx);
1195
1196     return S_OK;
1197 }
1198
1199 static HRESULT WINAPI Videowindow_put_AutoShow(IVideoWindow *iface,
1200                                                long AutoShow) {
1201     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1202
1203     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, AutoShow);
1204
1205     return S_OK;
1206 }
1207
1208 static HRESULT WINAPI Videowindow_get_AutoShow(IVideoWindow *iface,
1209                                                long *AutoShow) {
1210     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1211
1212     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, AutoShow);
1213
1214     return S_OK;
1215 }
1216
1217 static HRESULT WINAPI Videowindow_put_WindowState(IVideoWindow *iface,
1218                                                   long WindowState) {
1219     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1220
1221     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, WindowState);
1222
1223     return S_OK;
1224 }
1225
1226 static HRESULT WINAPI Videowindow_get_WindowState(IVideoWindow *iface,
1227                                                   long *WindowState) {
1228     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1229
1230     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, WindowState);
1231
1232     return S_OK;
1233 }
1234
1235 static HRESULT WINAPI Videowindow_put_BackgroundPalette(IVideoWindow *iface,
1236                                                         long BackgroundPalette) {
1237     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1238
1239     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, BackgroundPalette);
1240
1241     return S_OK;
1242 }
1243
1244 static HRESULT WINAPI Videowindow_get_BackgroundPalette(IVideoWindow *iface,
1245                                                         long *pBackgroundPalette) {
1246     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1247
1248     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pBackgroundPalette);
1249
1250     return S_OK;
1251 }
1252
1253 static HRESULT WINAPI Videowindow_put_Visible(IVideoWindow *iface,
1254                                               long Visible) {
1255     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1256
1257     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Visible);
1258
1259     return S_OK;
1260 }
1261
1262 static HRESULT WINAPI Videowindow_get_Visible(IVideoWindow *iface,
1263                                               long *pVisible) {
1264     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1265
1266     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pVisible);
1267
1268     return S_OK;
1269 }
1270
1271 static HRESULT WINAPI Videowindow_put_Left(IVideoWindow *iface,
1272                                            long Left) {
1273     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1274
1275     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Left);
1276
1277     return S_OK;
1278 }
1279
1280 static HRESULT WINAPI Videowindow_get_Left(IVideoWindow *iface,
1281                                            long *pLeft) {
1282     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1283
1284     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pLeft);
1285
1286     return S_OK;
1287 }
1288
1289 static HRESULT WINAPI Videowindow_put_Width(IVideoWindow *iface,
1290                                             long Width) {
1291     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1292
1293     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Width);
1294
1295     return S_OK;
1296 }
1297
1298 static HRESULT WINAPI Videowindow_get_Width(IVideoWindow *iface,
1299                                             long *pWidth) {
1300     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1301
1302     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pWidth);
1303
1304     return S_OK;
1305 }
1306
1307 static HRESULT WINAPI Videowindow_put_Top(IVideoWindow *iface,
1308                                           long Top) {
1309     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1310
1311     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Top);
1312
1313     return S_OK;
1314 }
1315
1316 static HRESULT WINAPI Videowindow_get_Top(IVideoWindow *iface,
1317                                           long *pTop) {
1318     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1319
1320     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pTop);
1321
1322     return S_OK;
1323 }
1324
1325 static HRESULT WINAPI Videowindow_put_Height(IVideoWindow *iface,
1326                                              long Height) {
1327     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1328
1329     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Height);
1330
1331     return S_OK;
1332 }
1333
1334 static HRESULT WINAPI Videowindow_get_Height(IVideoWindow *iface,
1335                                              long *pHeight) {
1336     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1337
1338     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, pHeight);
1339
1340     return S_OK;
1341 }
1342
1343 static HRESULT WINAPI Videowindow_put_Owner(IVideoWindow *iface,
1344                                             OAHWND Owner) {
1345     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1346
1347     TRACE("(%p/%p)->(%08lx): stub !!!\n", This, iface, (DWORD) Owner);
1348
1349     return S_OK;
1350 }
1351
1352 static HRESULT WINAPI Videowindow_get_Owner(IVideoWindow *iface,
1353                                             OAHWND *Owner) {
1354     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1355
1356     TRACE("(%p/%p)->(%08lx): stub !!!\n", This, iface, (DWORD) Owner);
1357
1358     return S_OK;
1359 }
1360
1361 static HRESULT WINAPI Videowindow_put_MessageDrain(IVideoWindow *iface,
1362                                                    OAHWND Drain) {
1363     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1364
1365     TRACE("(%p/%p)->(%08lx): stub !!!\n", This, iface, (DWORD) Drain);
1366
1367     return S_OK;
1368 }
1369
1370 static HRESULT WINAPI Videowindow_get_MessageDrain(IVideoWindow *iface,
1371                                                    OAHWND *Drain) {
1372     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1373
1374     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, Drain);
1375
1376     return S_OK;
1377 }
1378
1379 static HRESULT WINAPI Videowindow_get_BorderColor(IVideoWindow *iface,
1380                                                   long *Color) {
1381     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1382
1383     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, Color);
1384
1385     return S_OK;
1386 }
1387
1388 static HRESULT WINAPI Videowindow_put_BorderColor(IVideoWindow *iface,
1389                                                   long Color) {
1390     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1391
1392     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Color);
1393
1394     return S_OK;
1395 }
1396
1397 static HRESULT WINAPI Videowindow_get_FullScreenMode(IVideoWindow *iface,
1398                                                      long *FullScreenMode) {
1399     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1400
1401     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, FullScreenMode);
1402
1403     return S_OK;
1404 }
1405
1406 static HRESULT WINAPI Videowindow_put_FullScreenMode(IVideoWindow *iface,
1407                                                      long FullScreenMode) {
1408     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1409
1410     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, FullScreenMode);
1411
1412     return S_OK;
1413 }
1414
1415 static HRESULT WINAPI Videowindow_SetWindowForeground(IVideoWindow *iface,
1416                                                       long Focus) {
1417     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1418
1419     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, Focus);
1420
1421     return S_OK;
1422 }
1423
1424 static HRESULT WINAPI Videowindow_NotifyOwnerMessage(IVideoWindow *iface,
1425                                                      OAHWND hwnd,
1426                                                      long uMsg,
1427                                                      LONG_PTR wParam,
1428                                                      LONG_PTR lParam) {
1429     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1430
1431     TRACE("(%p/%p)->(%08lx, %ld, %08lx, %08lx): stub !!!\n", This, iface, (DWORD) hwnd, uMsg, wParam, lParam);
1432
1433     return S_OK;
1434 }
1435
1436 static HRESULT WINAPI Videowindow_SetWindowPosition(IVideoWindow *iface,
1437                                                     long Left,
1438                                                     long Top,
1439                                                     long Width,
1440                                                     long Height) {
1441     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1442     
1443     TRACE("(%p/%p)->(%ld, %ld, %ld, %ld): stub !!!\n", This, iface, Left, Top, Width, Height);
1444
1445     return S_OK;
1446 }
1447
1448 static HRESULT WINAPI Videowindow_GetWindowPosition(IVideoWindow *iface,
1449                                                     long *pLeft,
1450                                                     long *pTop,
1451                                                     long *pWidth,
1452                                                     long *pHeight) {
1453     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1454
1455     TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This, iface, pLeft, pTop, pWidth, pHeight);
1456
1457     return S_OK;
1458 }
1459
1460 static HRESULT WINAPI Videowindow_GetMinIdealImageSize(IVideoWindow *iface,
1461                                                        long *pWidth,
1462                                                        long *pHeight) {
1463     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1464
1465     TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pWidth, pHeight);
1466
1467     return S_OK;
1468 }
1469
1470 static HRESULT WINAPI Videowindow_GetMaxIdealImageSize(IVideoWindow *iface,
1471                                                        long *pWidth,
1472                                                        long *pHeight) {
1473     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1474
1475     TRACE("(%p/%p)->(%p, %p): stub !!!\n", This, iface, pWidth, pHeight);
1476
1477     return S_OK;
1478 }
1479
1480 static HRESULT WINAPI Videowindow_GetRestorePosition(IVideoWindow *iface,
1481                                                      long *pLeft,
1482                                                      long *pTop,
1483                                                      long *pWidth,
1484                                                      long *pHeight) {
1485     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1486
1487     TRACE("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This, iface, pLeft, pTop, pWidth, pHeight);
1488
1489     return S_OK;
1490 }
1491
1492 static HRESULT WINAPI Videowindow_HideCursor(IVideoWindow *iface,
1493                                              long HideCursor) {
1494     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1495
1496     TRACE("(%p/%p)->(%ld): stub !!!\n", This, iface, HideCursor);
1497
1498     return S_OK;
1499 }
1500
1501 static HRESULT WINAPI Videowindow_IsCursorHidden(IVideoWindow *iface,
1502                                                  long *CursorHidden) {
1503     ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1504
1505     TRACE("(%p/%p)->(%p): stub !!!\n", This, iface, CursorHidden);
1506
1507     return S_OK;
1508 }
1509
1510 static IVideoWindowVtbl IVideoWindow_VTable =
1511 {
1512     Videowindow_QueryInterface,
1513     Videowindow_AddRef,
1514     Videowindow_Release,
1515     Videowindow_GetTypeInfoCount,
1516     Videowindow_GetTypeInfo,
1517     Videowindow_GetIDsOfNames,
1518     Videowindow_Invoke,
1519     Videowindow_put_Caption,
1520     Videowindow_get_Caption,
1521     Videowindow_put_WindowStyle,
1522     Videowindow_get_WindowStyle,
1523     Videowindow_put_WindowStyleEx,
1524     Videowindow_get_WindowStyleEx,
1525     Videowindow_put_AutoShow,
1526     Videowindow_get_AutoShow,
1527     Videowindow_put_WindowState,
1528     Videowindow_get_WindowState,
1529     Videowindow_put_BackgroundPalette,
1530     Videowindow_get_BackgroundPalette,
1531     Videowindow_put_Visible,
1532     Videowindow_get_Visible,
1533     Videowindow_put_Left,
1534     Videowindow_get_Left,
1535     Videowindow_put_Width,
1536     Videowindow_get_Width,
1537     Videowindow_put_Top,
1538     Videowindow_get_Top,
1539     Videowindow_put_Height,
1540     Videowindow_get_Height,
1541     Videowindow_put_Owner,
1542     Videowindow_get_Owner,
1543     Videowindow_put_MessageDrain,
1544     Videowindow_get_MessageDrain,
1545     Videowindow_get_BorderColor,
1546     Videowindow_put_BorderColor,
1547     Videowindow_get_FullScreenMode,
1548     Videowindow_put_FullScreenMode,
1549     Videowindow_SetWindowForeground,
1550     Videowindow_NotifyOwnerMessage,
1551     Videowindow_SetWindowPosition,
1552     Videowindow_GetWindowPosition,
1553     Videowindow_GetMinIdealImageSize,
1554     Videowindow_GetMaxIdealImageSize,
1555     Videowindow_GetRestorePosition,
1556     Videowindow_HideCursor,
1557     Videowindow_IsCursorHidden
1558 };