strmbase: Remove some no longer used callbacks.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-07-20 10:25:30 -05:00 committed by Alexandre Julliard
parent 9f467402df
commit af50b499cb
2 changed files with 27 additions and 73 deletions

View File

@ -194,7 +194,6 @@ static HRESULT sink_eos(struct strmbase_sink *iface)
struct strmbase_renderer *filter = impl_from_IPin(&iface->pin.IPin_iface);
IFilterGraph *graph = filter->filter.graph;
IMediaEventSink *event_sink;
HRESULT hr = S_OK;
EnterCriticalSection(&filter->csRenderLock);
@ -210,11 +209,8 @@ static HRESULT sink_eos(struct strmbase_sink *iface)
strmbase_passthrough_eos(&filter->passthrough);
SetEvent(filter->state_event);
if (filter->pFuncsTable->pfnEndOfStream)
hr = filter->pFuncsTable->pfnEndOfStream(filter);
LeaveCriticalSection(&filter->csRenderLock);
return hr;
return S_OK;
}
static HRESULT sink_begin_flush(struct strmbase_sink *iface)
@ -229,7 +225,6 @@ static HRESULT sink_begin_flush(struct strmbase_sink *iface)
static HRESULT sink_end_flush(struct strmbase_sink *iface)
{
struct strmbase_renderer *filter = impl_from_IPin(&iface->pin.IPin_iface);
HRESULT hr = S_OK;
EnterCriticalSection(&filter->csRenderLock);
@ -238,11 +233,8 @@ static HRESULT sink_end_flush(struct strmbase_sink *iface)
strmbase_passthrough_invalidate_time(&filter->passthrough);
ResetEvent(filter->flush_event);
if (filter->pFuncsTable->pfnEndFlush)
hr = filter->pFuncsTable->pfnEndFlush(filter);
LeaveCriticalSection(&filter->csRenderLock);
return hr;
return S_OK;
}
static const struct strmbase_sink_ops sink_ops =
@ -277,9 +269,9 @@ void strmbase_renderer_cleanup(struct strmbase_renderer *filter)
HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSample *pSample)
{
HRESULT hr = S_OK;
REFERENCE_TIME start, stop;
AM_MEDIA_TYPE *pmt;
HRESULT hr;
TRACE("(%p)->%p\n", This, pSample);
@ -301,35 +293,18 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa
DeleteMediaType(pmt);
}
if (This->pFuncsTable->pfnPrepareReceive)
hr = This->pFuncsTable->pfnPrepareReceive(This, pSample);
if (FAILED(hr))
{
if (hr == VFW_E_SAMPLE_REJECTED)
return S_OK;
else
return hr;
}
EnterCriticalSection(&This->csRenderLock);
if (This->filter.state == State_Paused)
SetEvent(This->state_event);
/* Wait for render Time */
if (This->filter.clock && SUCCEEDED(IMediaSample_GetTime(pSample, &start, &stop)))
{
hr = S_FALSE;
strmbase_passthrough_update_time(&This->passthrough, start);
if (This->pFuncsTable->pfnShouldDrawSampleNow)
hr = This->pFuncsTable->pfnShouldDrawSampleNow(This, pSample, &start, &stop);
if (hr == S_OK)
;/* Do not wait: drop through */
else if (hr == S_FALSE)
{
REFERENCE_TIME now;
DWORD_PTR cookie;
strmbase_passthrough_update_time(&This->passthrough, start);
IReferenceClock_GetTime(This->filter.clock, &now);
if (now - This->stream_start - start <= -10000)
@ -354,23 +329,12 @@ HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *This, IMediaSa
EnterCriticalSection(&This->csRenderLock);
}
}
else
{
LeaveCriticalSection(&This->csRenderLock);
/* Drop Sample */
return S_OK;
}
}
else
start = stop = -1;
if (SUCCEEDED(hr))
{
QualityControlRender_BeginRender(&This->qc, start, stop);
hr = This->pFuncsTable->pfnDoRenderSample(This, pSample);
QualityControlRender_EndRender(&This->qc);
}
QualityControlRender_DoQOS(&This->qc);
LeaveCriticalSection(&This->csRenderLock);

View File

@ -318,12 +318,6 @@ struct strmbase_renderer
typedef HRESULT (WINAPI *BaseRenderer_CheckMediaType)(struct strmbase_renderer *iface, const AM_MEDIA_TYPE *mt);
typedef HRESULT (WINAPI *BaseRenderer_DoRenderSample)(struct strmbase_renderer *iface, IMediaSample *sample);
typedef HRESULT (WINAPI *BaseRenderer_ShouldDrawSampleNow)(struct strmbase_renderer *iface,
IMediaSample *sample, REFERENCE_TIME *start, REFERENCE_TIME *end);
typedef HRESULT (WINAPI *BaseRenderer_PrepareReceive)(struct strmbase_renderer *iface, IMediaSample *sample);
typedef HRESULT (WINAPI *BaseRenderer_EndOfStream)(struct strmbase_renderer *iface);
typedef HRESULT (WINAPI *BaseRenderer_BeginFlush) (struct strmbase_renderer *iface);
typedef HRESULT (WINAPI *BaseRenderer_EndFlush) (struct strmbase_renderer *iface);
typedef HRESULT (WINAPI *BaseRenderer_BreakConnect) (struct strmbase_renderer *iface);
struct strmbase_renderer_ops
@ -333,12 +327,8 @@ struct strmbase_renderer_ops
void (*renderer_init_stream)(struct strmbase_renderer *iface);
void (*renderer_start_stream)(struct strmbase_renderer *iface);
void (*renderer_stop_stream)(struct strmbase_renderer *iface);
BaseRenderer_ShouldDrawSampleNow pfnShouldDrawSampleNow;
BaseRenderer_PrepareReceive pfnPrepareReceive;
HRESULT (*renderer_connect)(struct strmbase_renderer *iface, const AM_MEDIA_TYPE *mt);
BaseRenderer_BreakConnect pfnBreakConnect;
BaseRenderer_EndOfStream pfnEndOfStream;
BaseRenderer_EndFlush pfnEndFlush;
void (*renderer_destroy)(struct strmbase_renderer *iface);
HRESULT (*renderer_query_interface)(struct strmbase_renderer *iface, REFIID iid, void **out);
HRESULT (*renderer_pin_query_interface)(struct strmbase_renderer *iface, REFIID iid, void **out);