strmbase: Remove several unused callbacks.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ca5a068a7b
commit
48b475ad00
|
@ -55,27 +55,11 @@ static void null_renderer_destroy(BaseRenderer *iface)
|
||||||
CoTaskMemFree(filter);
|
CoTaskMemFree(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const BaseRendererFuncTable RendererFuncTable = {
|
static const BaseRendererFuncTable RendererFuncTable =
|
||||||
NullRenderer_CheckMediaType,
|
{
|
||||||
NullRenderer_DoRenderSample,
|
.pfnCheckMediaType = NullRenderer_CheckMediaType,
|
||||||
/**/
|
.pfnDoRenderSample = NullRenderer_DoRenderSample,
|
||||||
NULL,
|
.renderer_destroy = null_renderer_destroy,
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
/**/
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
null_renderer_destroy,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const IBaseFilterVtbl NullRenderer_Vtbl =
|
static const IBaseFilterVtbl NullRenderer_Vtbl =
|
||||||
|
|
|
@ -601,28 +601,20 @@ static HRESULT dsound_render_query_interface(BaseRenderer *iface, REFIID iid, vo
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const BaseRendererFuncTable BaseFuncTable = {
|
static const BaseRendererFuncTable BaseFuncTable =
|
||||||
DSoundRender_CheckMediaType,
|
{
|
||||||
DSoundRender_DoRenderSample,
|
.pfnCheckMediaType = DSoundRender_CheckMediaType,
|
||||||
/**/
|
.pfnDoRenderSample = DSoundRender_DoRenderSample,
|
||||||
NULL,
|
.pfnOnStartStreaming = DSoundRender_OnStartStreaming,
|
||||||
NULL,
|
.pfnOnStopStreaming = DSoundRender_OnStopStreaming,
|
||||||
NULL,
|
.pfnShouldDrawSampleNow = DSoundRender_ShouldDrawSampleNow,
|
||||||
DSoundRender_OnStartStreaming,
|
.pfnPrepareReceive = DSoundRender_PrepareReceive,
|
||||||
DSoundRender_OnStopStreaming,
|
.pfnCompleteConnect = DSoundRender_CompleteConnect,
|
||||||
NULL,
|
.pfnBreakConnect = DSoundRender_BreakConnect,
|
||||||
NULL,
|
.pfnEndOfStream = DSoundRender_EndOfStream,
|
||||||
NULL,
|
.pfnEndFlush = DSoundRender_EndFlush,
|
||||||
DSoundRender_ShouldDrawSampleNow,
|
.renderer_destroy = dsound_render_destroy,
|
||||||
DSoundRender_PrepareReceive,
|
.renderer_query_interface = dsound_render_query_interface,
|
||||||
/**/
|
|
||||||
DSoundRender_CompleteConnect,
|
|
||||||
DSoundRender_BreakConnect,
|
|
||||||
DSoundRender_EndOfStream,
|
|
||||||
NULL,
|
|
||||||
DSoundRender_EndFlush,
|
|
||||||
dsound_render_destroy,
|
|
||||||
dsound_render_query_interface,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
HRESULT DSoundRender_create(IUnknown *outer, void **out)
|
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);
|
return BaseWindowImpl_OnSize(iface, Width, Height);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const BaseRendererFuncTable BaseFuncTable = {
|
static const BaseRendererFuncTable BaseFuncTable =
|
||||||
VideoRenderer_CheckMediaType,
|
{
|
||||||
VideoRenderer_DoRenderSample,
|
.pfnCheckMediaType = VideoRenderer_CheckMediaType,
|
||||||
/**/
|
.pfnDoRenderSample = VideoRenderer_DoRenderSample,
|
||||||
NULL,
|
.pfnOnStartStreaming = VideoRenderer_OnStartStreaming,
|
||||||
NULL,
|
.pfnOnStopStreaming = VideoRenderer_OnStopStreaming,
|
||||||
NULL,
|
.pfnShouldDrawSampleNow = VideoRenderer_ShouldDrawSampleNow,
|
||||||
VideoRenderer_OnStartStreaming,
|
.pfnEndFlush = VideoRenderer_EndFlush,
|
||||||
VideoRenderer_OnStopStreaming,
|
.renderer_destroy = video_renderer_destroy,
|
||||||
NULL,
|
.renderer_query_interface = video_renderer_query_interface,
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
VideoRenderer_ShouldDrawSampleNow,
|
|
||||||
NULL,
|
|
||||||
/**/
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
VideoRenderer_EndFlush,
|
|
||||||
video_renderer_destroy,
|
|
||||||
video_renderer_query_interface,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const BaseWindowFuncTable renderer_BaseWindowFuncTable = {
|
static const BaseWindowFuncTable renderer_BaseWindowFuncTable = {
|
||||||
|
|
|
@ -558,28 +558,17 @@ static HRESULT vmr_query_interface(BaseRenderer *iface, REFIID iid, void **out)
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const BaseRendererFuncTable BaseFuncTable = {
|
static const BaseRendererFuncTable BaseFuncTable =
|
||||||
VMR9_CheckMediaType,
|
{
|
||||||
VMR9_DoRenderSample,
|
.pfnCheckMediaType = VMR9_CheckMediaType,
|
||||||
/**/
|
.pfnDoRenderSample = VMR9_DoRenderSample,
|
||||||
NULL,
|
.pfnOnStartStreaming = VMR9_OnStartStreaming,
|
||||||
NULL,
|
.pfnOnStopStreaming = VMR9_OnStopStreaming,
|
||||||
NULL,
|
.pfnShouldDrawSampleNow = VMR9_ShouldDrawSampleNow,
|
||||||
VMR9_OnStartStreaming,
|
.pfnCompleteConnect = VMR9_CompleteConnect,
|
||||||
VMR9_OnStopStreaming,
|
.pfnBreakConnect = VMR9_BreakConnect,
|
||||||
NULL,
|
.renderer_destroy = vmr_destroy,
|
||||||
NULL,
|
.renderer_query_interface = vmr_query_interface,
|
||||||
NULL,
|
|
||||||
VMR9_ShouldDrawSampleNow,
|
|
||||||
NULL,
|
|
||||||
/**/
|
|
||||||
VMR9_CompleteConnect,
|
|
||||||
VMR9_BreakConnect,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
NULL,
|
|
||||||
vmr_destroy,
|
|
||||||
vmr_query_interface,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static LPWSTR WINAPI VMR9_GetClassWindowStyles(BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx)
|
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);
|
EnterCriticalSection(&pFilter->filter.csFilter);
|
||||||
hr = BaseInputPinImpl_BeginFlush(iface);
|
hr = BaseInputPinImpl_BeginFlush(iface);
|
||||||
if (SUCCEEDED(hr))
|
if (SUCCEEDED(hr))
|
||||||
{
|
hr = BaseRendererImpl_BeginFlush(pFilter);
|
||||||
if (pFilter->pFuncsTable->pfnBeginFlush)
|
|
||||||
hr = pFilter->pFuncsTable->pfnBeginFlush(pFilter);
|
|
||||||
else
|
|
||||||
hr = BaseRendererImpl_BeginFlush(pFilter);
|
|
||||||
}
|
|
||||||
LeaveCriticalSection(&pFilter->filter.csFilter);
|
LeaveCriticalSection(&pFilter->filter.csFilter);
|
||||||
LeaveCriticalSection(&pFilter->csRenderLock);
|
LeaveCriticalSection(&pFilter->csRenderLock);
|
||||||
return hr;
|
return hr;
|
||||||
|
@ -334,17 +329,9 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (This->pFuncsTable->pfnPrepareRender)
|
|
||||||
This->pFuncsTable->pfnPrepareRender(This);
|
|
||||||
|
|
||||||
EnterCriticalSection(&This->csRenderLock);
|
EnterCriticalSection(&This->csRenderLock);
|
||||||
if ( This->filter.state == State_Paused )
|
if (This->filter.state == State_Paused)
|
||||||
{
|
|
||||||
if (This->pFuncsTable->pfnOnReceiveFirstSample)
|
|
||||||
This->pFuncsTable->pfnOnReceiveFirstSample(This, pSample);
|
|
||||||
|
|
||||||
SetEvent(This->state_event);
|
SetEvent(This->state_event);
|
||||||
}
|
|
||||||
|
|
||||||
/* Wait for render Time */
|
/* Wait for render Time */
|
||||||
if (This->filter.pClock && SUCCEEDED(IMediaSample_GetTime(pSample, &start, &stop)))
|
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;
|
REFERENCE_TIME now;
|
||||||
DWORD_PTR cookie;
|
DWORD_PTR cookie;
|
||||||
|
|
||||||
if (This->pFuncsTable->pfnOnWaitStart)
|
|
||||||
This->pFuncsTable->pfnOnWaitStart(This);
|
|
||||||
|
|
||||||
IReferenceClock_GetTime(This->filter.pClock, &now);
|
IReferenceClock_GetTime(This->filter.pClock, &now);
|
||||||
|
|
||||||
if (now - This->filter.rtStreamStart - start <= -10000)
|
if (now - This->filter.rtStreamStart - start <= -10000)
|
||||||
|
@ -380,9 +364,6 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
|
||||||
|
|
||||||
EnterCriticalSection(&This->csRenderLock);
|
EnterCriticalSection(&This->csRenderLock);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (This->pFuncsTable->pfnOnWaitEnd)
|
|
||||||
This->pFuncsTable->pfnOnWaitEnd(This);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -576,28 +576,18 @@ typedef HRESULT (WINAPI *BaseRenderer_BreakConnect) (BaseRenderer *This);
|
||||||
typedef HRESULT (WINAPI *BaseRenderer_CompleteConnect) (BaseRenderer *This, IPin *pReceivePin);
|
typedef HRESULT (WINAPI *BaseRenderer_CompleteConnect) (BaseRenderer *This, IPin *pReceivePin);
|
||||||
|
|
||||||
typedef struct BaseRendererFuncTable {
|
typedef struct BaseRendererFuncTable {
|
||||||
/* Required */
|
BaseRenderer_CheckMediaType pfnCheckMediaType;
|
||||||
BaseRenderer_CheckMediaType pfnCheckMediaType;
|
BaseRenderer_DoRenderSample pfnDoRenderSample;
|
||||||
BaseRenderer_DoRenderSample pfnDoRenderSample;
|
BaseRenderer_OnStartStreaming pfnOnStartStreaming;
|
||||||
/* Optional, Data Handlers */
|
BaseRenderer_OnStopStreaming pfnOnStopStreaming;
|
||||||
BaseRenderer_OnReceiveFirstSample pfnOnReceiveFirstSample;
|
BaseRenderer_ShouldDrawSampleNow pfnShouldDrawSampleNow;
|
||||||
BaseRenderer_OnRenderEnd pfnOnRenderEnd;
|
BaseRenderer_PrepareReceive pfnPrepareReceive;
|
||||||
BaseRenderer_OnRenderStart pfnOnRenderStart;
|
BaseRenderer_CompleteConnect pfnCompleteConnect;
|
||||||
BaseRenderer_OnStartStreaming pfnOnStartStreaming;
|
BaseRenderer_BreakConnect pfnBreakConnect;
|
||||||
BaseRenderer_OnStopStreaming pfnOnStopStreaming;
|
BaseRenderer_EndOfStream pfnEndOfStream;
|
||||||
BaseRenderer_OnWaitEnd pfnOnWaitEnd;
|
BaseRenderer_EndFlush pfnEndFlush;
|
||||||
BaseRenderer_OnWaitStart pfnOnWaitStart;
|
void (*renderer_destroy)(BaseRenderer *iface);
|
||||||
BaseRenderer_PrepareRender pfnPrepareRender;
|
HRESULT (*renderer_query_interface)(BaseRenderer *iface, REFIID iid, void **out);
|
||||||
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);
|
|
||||||
} BaseRendererFuncTable;
|
} BaseRendererFuncTable;
|
||||||
|
|
||||||
HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSample);
|
HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSample);
|
||||||
|
|
Loading…
Reference in New Issue