Commit 4d221c31 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Get rid of BaseRendererImpl_EndOfStream().

parent dc8bd459
......@@ -500,20 +500,7 @@ static HRESULT WINAPI DSoundRender_BreakConnect(struct strmbase_renderer *iface)
static HRESULT WINAPI DSoundRender_EndOfStream(struct strmbase_renderer *iface)
{
DSoundRenderImpl *This = impl_from_strmbase_renderer(iface);
HRESULT hr;
TRACE("(%p)->()\n",iface);
hr = BaseRendererImpl_EndOfStream(iface);
if (hr != S_OK)
{
ERR("%08x\n", hr);
return hr;
}
hr = DSoundRender_HandleEndOfStream(This);
return hr;
return DSoundRender_HandleEndOfStream(This);
}
static HRESULT WINAPI DSoundRender_EndFlush(struct strmbase_renderer *iface)
......
......@@ -82,18 +82,29 @@ static HRESULT WINAPI BaseRenderer_InputPin_Disconnect(IPin * iface)
static HRESULT WINAPI BaseRenderer_InputPin_EndOfStream(IPin * iface)
{
struct strmbase_renderer *pFilter = impl_from_IPin(iface);
HRESULT hr;
struct strmbase_renderer *filter = impl_from_IPin(iface);
IFilterGraph *graph = filter->filter.filterInfo.pGraph;
IMediaEventSink *event_sink;
HRESULT hr = S_OK;
TRACE("iface %p.\n", iface);
EnterCriticalSection(&pFilter->csRenderLock);
pFilter->eos = TRUE;
if (pFilter->pFuncsTable->pfnEndOfStream)
hr = pFilter->pFuncsTable->pfnEndOfStream(pFilter);
else
hr = BaseRendererImpl_EndOfStream(pFilter);
LeaveCriticalSection(&pFilter->csRenderLock);
EnterCriticalSection(&filter->csRenderLock);
filter->eos = TRUE;
if (graph && SUCCEEDED(IFilterGraph_QueryInterface(graph,
&IID_IMediaEventSink, (void **)&event_sink)))
{
IMediaEventSink_Notify(event_sink, EC_COMPLETE, S_OK,
(LONG_PTR)&filter->filter.IBaseFilter_iface);
IMediaEventSink_Release(event_sink);
}
RendererPosPassThru_EOS(filter->pPosition);
SetEvent(filter->state_event);
if (filter->pFuncsTable->pfnEndOfStream)
hr = filter->pFuncsTable->pfnEndOfStream(filter);
LeaveCriticalSection(&filter->csRenderLock);
return hr;
}
......@@ -458,29 +469,6 @@ static const IBaseFilterVtbl strmbase_renderer_vtbl =
BaseFilterImpl_QueryVendorInfo
};
HRESULT WINAPI BaseRendererImpl_EndOfStream(struct strmbase_renderer *iface)
{
IMediaEventSink* pEventSink;
IFilterGraph *graph;
HRESULT hr = S_OK;
TRACE("(%p)\n", iface);
graph = iface->filter.filterInfo.pGraph;
if (graph)
{ hr = IFilterGraph_QueryInterface(iface->filter.filterInfo.pGraph, &IID_IMediaEventSink, (LPVOID*)&pEventSink);
if (SUCCEEDED(hr))
{
hr = IMediaEventSink_Notify(pEventSink, EC_COMPLETE, S_OK, (LONG_PTR)iface);
IMediaEventSink_Release(pEventSink);
}
}
RendererPosPassThru_EOS(iface->pPosition);
SetEvent(iface->state_event);
return hr;
}
HRESULT WINAPI BaseRendererImpl_ClearPendingSample(struct strmbase_renderer *iface)
{
if (iface->pMediaSample)
......
......@@ -568,7 +568,6 @@ struct strmbase_renderer_ops
};
HRESULT WINAPI BaseRendererImpl_ClearPendingSample(struct strmbase_renderer *filter);
HRESULT WINAPI BaseRendererImpl_EndOfStream(struct strmbase_renderer *filter);
HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *filter, IMediaSample *sample);
HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer,
......
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