Add missing cast.
[wine] / dlls / quartz / fgpass.c
1 /*
2  * Implementation of IBasicAudio, IBasicVideo2, IVideoWindow for FilterGraph.
3  *
4  * hidenori@a2.ctktv.ne.jp
5  */
6
7 #include "config.h"
8
9 #include "windef.h"
10 #include "winbase.h"
11 #include "wingdi.h"
12 #include "winuser.h"
13 #include "winerror.h"
14 #include "strmif.h"
15 #include "control.h"
16 #include "uuids.h"
17
18 #include "debugtools.h"
19 DEFAULT_DEBUG_CHANNEL(quartz);
20
21 #include "quartz_private.h"
22 #include "fgraph.h"
23
24
25 static HRESULT CFilterGraph_QIFilters(
26         CFilterGraph* This, REFIID riid, void** ppvobj )
27 {
28         QUARTZ_CompListItem*    pItem;
29         HRESULT hr = E_NOINTERFACE;
30
31         TRACE( "(%p,%p,%p)\n",This,riid,ppvobj);
32
33         QUARTZ_CompList_Lock( This->m_pFilterList );
34         pItem = QUARTZ_CompList_GetLast( This->m_pFilterList );
35         while ( pItem != NULL )
36         {
37                 if ( IUnknown_QueryInterface( QUARTZ_CompList_GetItemPtr(pItem),riid,ppvobj) == S_OK )
38                 {
39                         hr = S_OK;
40                         break;
41                 }
42                 pItem = QUARTZ_CompList_GetPrev( This->m_pFilterList, pItem );
43         }
44         QUARTZ_CompList_Unlock( This->m_pFilterList );
45
46         return hr;
47 }
48
49
50 static HRESULT CFilterGraph_QueryBasicAudio(
51         CFilterGraph* This, IBasicAudio** ppAudio )
52 {
53         return CFilterGraph_QIFilters(This,&IID_IBasicAudio,(void**)ppAudio);
54 }
55
56 static HRESULT CFilterGraph_QueryBasicVideo(
57         CFilterGraph* This, IBasicVideo** ppVideo )
58 {
59         return CFilterGraph_QIFilters(This,&IID_IBasicVideo,(void**)ppVideo);
60 }
61
62 static HRESULT CFilterGraph_QueryBasicVideo2(
63         CFilterGraph* This, IBasicVideo2** ppVideo )
64 {
65         return CFilterGraph_QIFilters(This,&IID_IBasicVideo2,(void**)ppVideo);
66 }
67
68 static HRESULT CFilterGraph_QueryVideoWindow(
69         CFilterGraph* This, IVideoWindow** ppVidWin )
70 {
71         return CFilterGraph_QIFilters(This,&IID_IVideoWindow,(void**)ppVidWin);
72 }
73
74
75
76 /***************************************************************************
77  *
78  *      CFilterGraph::IBasicAudio
79  *
80  */
81
82 #define QUERYBASICAUDIO \
83         IBasicAudio* pAudio = NULL; \
84         HRESULT hr; \
85         hr = CFilterGraph_QueryBasicAudio( This, &pAudio ); \
86         if ( FAILED(hr) ) return hr;
87
88
89 static HRESULT WINAPI
90 IBasicAudio_fnQueryInterface(IBasicAudio* iface,REFIID riid,void** ppobj)
91 {
92         CFilterGraph_THIS(iface,basaud);
93
94         TRACE("(%p)->()\n",This);
95
96         return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
97 }
98
99 static ULONG WINAPI
100 IBasicAudio_fnAddRef(IBasicAudio* iface)
101 {
102         CFilterGraph_THIS(iface,basaud);
103
104         TRACE("(%p)->()\n",This);
105
106         return IUnknown_AddRef(This->unk.punkControl);
107 }
108
109 static ULONG WINAPI
110 IBasicAudio_fnRelease(IBasicAudio* iface)
111 {
112         CFilterGraph_THIS(iface,basaud);
113
114         TRACE("(%p)->()\n",This);
115
116         return IUnknown_Release(This->unk.punkControl);
117 }
118
119 static HRESULT WINAPI
120 IBasicAudio_fnGetTypeInfoCount(IBasicAudio* iface,UINT* pcTypeInfo)
121 {
122         CFilterGraph_THIS(iface,basaud);
123
124         FIXME("(%p)->()\n",This);
125
126         return E_NOTIMPL;
127 }
128
129 static HRESULT WINAPI
130 IBasicAudio_fnGetTypeInfo(IBasicAudio* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj)
131 {
132         CFilterGraph_THIS(iface,basaud);
133
134         FIXME("(%p)->()\n",This);
135
136         return E_NOTIMPL;
137 }
138
139 static HRESULT WINAPI
140 IBasicAudio_fnGetIDsOfNames(IBasicAudio* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId)
141 {
142         CFilterGraph_THIS(iface,basaud);
143
144         FIXME("(%p)->()\n",This);
145
146         return E_NOTIMPL;
147 }
148
149 static HRESULT WINAPI
150 IBasicAudio_fnInvoke(IBasicAudio* iface,DISPID DispId, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarRes, EXCEPINFO* pExcepInfo, UINT* puArgErr)
151 {
152         CFilterGraph_THIS(iface,basaud);
153
154         FIXME("(%p)->()\n",This);
155
156         return E_NOTIMPL;
157 }
158
159
160 static HRESULT WINAPI
161 IBasicAudio_fnput_Volume(IBasicAudio* iface,long lVol)
162 {
163         CFilterGraph_THIS(iface,basaud);
164         QUERYBASICAUDIO
165
166         TRACE("(%p)->()\n",This);
167
168         hr = IBasicAudio_put_Volume(pAudio,lVol);
169         IBasicAudio_Release(pAudio);
170         return hr;
171 }
172
173 static HRESULT WINAPI
174 IBasicAudio_fnget_Volume(IBasicAudio* iface,long* plVol)
175 {
176         CFilterGraph_THIS(iface,basaud);
177         QUERYBASICAUDIO
178
179         TRACE("(%p)->()\n",This);
180
181         hr = IBasicAudio_get_Volume(pAudio,plVol);
182         IBasicAudio_Release(pAudio);
183         return hr;
184 }
185
186 static HRESULT WINAPI
187 IBasicAudio_fnput_Balance(IBasicAudio* iface,long lBalance)
188 {
189         CFilterGraph_THIS(iface,basaud);
190         QUERYBASICAUDIO
191
192         TRACE("(%p)->()\n",This);
193
194         hr = IBasicAudio_put_Balance(pAudio,lBalance);
195         IBasicAudio_Release(pAudio);
196         return hr;
197 }
198
199 static HRESULT WINAPI
200 IBasicAudio_fnget_Balance(IBasicAudio* iface,long* plBalance)
201 {
202         CFilterGraph_THIS(iface,basaud);
203         QUERYBASICAUDIO
204
205         TRACE("(%p)->()\n",This);
206
207         hr = IBasicAudio_get_Balance(pAudio,plBalance);
208         IBasicAudio_Release(pAudio);
209         return hr;
210 }
211
212
213 static ICOM_VTABLE(IBasicAudio) ibasicaudio =
214 {
215         ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
216         /* IUnknown fields */
217         IBasicAudio_fnQueryInterface,
218         IBasicAudio_fnAddRef,
219         IBasicAudio_fnRelease,
220         /* IDispatch fields */
221         IBasicAudio_fnGetTypeInfoCount,
222         IBasicAudio_fnGetTypeInfo,
223         IBasicAudio_fnGetIDsOfNames,
224         IBasicAudio_fnInvoke,
225         /* IBasicAudio fields */
226         IBasicAudio_fnput_Volume,
227         IBasicAudio_fnget_Volume,
228         IBasicAudio_fnput_Balance,
229         IBasicAudio_fnget_Balance,
230 };
231
232
233 HRESULT CFilterGraph_InitIBasicAudio( CFilterGraph* pfg )
234 {
235         TRACE("(%p)\n",pfg);
236         ICOM_VTBL(&pfg->basaud) = &ibasicaudio;
237
238         return NOERROR;
239 }
240
241 void CFilterGraph_UninitIBasicAudio( CFilterGraph* pfg )
242 {
243         TRACE("(%p)\n",pfg);
244 }
245
246 #undef QUERYBASICAUDIO
247
248
249 /***************************************************************************
250  *
251  *      CFilterGraph::IBasicVideo2
252  *
253  */
254
255
256 #define QUERYBASICVIDEO \
257         IBasicVideo* pVideo = NULL; \
258         HRESULT hr; \
259         hr = CFilterGraph_QueryBasicVideo( This, &pVideo ); \
260         if ( FAILED(hr) ) return hr;
261
262 #define QUERYBASICVIDEO2        \
263         IBasicVideo2* pVideo = NULL; \
264         HRESULT hr; \
265         hr = CFilterGraph_QueryBasicVideo2( This, &pVideo ); \
266         if ( FAILED(hr) ) return hr;
267
268
269 static HRESULT WINAPI
270 IBasicVideo2_fnQueryInterface(IBasicVideo2* iface,REFIID riid,void** ppobj)
271 {
272         CFilterGraph_THIS(iface,basvid);
273
274         TRACE("(%p)->()\n",This);
275
276         return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
277 }
278
279 static ULONG WINAPI
280 IBasicVideo2_fnAddRef(IBasicVideo2* iface)
281 {
282         CFilterGraph_THIS(iface,basvid);
283
284         TRACE("(%p)->()\n",This);
285
286         return IUnknown_AddRef(This->unk.punkControl);
287 }
288
289 static ULONG WINAPI
290 IBasicVideo2_fnRelease(IBasicVideo2* iface)
291 {
292         CFilterGraph_THIS(iface,basvid);
293
294         TRACE("(%p)->()\n",This);
295
296         return IUnknown_Release(This->unk.punkControl);
297 }
298
299 static HRESULT WINAPI
300 IBasicVideo2_fnGetTypeInfoCount(IBasicVideo2* iface,UINT* pcTypeInfo)
301 {
302         CFilterGraph_THIS(iface,basvid);
303
304         FIXME("(%p)->()\n",This);
305
306         return E_NOTIMPL;
307 }
308
309 static HRESULT WINAPI
310 IBasicVideo2_fnGetTypeInfo(IBasicVideo2* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj)
311 {
312         CFilterGraph_THIS(iface,basvid);
313
314         FIXME("(%p)->()\n",This);
315
316         return E_NOTIMPL;
317 }
318
319 static HRESULT WINAPI
320 IBasicVideo2_fnGetIDsOfNames(IBasicVideo2* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId)
321 {
322         CFilterGraph_THIS(iface,basvid);
323
324         FIXME("(%p)->()\n",This);
325
326         return E_NOTIMPL;
327 }
328
329 static HRESULT WINAPI
330 IBasicVideo2_fnInvoke(IBasicVideo2* iface,DISPID DispId, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarRes, EXCEPINFO* pExcepInfo, UINT* puArgErr)
331 {
332         CFilterGraph_THIS(iface,basvid);
333
334         FIXME("(%p)->()\n",This);
335
336         return E_NOTIMPL;
337 }
338
339
340 static HRESULT WINAPI
341 IBasicVideo2_fnget_AvgTimePerFrame(IBasicVideo2* iface,REFTIME* prefTime)
342 {
343         CFilterGraph_THIS(iface,basvid);
344         QUERYBASICVIDEO
345
346         TRACE("(%p)->()\n",This);
347
348         hr = IBasicVideo_get_AvgTimePerFrame(pVideo,prefTime);
349         IBasicVideo_Release(pVideo);
350         return hr;
351 }
352
353 static HRESULT WINAPI
354 IBasicVideo2_fnget_BitRate(IBasicVideo2* iface,long* plRate)
355 {
356         CFilterGraph_THIS(iface,basvid);
357         QUERYBASICVIDEO
358
359         TRACE("(%p)->()\n",This);
360
361         hr = IBasicVideo_get_BitRate(pVideo,plRate);
362         IBasicVideo_Release(pVideo);
363         return hr;
364 }
365
366 static HRESULT WINAPI
367 IBasicVideo2_fnget_BitErrorRate(IBasicVideo2* iface,long* plRate)
368 {
369         CFilterGraph_THIS(iface,basvid);
370         QUERYBASICVIDEO
371
372         TRACE("(%p)->()\n",This);
373
374         hr = IBasicVideo_get_BitErrorRate(pVideo,plRate);
375         IBasicVideo_Release(pVideo);
376         return hr;
377 }
378
379 static HRESULT WINAPI
380 IBasicVideo2_fnget_VideoWidth(IBasicVideo2* iface,long* plWidth)
381 {
382         CFilterGraph_THIS(iface,basvid);
383         QUERYBASICVIDEO
384
385         TRACE("(%p)->()\n",This);
386
387         hr = IBasicVideo_get_VideoWidth(pVideo,plWidth);
388         IBasicVideo_Release(pVideo);
389         return hr;
390 }
391
392 static HRESULT WINAPI
393 IBasicVideo2_fnget_VideoHeight(IBasicVideo2* iface,long* plHeight)
394 {
395         CFilterGraph_THIS(iface,basvid);
396         QUERYBASICVIDEO
397
398         TRACE("(%p)->()\n",This);
399
400         hr = IBasicVideo_get_VideoHeight(pVideo,plHeight);
401         IBasicVideo_Release(pVideo);
402         return hr;
403 }
404
405 static HRESULT WINAPI
406 IBasicVideo2_fnput_SourceLeft(IBasicVideo2* iface,long lLeft)
407 {
408         CFilterGraph_THIS(iface,basvid);
409         QUERYBASICVIDEO
410
411         TRACE("(%p)->()\n",This);
412
413         hr = IBasicVideo_put_SourceLeft(pVideo,lLeft);
414         IBasicVideo_Release(pVideo);
415         return hr;
416 }
417
418 static HRESULT WINAPI
419 IBasicVideo2_fnget_SourceLeft(IBasicVideo2* iface,long* plLeft)
420 {
421         CFilterGraph_THIS(iface,basvid);
422         QUERYBASICVIDEO
423
424         TRACE("(%p)->()\n",This);
425
426         hr = IBasicVideo_get_SourceLeft(pVideo,plLeft);
427         IBasicVideo_Release(pVideo);
428         return hr;
429 }
430
431 static HRESULT WINAPI
432 IBasicVideo2_fnput_SourceWidth(IBasicVideo2* iface,long lWidth)
433 {
434         CFilterGraph_THIS(iface,basvid);
435         QUERYBASICVIDEO
436
437         TRACE("(%p)->()\n",This);
438
439         hr = IBasicVideo_put_SourceWidth(pVideo,lWidth);
440         IBasicVideo_Release(pVideo);
441         return hr;
442 }
443
444 static HRESULT WINAPI
445 IBasicVideo2_fnget_SourceWidth(IBasicVideo2* iface,long* plWidth)
446 {
447         CFilterGraph_THIS(iface,basvid);
448         QUERYBASICVIDEO
449
450         TRACE("(%p)->()\n",This);
451
452         hr = IBasicVideo_get_SourceWidth(pVideo,plWidth);
453         IBasicVideo_Release(pVideo);
454         return hr;
455 }
456
457 static HRESULT WINAPI
458 IBasicVideo2_fnput_SourceTop(IBasicVideo2* iface,long lTop)
459 {
460         CFilterGraph_THIS(iface,basvid);
461         QUERYBASICVIDEO
462
463         TRACE("(%p)->()\n",This);
464
465         hr = IBasicVideo_put_SourceTop(pVideo,lTop);
466         IBasicVideo_Release(pVideo);
467         return hr;
468 }
469
470 static HRESULT WINAPI
471 IBasicVideo2_fnget_SourceTop(IBasicVideo2* iface,long* plTop)
472 {
473         CFilterGraph_THIS(iface,basvid);
474         QUERYBASICVIDEO
475
476         TRACE("(%p)->()\n",This);
477
478         hr = IBasicVideo_get_SourceTop(pVideo,plTop);
479         IBasicVideo_Release(pVideo);
480         return hr;
481 }
482
483 static HRESULT WINAPI
484 IBasicVideo2_fnput_SourceHeight(IBasicVideo2* iface,long lHeight)
485 {
486         CFilterGraph_THIS(iface,basvid);
487         QUERYBASICVIDEO
488
489         TRACE("(%p)->()\n",This);
490
491         hr = IBasicVideo_put_SourceHeight(pVideo,lHeight);
492         IBasicVideo_Release(pVideo);
493         return hr;
494 }
495
496 static HRESULT WINAPI
497 IBasicVideo2_fnget_SourceHeight(IBasicVideo2* iface,long* plHeight)
498 {
499         CFilterGraph_THIS(iface,basvid);
500         QUERYBASICVIDEO
501
502         TRACE("(%p)->()\n",This);
503
504         hr = IBasicVideo_get_SourceHeight(pVideo,plHeight);
505         IBasicVideo_Release(pVideo);
506         return hr;
507 }
508
509 static HRESULT WINAPI
510 IBasicVideo2_fnput_DestinationLeft(IBasicVideo2* iface,long lLeft)
511 {
512         CFilterGraph_THIS(iface,basvid);
513         QUERYBASICVIDEO
514
515         TRACE("(%p)->()\n",This);
516
517         hr = IBasicVideo_put_DestinationLeft(pVideo,lLeft);
518         IBasicVideo_Release(pVideo);
519         return hr;
520 }
521
522 static HRESULT WINAPI
523 IBasicVideo2_fnget_DestinationLeft(IBasicVideo2* iface,long* plLeft)
524 {
525         CFilterGraph_THIS(iface,basvid);
526         QUERYBASICVIDEO
527
528         TRACE("(%p)->()\n",This);
529
530         hr = IBasicVideo_get_DestinationLeft(pVideo,plLeft);
531         IBasicVideo_Release(pVideo);
532         return hr;
533 }
534
535 static HRESULT WINAPI
536 IBasicVideo2_fnput_DestinationWidth(IBasicVideo2* iface,long lWidth)
537 {
538         CFilterGraph_THIS(iface,basvid);
539         QUERYBASICVIDEO
540
541         TRACE("(%p)->()\n",This);
542
543         hr = IBasicVideo_put_DestinationWidth(pVideo,lWidth);
544         IBasicVideo_Release(pVideo);
545         return hr;
546 }
547
548 static HRESULT WINAPI
549 IBasicVideo2_fnget_DestinationWidth(IBasicVideo2* iface,long* plWidth)
550 {
551         CFilterGraph_THIS(iface,basvid);
552         QUERYBASICVIDEO
553
554         TRACE("(%p)->()\n",This);
555
556         hr = IBasicVideo_get_DestinationWidth(pVideo,plWidth);
557         IBasicVideo_Release(pVideo);
558         return hr;
559 }
560
561 static HRESULT WINAPI
562 IBasicVideo2_fnput_DestinationTop(IBasicVideo2* iface,long lTop)
563 {
564         CFilterGraph_THIS(iface,basvid);
565         QUERYBASICVIDEO
566
567         TRACE("(%p)->()\n",This);
568
569         hr = IBasicVideo_put_DestinationTop(pVideo,lTop);
570         IBasicVideo_Release(pVideo);
571         return hr;
572 }
573
574 static HRESULT WINAPI
575 IBasicVideo2_fnget_DestinationTop(IBasicVideo2* iface,long* plTop)
576 {
577         CFilterGraph_THIS(iface,basvid);
578         QUERYBASICVIDEO
579
580         TRACE("(%p)->()\n",This);
581
582         hr = IBasicVideo_get_DestinationTop(pVideo,plTop);
583         IBasicVideo_Release(pVideo);
584         return hr;
585 }
586
587 static HRESULT WINAPI
588 IBasicVideo2_fnput_DestinationHeight(IBasicVideo2* iface,long lHeight)
589 {
590         CFilterGraph_THIS(iface,basvid);
591         QUERYBASICVIDEO
592
593         TRACE("(%p)->()\n",This);
594
595         hr = IBasicVideo_put_DestinationHeight(pVideo,lHeight);
596         IBasicVideo_Release(pVideo);
597         return hr;
598 }
599
600 static HRESULT WINAPI
601 IBasicVideo2_fnget_DestinationHeight(IBasicVideo2* iface,long* plHeight)
602 {
603         CFilterGraph_THIS(iface,basvid);
604         QUERYBASICVIDEO
605
606         TRACE("(%p)->()\n",This);
607
608         hr = IBasicVideo_get_DestinationHeight(pVideo,plHeight);
609         IBasicVideo_Release(pVideo);
610         return hr;
611 }
612
613 static HRESULT WINAPI
614 IBasicVideo2_fnSetSourcePosition(IBasicVideo2* iface,long lLeft,long lTop,long lWidth,long lHeight)
615 {
616         CFilterGraph_THIS(iface,basvid);
617         QUERYBASICVIDEO
618
619         TRACE("(%p)->()\n",This);
620
621         hr = IBasicVideo_SetSourcePosition(pVideo,lLeft,lTop,lWidth,lHeight);
622         IBasicVideo_Release(pVideo);
623         return hr;
624 }
625
626 static HRESULT WINAPI
627 IBasicVideo2_fnGetSourcePosition(IBasicVideo2* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight)
628 {
629         CFilterGraph_THIS(iface,basvid);
630         QUERYBASICVIDEO
631
632         TRACE("(%p)->()\n",This);
633
634         hr = IBasicVideo_GetSourcePosition(pVideo,plLeft,plTop,plWidth,plHeight);
635         IBasicVideo_Release(pVideo);
636         return hr;
637 }
638
639 static HRESULT WINAPI
640 IBasicVideo2_fnSetDefaultSourcePosition(IBasicVideo2* iface)
641 {
642         CFilterGraph_THIS(iface,basvid);
643         QUERYBASICVIDEO
644
645         TRACE("(%p)->()\n",This);
646
647         hr = IBasicVideo_SetDefaultSourcePosition(pVideo);
648         IBasicVideo_Release(pVideo);
649         return hr;
650 }
651
652 static HRESULT WINAPI
653 IBasicVideo2_fnSetDestinationPosition(IBasicVideo2* iface,long lLeft,long lTop,long lWidth,long lHeight)
654 {
655         CFilterGraph_THIS(iface,basvid);
656         QUERYBASICVIDEO
657
658         TRACE("(%p)->()\n",This);
659
660         hr = IBasicVideo_SetDestinationPosition(pVideo,lLeft,lTop,lWidth,lHeight);
661         IBasicVideo_Release(pVideo);
662         return hr;
663 }
664
665 static HRESULT WINAPI
666 IBasicVideo2_fnGetDestinationPosition(IBasicVideo2* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight)
667 {
668         CFilterGraph_THIS(iface,basvid);
669         QUERYBASICVIDEO
670
671         TRACE("(%p)->()\n",This);
672
673         hr = IBasicVideo_GetDestinationPosition(pVideo,plLeft,plTop,plWidth,plHeight);
674         IBasicVideo_Release(pVideo);
675         return hr;
676 }
677
678 static HRESULT WINAPI
679 IBasicVideo2_fnSetDefaultDestinationPosition(IBasicVideo2* iface)
680 {
681         CFilterGraph_THIS(iface,basvid);
682         QUERYBASICVIDEO
683
684         TRACE("(%p)->()\n",This);
685
686         hr = IBasicVideo_SetDefaultDestinationPosition(pVideo);
687         IBasicVideo_Release(pVideo);
688         return hr;
689 }
690
691 static HRESULT WINAPI
692 IBasicVideo2_fnGetVideoSize(IBasicVideo2* iface,long* plWidth,long* plHeight)
693 {
694         CFilterGraph_THIS(iface,basvid);
695         QUERYBASICVIDEO
696
697         TRACE("(%p)->()\n",This);
698
699         hr = IBasicVideo_GetVideoSize(pVideo,plWidth,plHeight);
700         IBasicVideo_Release(pVideo);
701         return hr;
702 }
703
704 static HRESULT WINAPI
705 IBasicVideo2_fnGetVideoPaletteEntries(IBasicVideo2* iface,long lStart,long lCount,long* plRet,long* plPaletteEntry)
706 {
707         CFilterGraph_THIS(iface,basvid);
708         QUERYBASICVIDEO
709
710         TRACE("(%p)->()\n",This);
711
712         hr = IBasicVideo_GetVideoPaletteEntries(pVideo,lStart,lCount,plRet,plPaletteEntry);
713         IBasicVideo_Release(pVideo);
714         return hr;
715 }
716
717 static HRESULT WINAPI
718 IBasicVideo2_fnGetCurrentImage(IBasicVideo2* iface,long* plBufferSize,long* plDIBBuffer)
719 {
720         CFilterGraph_THIS(iface,basvid);
721         QUERYBASICVIDEO
722
723         TRACE("(%p)->()\n",This);
724
725         hr = IBasicVideo_GetCurrentImage(pVideo,plBufferSize,plDIBBuffer);
726         IBasicVideo_Release(pVideo);
727         return hr;
728 }
729
730 static HRESULT WINAPI
731 IBasicVideo2_fnIsUsingDefaultSource(IBasicVideo2* iface)
732 {
733         CFilterGraph_THIS(iface,basvid);
734         QUERYBASICVIDEO
735
736         TRACE("(%p)->()\n",This);
737
738         hr = IBasicVideo_IsUsingDefaultSource(pVideo);
739         IBasicVideo_Release(pVideo);
740         return hr;
741 }
742
743 static HRESULT WINAPI
744 IBasicVideo2_fnIsUsingDefaultDestination(IBasicVideo2* iface)
745 {
746         CFilterGraph_THIS(iface,basvid);
747         QUERYBASICVIDEO
748
749         TRACE("(%p)->()\n",This);
750
751         hr = IBasicVideo_IsUsingDefaultDestination(pVideo);
752         IBasicVideo_Release(pVideo);
753         return hr;
754 }
755
756 static HRESULT WINAPI
757 IBasicVideo2_fnGetPreferredAspectRatio(IBasicVideo2* iface,long* plRateX,long* plRateY)
758 {
759         CFilterGraph_THIS(iface,basvid);
760         QUERYBASICVIDEO2
761
762         TRACE("(%p)->()\n",This);
763
764         hr = IBasicVideo2_GetPreferredAspectRatio(pVideo,plRateX,plRateY);
765         IBasicVideo2_Release(pVideo);
766         return hr;
767 }
768
769
770
771
772 static ICOM_VTABLE(IBasicVideo2) ibasicvideo =
773 {
774         ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
775         /* IUnknown fields */
776         IBasicVideo2_fnQueryInterface,
777         IBasicVideo2_fnAddRef,
778         IBasicVideo2_fnRelease,
779         /* IDispatch fields */
780         IBasicVideo2_fnGetTypeInfoCount,
781         IBasicVideo2_fnGetTypeInfo,
782         IBasicVideo2_fnGetIDsOfNames,
783         IBasicVideo2_fnInvoke,
784         /* IBasicVideo fields */
785         IBasicVideo2_fnget_AvgTimePerFrame,
786         IBasicVideo2_fnget_BitRate,
787         IBasicVideo2_fnget_BitErrorRate,
788         IBasicVideo2_fnget_VideoWidth,
789         IBasicVideo2_fnget_VideoHeight,
790         IBasicVideo2_fnput_SourceLeft,
791         IBasicVideo2_fnget_SourceLeft,
792         IBasicVideo2_fnput_SourceWidth,
793         IBasicVideo2_fnget_SourceWidth,
794         IBasicVideo2_fnput_SourceTop,
795         IBasicVideo2_fnget_SourceTop,
796         IBasicVideo2_fnput_SourceHeight,
797         IBasicVideo2_fnget_SourceHeight,
798         IBasicVideo2_fnput_DestinationLeft,
799         IBasicVideo2_fnget_DestinationLeft,
800         IBasicVideo2_fnput_DestinationWidth,
801         IBasicVideo2_fnget_DestinationWidth,
802         IBasicVideo2_fnput_DestinationTop,
803         IBasicVideo2_fnget_DestinationTop,
804         IBasicVideo2_fnput_DestinationHeight,
805         IBasicVideo2_fnget_DestinationHeight,
806         IBasicVideo2_fnSetSourcePosition,
807         IBasicVideo2_fnGetSourcePosition,
808         IBasicVideo2_fnSetDefaultSourcePosition,
809         IBasicVideo2_fnSetDestinationPosition,
810         IBasicVideo2_fnGetDestinationPosition,
811         IBasicVideo2_fnSetDefaultDestinationPosition,
812         IBasicVideo2_fnGetVideoSize,
813         IBasicVideo2_fnGetVideoPaletteEntries,
814         IBasicVideo2_fnGetCurrentImage,
815         IBasicVideo2_fnIsUsingDefaultSource,
816         IBasicVideo2_fnIsUsingDefaultDestination,
817         /* IBasicVideo2 fields */
818         IBasicVideo2_fnGetPreferredAspectRatio,
819 };
820
821
822 HRESULT CFilterGraph_InitIBasicVideo2( CFilterGraph* pfg )
823 {
824         TRACE("(%p)\n",pfg);
825         ICOM_VTBL(&pfg->basvid) = &ibasicvideo;
826
827         return NOERROR;
828 }
829
830 void CFilterGraph_UninitIBasicVideo2( CFilterGraph* pfg )
831 {
832         TRACE("(%p)\n",pfg);
833 }
834
835 #undef QUERYBASICVIDEO2
836 #undef QUERYBASICVIDEO
837
838 /***************************************************************************
839  *
840  *      CFilterGraph::IVideoWindow
841  *
842  */
843
844 #define QUERYVIDEOWINDOW \
845         IVideoWindow* pVidWin = NULL; \
846         HRESULT hr; \
847         hr = CFilterGraph_QueryVideoWindow( This, &pVidWin ); \
848         if ( FAILED(hr) ) return hr;
849
850
851 static HRESULT WINAPI
852 IVideoWindow_fnQueryInterface(IVideoWindow* iface,REFIID riid,void** ppobj)
853 {
854         CFilterGraph_THIS(iface,vidwin);
855
856         TRACE("(%p)->()\n",This);
857
858         return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
859 }
860
861 static ULONG WINAPI
862 IVideoWindow_fnAddRef(IVideoWindow* iface)
863 {
864         CFilterGraph_THIS(iface,vidwin);
865
866         TRACE("(%p)->()\n",This);
867
868         return IUnknown_AddRef(This->unk.punkControl);
869 }
870
871 static ULONG WINAPI
872 IVideoWindow_fnRelease(IVideoWindow* iface)
873 {
874         CFilterGraph_THIS(iface,vidwin);
875
876         TRACE("(%p)->()\n",This);
877
878         return IUnknown_Release(This->unk.punkControl);
879 }
880
881 static HRESULT WINAPI
882 IVideoWindow_fnGetTypeInfoCount(IVideoWindow* iface,UINT* pcTypeInfo)
883 {
884         CFilterGraph_THIS(iface,vidwin);
885
886         FIXME("(%p)->()\n",This);
887
888         return E_NOTIMPL;
889 }
890
891 static HRESULT WINAPI
892 IVideoWindow_fnGetTypeInfo(IVideoWindow* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj)
893 {
894         CFilterGraph_THIS(iface,vidwin);
895
896         FIXME("(%p)->()\n",This);
897
898         return E_NOTIMPL;
899 }
900
901 static HRESULT WINAPI
902 IVideoWindow_fnGetIDsOfNames(IVideoWindow* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId)
903 {
904         CFilterGraph_THIS(iface,vidwin);
905
906         FIXME("(%p)->()\n",This);
907
908         return E_NOTIMPL;
909 }
910
911 static HRESULT WINAPI
912 IVideoWindow_fnInvoke(IVideoWindow* iface,DISPID DispId, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarRes, EXCEPINFO* pExcepInfo, UINT* puArgErr)
913 {
914         CFilterGraph_THIS(iface,vidwin);
915
916         FIXME("(%p)->()\n",This);
917
918         return E_NOTIMPL;
919 }
920
921
922
923 static HRESULT WINAPI
924 IVideoWindow_fnput_Caption(IVideoWindow* iface,BSTR strCaption)
925 {
926         CFilterGraph_THIS(iface,vidwin);
927         QUERYVIDEOWINDOW
928
929         TRACE("(%p)->()\n",This);
930
931         hr = IVideoWindow_put_Caption(pVidWin,strCaption);
932         IVideoWindow_Release(pVidWin);
933         return hr;
934 }
935
936 static HRESULT WINAPI
937 IVideoWindow_fnget_Caption(IVideoWindow* iface,BSTR* pstrCaption)
938 {
939         CFilterGraph_THIS(iface,vidwin);
940         QUERYVIDEOWINDOW
941
942         TRACE("(%p)->()\n",This);
943
944         hr = IVideoWindow_get_Caption(pVidWin,pstrCaption);
945         IVideoWindow_Release(pVidWin);
946         return hr;
947 }
948
949 static HRESULT WINAPI
950 IVideoWindow_fnput_WindowStyle(IVideoWindow* iface,long lStyle)
951 {
952         CFilterGraph_THIS(iface,vidwin);
953         QUERYVIDEOWINDOW
954
955         TRACE("(%p)->()\n",This);
956
957         hr = IVideoWindow_put_WindowStyle(pVidWin,lStyle);
958         IVideoWindow_Release(pVidWin);
959         return hr;
960 }
961
962 static HRESULT WINAPI
963 IVideoWindow_fnget_WindowStyle(IVideoWindow* iface,long* plStyle)
964 {
965         CFilterGraph_THIS(iface,vidwin);
966         QUERYVIDEOWINDOW
967
968         TRACE("(%p)->()\n",This);
969
970         hr = IVideoWindow_get_WindowStyle(pVidWin,plStyle);
971         IVideoWindow_Release(pVidWin);
972         return hr;
973 }
974
975 static HRESULT WINAPI
976 IVideoWindow_fnput_WindowStyleEx(IVideoWindow* iface,long lExStyle)
977 {
978         CFilterGraph_THIS(iface,vidwin);
979         QUERYVIDEOWINDOW
980
981         TRACE("(%p)->()\n",This);
982
983         hr = IVideoWindow_put_WindowStyleEx(pVidWin,lExStyle);
984         IVideoWindow_Release(pVidWin);
985         return hr;
986 }
987
988 static HRESULT WINAPI
989 IVideoWindow_fnget_WindowStyleEx(IVideoWindow* iface,long* plExStyle)
990 {
991         CFilterGraph_THIS(iface,vidwin);
992         QUERYVIDEOWINDOW
993
994         TRACE("(%p)->()\n",This);
995
996         hr = IVideoWindow_get_WindowStyleEx(pVidWin,plExStyle);
997         IVideoWindow_Release(pVidWin);
998         return hr;
999 }
1000
1001 static HRESULT WINAPI
1002 IVideoWindow_fnput_AutoShow(IVideoWindow* iface,long lAutoShow)
1003 {
1004         CFilterGraph_THIS(iface,vidwin);
1005         QUERYVIDEOWINDOW
1006
1007         TRACE("(%p)->()\n",This);
1008
1009         hr = IVideoWindow_put_AutoShow(pVidWin,lAutoShow);
1010         IVideoWindow_Release(pVidWin);
1011         return hr;
1012 }
1013
1014 static HRESULT WINAPI
1015 IVideoWindow_fnget_AutoShow(IVideoWindow* iface,long* plAutoShow)
1016 {
1017         CFilterGraph_THIS(iface,vidwin);
1018         QUERYVIDEOWINDOW
1019
1020         TRACE("(%p)->()\n",This);
1021
1022         hr = IVideoWindow_get_AutoShow(pVidWin,plAutoShow);
1023         IVideoWindow_Release(pVidWin);
1024         return hr;
1025 }
1026
1027 static HRESULT WINAPI
1028 IVideoWindow_fnput_WindowState(IVideoWindow* iface,long lState)
1029 {
1030         CFilterGraph_THIS(iface,vidwin);
1031         QUERYVIDEOWINDOW
1032
1033         TRACE("(%p)->()\n",This);
1034
1035         hr = IVideoWindow_put_WindowState(pVidWin,lState);
1036         IVideoWindow_Release(pVidWin);
1037         return hr;
1038 }
1039
1040 static HRESULT WINAPI
1041 IVideoWindow_fnget_WindowState(IVideoWindow* iface,long* plState)
1042 {
1043         CFilterGraph_THIS(iface,vidwin);
1044         QUERYVIDEOWINDOW
1045
1046         TRACE("(%p)->()\n",This);
1047
1048         hr = IVideoWindow_get_WindowState(pVidWin,plState);
1049         IVideoWindow_Release(pVidWin);
1050         return hr;
1051 }
1052
1053 static HRESULT WINAPI
1054 IVideoWindow_fnput_BackgroundPalette(IVideoWindow* iface,long lBackPal)
1055 {
1056         CFilterGraph_THIS(iface,vidwin);
1057         QUERYVIDEOWINDOW
1058
1059         TRACE("(%p)->()\n",This);
1060
1061         hr = IVideoWindow_put_BackgroundPalette(pVidWin,lBackPal);
1062         IVideoWindow_Release(pVidWin);
1063         return hr;
1064 }
1065
1066 static HRESULT WINAPI
1067 IVideoWindow_fnget_BackgroundPalette(IVideoWindow* iface,long* plBackPal)
1068 {
1069         CFilterGraph_THIS(iface,vidwin);
1070         QUERYVIDEOWINDOW
1071
1072         TRACE("(%p)->()\n",This);
1073
1074         hr = IVideoWindow_get_BackgroundPalette(pVidWin,plBackPal);
1075         IVideoWindow_Release(pVidWin);
1076         return hr;
1077 }
1078
1079 static HRESULT WINAPI
1080 IVideoWindow_fnput_Visible(IVideoWindow* iface,long lVisible)
1081 {
1082         CFilterGraph_THIS(iface,vidwin);
1083         QUERYVIDEOWINDOW
1084
1085         TRACE("(%p)->()\n",This);
1086
1087         hr = IVideoWindow_put_Visible(pVidWin,lVisible);
1088         IVideoWindow_Release(pVidWin);
1089         return hr;
1090 }
1091
1092 static HRESULT WINAPI
1093 IVideoWindow_fnget_Visible(IVideoWindow* iface,long* plVisible)
1094 {
1095         CFilterGraph_THIS(iface,vidwin);
1096         QUERYVIDEOWINDOW
1097
1098         TRACE("(%p)->()\n",This);
1099
1100         hr = IVideoWindow_get_Visible(pVidWin,plVisible);
1101         IVideoWindow_Release(pVidWin);
1102         return hr;
1103 }
1104
1105 static HRESULT WINAPI
1106 IVideoWindow_fnput_Left(IVideoWindow* iface,long lLeft)
1107 {
1108         CFilterGraph_THIS(iface,vidwin);
1109         QUERYVIDEOWINDOW
1110
1111         TRACE("(%p)->()\n",This);
1112
1113         hr = IVideoWindow_put_Left(pVidWin,lLeft);
1114         IVideoWindow_Release(pVidWin);
1115         return hr;
1116 }
1117
1118 static HRESULT WINAPI
1119 IVideoWindow_fnget_Left(IVideoWindow* iface,long* plLeft)
1120 {
1121         CFilterGraph_THIS(iface,vidwin);
1122         QUERYVIDEOWINDOW
1123
1124         TRACE("(%p)->()\n",This);
1125
1126         hr = IVideoWindow_get_Left(pVidWin,plLeft);
1127         IVideoWindow_Release(pVidWin);
1128         return hr;
1129 }
1130
1131 static HRESULT WINAPI
1132 IVideoWindow_fnput_Width(IVideoWindow* iface,long lWidth)
1133 {
1134         CFilterGraph_THIS(iface,vidwin);
1135         QUERYVIDEOWINDOW
1136
1137         TRACE("(%p)->()\n",This);
1138
1139         hr = IVideoWindow_put_Width(pVidWin,lWidth);
1140         IVideoWindow_Release(pVidWin);
1141         return hr;
1142 }
1143
1144 static HRESULT WINAPI
1145 IVideoWindow_fnget_Width(IVideoWindow* iface,long* plWidth)
1146 {
1147         CFilterGraph_THIS(iface,vidwin);
1148         QUERYVIDEOWINDOW
1149
1150         TRACE("(%p)->()\n",This);
1151
1152         hr =IVideoWindow_get_Width(pVidWin,plWidth);
1153         IVideoWindow_Release(pVidWin);
1154         return hr;
1155 }
1156
1157 static HRESULT WINAPI
1158 IVideoWindow_fnput_Top(IVideoWindow* iface,long lTop)
1159 {
1160         CFilterGraph_THIS(iface,vidwin);
1161         QUERYVIDEOWINDOW
1162
1163         TRACE("(%p)->()\n",This);
1164
1165         hr = IVideoWindow_put_Top(pVidWin,lTop);
1166         IVideoWindow_Release(pVidWin);
1167         return hr;
1168 }
1169
1170 static HRESULT WINAPI
1171 IVideoWindow_fnget_Top(IVideoWindow* iface,long* plTop)
1172 {
1173         CFilterGraph_THIS(iface,vidwin);
1174         QUERYVIDEOWINDOW
1175
1176         TRACE("(%p)->()\n",This);
1177
1178         hr = IVideoWindow_get_Top(pVidWin,plTop);
1179         IVideoWindow_Release(pVidWin);
1180         return hr;
1181 }
1182
1183 static HRESULT WINAPI
1184 IVideoWindow_fnput_Height(IVideoWindow* iface,long lHeight)
1185 {
1186         CFilterGraph_THIS(iface,vidwin);
1187         QUERYVIDEOWINDOW
1188
1189         TRACE("(%p)->()\n",This);
1190
1191         hr = IVideoWindow_put_Height(pVidWin,lHeight);
1192         IVideoWindow_Release(pVidWin);
1193         return hr;
1194 }
1195
1196 static HRESULT WINAPI
1197 IVideoWindow_fnget_Height(IVideoWindow* iface,long* plHeight)
1198 {
1199         CFilterGraph_THIS(iface,vidwin);
1200         QUERYVIDEOWINDOW
1201
1202         TRACE("(%p)->()\n",This);
1203
1204         hr = IVideoWindow_get_Height(pVidWin,plHeight);
1205         IVideoWindow_Release(pVidWin);
1206         return hr;
1207 }
1208
1209 static HRESULT WINAPI
1210 IVideoWindow_fnput_Owner(IVideoWindow* iface,OAHWND hwnd)
1211 {
1212         CFilterGraph_THIS(iface,vidwin);
1213         QUERYVIDEOWINDOW
1214
1215         TRACE("(%p)->()\n",This);
1216
1217         hr = IVideoWindow_put_Owner(pVidWin,hwnd);
1218         IVideoWindow_Release(pVidWin);
1219         return hr;
1220 }
1221
1222 static HRESULT WINAPI
1223 IVideoWindow_fnget_Owner(IVideoWindow* iface,OAHWND* phwnd)
1224 {
1225         CFilterGraph_THIS(iface,vidwin);
1226         QUERYVIDEOWINDOW
1227
1228         TRACE("(%p)->()\n",This);
1229
1230         hr = IVideoWindow_get_Owner(pVidWin,phwnd);
1231         IVideoWindow_Release(pVidWin);
1232         return hr;
1233 }
1234
1235 static HRESULT WINAPI
1236 IVideoWindow_fnput_MessageDrain(IVideoWindow* iface,OAHWND hwnd)
1237 {
1238         CFilterGraph_THIS(iface,vidwin);
1239         QUERYVIDEOWINDOW
1240
1241         TRACE("(%p)->()\n",This);
1242
1243         hr = IVideoWindow_put_MessageDrain(pVidWin,hwnd);
1244         IVideoWindow_Release(pVidWin);
1245         return hr;
1246 }
1247
1248 static HRESULT WINAPI
1249 IVideoWindow_fnget_MessageDrain(IVideoWindow* iface,OAHWND* phwnd)
1250 {
1251         CFilterGraph_THIS(iface,vidwin);
1252         QUERYVIDEOWINDOW
1253
1254         TRACE("(%p)->()\n",This);
1255
1256         hr = IVideoWindow_get_MessageDrain(pVidWin,phwnd);
1257         IVideoWindow_Release(pVidWin);
1258         return hr;
1259 }
1260
1261 static HRESULT WINAPI
1262 IVideoWindow_fnget_BorderColor(IVideoWindow* iface,long* plColor)
1263 {
1264         CFilterGraph_THIS(iface,vidwin);
1265         QUERYVIDEOWINDOW
1266
1267         TRACE("(%p)->()\n",This);
1268
1269         hr = IVideoWindow_get_BorderColor(pVidWin,plColor);
1270         IVideoWindow_Release(pVidWin);
1271         return hr;
1272 }
1273
1274 static HRESULT WINAPI
1275 IVideoWindow_fnput_BorderColor(IVideoWindow* iface,long lColor)
1276 {
1277         CFilterGraph_THIS(iface,vidwin);
1278         QUERYVIDEOWINDOW
1279
1280         TRACE("(%p)->()\n",This);
1281
1282         hr = IVideoWindow_put_BorderColor(pVidWin,lColor);
1283         IVideoWindow_Release(pVidWin);
1284         return hr;
1285 }
1286
1287 static HRESULT WINAPI
1288 IVideoWindow_fnget_FullScreenMode(IVideoWindow* iface,long* plMode)
1289 {
1290         CFilterGraph_THIS(iface,vidwin);
1291         QUERYVIDEOWINDOW
1292
1293         TRACE("(%p)->()\n",This);
1294
1295         hr = IVideoWindow_get_FullScreenMode(pVidWin,plMode);
1296         IVideoWindow_Release(pVidWin);
1297         return hr;
1298 }
1299
1300 static HRESULT WINAPI
1301 IVideoWindow_fnput_FullScreenMode(IVideoWindow* iface,long lMode)
1302 {
1303         CFilterGraph_THIS(iface,vidwin);
1304         QUERYVIDEOWINDOW
1305
1306         TRACE("(%p)->()\n",This);
1307
1308         hr = IVideoWindow_put_FullScreenMode(pVidWin,lMode);
1309         IVideoWindow_Release(pVidWin);
1310         return hr;
1311 }
1312
1313 static HRESULT WINAPI
1314 IVideoWindow_fnSetWindowForeground(IVideoWindow* iface,long lFocus)
1315 {
1316         CFilterGraph_THIS(iface,vidwin);
1317         QUERYVIDEOWINDOW
1318
1319         TRACE("(%p)->()\n",This);
1320
1321         hr = IVideoWindow_SetWindowForeground(pVidWin,lFocus);
1322         IVideoWindow_Release(pVidWin);
1323         return hr;
1324 }
1325
1326 static HRESULT WINAPI
1327 IVideoWindow_fnNotifyOwnerMessage(IVideoWindow* iface,OAHWND hwnd,long message,LONG_PTR wParam,LONG_PTR lParam)
1328 {
1329         CFilterGraph_THIS(iface,vidwin);
1330         QUERYVIDEOWINDOW
1331
1332         TRACE("(%p)->()\n",This);
1333
1334         hr = IVideoWindow_NotifyOwnerMessage(pVidWin,hwnd,message,wParam,lParam);
1335         IVideoWindow_Release(pVidWin);
1336         return hr;
1337 }
1338
1339 static HRESULT WINAPI
1340 IVideoWindow_fnSetWindowPosition(IVideoWindow* iface,long lLeft,long lTop,long lWidth,long lHeight)
1341 {
1342         CFilterGraph_THIS(iface,vidwin);
1343         QUERYVIDEOWINDOW
1344
1345         TRACE("(%p)->()\n",This);
1346
1347         hr = IVideoWindow_SetWindowPosition(pVidWin,lLeft,lTop,lWidth,lHeight);
1348         IVideoWindow_Release(pVidWin);
1349         return hr;
1350 }
1351
1352 static HRESULT WINAPI
1353 IVideoWindow_fnGetWindowPosition(IVideoWindow* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight)
1354 {
1355         CFilterGraph_THIS(iface,vidwin);
1356         QUERYVIDEOWINDOW
1357
1358         TRACE("(%p)->()\n",This);
1359
1360         hr = IVideoWindow_GetWindowPosition(pVidWin,plLeft,plTop,plWidth,plHeight);
1361         IVideoWindow_Release(pVidWin);
1362         return hr;
1363 }
1364
1365 static HRESULT WINAPI
1366 IVideoWindow_fnGetMinIdealImageSize(IVideoWindow* iface,long* plWidth,long* plHeight)
1367 {
1368         CFilterGraph_THIS(iface,vidwin);
1369         QUERYVIDEOWINDOW
1370
1371         TRACE("(%p)->()\n",This);
1372
1373         hr = IVideoWindow_GetMinIdealImageSize(pVidWin,plWidth,plHeight);
1374         IVideoWindow_Release(pVidWin);
1375         return hr;
1376 }
1377
1378 static HRESULT WINAPI
1379 IVideoWindow_fnGetMaxIdealImageSize(IVideoWindow* iface,long* plWidth,long* plHeight)
1380 {
1381         CFilterGraph_THIS(iface,vidwin);
1382         QUERYVIDEOWINDOW
1383
1384         TRACE("(%p)->()\n",This);
1385
1386         hr = IVideoWindow_GetMaxIdealImageSize(pVidWin,plWidth,plHeight);
1387         IVideoWindow_Release(pVidWin);
1388         return hr;
1389 }
1390
1391 static HRESULT WINAPI
1392 IVideoWindow_fnGetRestorePosition(IVideoWindow* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight)
1393 {
1394         CFilterGraph_THIS(iface,vidwin);
1395         QUERYVIDEOWINDOW
1396
1397         TRACE("(%p)->()\n",This);
1398
1399         hr = IVideoWindow_GetRestorePosition(pVidWin,plLeft,plTop,plWidth,plHeight);
1400         IVideoWindow_Release(pVidWin);
1401         return hr;
1402 }
1403
1404 static HRESULT WINAPI
1405 IVideoWindow_fnHideCursor(IVideoWindow* iface,long lHide)
1406 {
1407         CFilterGraph_THIS(iface,vidwin);
1408         QUERYVIDEOWINDOW
1409
1410         TRACE("(%p)->()\n",This);
1411
1412         hr = IVideoWindow_HideCursor(pVidWin,lHide);
1413         IVideoWindow_Release(pVidWin);
1414         return hr;
1415 }
1416
1417 static HRESULT WINAPI
1418 IVideoWindow_fnIsCursorHidden(IVideoWindow* iface,long* plHide)
1419 {
1420         CFilterGraph_THIS(iface,vidwin);
1421         QUERYVIDEOWINDOW
1422
1423         TRACE("(%p)->()\n",This);
1424
1425         hr = IVideoWindow_IsCursorHidden(pVidWin,plHide);
1426         IVideoWindow_Release(pVidWin);
1427         return hr;
1428 }
1429
1430
1431
1432
1433 static ICOM_VTABLE(IVideoWindow) ivideowindow =
1434 {
1435         ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1436         /* IUnknown fields */
1437         IVideoWindow_fnQueryInterface,
1438         IVideoWindow_fnAddRef,
1439         IVideoWindow_fnRelease,
1440         /* IDispatch fields */
1441         IVideoWindow_fnGetTypeInfoCount,
1442         IVideoWindow_fnGetTypeInfo,
1443         IVideoWindow_fnGetIDsOfNames,
1444         IVideoWindow_fnInvoke,
1445         /* IVideoWindow fields */
1446         IVideoWindow_fnput_Caption,
1447         IVideoWindow_fnget_Caption,
1448         IVideoWindow_fnput_WindowStyle,
1449         IVideoWindow_fnget_WindowStyle,
1450         IVideoWindow_fnput_WindowStyleEx,
1451         IVideoWindow_fnget_WindowStyleEx,
1452         IVideoWindow_fnput_AutoShow,
1453         IVideoWindow_fnget_AutoShow,
1454         IVideoWindow_fnput_WindowState,
1455         IVideoWindow_fnget_WindowState,
1456         IVideoWindow_fnput_BackgroundPalette,
1457         IVideoWindow_fnget_BackgroundPalette,
1458         IVideoWindow_fnput_Visible,
1459         IVideoWindow_fnget_Visible,
1460         IVideoWindow_fnput_Left,
1461         IVideoWindow_fnget_Left,
1462         IVideoWindow_fnput_Width,
1463         IVideoWindow_fnget_Width,
1464         IVideoWindow_fnput_Top,
1465         IVideoWindow_fnget_Top,
1466         IVideoWindow_fnput_Height,
1467         IVideoWindow_fnget_Height,
1468         IVideoWindow_fnput_Owner,
1469         IVideoWindow_fnget_Owner,
1470         IVideoWindow_fnput_MessageDrain,
1471         IVideoWindow_fnget_MessageDrain,
1472         IVideoWindow_fnget_BorderColor,
1473         IVideoWindow_fnput_BorderColor,
1474         IVideoWindow_fnget_FullScreenMode,
1475         IVideoWindow_fnput_FullScreenMode,
1476         IVideoWindow_fnSetWindowForeground,
1477         IVideoWindow_fnNotifyOwnerMessage,
1478         IVideoWindow_fnSetWindowPosition,
1479         IVideoWindow_fnGetWindowPosition,
1480         IVideoWindow_fnGetMinIdealImageSize,
1481         IVideoWindow_fnGetMaxIdealImageSize,
1482         IVideoWindow_fnGetRestorePosition,
1483         IVideoWindow_fnHideCursor,
1484         IVideoWindow_fnIsCursorHidden,
1485
1486 };
1487
1488
1489 HRESULT CFilterGraph_InitIVideoWindow( CFilterGraph* pfg )
1490 {
1491         TRACE("(%p)\n",pfg);
1492         ICOM_VTBL(&pfg->vidwin) = &ivideowindow;
1493
1494         return NOERROR;
1495 }
1496
1497 void CFilterGraph_UninitIVideoWindow( CFilterGraph* pfg )
1498 {
1499         TRACE("(%p)\n",pfg);
1500 }
1501
1502 #undef QUERYVIDEOWINDOW