diff --git a/dlls/strmbase/filter.c b/dlls/strmbase/filter.c index 5f57731b7a1..9ed588cf803 100644 --- a/dlls/strmbase/filter.c +++ b/dlls/strmbase/filter.c @@ -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); diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 8de92b2826b..6abd8c76011 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -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);