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