Commit 0791cfb0 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Add default implementations of filter state change methods.

parent 7fae37c0
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment