mirror of
https://github.com/reactos/wine.git
synced 2024-11-24 12:20:07 +00:00
quartz: Implemented a number of the MediaPosition methods.
This commit is contained in:
parent
be21b3dfa7
commit
a3fbb39299
@ -2557,28 +2557,33 @@ static const IMediaSeekingVtbl IMediaSeeking_VTable =
|
||||
MediaSeeking_GetPreroll
|
||||
};
|
||||
|
||||
static inline IFilterGraphImpl *impl_from_IMediaPosition( IMediaPosition *iface )
|
||||
{
|
||||
return (IFilterGraphImpl *)((char*)iface - FIELD_OFFSET(IFilterGraphImpl, IMediaPosition_vtbl));
|
||||
}
|
||||
|
||||
/*** IUnknown methods ***/
|
||||
static HRESULT WINAPI MediaPosition_QueryInterface(IMediaPosition* iface, REFIID riid, void** ppvObj){
|
||||
ICOM_THIS_MULTI(IFilterGraphImpl, IMediaPosition_vtbl, iface);
|
||||
static HRESULT WINAPI MediaPosition_QueryInterface(IMediaPosition* iface, REFIID riid, void** ppvObj)
|
||||
{
|
||||
IFilterGraphImpl *This = impl_from_IMediaPosition( iface );
|
||||
|
||||
TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
|
||||
|
||||
return Filtergraph_QueryInterface(This, riid, ppvObj);
|
||||
}
|
||||
|
||||
static ULONG WINAPI MediaPosition_AddRef(IMediaPosition *iface){
|
||||
ICOM_THIS_MULTI(IFilterGraphImpl, IMediaPosition_vtbl, iface);
|
||||
static ULONG WINAPI MediaPosition_AddRef(IMediaPosition *iface)
|
||||
{
|
||||
IFilterGraphImpl *This = impl_from_IMediaPosition( iface );
|
||||
|
||||
TRACE("(%p/%p)->()\n", This, iface);
|
||||
|
||||
return Filtergraph_AddRef(This);
|
||||
}
|
||||
|
||||
static ULONG WINAPI MediaPosition_Release(IMediaPosition *iface){
|
||||
ICOM_THIS_MULTI(IFilterGraphImpl, IMediaPosition_vtbl, iface);
|
||||
static ULONG WINAPI MediaPosition_Release(IMediaPosition *iface)
|
||||
{
|
||||
IFilterGraphImpl *This = impl_from_IMediaPosition( iface );
|
||||
|
||||
TRACE("(%p/%p)->()\n", This, iface);
|
||||
|
||||
return Filtergraph_Release(This);
|
||||
}
|
||||
|
||||
@ -2604,31 +2609,51 @@ static HRESULT WINAPI MediaPosition_Invoke(IMediaPosition* iface, DISPID dispIdM
|
||||
}
|
||||
|
||||
/*** IMediaPosition methods ***/
|
||||
static HRESULT WINAPI MediaPosition_get_Duration(IMediaPosition * iface, REFTIME *plength){
|
||||
FIXME("(%p)->(%p) stub!\n", iface, plength);
|
||||
return E_NOTIMPL;
|
||||
static HRESULT WINAPI MediaPosition_get_Duration(IMediaPosition * iface, REFTIME *plength)
|
||||
{
|
||||
LONGLONG duration;
|
||||
IFilterGraphImpl *This = impl_from_IMediaPosition( iface );
|
||||
HRESULT hr = IMediaSeeking_GetDuration( (IMediaSeeking *)&This->IMediaSeeking_vtbl, &duration );
|
||||
if (SUCCEEDED(hr)) *plength = duration;
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MediaPosition_put_CurrentPosition(IMediaPosition * iface, REFTIME llTime){
|
||||
ICOM_THIS_MULTI(IFilterGraphImpl, IMediaPosition_vtbl, iface);
|
||||
static HRESULT WINAPI MediaPosition_put_CurrentPosition(IMediaPosition * iface, REFTIME llTime)
|
||||
{
|
||||
IFilterGraphImpl *This = impl_from_IMediaPosition( iface );
|
||||
LONGLONG reftime = llTime;
|
||||
|
||||
return IMediaSeeking_SetPositions((IMediaSeeking *)&This->IMediaSeeking_vtbl, &reftime, AM_SEEKING_AbsolutePositioning, NULL, AM_SEEKING_NoPositioning);
|
||||
return IMediaSeeking_SetPositions((IMediaSeeking *)&This->IMediaSeeking_vtbl,
|
||||
&reftime, AM_SEEKING_AbsolutePositioning,
|
||||
NULL, AM_SEEKING_NoPositioning);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MediaPosition_get_CurrentPosition(IMediaPosition * iface, REFTIME *pllTime){
|
||||
FIXME("(%p)->(%p) stub!\n", iface, pllTime);
|
||||
return E_NOTIMPL;
|
||||
static HRESULT WINAPI MediaPosition_get_CurrentPosition(IMediaPosition * iface, REFTIME *pllTime)
|
||||
{
|
||||
IFilterGraphImpl *This = impl_from_IMediaPosition( iface );
|
||||
LONGLONG pos;
|
||||
HRESULT hr = IMediaSeeking_GetCurrentPosition( (IMediaSeeking *)&This->IMediaSeeking_vtbl, &pos );
|
||||
if (SUCCEEDED(hr)) *pllTime = pos;
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MediaPosition_get_StopTime(IMediaPosition * iface, REFTIME *pllTime){
|
||||
FIXME("(%p)->(%p) stub!\n", iface, pllTime);
|
||||
return E_NOTIMPL;
|
||||
static HRESULT WINAPI MediaPosition_get_StopTime(IMediaPosition * iface, REFTIME *pllTime)
|
||||
{
|
||||
IFilterGraphImpl *This = impl_from_IMediaPosition( iface );
|
||||
LONGLONG pos;
|
||||
HRESULT hr = IMediaSeeking_GetStopPosition( (IMediaSeeking *)&This->IMediaSeeking_vtbl, &pos );
|
||||
if (SUCCEEDED(hr)) *pllTime = pos;
|
||||
return hr;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MediaPosition_put_StopTime(IMediaPosition * iface, REFTIME llTime){
|
||||
FIXME("(%p)->(%f) stub!\n", iface, llTime);
|
||||
return E_NOTIMPL;
|
||||
static HRESULT WINAPI MediaPosition_put_StopTime(IMediaPosition * iface, REFTIME llTime)
|
||||
{
|
||||
IFilterGraphImpl *This = impl_from_IMediaPosition( iface );
|
||||
LONGLONG reftime = llTime;
|
||||
|
||||
return IMediaSeeking_SetPositions((IMediaSeeking *)&This->IMediaSeeking_vtbl,
|
||||
NULL, AM_SEEKING_NoPositioning,
|
||||
&reftime, AM_SEEKING_AbsolutePositioning);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MediaPosition_get_PrerollTime(IMediaPosition * iface, REFTIME *pllTime){
|
||||
@ -2641,14 +2666,16 @@ static HRESULT WINAPI MediaPosition_put_PrerollTime(IMediaPosition * iface, REFT
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MediaPosition_put_Rate(IMediaPosition * iface, double dRate){
|
||||
FIXME("(%p)->(%f) stub!\n", iface, dRate);
|
||||
return E_NOTIMPL;
|
||||
static HRESULT WINAPI MediaPosition_put_Rate(IMediaPosition * iface, double dRate)
|
||||
{
|
||||
IFilterGraphImpl *This = impl_from_IMediaPosition( iface );
|
||||
return IMediaSeeking_SetRate((IMediaSeeking *)&This->IMediaSeeking_vtbl, dRate);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MediaPosition_get_Rate(IMediaPosition * iface, double *pdRate){
|
||||
FIXME("(%p)->(%p) stub!\n", iface, pdRate);
|
||||
return E_NOTIMPL;
|
||||
static HRESULT WINAPI MediaPosition_get_Rate(IMediaPosition * iface, double *pdRate)
|
||||
{
|
||||
IFilterGraphImpl *This = impl_from_IMediaPosition( iface );
|
||||
return IMediaSeeking_GetRate((IMediaSeeking *)&This->IMediaSeeking_vtbl, pdRate);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI MediaPosition_CanSeekForward(IMediaPosition * iface, LONG *pCanSeekForward){
|
||||
|
Loading…
Reference in New Issue
Block a user