2 * Implementation of IBasicAudio, IBasicVideo2, IVideoWindow for FilterGraph.
4 * hidenori@a2.ctktv.ne.jp
18 #include "debugtools.h"
19 DEFAULT_DEBUG_CHANNEL(quartz
);
21 #include "quartz_private.h"
25 static HRESULT
CFilterGraph_QIFilters(
26 CFilterGraph
* This
, REFIID riid
, void** ppvobj
)
28 QUARTZ_CompListItem
* pItem
;
29 HRESULT hr
= E_NOINTERFACE
;
31 TRACE( "(%p,%p,%p)\n",This
,riid
,ppvobj
);
33 QUARTZ_CompList_Lock( This
->m_pFilterList
);
34 pItem
= QUARTZ_CompList_GetLast( This
->m_pFilterList
);
35 while ( pItem
!= NULL
)
37 if ( IUnknown_QueryInterface( QUARTZ_CompList_GetItemPtr(pItem
),riid
,ppvobj
) == S_OK
)
42 pItem
= QUARTZ_CompList_GetPrev( This
->m_pFilterList
, pItem
);
44 QUARTZ_CompList_Unlock( This
->m_pFilterList
);
50 static HRESULT
CFilterGraph_QueryBasicAudio(
51 CFilterGraph
* This
, IBasicAudio
** ppAudio
)
53 return CFilterGraph_QIFilters(This
,&IID_IBasicAudio
,(void**)ppAudio
);
56 static HRESULT
CFilterGraph_QueryBasicVideo(
57 CFilterGraph
* This
, IBasicVideo
** ppVideo
)
59 return CFilterGraph_QIFilters(This
,&IID_IBasicVideo
,(void**)ppVideo
);
62 static HRESULT
CFilterGraph_QueryBasicVideo2(
63 CFilterGraph
* This
, IBasicVideo2
** ppVideo
)
65 return CFilterGraph_QIFilters(This
,&IID_IBasicVideo2
,(void**)ppVideo
);
68 static HRESULT
CFilterGraph_QueryVideoWindow(
69 CFilterGraph
* This
, IVideoWindow
** ppVidWin
)
71 return CFilterGraph_QIFilters(This
,&IID_IVideoWindow
,(void**)ppVidWin
);
76 /***************************************************************************
78 * CFilterGraph::IBasicAudio
82 #define QUERYBASICAUDIO \
83 IBasicAudio* pAudio = NULL; \
85 hr = CFilterGraph_QueryBasicAudio( This, &pAudio ); \
86 if ( FAILED(hr) ) return hr;
90 IBasicAudio_fnQueryInterface(IBasicAudio
* iface
,REFIID riid
,void** ppobj
)
92 CFilterGraph_THIS(iface
,basaud
);
94 TRACE("(%p)->()\n",This
);
96 return IUnknown_QueryInterface(This
->unk
.punkControl
,riid
,ppobj
);
100 IBasicAudio_fnAddRef(IBasicAudio
* iface
)
102 CFilterGraph_THIS(iface
,basaud
);
104 TRACE("(%p)->()\n",This
);
106 return IUnknown_AddRef(This
->unk
.punkControl
);
110 IBasicAudio_fnRelease(IBasicAudio
* iface
)
112 CFilterGraph_THIS(iface
,basaud
);
114 TRACE("(%p)->()\n",This
);
116 return IUnknown_Release(This
->unk
.punkControl
);
119 static HRESULT WINAPI
120 IBasicAudio_fnGetTypeInfoCount(IBasicAudio
* iface
,UINT
* pcTypeInfo
)
122 CFilterGraph_THIS(iface
,basaud
);
124 FIXME("(%p)->()\n",This
);
129 static HRESULT WINAPI
130 IBasicAudio_fnGetTypeInfo(IBasicAudio
* iface
,UINT iTypeInfo
, LCID lcid
, ITypeInfo
** ppobj
)
132 CFilterGraph_THIS(iface
,basaud
);
134 FIXME("(%p)->()\n",This
);
139 static HRESULT WINAPI
140 IBasicAudio_fnGetIDsOfNames(IBasicAudio
* iface
,REFIID riid
, LPOLESTR
* ppwszName
, UINT cNames
, LCID lcid
, DISPID
* pDispId
)
142 CFilterGraph_THIS(iface
,basaud
);
144 FIXME("(%p)->()\n",This
);
149 static HRESULT WINAPI
150 IBasicAudio_fnInvoke(IBasicAudio
* iface
,DISPID DispId
, REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
* pDispParams
, VARIANT
* pVarRes
, EXCEPINFO
* pExcepInfo
, UINT
* puArgErr
)
152 CFilterGraph_THIS(iface
,basaud
);
154 FIXME("(%p)->()\n",This
);
160 static HRESULT WINAPI
161 IBasicAudio_fnput_Volume(IBasicAudio
* iface
,long lVol
)
163 CFilterGraph_THIS(iface
,basaud
);
166 TRACE("(%p)->()\n",This
);
168 hr
= IBasicAudio_put_Volume(pAudio
,lVol
);
169 IBasicAudio_Release(pAudio
);
173 static HRESULT WINAPI
174 IBasicAudio_fnget_Volume(IBasicAudio
* iface
,long* plVol
)
176 CFilterGraph_THIS(iface
,basaud
);
179 TRACE("(%p)->()\n",This
);
181 hr
= IBasicAudio_get_Volume(pAudio
,plVol
);
182 IBasicAudio_Release(pAudio
);
186 static HRESULT WINAPI
187 IBasicAudio_fnput_Balance(IBasicAudio
* iface
,long lBalance
)
189 CFilterGraph_THIS(iface
,basaud
);
192 TRACE("(%p)->()\n",This
);
194 hr
= IBasicAudio_put_Balance(pAudio
,lBalance
);
195 IBasicAudio_Release(pAudio
);
199 static HRESULT WINAPI
200 IBasicAudio_fnget_Balance(IBasicAudio
* iface
,long* plBalance
)
202 CFilterGraph_THIS(iface
,basaud
);
205 TRACE("(%p)->()\n",This
);
207 hr
= IBasicAudio_get_Balance(pAudio
,plBalance
);
208 IBasicAudio_Release(pAudio
);
213 static ICOM_VTABLE(IBasicAudio
) ibasicaudio
=
215 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
216 /* IUnknown fields */
217 IBasicAudio_fnQueryInterface
,
218 IBasicAudio_fnAddRef
,
219 IBasicAudio_fnRelease
,
220 /* IDispatch fields */
221 IBasicAudio_fnGetTypeInfoCount
,
222 IBasicAudio_fnGetTypeInfo
,
223 IBasicAudio_fnGetIDsOfNames
,
224 IBasicAudio_fnInvoke
,
225 /* IBasicAudio fields */
226 IBasicAudio_fnput_Volume
,
227 IBasicAudio_fnget_Volume
,
228 IBasicAudio_fnput_Balance
,
229 IBasicAudio_fnget_Balance
,
233 HRESULT
CFilterGraph_InitIBasicAudio( CFilterGraph
* pfg
)
236 ICOM_VTBL(&pfg
->basaud
) = &ibasicaudio
;
241 void CFilterGraph_UninitIBasicAudio( CFilterGraph
* pfg
)
246 #undef QUERYBASICAUDIO
249 /***************************************************************************
251 * CFilterGraph::IBasicVideo2
256 #define QUERYBASICVIDEO \
257 IBasicVideo* pVideo = NULL; \
259 hr = CFilterGraph_QueryBasicVideo( This, &pVideo ); \
260 if ( FAILED(hr) ) return hr;
262 #define QUERYBASICVIDEO2 \
263 IBasicVideo2* pVideo = NULL; \
265 hr = CFilterGraph_QueryBasicVideo2( This, &pVideo ); \
266 if ( FAILED(hr) ) return hr;
269 static HRESULT WINAPI
270 IBasicVideo2_fnQueryInterface(IBasicVideo2
* iface
,REFIID riid
,void** ppobj
)
272 CFilterGraph_THIS(iface
,basvid
);
274 TRACE("(%p)->()\n",This
);
276 return IUnknown_QueryInterface(This
->unk
.punkControl
,riid
,ppobj
);
280 IBasicVideo2_fnAddRef(IBasicVideo2
* iface
)
282 CFilterGraph_THIS(iface
,basvid
);
284 TRACE("(%p)->()\n",This
);
286 return IUnknown_AddRef(This
->unk
.punkControl
);
290 IBasicVideo2_fnRelease(IBasicVideo2
* iface
)
292 CFilterGraph_THIS(iface
,basvid
);
294 TRACE("(%p)->()\n",This
);
296 return IUnknown_Release(This
->unk
.punkControl
);
299 static HRESULT WINAPI
300 IBasicVideo2_fnGetTypeInfoCount(IBasicVideo2
* iface
,UINT
* pcTypeInfo
)
302 CFilterGraph_THIS(iface
,basvid
);
304 FIXME("(%p)->()\n",This
);
309 static HRESULT WINAPI
310 IBasicVideo2_fnGetTypeInfo(IBasicVideo2
* iface
,UINT iTypeInfo
, LCID lcid
, ITypeInfo
** ppobj
)
312 CFilterGraph_THIS(iface
,basvid
);
314 FIXME("(%p)->()\n",This
);
319 static HRESULT WINAPI
320 IBasicVideo2_fnGetIDsOfNames(IBasicVideo2
* iface
,REFIID riid
, LPOLESTR
* ppwszName
, UINT cNames
, LCID lcid
, DISPID
* pDispId
)
322 CFilterGraph_THIS(iface
,basvid
);
324 FIXME("(%p)->()\n",This
);
329 static HRESULT WINAPI
330 IBasicVideo2_fnInvoke(IBasicVideo2
* iface
,DISPID DispId
, REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
* pDispParams
, VARIANT
* pVarRes
, EXCEPINFO
* pExcepInfo
, UINT
* puArgErr
)
332 CFilterGraph_THIS(iface
,basvid
);
334 FIXME("(%p)->()\n",This
);
340 static HRESULT WINAPI
341 IBasicVideo2_fnget_AvgTimePerFrame(IBasicVideo2
* iface
,REFTIME
* prefTime
)
343 CFilterGraph_THIS(iface
,basvid
);
346 TRACE("(%p)->()\n",This
);
348 hr
= IBasicVideo_get_AvgTimePerFrame(pVideo
,prefTime
);
349 IBasicVideo_Release(pVideo
);
353 static HRESULT WINAPI
354 IBasicVideo2_fnget_BitRate(IBasicVideo2
* iface
,long* plRate
)
356 CFilterGraph_THIS(iface
,basvid
);
359 TRACE("(%p)->()\n",This
);
361 hr
= IBasicVideo_get_BitRate(pVideo
,plRate
);
362 IBasicVideo_Release(pVideo
);
366 static HRESULT WINAPI
367 IBasicVideo2_fnget_BitErrorRate(IBasicVideo2
* iface
,long* plRate
)
369 CFilterGraph_THIS(iface
,basvid
);
372 TRACE("(%p)->()\n",This
);
374 hr
= IBasicVideo_get_BitErrorRate(pVideo
,plRate
);
375 IBasicVideo_Release(pVideo
);
379 static HRESULT WINAPI
380 IBasicVideo2_fnget_VideoWidth(IBasicVideo2
* iface
,long* plWidth
)
382 CFilterGraph_THIS(iface
,basvid
);
385 TRACE("(%p)->()\n",This
);
387 hr
= IBasicVideo_get_VideoWidth(pVideo
,plWidth
);
388 IBasicVideo_Release(pVideo
);
392 static HRESULT WINAPI
393 IBasicVideo2_fnget_VideoHeight(IBasicVideo2
* iface
,long* plHeight
)
395 CFilterGraph_THIS(iface
,basvid
);
398 TRACE("(%p)->()\n",This
);
400 hr
= IBasicVideo_get_VideoHeight(pVideo
,plHeight
);
401 IBasicVideo_Release(pVideo
);
405 static HRESULT WINAPI
406 IBasicVideo2_fnput_SourceLeft(IBasicVideo2
* iface
,long lLeft
)
408 CFilterGraph_THIS(iface
,basvid
);
411 TRACE("(%p)->()\n",This
);
413 hr
= IBasicVideo_put_SourceLeft(pVideo
,lLeft
);
414 IBasicVideo_Release(pVideo
);
418 static HRESULT WINAPI
419 IBasicVideo2_fnget_SourceLeft(IBasicVideo2
* iface
,long* plLeft
)
421 CFilterGraph_THIS(iface
,basvid
);
424 TRACE("(%p)->()\n",This
);
426 hr
= IBasicVideo_get_SourceLeft(pVideo
,plLeft
);
427 IBasicVideo_Release(pVideo
);
431 static HRESULT WINAPI
432 IBasicVideo2_fnput_SourceWidth(IBasicVideo2
* iface
,long lWidth
)
434 CFilterGraph_THIS(iface
,basvid
);
437 TRACE("(%p)->()\n",This
);
439 hr
= IBasicVideo_put_SourceWidth(pVideo
,lWidth
);
440 IBasicVideo_Release(pVideo
);
444 static HRESULT WINAPI
445 IBasicVideo2_fnget_SourceWidth(IBasicVideo2
* iface
,long* plWidth
)
447 CFilterGraph_THIS(iface
,basvid
);
450 TRACE("(%p)->()\n",This
);
452 hr
= IBasicVideo_get_SourceWidth(pVideo
,plWidth
);
453 IBasicVideo_Release(pVideo
);
457 static HRESULT WINAPI
458 IBasicVideo2_fnput_SourceTop(IBasicVideo2
* iface
,long lTop
)
460 CFilterGraph_THIS(iface
,basvid
);
463 TRACE("(%p)->()\n",This
);
465 hr
= IBasicVideo_put_SourceTop(pVideo
,lTop
);
466 IBasicVideo_Release(pVideo
);
470 static HRESULT WINAPI
471 IBasicVideo2_fnget_SourceTop(IBasicVideo2
* iface
,long* plTop
)
473 CFilterGraph_THIS(iface
,basvid
);
476 TRACE("(%p)->()\n",This
);
478 hr
= IBasicVideo_get_SourceTop(pVideo
,plTop
);
479 IBasicVideo_Release(pVideo
);
483 static HRESULT WINAPI
484 IBasicVideo2_fnput_SourceHeight(IBasicVideo2
* iface
,long lHeight
)
486 CFilterGraph_THIS(iface
,basvid
);
489 TRACE("(%p)->()\n",This
);
491 hr
= IBasicVideo_put_SourceHeight(pVideo
,lHeight
);
492 IBasicVideo_Release(pVideo
);
496 static HRESULT WINAPI
497 IBasicVideo2_fnget_SourceHeight(IBasicVideo2
* iface
,long* plHeight
)
499 CFilterGraph_THIS(iface
,basvid
);
502 TRACE("(%p)->()\n",This
);
504 hr
= IBasicVideo_get_SourceHeight(pVideo
,plHeight
);
505 IBasicVideo_Release(pVideo
);
509 static HRESULT WINAPI
510 IBasicVideo2_fnput_DestinationLeft(IBasicVideo2
* iface
,long lLeft
)
512 CFilterGraph_THIS(iface
,basvid
);
515 TRACE("(%p)->()\n",This
);
517 hr
= IBasicVideo_put_DestinationLeft(pVideo
,lLeft
);
518 IBasicVideo_Release(pVideo
);
522 static HRESULT WINAPI
523 IBasicVideo2_fnget_DestinationLeft(IBasicVideo2
* iface
,long* plLeft
)
525 CFilterGraph_THIS(iface
,basvid
);
528 TRACE("(%p)->()\n",This
);
530 hr
= IBasicVideo_get_DestinationLeft(pVideo
,plLeft
);
531 IBasicVideo_Release(pVideo
);
535 static HRESULT WINAPI
536 IBasicVideo2_fnput_DestinationWidth(IBasicVideo2
* iface
,long lWidth
)
538 CFilterGraph_THIS(iface
,basvid
);
541 TRACE("(%p)->()\n",This
);
543 hr
= IBasicVideo_put_DestinationWidth(pVideo
,lWidth
);
544 IBasicVideo_Release(pVideo
);
548 static HRESULT WINAPI
549 IBasicVideo2_fnget_DestinationWidth(IBasicVideo2
* iface
,long* plWidth
)
551 CFilterGraph_THIS(iface
,basvid
);
554 TRACE("(%p)->()\n",This
);
556 hr
= IBasicVideo_get_DestinationWidth(pVideo
,plWidth
);
557 IBasicVideo_Release(pVideo
);
561 static HRESULT WINAPI
562 IBasicVideo2_fnput_DestinationTop(IBasicVideo2
* iface
,long lTop
)
564 CFilterGraph_THIS(iface
,basvid
);
567 TRACE("(%p)->()\n",This
);
569 hr
= IBasicVideo_put_DestinationTop(pVideo
,lTop
);
570 IBasicVideo_Release(pVideo
);
574 static HRESULT WINAPI
575 IBasicVideo2_fnget_DestinationTop(IBasicVideo2
* iface
,long* plTop
)
577 CFilterGraph_THIS(iface
,basvid
);
580 TRACE("(%p)->()\n",This
);
582 hr
= IBasicVideo_get_DestinationTop(pVideo
,plTop
);
583 IBasicVideo_Release(pVideo
);
587 static HRESULT WINAPI
588 IBasicVideo2_fnput_DestinationHeight(IBasicVideo2
* iface
,long lHeight
)
590 CFilterGraph_THIS(iface
,basvid
);
593 TRACE("(%p)->()\n",This
);
595 hr
= IBasicVideo_put_DestinationHeight(pVideo
,lHeight
);
596 IBasicVideo_Release(pVideo
);
600 static HRESULT WINAPI
601 IBasicVideo2_fnget_DestinationHeight(IBasicVideo2
* iface
,long* plHeight
)
603 CFilterGraph_THIS(iface
,basvid
);
606 TRACE("(%p)->()\n",This
);
608 hr
= IBasicVideo_get_DestinationHeight(pVideo
,plHeight
);
609 IBasicVideo_Release(pVideo
);
613 static HRESULT WINAPI
614 IBasicVideo2_fnSetSourcePosition(IBasicVideo2
* iface
,long lLeft
,long lTop
,long lWidth
,long lHeight
)
616 CFilterGraph_THIS(iface
,basvid
);
619 TRACE("(%p)->()\n",This
);
621 hr
= IBasicVideo_SetSourcePosition(pVideo
,lLeft
,lTop
,lWidth
,lHeight
);
622 IBasicVideo_Release(pVideo
);
626 static HRESULT WINAPI
627 IBasicVideo2_fnGetSourcePosition(IBasicVideo2
* iface
,long* plLeft
,long* plTop
,long* plWidth
,long* plHeight
)
629 CFilterGraph_THIS(iface
,basvid
);
632 TRACE("(%p)->()\n",This
);
634 hr
= IBasicVideo_GetSourcePosition(pVideo
,plLeft
,plTop
,plWidth
,plHeight
);
635 IBasicVideo_Release(pVideo
);
639 static HRESULT WINAPI
640 IBasicVideo2_fnSetDefaultSourcePosition(IBasicVideo2
* iface
)
642 CFilterGraph_THIS(iface
,basvid
);
645 TRACE("(%p)->()\n",This
);
647 hr
= IBasicVideo_SetDefaultSourcePosition(pVideo
);
648 IBasicVideo_Release(pVideo
);
652 static HRESULT WINAPI
653 IBasicVideo2_fnSetDestinationPosition(IBasicVideo2
* iface
,long lLeft
,long lTop
,long lWidth
,long lHeight
)
655 CFilterGraph_THIS(iface
,basvid
);
658 TRACE("(%p)->()\n",This
);
660 hr
= IBasicVideo_SetDestinationPosition(pVideo
,lLeft
,lTop
,lWidth
,lHeight
);
661 IBasicVideo_Release(pVideo
);
665 static HRESULT WINAPI
666 IBasicVideo2_fnGetDestinationPosition(IBasicVideo2
* iface
,long* plLeft
,long* plTop
,long* plWidth
,long* plHeight
)
668 CFilterGraph_THIS(iface
,basvid
);
671 TRACE("(%p)->()\n",This
);
673 hr
= IBasicVideo_GetDestinationPosition(pVideo
,plLeft
,plTop
,plWidth
,plHeight
);
674 IBasicVideo_Release(pVideo
);
678 static HRESULT WINAPI
679 IBasicVideo2_fnSetDefaultDestinationPosition(IBasicVideo2
* iface
)
681 CFilterGraph_THIS(iface
,basvid
);
684 TRACE("(%p)->()\n",This
);
686 hr
= IBasicVideo_SetDefaultDestinationPosition(pVideo
);
687 IBasicVideo_Release(pVideo
);
691 static HRESULT WINAPI
692 IBasicVideo2_fnGetVideoSize(IBasicVideo2
* iface
,long* plWidth
,long* plHeight
)
694 CFilterGraph_THIS(iface
,basvid
);
697 TRACE("(%p)->()\n",This
);
699 hr
= IBasicVideo_GetVideoSize(pVideo
,plWidth
,plHeight
);
700 IBasicVideo_Release(pVideo
);
704 static HRESULT WINAPI
705 IBasicVideo2_fnGetVideoPaletteEntries(IBasicVideo2
* iface
,long lStart
,long lCount
,long* plRet
,long* plPaletteEntry
)
707 CFilterGraph_THIS(iface
,basvid
);
710 TRACE("(%p)->()\n",This
);
712 hr
= IBasicVideo_GetVideoPaletteEntries(pVideo
,lStart
,lCount
,plRet
,plPaletteEntry
);
713 IBasicVideo_Release(pVideo
);
717 static HRESULT WINAPI
718 IBasicVideo2_fnGetCurrentImage(IBasicVideo2
* iface
,long* plBufferSize
,long* plDIBBuffer
)
720 CFilterGraph_THIS(iface
,basvid
);
723 TRACE("(%p)->()\n",This
);
725 hr
= IBasicVideo_GetCurrentImage(pVideo
,plBufferSize
,plDIBBuffer
);
726 IBasicVideo_Release(pVideo
);
730 static HRESULT WINAPI
731 IBasicVideo2_fnIsUsingDefaultSource(IBasicVideo2
* iface
)
733 CFilterGraph_THIS(iface
,basvid
);
736 TRACE("(%p)->()\n",This
);
738 hr
= IBasicVideo_IsUsingDefaultSource(pVideo
);
739 IBasicVideo_Release(pVideo
);
743 static HRESULT WINAPI
744 IBasicVideo2_fnIsUsingDefaultDestination(IBasicVideo2
* iface
)
746 CFilterGraph_THIS(iface
,basvid
);
749 TRACE("(%p)->()\n",This
);
751 hr
= IBasicVideo_IsUsingDefaultDestination(pVideo
);
752 IBasicVideo_Release(pVideo
);
756 static HRESULT WINAPI
757 IBasicVideo2_fnGetPreferredAspectRatio(IBasicVideo2
* iface
,long* plRateX
,long* plRateY
)
759 CFilterGraph_THIS(iface
,basvid
);
762 TRACE("(%p)->()\n",This
);
764 hr
= IBasicVideo2_GetPreferredAspectRatio(pVideo
,plRateX
,plRateY
);
765 IBasicVideo2_Release(pVideo
);
772 static ICOM_VTABLE(IBasicVideo2
) ibasicvideo
=
774 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
775 /* IUnknown fields */
776 IBasicVideo2_fnQueryInterface
,
777 IBasicVideo2_fnAddRef
,
778 IBasicVideo2_fnRelease
,
779 /* IDispatch fields */
780 IBasicVideo2_fnGetTypeInfoCount
,
781 IBasicVideo2_fnGetTypeInfo
,
782 IBasicVideo2_fnGetIDsOfNames
,
783 IBasicVideo2_fnInvoke
,
784 /* IBasicVideo fields */
785 IBasicVideo2_fnget_AvgTimePerFrame
,
786 IBasicVideo2_fnget_BitRate
,
787 IBasicVideo2_fnget_BitErrorRate
,
788 IBasicVideo2_fnget_VideoWidth
,
789 IBasicVideo2_fnget_VideoHeight
,
790 IBasicVideo2_fnput_SourceLeft
,
791 IBasicVideo2_fnget_SourceLeft
,
792 IBasicVideo2_fnput_SourceWidth
,
793 IBasicVideo2_fnget_SourceWidth
,
794 IBasicVideo2_fnput_SourceTop
,
795 IBasicVideo2_fnget_SourceTop
,
796 IBasicVideo2_fnput_SourceHeight
,
797 IBasicVideo2_fnget_SourceHeight
,
798 IBasicVideo2_fnput_DestinationLeft
,
799 IBasicVideo2_fnget_DestinationLeft
,
800 IBasicVideo2_fnput_DestinationWidth
,
801 IBasicVideo2_fnget_DestinationWidth
,
802 IBasicVideo2_fnput_DestinationTop
,
803 IBasicVideo2_fnget_DestinationTop
,
804 IBasicVideo2_fnput_DestinationHeight
,
805 IBasicVideo2_fnget_DestinationHeight
,
806 IBasicVideo2_fnSetSourcePosition
,
807 IBasicVideo2_fnGetSourcePosition
,
808 IBasicVideo2_fnSetDefaultSourcePosition
,
809 IBasicVideo2_fnSetDestinationPosition
,
810 IBasicVideo2_fnGetDestinationPosition
,
811 IBasicVideo2_fnSetDefaultDestinationPosition
,
812 IBasicVideo2_fnGetVideoSize
,
813 IBasicVideo2_fnGetVideoPaletteEntries
,
814 IBasicVideo2_fnGetCurrentImage
,
815 IBasicVideo2_fnIsUsingDefaultSource
,
816 IBasicVideo2_fnIsUsingDefaultDestination
,
817 /* IBasicVideo2 fields */
818 IBasicVideo2_fnGetPreferredAspectRatio
,
822 HRESULT
CFilterGraph_InitIBasicVideo2( CFilterGraph
* pfg
)
825 ICOM_VTBL(&pfg
->basvid
) = &ibasicvideo
;
830 void CFilterGraph_UninitIBasicVideo2( CFilterGraph
* pfg
)
835 #undef QUERYBASICVIDEO2
836 #undef QUERYBASICVIDEO
838 /***************************************************************************
840 * CFilterGraph::IVideoWindow
844 #define QUERYVIDEOWINDOW \
845 IVideoWindow* pVidWin = NULL; \
847 hr = CFilterGraph_QueryVideoWindow( This, &pVidWin ); \
848 if ( FAILED(hr) ) return hr;
851 static HRESULT WINAPI
852 IVideoWindow_fnQueryInterface(IVideoWindow
* iface
,REFIID riid
,void** ppobj
)
854 CFilterGraph_THIS(iface
,vidwin
);
856 TRACE("(%p)->()\n",This
);
858 return IUnknown_QueryInterface(This
->unk
.punkControl
,riid
,ppobj
);
862 IVideoWindow_fnAddRef(IVideoWindow
* iface
)
864 CFilterGraph_THIS(iface
,vidwin
);
866 TRACE("(%p)->()\n",This
);
868 return IUnknown_AddRef(This
->unk
.punkControl
);
872 IVideoWindow_fnRelease(IVideoWindow
* iface
)
874 CFilterGraph_THIS(iface
,vidwin
);
876 TRACE("(%p)->()\n",This
);
878 return IUnknown_Release(This
->unk
.punkControl
);
881 static HRESULT WINAPI
882 IVideoWindow_fnGetTypeInfoCount(IVideoWindow
* iface
,UINT
* pcTypeInfo
)
884 CFilterGraph_THIS(iface
,vidwin
);
886 FIXME("(%p)->()\n",This
);
891 static HRESULT WINAPI
892 IVideoWindow_fnGetTypeInfo(IVideoWindow
* iface
,UINT iTypeInfo
, LCID lcid
, ITypeInfo
** ppobj
)
894 CFilterGraph_THIS(iface
,vidwin
);
896 FIXME("(%p)->()\n",This
);
901 static HRESULT WINAPI
902 IVideoWindow_fnGetIDsOfNames(IVideoWindow
* iface
,REFIID riid
, LPOLESTR
* ppwszName
, UINT cNames
, LCID lcid
, DISPID
* pDispId
)
904 CFilterGraph_THIS(iface
,vidwin
);
906 FIXME("(%p)->()\n",This
);
911 static HRESULT WINAPI
912 IVideoWindow_fnInvoke(IVideoWindow
* iface
,DISPID DispId
, REFIID riid
, LCID lcid
, WORD wFlags
, DISPPARAMS
* pDispParams
, VARIANT
* pVarRes
, EXCEPINFO
* pExcepInfo
, UINT
* puArgErr
)
914 CFilterGraph_THIS(iface
,vidwin
);
916 FIXME("(%p)->()\n",This
);
923 static HRESULT WINAPI
924 IVideoWindow_fnput_Caption(IVideoWindow
* iface
,BSTR strCaption
)
926 CFilterGraph_THIS(iface
,vidwin
);
929 TRACE("(%p)->()\n",This
);
931 hr
= IVideoWindow_put_Caption(pVidWin
,strCaption
);
932 IVideoWindow_Release(pVidWin
);
936 static HRESULT WINAPI
937 IVideoWindow_fnget_Caption(IVideoWindow
* iface
,BSTR
* pstrCaption
)
939 CFilterGraph_THIS(iface
,vidwin
);
942 TRACE("(%p)->()\n",This
);
944 hr
= IVideoWindow_get_Caption(pVidWin
,pstrCaption
);
945 IVideoWindow_Release(pVidWin
);
949 static HRESULT WINAPI
950 IVideoWindow_fnput_WindowStyle(IVideoWindow
* iface
,long lStyle
)
952 CFilterGraph_THIS(iface
,vidwin
);
955 TRACE("(%p)->()\n",This
);
957 hr
= IVideoWindow_put_WindowStyle(pVidWin
,lStyle
);
958 IVideoWindow_Release(pVidWin
);
962 static HRESULT WINAPI
963 IVideoWindow_fnget_WindowStyle(IVideoWindow
* iface
,long* plStyle
)
965 CFilterGraph_THIS(iface
,vidwin
);
968 TRACE("(%p)->()\n",This
);
970 hr
= IVideoWindow_get_WindowStyle(pVidWin
,plStyle
);
971 IVideoWindow_Release(pVidWin
);
975 static HRESULT WINAPI
976 IVideoWindow_fnput_WindowStyleEx(IVideoWindow
* iface
,long lExStyle
)
978 CFilterGraph_THIS(iface
,vidwin
);
981 TRACE("(%p)->()\n",This
);
983 hr
= IVideoWindow_put_WindowStyleEx(pVidWin
,lExStyle
);
984 IVideoWindow_Release(pVidWin
);
988 static HRESULT WINAPI
989 IVideoWindow_fnget_WindowStyleEx(IVideoWindow
* iface
,long* plExStyle
)
991 CFilterGraph_THIS(iface
,vidwin
);
994 TRACE("(%p)->()\n",This
);
996 hr
= IVideoWindow_get_WindowStyleEx(pVidWin
,plExStyle
);
997 IVideoWindow_Release(pVidWin
);
1001 static HRESULT WINAPI
1002 IVideoWindow_fnput_AutoShow(IVideoWindow
* iface
,long lAutoShow
)
1004 CFilterGraph_THIS(iface
,vidwin
);
1007 TRACE("(%p)->()\n",This
);
1009 hr
= IVideoWindow_put_AutoShow(pVidWin
,lAutoShow
);
1010 IVideoWindow_Release(pVidWin
);
1014 static HRESULT WINAPI
1015 IVideoWindow_fnget_AutoShow(IVideoWindow
* iface
,long* plAutoShow
)
1017 CFilterGraph_THIS(iface
,vidwin
);
1020 TRACE("(%p)->()\n",This
);
1022 hr
= IVideoWindow_get_AutoShow(pVidWin
,plAutoShow
);
1023 IVideoWindow_Release(pVidWin
);
1027 static HRESULT WINAPI
1028 IVideoWindow_fnput_WindowState(IVideoWindow
* iface
,long lState
)
1030 CFilterGraph_THIS(iface
,vidwin
);
1033 TRACE("(%p)->()\n",This
);
1035 hr
= IVideoWindow_put_WindowState(pVidWin
,lState
);
1036 IVideoWindow_Release(pVidWin
);
1040 static HRESULT WINAPI
1041 IVideoWindow_fnget_WindowState(IVideoWindow
* iface
,long* plState
)
1043 CFilterGraph_THIS(iface
,vidwin
);
1046 TRACE("(%p)->()\n",This
);
1048 hr
= IVideoWindow_get_WindowState(pVidWin
,plState
);
1049 IVideoWindow_Release(pVidWin
);
1053 static HRESULT WINAPI
1054 IVideoWindow_fnput_BackgroundPalette(IVideoWindow
* iface
,long lBackPal
)
1056 CFilterGraph_THIS(iface
,vidwin
);
1059 TRACE("(%p)->()\n",This
);
1061 hr
= IVideoWindow_put_BackgroundPalette(pVidWin
,lBackPal
);
1062 IVideoWindow_Release(pVidWin
);
1066 static HRESULT WINAPI
1067 IVideoWindow_fnget_BackgroundPalette(IVideoWindow
* iface
,long* plBackPal
)
1069 CFilterGraph_THIS(iface
,vidwin
);
1072 TRACE("(%p)->()\n",This
);
1074 hr
= IVideoWindow_get_BackgroundPalette(pVidWin
,plBackPal
);
1075 IVideoWindow_Release(pVidWin
);
1079 static HRESULT WINAPI
1080 IVideoWindow_fnput_Visible(IVideoWindow
* iface
,long lVisible
)
1082 CFilterGraph_THIS(iface
,vidwin
);
1085 TRACE("(%p)->()\n",This
);
1087 hr
= IVideoWindow_put_Visible(pVidWin
,lVisible
);
1088 IVideoWindow_Release(pVidWin
);
1092 static HRESULT WINAPI
1093 IVideoWindow_fnget_Visible(IVideoWindow
* iface
,long* plVisible
)
1095 CFilterGraph_THIS(iface
,vidwin
);
1098 TRACE("(%p)->()\n",This
);
1100 hr
= IVideoWindow_get_Visible(pVidWin
,plVisible
);
1101 IVideoWindow_Release(pVidWin
);
1105 static HRESULT WINAPI
1106 IVideoWindow_fnput_Left(IVideoWindow
* iface
,long lLeft
)
1108 CFilterGraph_THIS(iface
,vidwin
);
1111 TRACE("(%p)->()\n",This
);
1113 hr
= IVideoWindow_put_Left(pVidWin
,lLeft
);
1114 IVideoWindow_Release(pVidWin
);
1118 static HRESULT WINAPI
1119 IVideoWindow_fnget_Left(IVideoWindow
* iface
,long* plLeft
)
1121 CFilterGraph_THIS(iface
,vidwin
);
1124 TRACE("(%p)->()\n",This
);
1126 hr
= IVideoWindow_get_Left(pVidWin
,plLeft
);
1127 IVideoWindow_Release(pVidWin
);
1131 static HRESULT WINAPI
1132 IVideoWindow_fnput_Width(IVideoWindow
* iface
,long lWidth
)
1134 CFilterGraph_THIS(iface
,vidwin
);
1137 TRACE("(%p)->()\n",This
);
1139 hr
= IVideoWindow_put_Width(pVidWin
,lWidth
);
1140 IVideoWindow_Release(pVidWin
);
1144 static HRESULT WINAPI
1145 IVideoWindow_fnget_Width(IVideoWindow
* iface
,long* plWidth
)
1147 CFilterGraph_THIS(iface
,vidwin
);
1150 TRACE("(%p)->()\n",This
);
1152 hr
=IVideoWindow_get_Width(pVidWin
,plWidth
);
1153 IVideoWindow_Release(pVidWin
);
1157 static HRESULT WINAPI
1158 IVideoWindow_fnput_Top(IVideoWindow
* iface
,long lTop
)
1160 CFilterGraph_THIS(iface
,vidwin
);
1163 TRACE("(%p)->()\n",This
);
1165 hr
= IVideoWindow_put_Top(pVidWin
,lTop
);
1166 IVideoWindow_Release(pVidWin
);
1170 static HRESULT WINAPI
1171 IVideoWindow_fnget_Top(IVideoWindow
* iface
,long* plTop
)
1173 CFilterGraph_THIS(iface
,vidwin
);
1176 TRACE("(%p)->()\n",This
);
1178 hr
= IVideoWindow_get_Top(pVidWin
,plTop
);
1179 IVideoWindow_Release(pVidWin
);
1183 static HRESULT WINAPI
1184 IVideoWindow_fnput_Height(IVideoWindow
* iface
,long lHeight
)
1186 CFilterGraph_THIS(iface
,vidwin
);
1189 TRACE("(%p)->()\n",This
);
1191 hr
= IVideoWindow_put_Height(pVidWin
,lHeight
);
1192 IVideoWindow_Release(pVidWin
);
1196 static HRESULT WINAPI
1197 IVideoWindow_fnget_Height(IVideoWindow
* iface
,long* plHeight
)
1199 CFilterGraph_THIS(iface
,vidwin
);
1202 TRACE("(%p)->()\n",This
);
1204 hr
= IVideoWindow_get_Height(pVidWin
,plHeight
);
1205 IVideoWindow_Release(pVidWin
);
1209 static HRESULT WINAPI
1210 IVideoWindow_fnput_Owner(IVideoWindow
* iface
,OAHWND hwnd
)
1212 CFilterGraph_THIS(iface
,vidwin
);
1215 TRACE("(%p)->()\n",This
);
1217 hr
= IVideoWindow_put_Owner(pVidWin
,hwnd
);
1218 IVideoWindow_Release(pVidWin
);
1222 static HRESULT WINAPI
1223 IVideoWindow_fnget_Owner(IVideoWindow
* iface
,OAHWND
* phwnd
)
1225 CFilterGraph_THIS(iface
,vidwin
);
1228 TRACE("(%p)->()\n",This
);
1230 hr
= IVideoWindow_get_Owner(pVidWin
,phwnd
);
1231 IVideoWindow_Release(pVidWin
);
1235 static HRESULT WINAPI
1236 IVideoWindow_fnput_MessageDrain(IVideoWindow
* iface
,OAHWND hwnd
)
1238 CFilterGraph_THIS(iface
,vidwin
);
1241 TRACE("(%p)->()\n",This
);
1243 hr
= IVideoWindow_put_MessageDrain(pVidWin
,hwnd
);
1244 IVideoWindow_Release(pVidWin
);
1248 static HRESULT WINAPI
1249 IVideoWindow_fnget_MessageDrain(IVideoWindow
* iface
,OAHWND
* phwnd
)
1251 CFilterGraph_THIS(iface
,vidwin
);
1254 TRACE("(%p)->()\n",This
);
1256 hr
= IVideoWindow_get_MessageDrain(pVidWin
,phwnd
);
1257 IVideoWindow_Release(pVidWin
);
1261 static HRESULT WINAPI
1262 IVideoWindow_fnget_BorderColor(IVideoWindow
* iface
,long* plColor
)
1264 CFilterGraph_THIS(iface
,vidwin
);
1267 TRACE("(%p)->()\n",This
);
1269 hr
= IVideoWindow_get_BorderColor(pVidWin
,plColor
);
1270 IVideoWindow_Release(pVidWin
);
1274 static HRESULT WINAPI
1275 IVideoWindow_fnput_BorderColor(IVideoWindow
* iface
,long lColor
)
1277 CFilterGraph_THIS(iface
,vidwin
);
1280 TRACE("(%p)->()\n",This
);
1282 hr
= IVideoWindow_put_BorderColor(pVidWin
,lColor
);
1283 IVideoWindow_Release(pVidWin
);
1287 static HRESULT WINAPI
1288 IVideoWindow_fnget_FullScreenMode(IVideoWindow
* iface
,long* plMode
)
1290 CFilterGraph_THIS(iface
,vidwin
);
1293 TRACE("(%p)->()\n",This
);
1295 hr
= IVideoWindow_get_FullScreenMode(pVidWin
,plMode
);
1296 IVideoWindow_Release(pVidWin
);
1300 static HRESULT WINAPI
1301 IVideoWindow_fnput_FullScreenMode(IVideoWindow
* iface
,long lMode
)
1303 CFilterGraph_THIS(iface
,vidwin
);
1306 TRACE("(%p)->()\n",This
);
1308 hr
= IVideoWindow_put_FullScreenMode(pVidWin
,lMode
);
1309 IVideoWindow_Release(pVidWin
);
1313 static HRESULT WINAPI
1314 IVideoWindow_fnSetWindowForeground(IVideoWindow
* iface
,long lFocus
)
1316 CFilterGraph_THIS(iface
,vidwin
);
1319 TRACE("(%p)->()\n",This
);
1321 hr
= IVideoWindow_SetWindowForeground(pVidWin
,lFocus
);
1322 IVideoWindow_Release(pVidWin
);
1326 static HRESULT WINAPI
1327 IVideoWindow_fnNotifyOwnerMessage(IVideoWindow
* iface
,OAHWND hwnd
,long message
,LONG_PTR wParam
,LONG_PTR lParam
)
1329 CFilterGraph_THIS(iface
,vidwin
);
1332 TRACE("(%p)->()\n",This
);
1334 hr
= IVideoWindow_NotifyOwnerMessage(pVidWin
,hwnd
,message
,wParam
,lParam
);
1335 IVideoWindow_Release(pVidWin
);
1339 static HRESULT WINAPI
1340 IVideoWindow_fnSetWindowPosition(IVideoWindow
* iface
,long lLeft
,long lTop
,long lWidth
,long lHeight
)
1342 CFilterGraph_THIS(iface
,vidwin
);
1345 TRACE("(%p)->()\n",This
);
1347 hr
= IVideoWindow_SetWindowPosition(pVidWin
,lLeft
,lTop
,lWidth
,lHeight
);
1348 IVideoWindow_Release(pVidWin
);
1352 static HRESULT WINAPI
1353 IVideoWindow_fnGetWindowPosition(IVideoWindow
* iface
,long* plLeft
,long* plTop
,long* plWidth
,long* plHeight
)
1355 CFilterGraph_THIS(iface
,vidwin
);
1358 TRACE("(%p)->()\n",This
);
1360 hr
= IVideoWindow_GetWindowPosition(pVidWin
,plLeft
,plTop
,plWidth
,plHeight
);
1361 IVideoWindow_Release(pVidWin
);
1365 static HRESULT WINAPI
1366 IVideoWindow_fnGetMinIdealImageSize(IVideoWindow
* iface
,long* plWidth
,long* plHeight
)
1368 CFilterGraph_THIS(iface
,vidwin
);
1371 TRACE("(%p)->()\n",This
);
1373 hr
= IVideoWindow_GetMinIdealImageSize(pVidWin
,plWidth
,plHeight
);
1374 IVideoWindow_Release(pVidWin
);
1378 static HRESULT WINAPI
1379 IVideoWindow_fnGetMaxIdealImageSize(IVideoWindow
* iface
,long* plWidth
,long* plHeight
)
1381 CFilterGraph_THIS(iface
,vidwin
);
1384 TRACE("(%p)->()\n",This
);
1386 hr
= IVideoWindow_GetMaxIdealImageSize(pVidWin
,plWidth
,plHeight
);
1387 IVideoWindow_Release(pVidWin
);
1391 static HRESULT WINAPI
1392 IVideoWindow_fnGetRestorePosition(IVideoWindow
* iface
,long* plLeft
,long* plTop
,long* plWidth
,long* plHeight
)
1394 CFilterGraph_THIS(iface
,vidwin
);
1397 TRACE("(%p)->()\n",This
);
1399 hr
= IVideoWindow_GetRestorePosition(pVidWin
,plLeft
,plTop
,plWidth
,plHeight
);
1400 IVideoWindow_Release(pVidWin
);
1404 static HRESULT WINAPI
1405 IVideoWindow_fnHideCursor(IVideoWindow
* iface
,long lHide
)
1407 CFilterGraph_THIS(iface
,vidwin
);
1410 TRACE("(%p)->()\n",This
);
1412 hr
= IVideoWindow_HideCursor(pVidWin
,lHide
);
1413 IVideoWindow_Release(pVidWin
);
1417 static HRESULT WINAPI
1418 IVideoWindow_fnIsCursorHidden(IVideoWindow
* iface
,long* plHide
)
1420 CFilterGraph_THIS(iface
,vidwin
);
1423 TRACE("(%p)->()\n",This
);
1425 hr
= IVideoWindow_IsCursorHidden(pVidWin
,plHide
);
1426 IVideoWindow_Release(pVidWin
);
1433 static ICOM_VTABLE(IVideoWindow
) ivideowindow
=
1435 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1436 /* IUnknown fields */
1437 IVideoWindow_fnQueryInterface
,
1438 IVideoWindow_fnAddRef
,
1439 IVideoWindow_fnRelease
,
1440 /* IDispatch fields */
1441 IVideoWindow_fnGetTypeInfoCount
,
1442 IVideoWindow_fnGetTypeInfo
,
1443 IVideoWindow_fnGetIDsOfNames
,
1444 IVideoWindow_fnInvoke
,
1445 /* IVideoWindow fields */
1446 IVideoWindow_fnput_Caption
,
1447 IVideoWindow_fnget_Caption
,
1448 IVideoWindow_fnput_WindowStyle
,
1449 IVideoWindow_fnget_WindowStyle
,
1450 IVideoWindow_fnput_WindowStyleEx
,
1451 IVideoWindow_fnget_WindowStyleEx
,
1452 IVideoWindow_fnput_AutoShow
,
1453 IVideoWindow_fnget_AutoShow
,
1454 IVideoWindow_fnput_WindowState
,
1455 IVideoWindow_fnget_WindowState
,
1456 IVideoWindow_fnput_BackgroundPalette
,
1457 IVideoWindow_fnget_BackgroundPalette
,
1458 IVideoWindow_fnput_Visible
,
1459 IVideoWindow_fnget_Visible
,
1460 IVideoWindow_fnput_Left
,
1461 IVideoWindow_fnget_Left
,
1462 IVideoWindow_fnput_Width
,
1463 IVideoWindow_fnget_Width
,
1464 IVideoWindow_fnput_Top
,
1465 IVideoWindow_fnget_Top
,
1466 IVideoWindow_fnput_Height
,
1467 IVideoWindow_fnget_Height
,
1468 IVideoWindow_fnput_Owner
,
1469 IVideoWindow_fnget_Owner
,
1470 IVideoWindow_fnput_MessageDrain
,
1471 IVideoWindow_fnget_MessageDrain
,
1472 IVideoWindow_fnget_BorderColor
,
1473 IVideoWindow_fnput_BorderColor
,
1474 IVideoWindow_fnget_FullScreenMode
,
1475 IVideoWindow_fnput_FullScreenMode
,
1476 IVideoWindow_fnSetWindowForeground
,
1477 IVideoWindow_fnNotifyOwnerMessage
,
1478 IVideoWindow_fnSetWindowPosition
,
1479 IVideoWindow_fnGetWindowPosition
,
1480 IVideoWindow_fnGetMinIdealImageSize
,
1481 IVideoWindow_fnGetMaxIdealImageSize
,
1482 IVideoWindow_fnGetRestorePosition
,
1483 IVideoWindow_fnHideCursor
,
1484 IVideoWindow_fnIsCursorHidden
,
1489 HRESULT
CFilterGraph_InitIVideoWindow( CFilterGraph
* pfg
)
1491 TRACE("(%p)\n",pfg
);
1492 ICOM_VTBL(&pfg
->vidwin
) = &ivideowindow
;
1497 void CFilterGraph_UninitIVideoWindow( CFilterGraph
* pfg
)
1499 TRACE("(%p)\n",pfg
);
1502 #undef QUERYVIDEOWINDOW