Fixed memory leak.
[wine/multimedia.git] / dlls / quartz / seekpass.c
blob98824c2667dcd57d5d8fa79d5e19d432021a5029
1 /*
2 * Implementation of CLSID_SeekingPassThru
4 * FIXME - not tested yet.
6 * hidenori@a2.ctktv.ne.jp
7 */
9 #include "config.h"
11 #include "windef.h"
12 #include "winbase.h"
13 #include "wingdi.h"
14 #include "winuser.h"
15 #include "winerror.h"
16 #include "strmif.h"
17 #include "control.h"
18 #include "uuids.h"
20 #include "debugtools.h"
21 DEFAULT_DEBUG_CHANNEL(quartz);
23 #include "quartz_private.h"
24 #include "seekpass.h"
27 /***************************************************************************
29 * CSeekingPassThru::ISeekingPassThru
33 static HRESULT WINAPI
34 ISeekingPassThru_fnQueryInterface(ISeekingPassThru* iface,REFIID riid,void** ppobj)
36 CSeekingPassThru_THIS(iface,seekpass);
38 TRACE("(%p)->()\n",This);
40 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
43 static ULONG WINAPI
44 ISeekingPassThru_fnAddRef(ISeekingPassThru* iface)
46 CSeekingPassThru_THIS(iface,seekpass);
48 TRACE("(%p)->()\n",This);
50 return IUnknown_AddRef(This->unk.punkControl);
53 static ULONG WINAPI
54 ISeekingPassThru_fnRelease(ISeekingPassThru* iface)
56 CSeekingPassThru_THIS(iface,seekpass);
58 TRACE("(%p)->()\n",This);
60 return IUnknown_Release(This->unk.punkControl);
63 static HRESULT WINAPI
64 ISeekingPassThru_fnInit(ISeekingPassThru* iface,BOOL bRendering,IPin* pPin)
66 CSeekingPassThru_THIS(iface,seekpass);
68 FIXME("(%p)->(%d,%p) not tested!\n",This,bRendering,pPin);
70 if ( pPin == NULL )
71 return E_POINTER;
73 /* Why is 'bRendering' given as an argument?? */
74 EnterCriticalSection( &This->cs );
76 if ( This->passthru.pPin != NULL )
77 IPin_Release( This->passthru.pPin );
78 This->passthru.pPin = pPin; IPin_AddRef( pPin );
80 LeaveCriticalSection( &This->cs );
82 return NOERROR;
86 static ICOM_VTABLE(ISeekingPassThru) iseekingpassthru =
88 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
89 /* IUnknown fields */
90 ISeekingPassThru_fnQueryInterface,
91 ISeekingPassThru_fnAddRef,
92 ISeekingPassThru_fnRelease,
93 /* ISeekingPassThru fields */
94 ISeekingPassThru_fnInit,
97 static
98 HRESULT CSeekingPassThru_InitISeekingPassThru(CSeekingPassThru* This)
100 TRACE("(%p)\n",This);
101 ICOM_VTBL(&This->seekpass) = &iseekingpassthru;
102 This->passthru.punk = This->unk.punkControl;
103 This->passthru.pPin = NULL;
104 InitializeCriticalSection( &This->cs );
106 return NOERROR;
109 static
110 void CSeekingPassThru_UninitISeekingPassThru(CSeekingPassThru* This)
112 TRACE("(%p)\n",This);
113 if ( This->passthru.pPin != NULL )
115 IPin_Release( This->passthru.pPin );
116 This->passthru.pPin = NULL;
118 DeleteCriticalSection( &This->cs );
121 /***************************************************************************
123 * new/delete for CLSID_SeekingPassThru.
127 /* can I use offsetof safely? - FIXME? */
128 static QUARTZ_IFEntry IFEntries[] =
130 { &IID_ISeekingPassThru, offsetof(CSeekingPassThru,seekpass)-offsetof(CSeekingPassThru,unk) },
131 { &IID_IMediaPosition, offsetof(CSeekingPassThru,passthru.mpos)-offsetof(CSeekingPassThru,unk) },
132 { &IID_IMediaSeeking, offsetof(CSeekingPassThru,passthru.mseek)-offsetof(CSeekingPassThru,unk) },
136 static void QUARTZ_DestroySeekingPassThru(IUnknown* punk)
138 CSeekingPassThru_THIS(punk,unk);
140 TRACE("(%p)\n",This);
142 CPassThruImpl_UninitIMediaSeeking( &This->passthru );
143 CPassThruImpl_UninitIMediaPosition( &This->passthru );
144 CSeekingPassThru_UninitISeekingPassThru(This);
147 HRESULT QUARTZ_CreateSeekingPassThru(IUnknown* punkOuter,void** ppobj)
149 HRESULT hr;
150 CSeekingPassThru* This;
152 TRACE("(%p,%p)\n",punkOuter,ppobj);
154 hr = QUARTZ_CreateSeekingPassThruInternal(punkOuter,&This,FALSE,NULL);
155 if ( hr != S_OK )
156 return hr;
158 ppobj = (void*)(&This->unk);
160 return NOERROR;
163 HRESULT QUARTZ_CreateSeekingPassThruInternal(IUnknown* punkOuter,CSeekingPassThru** ppobj,BOOL bRendering,IPin* pPin)
165 CSeekingPassThru* This;
166 HRESULT hr;
168 TRACE("(%p,%p,%d,%p)\n",punkOuter,ppobj,(int)bRendering,pPin);
170 This = (CSeekingPassThru*)QUARTZ_AllocObj( sizeof(CSeekingPassThru) );
171 if ( This == NULL )
172 return E_OUTOFMEMORY;
174 QUARTZ_IUnkInit( &This->unk, punkOuter );
175 hr = CSeekingPassThru_InitISeekingPassThru(This);
176 if ( SUCCEEDED(hr) )
178 hr = CPassThruImpl_InitIMediaPosition( &This->passthru );
179 if ( SUCCEEDED(hr) )
181 hr = CPassThruImpl_InitIMediaSeeking( &This->passthru );
182 if ( FAILED(hr) )
184 CPassThruImpl_UninitIMediaPosition( &This->passthru );
187 else
189 CSeekingPassThru_UninitISeekingPassThru(This);
193 if ( FAILED(hr) )
195 QUARTZ_FreeObj( This );
196 return hr;
199 This->unk.pEntries = IFEntries;
200 This->unk.dwEntries = sizeof(IFEntries)/sizeof(IFEntries[0]);
201 This->unk.pOnFinalRelease = QUARTZ_DestroySeekingPassThru;
203 *ppobj = This;
205 if ( pPin != NULL )
207 hr = ISeekingPassThru_Init((ISeekingPassThru*)(&This->seekpass),bRendering,pPin);
208 if ( FAILED(hr) )
210 IUnknown_Release(This->unk.punkControl);
211 return hr;
215 return S_OK;
221 /***************************************************************************
223 * CPassThruImpl Helper methods.
227 static
228 HRESULT CPassThruImpl_GetConnected( CPassThruImpl* pImpl, IPin** ppPin )
230 return IPin_ConnectedTo( pImpl->pPin, ppPin );
233 HRESULT CPassThruImpl_QueryPosPass(
234 CPassThruImpl* pImpl, IMediaPosition** ppPosition )
236 IPin* pPin;
237 HRESULT hr;
239 hr = CPassThruImpl_GetConnected( pImpl, &pPin );
240 if ( FAILED(hr) )
241 return hr;
242 hr = IPin_QueryInterface(pPin,&IID_IMediaPosition,(void**)ppPosition);
243 IPin_Release(pPin);
245 return hr;
248 HRESULT CPassThruImpl_QuerySeekPass(
249 CPassThruImpl* pImpl, IMediaSeeking** ppSeeking )
251 IPin* pPin;
252 HRESULT hr;
254 hr = CPassThruImpl_GetConnected( pImpl, &pPin );
255 if ( FAILED(hr) )
256 return hr;
257 hr = IPin_QueryInterface(pPin,&IID_IMediaSeeking,(void**)ppSeeking);
258 IPin_Release(pPin);
260 return hr;
263 /***************************************************************************
265 * An implementation for CPassThruImpl::IMediaPosition.
270 #define QUERYPOSPASS \
271 IMediaPosition* pPos = NULL; \
272 HRESULT hr; \
273 hr = CPassThruImpl_QueryPosPass( This, &pPos ); \
274 if ( FAILED(hr) ) return hr;
276 static HRESULT WINAPI
277 IMediaPosition_fnQueryInterface(IMediaPosition* iface,REFIID riid,void** ppobj)
279 CPassThruImpl_THIS(iface,mpos);
281 TRACE("(%p)->()\n",This);
283 return IUnknown_QueryInterface(This->punk,riid,ppobj);
286 static ULONG WINAPI
287 IMediaPosition_fnAddRef(IMediaPosition* iface)
289 CPassThruImpl_THIS(iface,mpos);
291 TRACE("(%p)->()\n",This);
293 return IUnknown_AddRef(This->punk);
296 static ULONG WINAPI
297 IMediaPosition_fnRelease(IMediaPosition* iface)
299 CPassThruImpl_THIS(iface,mpos);
301 TRACE("(%p)->()\n",This);
303 return IUnknown_Release(This->punk);
306 static HRESULT WINAPI
307 IMediaPosition_fnGetTypeInfoCount(IMediaPosition* iface,UINT* pcTypeInfo)
309 CPassThruImpl_THIS(iface,mpos);
311 FIXME("(%p)->() stub!\n",This);
313 return E_NOTIMPL;
316 static HRESULT WINAPI
317 IMediaPosition_fnGetTypeInfo(IMediaPosition* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj)
319 CPassThruImpl_THIS(iface,mpos);
321 FIXME("(%p)->() stub!\n",This);
323 return E_NOTIMPL;
326 static HRESULT WINAPI
327 IMediaPosition_fnGetIDsOfNames(IMediaPosition* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId)
329 CPassThruImpl_THIS(iface,mpos);
331 FIXME("(%p)->() stub!\n",This);
333 return E_NOTIMPL;
336 static HRESULT WINAPI
337 IMediaPosition_fnInvoke(IMediaPosition* iface,DISPID DispId, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarRes, EXCEPINFO* pExcepInfo, UINT* puArgErr)
339 CPassThruImpl_THIS(iface,mpos);
341 FIXME("(%p)->() stub!\n",This);
343 return E_NOTIMPL;
347 static HRESULT WINAPI
348 IMediaPosition_fnget_Duration(IMediaPosition* iface,REFTIME* prefTime)
350 CPassThruImpl_THIS(iface,mpos);
351 QUERYPOSPASS
353 TRACE("(%p)->()\n",This);
355 hr = IMediaPosition_get_Duration(pPos,prefTime);
356 IMediaPosition_Release(pPos);
357 return hr;
360 static HRESULT WINAPI
361 IMediaPosition_fnput_CurrentPosition(IMediaPosition* iface,REFTIME refTime)
363 CPassThruImpl_THIS(iface,mpos);
364 QUERYPOSPASS
366 TRACE("(%p)->()\n",This);
368 hr = IMediaPosition_put_CurrentPosition(pPos,refTime);
369 IMediaPosition_Release(pPos);
370 return hr;
373 static HRESULT WINAPI
374 IMediaPosition_fnget_CurrentPosition(IMediaPosition* iface,REFTIME* prefTime)
376 CPassThruImpl_THIS(iface,mpos);
377 QUERYPOSPASS
379 TRACE("(%p)->()\n",This);
381 hr = IMediaPosition_get_CurrentPosition(pPos,prefTime);
382 IMediaPosition_Release(pPos);
383 return hr;
386 static HRESULT WINAPI
387 IMediaPosition_fnget_StopTime(IMediaPosition* iface,REFTIME* prefTime)
389 CPassThruImpl_THIS(iface,mpos);
390 QUERYPOSPASS
392 TRACE("(%p)->()\n",This);
394 hr = IMediaPosition_get_StopTime(pPos,prefTime);
395 IMediaPosition_Release(pPos);
396 return hr;
399 static HRESULT WINAPI
400 IMediaPosition_fnput_StopTime(IMediaPosition* iface,REFTIME refTime)
402 CPassThruImpl_THIS(iface,mpos);
403 QUERYPOSPASS
405 TRACE("(%p)->()\n",This);
407 hr = IMediaPosition_put_StopTime(pPos,refTime);
408 IMediaPosition_Release(pPos);
409 return hr;
412 static HRESULT WINAPI
413 IMediaPosition_fnget_PrerollTime(IMediaPosition* iface,REFTIME* prefTime)
415 CPassThruImpl_THIS(iface,mpos);
416 QUERYPOSPASS
418 TRACE("(%p)->()\n",This);
420 hr = IMediaPosition_get_PrerollTime(pPos,prefTime);
421 IMediaPosition_Release(pPos);
422 return hr;
425 static HRESULT WINAPI
426 IMediaPosition_fnput_PrerollTime(IMediaPosition* iface,REFTIME refTime)
428 CPassThruImpl_THIS(iface,mpos);
429 QUERYPOSPASS
431 TRACE("(%p)->()\n",This);
433 hr = IMediaPosition_put_PrerollTime(pPos,refTime);
434 IMediaPosition_Release(pPos);
435 return hr;
438 static HRESULT WINAPI
439 IMediaPosition_fnput_Rate(IMediaPosition* iface,double dblRate)
441 CPassThruImpl_THIS(iface,mpos);
442 QUERYPOSPASS
444 TRACE("(%p)->()\n",This);
446 hr = IMediaPosition_put_Rate(pPos,dblRate);
447 IMediaPosition_Release(pPos);
448 return hr;
451 static HRESULT WINAPI
452 IMediaPosition_fnget_Rate(IMediaPosition* iface,double* pdblRate)
454 CPassThruImpl_THIS(iface,mpos);
455 QUERYPOSPASS
457 TRACE("(%p)->()\n",This);
459 hr = IMediaPosition_get_Rate(pPos,pdblRate);
460 IMediaPosition_Release(pPos);
461 return hr;
464 static HRESULT WINAPI
465 IMediaPosition_fnCanSeekForward(IMediaPosition* iface,LONG* pCanSeek)
467 CPassThruImpl_THIS(iface,mpos);
468 QUERYPOSPASS
470 TRACE("(%p)->()\n",This);
472 hr = IMediaPosition_CanSeekForward(pPos,pCanSeek);
473 IMediaPosition_Release(pPos);
474 return hr;
477 static HRESULT WINAPI
478 IMediaPosition_fnCanSeekBackward(IMediaPosition* iface,LONG* pCanSeek)
480 CPassThruImpl_THIS(iface,mpos);
481 QUERYPOSPASS
483 TRACE("(%p)->()\n",This);
485 hr = IMediaPosition_CanSeekBackward(pPos,pCanSeek);
486 IMediaPosition_Release(pPos);
487 return hr;
491 static ICOM_VTABLE(IMediaPosition) impos =
493 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
494 /* IUnknown fields */
495 IMediaPosition_fnQueryInterface,
496 IMediaPosition_fnAddRef,
497 IMediaPosition_fnRelease,
498 /* IDispatch fields */
499 IMediaPosition_fnGetTypeInfoCount,
500 IMediaPosition_fnGetTypeInfo,
501 IMediaPosition_fnGetIDsOfNames,
502 IMediaPosition_fnInvoke,
503 /* IMediaPosition fields */
504 IMediaPosition_fnget_Duration,
505 IMediaPosition_fnput_CurrentPosition,
506 IMediaPosition_fnget_CurrentPosition,
507 IMediaPosition_fnget_StopTime,
508 IMediaPosition_fnput_StopTime,
509 IMediaPosition_fnget_PrerollTime,
510 IMediaPosition_fnput_PrerollTime,
511 IMediaPosition_fnput_Rate,
512 IMediaPosition_fnget_Rate,
513 IMediaPosition_fnCanSeekForward,
514 IMediaPosition_fnCanSeekBackward,
518 HRESULT CPassThruImpl_InitIMediaPosition( CPassThruImpl* pImpl )
520 TRACE("(%p)\n",pImpl);
521 ICOM_VTBL(&pImpl->mpos) = &impos;
523 return NOERROR;
526 void CPassThruImpl_UninitIMediaPosition( CPassThruImpl* pImpl )
528 TRACE("(%p)\n",pImpl);
531 #undef QUERYPOSPASS
534 /***************************************************************************
536 * An implementation for CPassThruImpl::IMediaSeeking.
540 #define QUERYSEEKPASS \
541 IMediaSeeking* pSeek = NULL; \
542 HRESULT hr; \
543 hr = CPassThruImpl_QuerySeekPass( This, &pSeek ); \
544 if ( FAILED(hr) ) return hr;
547 static HRESULT WINAPI
548 IMediaSeeking_fnQueryInterface(IMediaSeeking* iface,REFIID riid,void** ppobj)
550 CPassThruImpl_THIS(iface,mseek);
552 TRACE("(%p)->()\n",This);
554 return IUnknown_QueryInterface(This->punk,riid,ppobj);
557 static ULONG WINAPI
558 IMediaSeeking_fnAddRef(IMediaSeeking* iface)
560 CPassThruImpl_THIS(iface,mseek);
562 TRACE("(%p)->()\n",This);
564 return IUnknown_AddRef(This->punk);
567 static ULONG WINAPI
568 IMediaSeeking_fnRelease(IMediaSeeking* iface)
570 CPassThruImpl_THIS(iface,mseek);
572 TRACE("(%p)->()\n",This);
574 return IUnknown_Release(This->punk);
578 static HRESULT WINAPI
579 IMediaSeeking_fnGetCapabilities(IMediaSeeking* iface,DWORD* pdwCaps)
581 CPassThruImpl_THIS(iface,mseek);
582 QUERYSEEKPASS
584 TRACE("(%p)->()\n",This);
586 hr = IMediaSeeking_GetCapabilities(pSeek,pdwCaps);
587 IMediaSeeking_Release(pSeek);
588 return hr;
591 static HRESULT WINAPI
592 IMediaSeeking_fnCheckCapabilities(IMediaSeeking* iface,DWORD* pdwCaps)
594 CPassThruImpl_THIS(iface,mseek);
595 QUERYSEEKPASS
597 TRACE("(%p)->()\n",This);
599 hr = IMediaSeeking_CheckCapabilities(pSeek,pdwCaps);
600 IMediaSeeking_Release(pSeek);
601 return hr;
604 static HRESULT WINAPI
605 IMediaSeeking_fnIsFormatSupported(IMediaSeeking* iface,const GUID* pidFormat)
607 CPassThruImpl_THIS(iface,mseek);
608 QUERYSEEKPASS
610 TRACE("(%p)->()\n",This);
612 hr = IMediaSeeking_IsFormatSupported(pSeek,pidFormat);
613 IMediaSeeking_Release(pSeek);
614 return hr;
617 static HRESULT WINAPI
618 IMediaSeeking_fnQueryPreferredFormat(IMediaSeeking* iface,GUID* pidFormat)
620 CPassThruImpl_THIS(iface,mseek);
621 QUERYSEEKPASS
623 TRACE("(%p)->()\n",This);
625 hr = IMediaSeeking_QueryPreferredFormat(pSeek,pidFormat);
626 IMediaSeeking_Release(pSeek);
627 return hr;
630 static HRESULT WINAPI
631 IMediaSeeking_fnGetTimeFormat(IMediaSeeking* iface,GUID* pidFormat)
633 CPassThruImpl_THIS(iface,mseek);
634 QUERYSEEKPASS
636 TRACE("(%p)->()\n",This);
638 hr = IMediaSeeking_GetTimeFormat(pSeek,pidFormat);
639 IMediaSeeking_Release(pSeek);
640 return hr;
643 static HRESULT WINAPI
644 IMediaSeeking_fnIsUsingTimeFormat(IMediaSeeking* iface,const GUID* pidFormat)
646 CPassThruImpl_THIS(iface,mseek);
647 QUERYSEEKPASS
649 TRACE("(%p)->()\n",This);
651 hr = IMediaSeeking_IsUsingTimeFormat(pSeek,pidFormat);
652 IMediaSeeking_Release(pSeek);
653 return hr;
656 static HRESULT WINAPI
657 IMediaSeeking_fnSetTimeFormat(IMediaSeeking* iface,const GUID* pidFormat)
659 CPassThruImpl_THIS(iface,mseek);
660 QUERYSEEKPASS
662 TRACE("(%p)->()\n",This);
664 hr = IMediaSeeking_SetTimeFormat(pSeek,pidFormat);
665 IMediaSeeking_Release(pSeek);
666 return hr;
669 static HRESULT WINAPI
670 IMediaSeeking_fnGetDuration(IMediaSeeking* iface,LONGLONG* pllDuration)
672 CPassThruImpl_THIS(iface,mseek);
673 QUERYSEEKPASS
675 TRACE("(%p)->()\n",This);
677 hr = IMediaSeeking_GetDuration(pSeek,pllDuration);
678 IMediaSeeking_Release(pSeek);
679 return hr;
682 static HRESULT WINAPI
683 IMediaSeeking_fnGetStopPosition(IMediaSeeking* iface,LONGLONG* pllPos)
685 CPassThruImpl_THIS(iface,mseek);
686 QUERYSEEKPASS
688 TRACE("(%p)->()\n",This);
690 hr = IMediaSeeking_GetStopPosition(pSeek,pllPos);
691 IMediaSeeking_Release(pSeek);
692 return hr;
695 static HRESULT WINAPI
696 IMediaSeeking_fnGetCurrentPosition(IMediaSeeking* iface,LONGLONG* pllPos)
698 CPassThruImpl_THIS(iface,mseek);
699 QUERYSEEKPASS
701 TRACE("(%p)->()\n",This);
703 hr = IMediaSeeking_GetCurrentPosition(pSeek,pllPos);
704 IMediaSeeking_Release(pSeek);
705 return hr;
708 static HRESULT WINAPI
709 IMediaSeeking_fnConvertTimeFormat(IMediaSeeking* iface,LONGLONG* pllOut,const GUID* pidFmtOut,LONGLONG llIn,const GUID* pidFmtIn)
711 CPassThruImpl_THIS(iface,mseek);
712 QUERYSEEKPASS
714 TRACE("(%p)->()\n",This);
716 hr = IMediaSeeking_ConvertTimeFormat(pSeek,pllOut,pidFmtOut,llIn,pidFmtIn);
717 IMediaSeeking_Release(pSeek);
718 return hr;
721 static HRESULT WINAPI
722 IMediaSeeking_fnSetPositions(IMediaSeeking* iface,LONGLONG* pllCur,DWORD dwCurFlags,LONGLONG* pllStop,DWORD dwStopFlags)
724 CPassThruImpl_THIS(iface,mseek);
725 QUERYSEEKPASS
727 TRACE("(%p)->()\n",This);
729 hr = IMediaSeeking_SetPositions(pSeek,pllCur,dwCurFlags,pllStop,dwStopFlags);
730 IMediaSeeking_Release(pSeek);
731 return hr;
734 static HRESULT WINAPI
735 IMediaSeeking_fnGetPositions(IMediaSeeking* iface,LONGLONG* pllCur,LONGLONG* pllStop)
737 CPassThruImpl_THIS(iface,mseek);
738 QUERYSEEKPASS
740 TRACE("(%p)->()\n",This);
742 hr = IMediaSeeking_GetPositions(pSeek,pllCur,pllStop);
743 IMediaSeeking_Release(pSeek);
744 return hr;
747 static HRESULT WINAPI
748 IMediaSeeking_fnGetAvailable(IMediaSeeking* iface,LONGLONG* pllFirst,LONGLONG* pllLast)
750 CPassThruImpl_THIS(iface,mseek);
751 QUERYSEEKPASS
753 TRACE("(%p)->()\n",This);
755 hr = IMediaSeeking_GetAvailable(pSeek,pllFirst,pllLast);
756 IMediaSeeking_Release(pSeek);
757 return hr;
760 static HRESULT WINAPI
761 IMediaSeeking_fnSetRate(IMediaSeeking* iface,double dblRate)
763 CPassThruImpl_THIS(iface,mseek);
764 QUERYSEEKPASS
766 TRACE("(%p)->()\n",This);
768 hr = IMediaSeeking_SetRate(pSeek,dblRate);
769 IMediaSeeking_Release(pSeek);
770 return hr;
773 static HRESULT WINAPI
774 IMediaSeeking_fnGetRate(IMediaSeeking* iface,double* pdblRate)
776 CPassThruImpl_THIS(iface,mseek);
777 QUERYSEEKPASS
779 TRACE("(%p)->()\n",This);
781 hr = IMediaSeeking_GetRate(pSeek,pdblRate);
782 IMediaSeeking_Release(pSeek);
783 return hr;
786 static HRESULT WINAPI
787 IMediaSeeking_fnGetPreroll(IMediaSeeking* iface,LONGLONG* pllPreroll)
789 CPassThruImpl_THIS(iface,mseek);
790 QUERYSEEKPASS
792 TRACE("(%p)->()\n",This);
794 hr = IMediaSeeking_GetPreroll(pSeek,pllPreroll);
795 IMediaSeeking_Release(pSeek);
796 return hr;
802 static ICOM_VTABLE(IMediaSeeking) imseek =
804 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
805 /* IUnknown fields */
806 IMediaSeeking_fnQueryInterface,
807 IMediaSeeking_fnAddRef,
808 IMediaSeeking_fnRelease,
809 /* IMediaSeeking fields */
810 IMediaSeeking_fnGetCapabilities,
811 IMediaSeeking_fnCheckCapabilities,
812 IMediaSeeking_fnIsFormatSupported,
813 IMediaSeeking_fnQueryPreferredFormat,
814 IMediaSeeking_fnGetTimeFormat,
815 IMediaSeeking_fnIsUsingTimeFormat,
816 IMediaSeeking_fnSetTimeFormat,
817 IMediaSeeking_fnGetDuration,
818 IMediaSeeking_fnGetStopPosition,
819 IMediaSeeking_fnGetCurrentPosition,
820 IMediaSeeking_fnConvertTimeFormat,
821 IMediaSeeking_fnSetPositions,
822 IMediaSeeking_fnGetPositions,
823 IMediaSeeking_fnGetAvailable,
824 IMediaSeeking_fnSetRate,
825 IMediaSeeking_fnGetRate,
826 IMediaSeeking_fnGetPreroll,
831 HRESULT CPassThruImpl_InitIMediaSeeking( CPassThruImpl* pImpl )
833 TRACE("(%p)\n",pImpl);
834 ICOM_VTBL(&pImpl->mseek) = &imseek;
836 return NOERROR;
839 void CPassThruImpl_UninitIMediaSeeking( CPassThruImpl* pImpl )
841 TRACE("(%p)\n",pImpl);
844 #undef QUERYSEEKPASS