Commit 48b475ad authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Remove several unused callbacks.

parent ca5a068a
......@@ -55,27 +55,11 @@ static void null_renderer_destroy(BaseRenderer *iface)
CoTaskMemFree(filter);
}
static const BaseRendererFuncTable RendererFuncTable = {
NullRenderer_CheckMediaType,
NullRenderer_DoRenderSample,
/**/
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
/**/
NULL,
NULL,
NULL,
NULL,
NULL,
null_renderer_destroy,
static const BaseRendererFuncTable RendererFuncTable =
{
.pfnCheckMediaType = NullRenderer_CheckMediaType,
.pfnDoRenderSample = NullRenderer_DoRenderSample,
.renderer_destroy = null_renderer_destroy,
};
static const IBaseFilterVtbl NullRenderer_Vtbl =
......
......@@ -601,28 +601,20 @@ static HRESULT dsound_render_query_interface(BaseRenderer *iface, REFIID iid, vo
return S_OK;
}
static const BaseRendererFuncTable BaseFuncTable = {
DSoundRender_CheckMediaType,
DSoundRender_DoRenderSample,
/**/
NULL,
NULL,
NULL,
DSoundRender_OnStartStreaming,
DSoundRender_OnStopStreaming,
NULL,
NULL,
NULL,
DSoundRender_ShouldDrawSampleNow,
DSoundRender_PrepareReceive,
/**/
DSoundRender_CompleteConnect,
DSoundRender_BreakConnect,
DSoundRender_EndOfStream,
NULL,
DSoundRender_EndFlush,
dsound_render_destroy,
dsound_render_query_interface,
static const BaseRendererFuncTable BaseFuncTable =
{
.pfnCheckMediaType = DSoundRender_CheckMediaType,
.pfnDoRenderSample = DSoundRender_DoRenderSample,
.pfnOnStartStreaming = DSoundRender_OnStartStreaming,
.pfnOnStopStreaming = DSoundRender_OnStopStreaming,
.pfnShouldDrawSampleNow = DSoundRender_ShouldDrawSampleNow,
.pfnPrepareReceive = DSoundRender_PrepareReceive,
.pfnCompleteConnect = DSoundRender_CompleteConnect,
.pfnBreakConnect = DSoundRender_BreakConnect,
.pfnEndOfStream = DSoundRender_EndOfStream,
.pfnEndFlush = DSoundRender_EndFlush,
.renderer_destroy = dsound_render_destroy,
.renderer_query_interface = dsound_render_query_interface,
};
HRESULT DSoundRender_create(IUnknown *outer, void **out)
......
......@@ -469,28 +469,16 @@ static BOOL WINAPI VideoRenderer_OnSize(BaseWindow *iface, LONG Width, LONG Heig
return BaseWindowImpl_OnSize(iface, Width, Height);
}
static const BaseRendererFuncTable BaseFuncTable = {
VideoRenderer_CheckMediaType,
VideoRenderer_DoRenderSample,
/**/
NULL,
NULL,
NULL,
VideoRenderer_OnStartStreaming,
VideoRenderer_OnStopStreaming,
NULL,
NULL,
NULL,
VideoRenderer_ShouldDrawSampleNow,
NULL,
/**/
NULL,
NULL,
NULL,
NULL,
VideoRenderer_EndFlush,
video_renderer_destroy,
video_renderer_query_interface,
static const BaseRendererFuncTable BaseFuncTable =
{
.pfnCheckMediaType = VideoRenderer_CheckMediaType,
.pfnDoRenderSample = VideoRenderer_DoRenderSample,
.pfnOnStartStreaming = VideoRenderer_OnStartStreaming,
.pfnOnStopStreaming = VideoRenderer_OnStopStreaming,
.pfnShouldDrawSampleNow = VideoRenderer_ShouldDrawSampleNow,
.pfnEndFlush = VideoRenderer_EndFlush,
.renderer_destroy = video_renderer_destroy,
.renderer_query_interface = video_renderer_query_interface,
};
static const BaseWindowFuncTable renderer_BaseWindowFuncTable = {
......
......@@ -558,28 +558,17 @@ static HRESULT vmr_query_interface(BaseRenderer *iface, REFIID iid, void **out)
return S_OK;
}
static const BaseRendererFuncTable BaseFuncTable = {
VMR9_CheckMediaType,
VMR9_DoRenderSample,
/**/
NULL,
NULL,
NULL,
VMR9_OnStartStreaming,
VMR9_OnStopStreaming,
NULL,
NULL,
NULL,
VMR9_ShouldDrawSampleNow,
NULL,
/**/
VMR9_CompleteConnect,
VMR9_BreakConnect,
NULL,
NULL,
NULL,
vmr_destroy,
vmr_query_interface,
static const BaseRendererFuncTable BaseFuncTable =
{
.pfnCheckMediaType = VMR9_CheckMediaType,
.pfnDoRenderSample = VMR9_DoRenderSample,
.pfnOnStartStreaming = VMR9_OnStartStreaming,
.pfnOnStopStreaming = VMR9_OnStopStreaming,
.pfnShouldDrawSampleNow = VMR9_ShouldDrawSampleNow,
.pfnCompleteConnect = VMR9_CompleteConnect,
.pfnBreakConnect = VMR9_BreakConnect,
.renderer_destroy = vmr_destroy,
.renderer_query_interface = vmr_query_interface,
};
static LPWSTR WINAPI VMR9_GetClassWindowStyles(BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx)
......
......@@ -117,12 +117,7 @@ static HRESULT WINAPI BaseRenderer_InputPin_BeginFlush(IPin * iface)
EnterCriticalSection(&pFilter->filter.csFilter);
hr = BaseInputPinImpl_BeginFlush(iface);
if (SUCCEEDED(hr))
{
if (pFilter->pFuncsTable->pfnBeginFlush)
hr = pFilter->pFuncsTable->pfnBeginFlush(pFilter);
else
hr = BaseRendererImpl_BeginFlush(pFilter);
}
hr = BaseRendererImpl_BeginFlush(pFilter);
LeaveCriticalSection(&pFilter->filter.csFilter);
LeaveCriticalSection(&pFilter->csRenderLock);
return hr;
......@@ -334,17 +329,9 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
return hr;
}
if (This->pFuncsTable->pfnPrepareRender)
This->pFuncsTable->pfnPrepareRender(This);
EnterCriticalSection(&This->csRenderLock);
if ( This->filter.state == State_Paused )
{
if (This->pFuncsTable->pfnOnReceiveFirstSample)
This->pFuncsTable->pfnOnReceiveFirstSample(This, pSample);
if (This->filter.state == State_Paused)
SetEvent(This->state_event);
}
/* Wait for render Time */
if (This->filter.pClock && SUCCEEDED(IMediaSample_GetTime(pSample, &start, &stop)))
......@@ -361,9 +348,6 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
REFERENCE_TIME now;
DWORD_PTR cookie;
if (This->pFuncsTable->pfnOnWaitStart)
This->pFuncsTable->pfnOnWaitStart(This);
IReferenceClock_GetTime(This->filter.pClock, &now);
if (now - This->filter.rtStreamStart - start <= -10000)
......@@ -380,9 +364,6 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
EnterCriticalSection(&This->csRenderLock);
}
if (This->pFuncsTable->pfnOnWaitEnd)
This->pFuncsTable->pfnOnWaitEnd(This);
}
else
{
......
......@@ -576,28 +576,18 @@ typedef HRESULT (WINAPI *BaseRenderer_BreakConnect) (BaseRenderer *This);
typedef HRESULT (WINAPI *BaseRenderer_CompleteConnect) (BaseRenderer *This, IPin *pReceivePin);
typedef struct BaseRendererFuncTable {
/* Required */
BaseRenderer_CheckMediaType pfnCheckMediaType;
BaseRenderer_DoRenderSample pfnDoRenderSample;
/* Optional, Data Handlers */
BaseRenderer_OnReceiveFirstSample pfnOnReceiveFirstSample;
BaseRenderer_OnRenderEnd pfnOnRenderEnd;
BaseRenderer_OnRenderStart pfnOnRenderStart;
BaseRenderer_OnStartStreaming pfnOnStartStreaming;
BaseRenderer_OnStopStreaming pfnOnStopStreaming;
BaseRenderer_OnWaitEnd pfnOnWaitEnd;
BaseRenderer_OnWaitStart pfnOnWaitStart;
BaseRenderer_PrepareRender pfnPrepareRender;
BaseRenderer_ShouldDrawSampleNow pfnShouldDrawSampleNow;
BaseRenderer_PrepareReceive pfnPrepareReceive;
/* Optional, Input Pin */
BaseRenderer_CompleteConnect pfnCompleteConnect;
BaseRenderer_BreakConnect pfnBreakConnect;
BaseRenderer_EndOfStream pfnEndOfStream;
BaseRenderer_BeginFlush pfnBeginFlush;
BaseRenderer_EndFlush pfnEndFlush;
void (*renderer_destroy)(BaseRenderer *iface);
HRESULT (*renderer_query_interface)(BaseRenderer *iface, REFIID iid, void **out);
BaseRenderer_CheckMediaType pfnCheckMediaType;
BaseRenderer_DoRenderSample pfnDoRenderSample;
BaseRenderer_OnStartStreaming pfnOnStartStreaming;
BaseRenderer_OnStopStreaming pfnOnStopStreaming;
BaseRenderer_ShouldDrawSampleNow pfnShouldDrawSampleNow;
BaseRenderer_PrepareReceive pfnPrepareReceive;
BaseRenderer_CompleteConnect pfnCompleteConnect;
BaseRenderer_BreakConnect pfnBreakConnect;
BaseRenderer_EndOfStream pfnEndOfStream;
BaseRenderer_EndFlush pfnEndFlush;
void (*renderer_destroy)(BaseRenderer *iface);
HRESULT (*renderer_query_interface)(BaseRenderer *iface, REFIID iid, void **out);
} BaseRendererFuncTable;
HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSample);
......
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