strmbase: Add default implementations of filter state change methods.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-06-21 22:35:38 -05:00 committed by Alexandre Julliard
parent 7fae37c0e1
commit 0791cfb096
2 changed files with 42 additions and 0 deletions

View File

@ -123,6 +123,45 @@ HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter * iface, CLSID * pClsid)
return S_OK;
}
HRESULT WINAPI BaseFilterImpl_Stop(IBaseFilter *iface)
{
BaseFilter *filter = impl_from_IBaseFilter(iface);
TRACE("iface %p.\n", iface);
EnterCriticalSection(&filter->csFilter);
filter->state = State_Stopped;
LeaveCriticalSection(&filter->csFilter);
return S_OK;
}
HRESULT WINAPI BaseFilterImpl_Pause(IBaseFilter *iface)
{
BaseFilter *filter = impl_from_IBaseFilter(iface);
TRACE("iface %p.\n", iface);
EnterCriticalSection(&filter->csFilter);
filter->state = State_Paused;
LeaveCriticalSection(&filter->csFilter);
return S_OK;
}
HRESULT WINAPI BaseFilterImpl_Run(IBaseFilter *iface, REFERENCE_TIME start)
{
BaseFilter *filter = impl_from_IBaseFilter(iface);
TRACE("iface %p, start %s.\n", iface, wine_dbgstr_longlong(start));
EnterCriticalSection(&filter->csFilter);
filter->state = State_Running;
LeaveCriticalSection(&filter->csFilter);
return S_OK;
}
HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState )
{
BaseFilter *This = impl_from_IBaseFilter(iface);

View File

@ -184,6 +184,9 @@ typedef struct BaseFilterFuncTable
HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv);
ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter * iface);
ULONG WINAPI BaseFilterImpl_Release(IBaseFilter * iface);
HRESULT WINAPI BaseFilterImpl_Stop(IBaseFilter *iface);
HRESULT WINAPI BaseFilterImpl_Pause(IBaseFilter *iface);
HRESULT WINAPI BaseFilterImpl_Run(IBaseFilter *iface, REFERENCE_TIME start);
HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter * iface, CLSID * pClsid);
HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState );
HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock);