2 * Implementation of IBasicAudio, IBasicVideo2, IVideoWindow for FilterGraph.
4 * Copyright (C) Hidenori TAKESHIMA <hidenori@a2.ctktv.ne.jp>
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.
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.
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
32 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(quartz);
35 #include "quartz_private.h"
39 static HRESULT CFilterGraph_QIFilters(
40 CFilterGraph* This, REFIID riid, void** ppvobj )
42 HRESULT hr = E_NOINTERFACE;
45 TRACE( "(%p,%p,%p)\n",This,riid,ppvobj);
47 EnterCriticalSection ( &This->m_csFilters );
49 for ( n = 0; n < This->m_cActiveFilters; n++ )
51 if ( IUnknown_QueryInterface(This->m_pActiveFilters[n].pFilter,riid,ppvobj) == S_OK )
58 LeaveCriticalSection ( &This->m_csFilters );
64 static HRESULT CFilterGraph_QueryBasicAudio(
65 CFilterGraph* This, IBasicAudio** ppAudio )
67 return CFilterGraph_QIFilters(This,&IID_IBasicAudio,(void**)ppAudio);
70 static HRESULT CFilterGraph_QueryBasicVideo(
71 CFilterGraph* This, IBasicVideo** ppVideo )
73 return CFilterGraph_QIFilters(This,&IID_IBasicVideo,(void**)ppVideo);
76 static HRESULT CFilterGraph_QueryBasicVideo2(
77 CFilterGraph* This, IBasicVideo2** ppVideo )
79 return CFilterGraph_QIFilters(This,&IID_IBasicVideo2,(void**)ppVideo);
82 static HRESULT CFilterGraph_QueryVideoWindow(
83 CFilterGraph* This, IVideoWindow** ppVidWin )
85 return CFilterGraph_QIFilters(This,&IID_IVideoWindow,(void**)ppVidWin);
90 /***************************************************************************
92 * CFilterGraph::IBasicAudio
96 #define QUERYBASICAUDIO \
97 IBasicAudio* pAudio = NULL; \
99 hr = CFilterGraph_QueryBasicAudio( This, &pAudio ); \
100 if ( FAILED(hr) ) return hr;
103 static HRESULT WINAPI
104 IBasicAudio_fnQueryInterface(IBasicAudio* iface,REFIID riid,void** ppobj)
106 CFilterGraph_THIS(iface,basaud);
108 TRACE("(%p)->()\n",This);
110 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
114 IBasicAudio_fnAddRef(IBasicAudio* iface)
116 CFilterGraph_THIS(iface,basaud);
118 TRACE("(%p)->()\n",This);
120 return IUnknown_AddRef(This->unk.punkControl);
124 IBasicAudio_fnRelease(IBasicAudio* iface)
126 CFilterGraph_THIS(iface,basaud);
128 TRACE("(%p)->()\n",This);
130 return IUnknown_Release(This->unk.punkControl);
133 static HRESULT WINAPI
134 IBasicAudio_fnGetTypeInfoCount(IBasicAudio* iface,UINT* pcTypeInfo)
136 CFilterGraph_THIS(iface,basaud);
138 FIXME("(%p)->()\n",This);
143 static HRESULT WINAPI
144 IBasicAudio_fnGetTypeInfo(IBasicAudio* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj)
146 CFilterGraph_THIS(iface,basaud);
148 FIXME("(%p)->()\n",This);
153 static HRESULT WINAPI
154 IBasicAudio_fnGetIDsOfNames(IBasicAudio* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId)
156 CFilterGraph_THIS(iface,basaud);
158 FIXME("(%p)->()\n",This);
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)
166 CFilterGraph_THIS(iface,basaud);
168 FIXME("(%p)->()\n",This);
174 static HRESULT WINAPI
175 IBasicAudio_fnput_Volume(IBasicAudio* iface,long lVol)
177 CFilterGraph_THIS(iface,basaud);
180 TRACE("(%p)->()\n",This);
182 hr = IBasicAudio_put_Volume(pAudio,lVol);
183 IBasicAudio_Release(pAudio);
187 static HRESULT WINAPI
188 IBasicAudio_fnget_Volume(IBasicAudio* iface,long* plVol)
190 CFilterGraph_THIS(iface,basaud);
193 TRACE("(%p)->()\n",This);
195 hr = IBasicAudio_get_Volume(pAudio,plVol);
196 IBasicAudio_Release(pAudio);
200 static HRESULT WINAPI
201 IBasicAudio_fnput_Balance(IBasicAudio* iface,long lBalance)
203 CFilterGraph_THIS(iface,basaud);
206 TRACE("(%p)->()\n",This);
208 hr = IBasicAudio_put_Balance(pAudio,lBalance);
209 IBasicAudio_Release(pAudio);
213 static HRESULT WINAPI
214 IBasicAudio_fnget_Balance(IBasicAudio* iface,long* plBalance)
216 CFilterGraph_THIS(iface,basaud);
219 TRACE("(%p)->()\n",This);
221 hr = IBasicAudio_get_Balance(pAudio,plBalance);
222 IBasicAudio_Release(pAudio);
227 static ICOM_VTABLE(IBasicAudio) ibasicaudio =
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,
247 HRESULT CFilterGraph_InitIBasicAudio( CFilterGraph* pfg )
250 ICOM_VTBL(&pfg->basaud) = &ibasicaudio;
255 void CFilterGraph_UninitIBasicAudio( CFilterGraph* pfg )
260 #undef QUERYBASICAUDIO
263 /***************************************************************************
265 * CFilterGraph::IBasicVideo2
270 #define QUERYBASICVIDEO \
271 IBasicVideo* pVideo = NULL; \
273 hr = CFilterGraph_QueryBasicVideo( This, &pVideo ); \
274 if ( FAILED(hr) ) return hr;
276 #define QUERYBASICVIDEO2 \
277 IBasicVideo2* pVideo = NULL; \
279 hr = CFilterGraph_QueryBasicVideo2( This, &pVideo ); \
280 if ( FAILED(hr) ) return hr;
283 static HRESULT WINAPI
284 IBasicVideo2_fnQueryInterface(IBasicVideo2* iface,REFIID riid,void** ppobj)
286 CFilterGraph_THIS(iface,basvid);
288 TRACE("(%p)->()\n",This);
290 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
294 IBasicVideo2_fnAddRef(IBasicVideo2* iface)
296 CFilterGraph_THIS(iface,basvid);
298 TRACE("(%p)->()\n",This);
300 return IUnknown_AddRef(This->unk.punkControl);
304 IBasicVideo2_fnRelease(IBasicVideo2* iface)
306 CFilterGraph_THIS(iface,basvid);
308 TRACE("(%p)->()\n",This);
310 return IUnknown_Release(This->unk.punkControl);
313 static HRESULT WINAPI
314 IBasicVideo2_fnGetTypeInfoCount(IBasicVideo2* iface,UINT* pcTypeInfo)
316 CFilterGraph_THIS(iface,basvid);
318 FIXME("(%p)->()\n",This);
323 static HRESULT WINAPI
324 IBasicVideo2_fnGetTypeInfo(IBasicVideo2* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj)
326 CFilterGraph_THIS(iface,basvid);
328 FIXME("(%p)->()\n",This);
333 static HRESULT WINAPI
334 IBasicVideo2_fnGetIDsOfNames(IBasicVideo2* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId)
336 CFilterGraph_THIS(iface,basvid);
338 FIXME("(%p)->()\n",This);
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)
346 CFilterGraph_THIS(iface,basvid);
348 FIXME("(%p)->()\n",This);
354 static HRESULT WINAPI
355 IBasicVideo2_fnget_AvgTimePerFrame(IBasicVideo2* iface,REFTIME* prefTime)
357 CFilterGraph_THIS(iface,basvid);
360 TRACE("(%p)->()\n",This);
362 hr = IBasicVideo_get_AvgTimePerFrame(pVideo,prefTime);
363 IBasicVideo_Release(pVideo);
367 static HRESULT WINAPI
368 IBasicVideo2_fnget_BitRate(IBasicVideo2* iface,long* plRate)
370 CFilterGraph_THIS(iface,basvid);
373 TRACE("(%p)->()\n",This);
375 hr = IBasicVideo_get_BitRate(pVideo,plRate);
376 IBasicVideo_Release(pVideo);
380 static HRESULT WINAPI
381 IBasicVideo2_fnget_BitErrorRate(IBasicVideo2* iface,long* plRate)
383 CFilterGraph_THIS(iface,basvid);
386 TRACE("(%p)->()\n",This);
388 hr = IBasicVideo_get_BitErrorRate(pVideo,plRate);
389 IBasicVideo_Release(pVideo);
393 static HRESULT WINAPI
394 IBasicVideo2_fnget_VideoWidth(IBasicVideo2* iface,long* plWidth)
396 CFilterGraph_THIS(iface,basvid);
399 TRACE("(%p)->()\n",This);
401 hr = IBasicVideo_get_VideoWidth(pVideo,plWidth);
402 IBasicVideo_Release(pVideo);
406 static HRESULT WINAPI
407 IBasicVideo2_fnget_VideoHeight(IBasicVideo2* iface,long* plHeight)
409 CFilterGraph_THIS(iface,basvid);
412 TRACE("(%p)->()\n",This);
414 hr = IBasicVideo_get_VideoHeight(pVideo,plHeight);
415 IBasicVideo_Release(pVideo);
419 static HRESULT WINAPI
420 IBasicVideo2_fnput_SourceLeft(IBasicVideo2* iface,long lLeft)
422 CFilterGraph_THIS(iface,basvid);
425 TRACE("(%p)->()\n",This);
427 hr = IBasicVideo_put_SourceLeft(pVideo,lLeft);
428 IBasicVideo_Release(pVideo);
432 static HRESULT WINAPI
433 IBasicVideo2_fnget_SourceLeft(IBasicVideo2* iface,long* plLeft)
435 CFilterGraph_THIS(iface,basvid);
438 TRACE("(%p)->()\n",This);
440 hr = IBasicVideo_get_SourceLeft(pVideo,plLeft);
441 IBasicVideo_Release(pVideo);
445 static HRESULT WINAPI
446 IBasicVideo2_fnput_SourceWidth(IBasicVideo2* iface,long lWidth)
448 CFilterGraph_THIS(iface,basvid);
451 TRACE("(%p)->()\n",This);
453 hr = IBasicVideo_put_SourceWidth(pVideo,lWidth);
454 IBasicVideo_Release(pVideo);
458 static HRESULT WINAPI
459 IBasicVideo2_fnget_SourceWidth(IBasicVideo2* iface,long* plWidth)
461 CFilterGraph_THIS(iface,basvid);
464 TRACE("(%p)->()\n",This);
466 hr = IBasicVideo_get_SourceWidth(pVideo,plWidth);
467 IBasicVideo_Release(pVideo);
471 static HRESULT WINAPI
472 IBasicVideo2_fnput_SourceTop(IBasicVideo2* iface,long lTop)
474 CFilterGraph_THIS(iface,basvid);
477 TRACE("(%p)->()\n",This);
479 hr = IBasicVideo_put_SourceTop(pVideo,lTop);
480 IBasicVideo_Release(pVideo);
484 static HRESULT WINAPI
485 IBasicVideo2_fnget_SourceTop(IBasicVideo2* iface,long* plTop)
487 CFilterGraph_THIS(iface,basvid);
490 TRACE("(%p)->()\n",This);
492 hr = IBasicVideo_get_SourceTop(pVideo,plTop);
493 IBasicVideo_Release(pVideo);
497 static HRESULT WINAPI
498 IBasicVideo2_fnput_SourceHeight(IBasicVideo2* iface,long lHeight)
500 CFilterGraph_THIS(iface,basvid);
503 TRACE("(%p)->()\n",This);
505 hr = IBasicVideo_put_SourceHeight(pVideo,lHeight);
506 IBasicVideo_Release(pVideo);
510 static HRESULT WINAPI
511 IBasicVideo2_fnget_SourceHeight(IBasicVideo2* iface,long* plHeight)
513 CFilterGraph_THIS(iface,basvid);
516 TRACE("(%p)->()\n",This);
518 hr = IBasicVideo_get_SourceHeight(pVideo,plHeight);
519 IBasicVideo_Release(pVideo);
523 static HRESULT WINAPI
524 IBasicVideo2_fnput_DestinationLeft(IBasicVideo2* iface,long lLeft)
526 CFilterGraph_THIS(iface,basvid);
529 TRACE("(%p)->()\n",This);
531 hr = IBasicVideo_put_DestinationLeft(pVideo,lLeft);
532 IBasicVideo_Release(pVideo);
536 static HRESULT WINAPI
537 IBasicVideo2_fnget_DestinationLeft(IBasicVideo2* iface,long* plLeft)
539 CFilterGraph_THIS(iface,basvid);
542 TRACE("(%p)->()\n",This);
544 hr = IBasicVideo_get_DestinationLeft(pVideo,plLeft);
545 IBasicVideo_Release(pVideo);
549 static HRESULT WINAPI
550 IBasicVideo2_fnput_DestinationWidth(IBasicVideo2* iface,long lWidth)
552 CFilterGraph_THIS(iface,basvid);
555 TRACE("(%p)->()\n",This);
557 hr = IBasicVideo_put_DestinationWidth(pVideo,lWidth);
558 IBasicVideo_Release(pVideo);
562 static HRESULT WINAPI
563 IBasicVideo2_fnget_DestinationWidth(IBasicVideo2* iface,long* plWidth)
565 CFilterGraph_THIS(iface,basvid);
568 TRACE("(%p)->()\n",This);
570 hr = IBasicVideo_get_DestinationWidth(pVideo,plWidth);
571 IBasicVideo_Release(pVideo);
575 static HRESULT WINAPI
576 IBasicVideo2_fnput_DestinationTop(IBasicVideo2* iface,long lTop)
578 CFilterGraph_THIS(iface,basvid);
581 TRACE("(%p)->()\n",This);
583 hr = IBasicVideo_put_DestinationTop(pVideo,lTop);
584 IBasicVideo_Release(pVideo);
588 static HRESULT WINAPI
589 IBasicVideo2_fnget_DestinationTop(IBasicVideo2* iface,long* plTop)
591 CFilterGraph_THIS(iface,basvid);
594 TRACE("(%p)->()\n",This);
596 hr = IBasicVideo_get_DestinationTop(pVideo,plTop);
597 IBasicVideo_Release(pVideo);
601 static HRESULT WINAPI
602 IBasicVideo2_fnput_DestinationHeight(IBasicVideo2* iface,long lHeight)
604 CFilterGraph_THIS(iface,basvid);
607 TRACE("(%p)->()\n",This);
609 hr = IBasicVideo_put_DestinationHeight(pVideo,lHeight);
610 IBasicVideo_Release(pVideo);
614 static HRESULT WINAPI
615 IBasicVideo2_fnget_DestinationHeight(IBasicVideo2* iface,long* plHeight)
617 CFilterGraph_THIS(iface,basvid);
620 TRACE("(%p)->()\n",This);
622 hr = IBasicVideo_get_DestinationHeight(pVideo,plHeight);
623 IBasicVideo_Release(pVideo);
627 static HRESULT WINAPI
628 IBasicVideo2_fnSetSourcePosition(IBasicVideo2* iface,long lLeft,long lTop,long lWidth,long lHeight)
630 CFilterGraph_THIS(iface,basvid);
633 TRACE("(%p)->()\n",This);
635 hr = IBasicVideo_SetSourcePosition(pVideo,lLeft,lTop,lWidth,lHeight);
636 IBasicVideo_Release(pVideo);
640 static HRESULT WINAPI
641 IBasicVideo2_fnGetSourcePosition(IBasicVideo2* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight)
643 CFilterGraph_THIS(iface,basvid);
646 TRACE("(%p)->()\n",This);
648 hr = IBasicVideo_GetSourcePosition(pVideo,plLeft,plTop,plWidth,plHeight);
649 IBasicVideo_Release(pVideo);
653 static HRESULT WINAPI
654 IBasicVideo2_fnSetDefaultSourcePosition(IBasicVideo2* iface)
656 CFilterGraph_THIS(iface,basvid);
659 TRACE("(%p)->()\n",This);
661 hr = IBasicVideo_SetDefaultSourcePosition(pVideo);
662 IBasicVideo_Release(pVideo);
666 static HRESULT WINAPI
667 IBasicVideo2_fnSetDestinationPosition(IBasicVideo2* iface,long lLeft,long lTop,long lWidth,long lHeight)
669 CFilterGraph_THIS(iface,basvid);
672 TRACE("(%p)->()\n",This);
674 hr = IBasicVideo_SetDestinationPosition(pVideo,lLeft,lTop,lWidth,lHeight);
675 IBasicVideo_Release(pVideo);
679 static HRESULT WINAPI
680 IBasicVideo2_fnGetDestinationPosition(IBasicVideo2* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight)
682 CFilterGraph_THIS(iface,basvid);
685 TRACE("(%p)->()\n",This);
687 hr = IBasicVideo_GetDestinationPosition(pVideo,plLeft,plTop,plWidth,plHeight);
688 IBasicVideo_Release(pVideo);
692 static HRESULT WINAPI
693 IBasicVideo2_fnSetDefaultDestinationPosition(IBasicVideo2* iface)
695 CFilterGraph_THIS(iface,basvid);
698 TRACE("(%p)->()\n",This);
700 hr = IBasicVideo_SetDefaultDestinationPosition(pVideo);
701 IBasicVideo_Release(pVideo);
705 static HRESULT WINAPI
706 IBasicVideo2_fnGetVideoSize(IBasicVideo2* iface,long* plWidth,long* plHeight)
708 CFilterGraph_THIS(iface,basvid);
711 TRACE("(%p)->()\n",This);
713 hr = IBasicVideo_GetVideoSize(pVideo,plWidth,plHeight);
714 IBasicVideo_Release(pVideo);
718 static HRESULT WINAPI
719 IBasicVideo2_fnGetVideoPaletteEntries(IBasicVideo2* iface,long lStart,long lCount,long* plRet,long* plPaletteEntry)
721 CFilterGraph_THIS(iface,basvid);
724 TRACE("(%p)->()\n",This);
726 hr = IBasicVideo_GetVideoPaletteEntries(pVideo,lStart,lCount,plRet,plPaletteEntry);
727 IBasicVideo_Release(pVideo);
731 static HRESULT WINAPI
732 IBasicVideo2_fnGetCurrentImage(IBasicVideo2* iface,long* plBufferSize,long* plDIBBuffer)
734 CFilterGraph_THIS(iface,basvid);
737 TRACE("(%p)->()\n",This);
739 hr = IBasicVideo_GetCurrentImage(pVideo,plBufferSize,plDIBBuffer);
740 IBasicVideo_Release(pVideo);
744 static HRESULT WINAPI
745 IBasicVideo2_fnIsUsingDefaultSource(IBasicVideo2* iface)
747 CFilterGraph_THIS(iface,basvid);
750 TRACE("(%p)->()\n",This);
752 hr = IBasicVideo_IsUsingDefaultSource(pVideo);
753 IBasicVideo_Release(pVideo);
757 static HRESULT WINAPI
758 IBasicVideo2_fnIsUsingDefaultDestination(IBasicVideo2* iface)
760 CFilterGraph_THIS(iface,basvid);
763 TRACE("(%p)->()\n",This);
765 hr = IBasicVideo_IsUsingDefaultDestination(pVideo);
766 IBasicVideo_Release(pVideo);
770 static HRESULT WINAPI
771 IBasicVideo2_fnGetPreferredAspectRatio(IBasicVideo2* iface,long* plRateX,long* plRateY)
773 CFilterGraph_THIS(iface,basvid);
776 TRACE("(%p)->()\n",This);
778 hr = IBasicVideo2_GetPreferredAspectRatio(pVideo,plRateX,plRateY);
779 IBasicVideo2_Release(pVideo);
786 static ICOM_VTABLE(IBasicVideo2) ibasicvideo =
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,
836 HRESULT CFilterGraph_InitIBasicVideo2( CFilterGraph* pfg )
839 ICOM_VTBL(&pfg->basvid) = &ibasicvideo;
844 void CFilterGraph_UninitIBasicVideo2( CFilterGraph* pfg )
849 #undef QUERYBASICVIDEO2
850 #undef QUERYBASICVIDEO
852 /***************************************************************************
854 * CFilterGraph::IVideoWindow
858 #define QUERYVIDEOWINDOW \
859 IVideoWindow* pVidWin = NULL; \
861 hr = CFilterGraph_QueryVideoWindow( This, &pVidWin ); \
862 if ( FAILED(hr) ) return hr;
865 static HRESULT WINAPI
866 IVideoWindow_fnQueryInterface(IVideoWindow* iface,REFIID riid,void** ppobj)
868 CFilterGraph_THIS(iface,vidwin);
870 TRACE("(%p)->()\n",This);
872 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
876 IVideoWindow_fnAddRef(IVideoWindow* iface)
878 CFilterGraph_THIS(iface,vidwin);
880 TRACE("(%p)->()\n",This);
882 return IUnknown_AddRef(This->unk.punkControl);
886 IVideoWindow_fnRelease(IVideoWindow* iface)
888 CFilterGraph_THIS(iface,vidwin);
890 TRACE("(%p)->()\n",This);
892 return IUnknown_Release(This->unk.punkControl);
895 static HRESULT WINAPI
896 IVideoWindow_fnGetTypeInfoCount(IVideoWindow* iface,UINT* pcTypeInfo)
898 CFilterGraph_THIS(iface,vidwin);
900 FIXME("(%p)->()\n",This);
905 static HRESULT WINAPI
906 IVideoWindow_fnGetTypeInfo(IVideoWindow* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj)
908 CFilterGraph_THIS(iface,vidwin);
910 FIXME("(%p)->()\n",This);
915 static HRESULT WINAPI
916 IVideoWindow_fnGetIDsOfNames(IVideoWindow* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId)
918 CFilterGraph_THIS(iface,vidwin);
920 FIXME("(%p)->()\n",This);
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)
928 CFilterGraph_THIS(iface,vidwin);
930 FIXME("(%p)->()\n",This);
937 static HRESULT WINAPI
938 IVideoWindow_fnput_Caption(IVideoWindow* iface,BSTR strCaption)
940 CFilterGraph_THIS(iface,vidwin);
943 TRACE("(%p)->()\n",This);
945 hr = IVideoWindow_put_Caption(pVidWin,strCaption);
946 IVideoWindow_Release(pVidWin);
950 static HRESULT WINAPI
951 IVideoWindow_fnget_Caption(IVideoWindow* iface,BSTR* pstrCaption)
953 CFilterGraph_THIS(iface,vidwin);
956 TRACE("(%p)->()\n",This);
958 hr = IVideoWindow_get_Caption(pVidWin,pstrCaption);
959 IVideoWindow_Release(pVidWin);
963 static HRESULT WINAPI
964 IVideoWindow_fnput_WindowStyle(IVideoWindow* iface,long lStyle)
966 CFilterGraph_THIS(iface,vidwin);
969 TRACE("(%p)->()\n",This);
971 hr = IVideoWindow_put_WindowStyle(pVidWin,lStyle);
972 IVideoWindow_Release(pVidWin);
976 static HRESULT WINAPI
977 IVideoWindow_fnget_WindowStyle(IVideoWindow* iface,long* plStyle)
979 CFilterGraph_THIS(iface,vidwin);
982 TRACE("(%p)->()\n",This);
984 hr = IVideoWindow_get_WindowStyle(pVidWin,plStyle);
985 IVideoWindow_Release(pVidWin);
989 static HRESULT WINAPI
990 IVideoWindow_fnput_WindowStyleEx(IVideoWindow* iface,long lExStyle)
992 CFilterGraph_THIS(iface,vidwin);
995 TRACE("(%p)->()\n",This);
997 hr = IVideoWindow_put_WindowStyleEx(pVidWin,lExStyle);
998 IVideoWindow_Release(pVidWin);
1002 static HRESULT WINAPI
1003 IVideoWindow_fnget_WindowStyleEx(IVideoWindow* iface,long* plExStyle)
1005 CFilterGraph_THIS(iface,vidwin);
1008 TRACE("(%p)->()\n",This);
1010 hr = IVideoWindow_get_WindowStyleEx(pVidWin,plExStyle);
1011 IVideoWindow_Release(pVidWin);
1015 static HRESULT WINAPI
1016 IVideoWindow_fnput_AutoShow(IVideoWindow* iface,long lAutoShow)
1018 CFilterGraph_THIS(iface,vidwin);
1021 TRACE("(%p)->()\n",This);
1023 hr = IVideoWindow_put_AutoShow(pVidWin,lAutoShow);
1024 IVideoWindow_Release(pVidWin);
1028 static HRESULT WINAPI
1029 IVideoWindow_fnget_AutoShow(IVideoWindow* iface,long* plAutoShow)
1031 CFilterGraph_THIS(iface,vidwin);
1034 TRACE("(%p)->()\n",This);
1036 hr = IVideoWindow_get_AutoShow(pVidWin,plAutoShow);
1037 IVideoWindow_Release(pVidWin);
1041 static HRESULT WINAPI
1042 IVideoWindow_fnput_WindowState(IVideoWindow* iface,long lState)
1044 CFilterGraph_THIS(iface,vidwin);
1047 TRACE("(%p)->()\n",This);
1049 hr = IVideoWindow_put_WindowState(pVidWin,lState);
1050 IVideoWindow_Release(pVidWin);
1054 static HRESULT WINAPI
1055 IVideoWindow_fnget_WindowState(IVideoWindow* iface,long* plState)
1057 CFilterGraph_THIS(iface,vidwin);
1060 TRACE("(%p)->()\n",This);
1062 hr = IVideoWindow_get_WindowState(pVidWin,plState);
1063 IVideoWindow_Release(pVidWin);
1067 static HRESULT WINAPI
1068 IVideoWindow_fnput_BackgroundPalette(IVideoWindow* iface,long lBackPal)
1070 CFilterGraph_THIS(iface,vidwin);
1073 TRACE("(%p)->()\n",This);
1075 hr = IVideoWindow_put_BackgroundPalette(pVidWin,lBackPal);
1076 IVideoWindow_Release(pVidWin);
1080 static HRESULT WINAPI
1081 IVideoWindow_fnget_BackgroundPalette(IVideoWindow* iface,long* plBackPal)
1083 CFilterGraph_THIS(iface,vidwin);
1086 TRACE("(%p)->()\n",This);
1088 hr = IVideoWindow_get_BackgroundPalette(pVidWin,plBackPal);
1089 IVideoWindow_Release(pVidWin);
1093 static HRESULT WINAPI
1094 IVideoWindow_fnput_Visible(IVideoWindow* iface,long lVisible)
1096 CFilterGraph_THIS(iface,vidwin);
1099 TRACE("(%p)->()\n",This);
1101 hr = IVideoWindow_put_Visible(pVidWin,lVisible);
1102 IVideoWindow_Release(pVidWin);
1106 static HRESULT WINAPI
1107 IVideoWindow_fnget_Visible(IVideoWindow* iface,long* plVisible)
1109 CFilterGraph_THIS(iface,vidwin);
1112 TRACE("(%p)->()\n",This);
1114 hr = IVideoWindow_get_Visible(pVidWin,plVisible);
1115 IVideoWindow_Release(pVidWin);
1119 static HRESULT WINAPI
1120 IVideoWindow_fnput_Left(IVideoWindow* iface,long lLeft)
1122 CFilterGraph_THIS(iface,vidwin);
1125 TRACE("(%p)->()\n",This);
1127 hr = IVideoWindow_put_Left(pVidWin,lLeft);
1128 IVideoWindow_Release(pVidWin);
1132 static HRESULT WINAPI
1133 IVideoWindow_fnget_Left(IVideoWindow* iface,long* plLeft)
1135 CFilterGraph_THIS(iface,vidwin);
1138 TRACE("(%p)->()\n",This);
1140 hr = IVideoWindow_get_Left(pVidWin,plLeft);
1141 IVideoWindow_Release(pVidWin);
1145 static HRESULT WINAPI
1146 IVideoWindow_fnput_Width(IVideoWindow* iface,long lWidth)
1148 CFilterGraph_THIS(iface,vidwin);
1151 TRACE("(%p)->()\n",This);
1153 hr = IVideoWindow_put_Width(pVidWin,lWidth);
1154 IVideoWindow_Release(pVidWin);
1158 static HRESULT WINAPI
1159 IVideoWindow_fnget_Width(IVideoWindow* iface,long* plWidth)
1161 CFilterGraph_THIS(iface,vidwin);
1164 TRACE("(%p)->()\n",This);
1166 hr =IVideoWindow_get_Width(pVidWin,plWidth);
1167 IVideoWindow_Release(pVidWin);
1171 static HRESULT WINAPI
1172 IVideoWindow_fnput_Top(IVideoWindow* iface,long lTop)
1174 CFilterGraph_THIS(iface,vidwin);
1177 TRACE("(%p)->()\n",This);
1179 hr = IVideoWindow_put_Top(pVidWin,lTop);
1180 IVideoWindow_Release(pVidWin);
1184 static HRESULT WINAPI
1185 IVideoWindow_fnget_Top(IVideoWindow* iface,long* plTop)
1187 CFilterGraph_THIS(iface,vidwin);
1190 TRACE("(%p)->()\n",This);
1192 hr = IVideoWindow_get_Top(pVidWin,plTop);
1193 IVideoWindow_Release(pVidWin);
1197 static HRESULT WINAPI
1198 IVideoWindow_fnput_Height(IVideoWindow* iface,long lHeight)
1200 CFilterGraph_THIS(iface,vidwin);
1203 TRACE("(%p)->()\n",This);
1205 hr = IVideoWindow_put_Height(pVidWin,lHeight);
1206 IVideoWindow_Release(pVidWin);
1210 static HRESULT WINAPI
1211 IVideoWindow_fnget_Height(IVideoWindow* iface,long* plHeight)
1213 CFilterGraph_THIS(iface,vidwin);
1216 TRACE("(%p)->()\n",This);
1218 hr = IVideoWindow_get_Height(pVidWin,plHeight);
1219 IVideoWindow_Release(pVidWin);
1223 static HRESULT WINAPI
1224 IVideoWindow_fnput_Owner(IVideoWindow* iface,OAHWND hwnd)
1226 CFilterGraph_THIS(iface,vidwin);
1229 TRACE("(%p)->()\n",This);
1231 hr = IVideoWindow_put_Owner(pVidWin,hwnd);
1232 IVideoWindow_Release(pVidWin);
1236 static HRESULT WINAPI
1237 IVideoWindow_fnget_Owner(IVideoWindow* iface,OAHWND* phwnd)
1239 CFilterGraph_THIS(iface,vidwin);
1242 TRACE("(%p)->()\n",This);
1244 hr = IVideoWindow_get_Owner(pVidWin,phwnd);
1245 IVideoWindow_Release(pVidWin);
1249 static HRESULT WINAPI
1250 IVideoWindow_fnput_MessageDrain(IVideoWindow* iface,OAHWND hwnd)
1252 CFilterGraph_THIS(iface,vidwin);
1255 TRACE("(%p)->()\n",This);
1257 hr = IVideoWindow_put_MessageDrain(pVidWin,hwnd);
1258 IVideoWindow_Release(pVidWin);
1262 static HRESULT WINAPI
1263 IVideoWindow_fnget_MessageDrain(IVideoWindow* iface,OAHWND* phwnd)
1265 CFilterGraph_THIS(iface,vidwin);
1268 TRACE("(%p)->()\n",This);
1270 hr = IVideoWindow_get_MessageDrain(pVidWin,phwnd);
1271 IVideoWindow_Release(pVidWin);
1275 static HRESULT WINAPI
1276 IVideoWindow_fnget_BorderColor(IVideoWindow* iface,long* plColor)
1278 CFilterGraph_THIS(iface,vidwin);
1281 TRACE("(%p)->()\n",This);
1283 hr = IVideoWindow_get_BorderColor(pVidWin,plColor);
1284 IVideoWindow_Release(pVidWin);
1288 static HRESULT WINAPI
1289 IVideoWindow_fnput_BorderColor(IVideoWindow* iface,long lColor)
1291 CFilterGraph_THIS(iface,vidwin);
1294 TRACE("(%p)->()\n",This);
1296 hr = IVideoWindow_put_BorderColor(pVidWin,lColor);
1297 IVideoWindow_Release(pVidWin);
1301 static HRESULT WINAPI
1302 IVideoWindow_fnget_FullScreenMode(IVideoWindow* iface,long* plMode)
1304 CFilterGraph_THIS(iface,vidwin);
1307 TRACE("(%p)->()\n",This);
1309 hr = IVideoWindow_get_FullScreenMode(pVidWin,plMode);
1310 IVideoWindow_Release(pVidWin);
1314 static HRESULT WINAPI
1315 IVideoWindow_fnput_FullScreenMode(IVideoWindow* iface,long lMode)
1317 CFilterGraph_THIS(iface,vidwin);
1320 TRACE("(%p)->()\n",This);
1322 hr = IVideoWindow_put_FullScreenMode(pVidWin,lMode);
1323 IVideoWindow_Release(pVidWin);
1327 static HRESULT WINAPI
1328 IVideoWindow_fnSetWindowForeground(IVideoWindow* iface,long lFocus)
1330 CFilterGraph_THIS(iface,vidwin);
1333 TRACE("(%p)->()\n",This);
1335 hr = IVideoWindow_SetWindowForeground(pVidWin,lFocus);
1336 IVideoWindow_Release(pVidWin);
1340 static HRESULT WINAPI
1341 IVideoWindow_fnNotifyOwnerMessage(IVideoWindow* iface,OAHWND hwnd,long message,LONG_PTR wParam,LONG_PTR lParam)
1343 CFilterGraph_THIS(iface,vidwin);
1346 TRACE("(%p)->()\n",This);
1348 hr = IVideoWindow_NotifyOwnerMessage(pVidWin,hwnd,message,wParam,lParam);
1349 IVideoWindow_Release(pVidWin);
1353 static HRESULT WINAPI
1354 IVideoWindow_fnSetWindowPosition(IVideoWindow* iface,long lLeft,long lTop,long lWidth,long lHeight)
1356 CFilterGraph_THIS(iface,vidwin);
1359 TRACE("(%p)->()\n",This);
1361 hr = IVideoWindow_SetWindowPosition(pVidWin,lLeft,lTop,lWidth,lHeight);
1362 IVideoWindow_Release(pVidWin);
1366 static HRESULT WINAPI
1367 IVideoWindow_fnGetWindowPosition(IVideoWindow* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight)
1369 CFilterGraph_THIS(iface,vidwin);
1372 TRACE("(%p)->()\n",This);
1374 hr = IVideoWindow_GetWindowPosition(pVidWin,plLeft,plTop,plWidth,plHeight);
1375 IVideoWindow_Release(pVidWin);
1379 static HRESULT WINAPI
1380 IVideoWindow_fnGetMinIdealImageSize(IVideoWindow* iface,long* plWidth,long* plHeight)
1382 CFilterGraph_THIS(iface,vidwin);
1385 TRACE("(%p)->()\n",This);
1387 hr = IVideoWindow_GetMinIdealImageSize(pVidWin,plWidth,plHeight);
1388 IVideoWindow_Release(pVidWin);
1392 static HRESULT WINAPI
1393 IVideoWindow_fnGetMaxIdealImageSize(IVideoWindow* iface,long* plWidth,long* plHeight)
1395 CFilterGraph_THIS(iface,vidwin);
1398 TRACE("(%p)->()\n",This);
1400 hr = IVideoWindow_GetMaxIdealImageSize(pVidWin,plWidth,plHeight);
1401 IVideoWindow_Release(pVidWin);
1405 static HRESULT WINAPI
1406 IVideoWindow_fnGetRestorePosition(IVideoWindow* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight)
1408 CFilterGraph_THIS(iface,vidwin);
1411 TRACE("(%p)->()\n",This);
1413 hr = IVideoWindow_GetRestorePosition(pVidWin,plLeft,plTop,plWidth,plHeight);
1414 IVideoWindow_Release(pVidWin);
1418 static HRESULT WINAPI
1419 IVideoWindow_fnHideCursor(IVideoWindow* iface,long lHide)
1421 CFilterGraph_THIS(iface,vidwin);
1424 TRACE("(%p)->()\n",This);
1426 hr = IVideoWindow_HideCursor(pVidWin,lHide);
1427 IVideoWindow_Release(pVidWin);
1431 static HRESULT WINAPI
1432 IVideoWindow_fnIsCursorHidden(IVideoWindow* iface,long* plHide)
1434 CFilterGraph_THIS(iface,vidwin);
1437 TRACE("(%p)->()\n",This);
1439 hr = IVideoWindow_IsCursorHidden(pVidWin,plHide);
1440 IVideoWindow_Release(pVidWin);
1447 static ICOM_VTABLE(IVideoWindow) ivideowindow =
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,
1503 HRESULT CFilterGraph_InitIVideoWindow( CFilterGraph* pfg )
1505 TRACE("(%p)\n",pfg);
1506 ICOM_VTBL(&pfg->vidwin) = &ivideowindow;
1511 void CFilterGraph_UninitIVideoWindow( CFilterGraph* pfg )
1513 TRACE("(%p)\n",pfg);
1516 #undef QUERYVIDEOWINDOW