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