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

strmbase: Get rid of the "vtbl" parameter to strmbase_renderer_init().

parent 601142bd
...@@ -36,25 +36,6 @@ typedef struct ...@@ -36,25 +36,6 @@ typedef struct
BaseRenderer renderer; BaseRenderer renderer;
} evr_filter; } evr_filter;
static const IBaseFilterVtbl basefilter_vtbl =
{
BaseFilterImpl_QueryInterface,
BaseFilterImpl_AddRef,
BaseFilterImpl_Release,
BaseFilterImpl_GetClassID,
BaseRendererImpl_Stop,
BaseRendererImpl_Pause,
BaseRendererImpl_Run,
BaseRendererImpl_GetState,
BaseRendererImpl_SetSyncSource,
BaseFilterImpl_GetSyncSource,
BaseFilterImpl_EnumPins,
BaseFilterImpl_FindPin,
BaseFilterImpl_QueryFilterInfo,
BaseFilterImpl_JoinFilterGraph,
BaseFilterImpl_QueryVendorInfo
};
static inline evr_filter *impl_from_BaseRenderer(BaseRenderer *iface) static inline evr_filter *impl_from_BaseRenderer(BaseRenderer *iface)
{ {
return CONTAINING_RECORD(iface, evr_filter, renderer); return CONTAINING_RECORD(iface, evr_filter, renderer);
...@@ -98,7 +79,7 @@ HRESULT evr_filter_create(IUnknown *outer, void **out) ...@@ -98,7 +79,7 @@ HRESULT evr_filter_create(IUnknown *outer, void **out)
if (!object) if (!object)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
strmbase_renderer_init(&object->renderer, &basefilter_vtbl, outer, strmbase_renderer_init(&object->renderer, outer,
&CLSID_EnhancedVideoRenderer, sink_name, &renderer_ops); &CLSID_EnhancedVideoRenderer, sink_name, &renderer_ops);
*out = &object->renderer.filter.IUnknown_inner; *out = &object->renderer.filter.IUnknown_inner;
......
...@@ -62,25 +62,6 @@ static const BaseRendererFuncTable RendererFuncTable = ...@@ -62,25 +62,6 @@ static const BaseRendererFuncTable RendererFuncTable =
.renderer_destroy = null_renderer_destroy, .renderer_destroy = null_renderer_destroy,
}; };
static const IBaseFilterVtbl NullRenderer_Vtbl =
{
BaseFilterImpl_QueryInterface,
BaseFilterImpl_AddRef,
BaseFilterImpl_Release,
BaseFilterImpl_GetClassID,
BaseRendererImpl_Stop,
BaseRendererImpl_Pause,
BaseRendererImpl_Run,
BaseRendererImpl_GetState,
BaseRendererImpl_SetSyncSource,
BaseFilterImpl_GetSyncSource,
BaseFilterImpl_EnumPins,
BaseFilterImpl_FindPin,
BaseFilterImpl_QueryFilterInfo,
BaseFilterImpl_JoinFilterGraph,
BaseFilterImpl_QueryVendorInfo
};
HRESULT NullRenderer_create(IUnknown *outer, void **out) HRESULT NullRenderer_create(IUnknown *outer, void **out)
{ {
static const WCHAR sink_name[] = {'I','n',0}; static const WCHAR sink_name[] = {'I','n',0};
...@@ -92,7 +73,7 @@ HRESULT NullRenderer_create(IUnknown *outer, void **out) ...@@ -92,7 +73,7 @@ HRESULT NullRenderer_create(IUnknown *outer, void **out)
pNullRenderer = CoTaskMemAlloc(sizeof(NullRendererImpl)); pNullRenderer = CoTaskMemAlloc(sizeof(NullRendererImpl));
hr = strmbase_renderer_init(&pNullRenderer->renderer, &NullRenderer_Vtbl, outer, hr = strmbase_renderer_init(&pNullRenderer->renderer, outer,
&CLSID_NullRenderer, sink_name, &RendererFuncTable); &CLSID_NullRenderer, sink_name, &RendererFuncTable);
if (FAILED(hr)) if (FAILED(hr))
......
...@@ -39,7 +39,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz); ...@@ -39,7 +39,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
*/ */
static const REFERENCE_TIME DSoundRenderer_Max_Fill = 150 * 10000; static const REFERENCE_TIME DSoundRenderer_Max_Fill = 150 * 10000;
static const IBaseFilterVtbl DSoundRender_Vtbl;
static const IBasicAudioVtbl IBasicAudio_Vtbl; static const IBasicAudioVtbl IBasicAudio_Vtbl;
static const IReferenceClockVtbl IReferenceClock_Vtbl; static const IReferenceClockVtbl IReferenceClock_Vtbl;
static const IAMDirectSoundVtbl IAMDirectSound_Vtbl; static const IAMDirectSoundVtbl IAMDirectSound_Vtbl;
...@@ -610,7 +609,7 @@ HRESULT DSoundRender_create(IUnknown *outer, void **out) ...@@ -610,7 +609,7 @@ HRESULT DSoundRender_create(IUnknown *outer, void **out)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
ZeroMemory(pDSoundRender, sizeof(DSoundRenderImpl)); ZeroMemory(pDSoundRender, sizeof(DSoundRenderImpl));
hr = strmbase_renderer_init(&pDSoundRender->renderer, &DSoundRender_Vtbl, hr = strmbase_renderer_init(&pDSoundRender->renderer,
outer, &CLSID_DSoundRender, sink_name, &BaseFuncTable); outer, &CLSID_DSoundRender, sink_name, &BaseFuncTable);
pDSoundRender->IBasicAudio_iface.lpVtbl = &IBasicAudio_Vtbl; pDSoundRender->IBasicAudio_iface.lpVtbl = &IBasicAudio_Vtbl;
...@@ -652,25 +651,6 @@ HRESULT DSoundRender_create(IUnknown *outer, void **out) ...@@ -652,25 +651,6 @@ HRESULT DSoundRender_create(IUnknown *outer, void **out)
return hr; return hr;
} }
static const IBaseFilterVtbl DSoundRender_Vtbl =
{
BaseFilterImpl_QueryInterface,
BaseFilterImpl_AddRef,
BaseFilterImpl_Release,
BaseFilterImpl_GetClassID,
BaseRendererImpl_Stop,
BaseRendererImpl_Pause,
BaseRendererImpl_Run,
BaseRendererImpl_GetState,
BaseRendererImpl_SetSyncSource,
BaseFilterImpl_GetSyncSource,
BaseFilterImpl_EnumPins,
BaseFilterImpl_FindPin,
BaseFilterImpl_QueryFilterInfo,
BaseFilterImpl_JoinFilterGraph,
BaseFilterImpl_QueryVendorInfo
};
/*** IUnknown methods ***/ /*** IUnknown methods ***/
static HRESULT WINAPI Basicaudio_QueryInterface(IBasicAudio *iface, static HRESULT WINAPI Basicaudio_QueryInterface(IBasicAudio *iface,
REFIID riid, REFIID riid,
......
...@@ -543,25 +543,6 @@ static const BaseControlVideoFuncTable renderer_BaseControlVideoFuncTable = { ...@@ -543,25 +543,6 @@ static const BaseControlVideoFuncTable renderer_BaseControlVideoFuncTable = {
VideoRenderer_SetTargetRect VideoRenderer_SetTargetRect
}; };
static const IBaseFilterVtbl VideoRenderer_Vtbl =
{
BaseFilterImpl_QueryInterface,
BaseFilterImpl_AddRef,
BaseFilterImpl_Release,
BaseFilterImpl_GetClassID,
BaseRendererImpl_Stop,
BaseRendererImpl_Pause,
BaseRendererImpl_Run,
BaseRendererImpl_GetState,
BaseRendererImpl_SetSyncSource,
BaseFilterImpl_GetSyncSource,
BaseFilterImpl_EnumPins,
BaseFilterImpl_FindPin,
BaseFilterImpl_QueryFilterInfo,
BaseFilterImpl_JoinFilterGraph,
BaseFilterImpl_QueryVendorInfo
};
static HRESULT WINAPI VideoWindow_get_FullScreenMode(IVideoWindow *iface, static HRESULT WINAPI VideoWindow_get_FullScreenMode(IVideoWindow *iface,
LONG *FullScreenMode) LONG *FullScreenMode)
{ {
...@@ -777,8 +758,8 @@ HRESULT VideoRenderer_create(IUnknown *outer, void **out) ...@@ -777,8 +758,8 @@ HRESULT VideoRenderer_create(IUnknown *outer, void **out)
pVideoRenderer->IOverlay_iface.lpVtbl = &overlay_vtbl; pVideoRenderer->IOverlay_iface.lpVtbl = &overlay_vtbl;
hr = strmbase_renderer_init(&pVideoRenderer->renderer, &VideoRenderer_Vtbl, hr = strmbase_renderer_init(&pVideoRenderer->renderer, outer,
outer, &CLSID_VideoRenderer, sink_name, &BaseFuncTable); &CLSID_VideoRenderer, sink_name, &BaseFuncTable);
if (FAILED(hr)) if (FAILED(hr))
goto fail; goto fail;
......
...@@ -758,25 +758,6 @@ static const BaseControlVideoFuncTable renderer_BaseControlVideoFuncTable = { ...@@ -758,25 +758,6 @@ static const BaseControlVideoFuncTable renderer_BaseControlVideoFuncTable = {
VMR9_SetTargetRect VMR9_SetTargetRect
}; };
static const IBaseFilterVtbl VMR_Vtbl =
{
BaseFilterImpl_QueryInterface,
BaseFilterImpl_AddRef,
BaseFilterImpl_Release,
BaseFilterImpl_GetClassID,
BaseRendererImpl_Stop,
BaseRendererImpl_Pause,
BaseRendererImpl_Run,
BaseRendererImpl_GetState,
BaseRendererImpl_SetSyncSource,
BaseFilterImpl_GetSyncSource,
BaseFilterImpl_EnumPins,
BaseFilterImpl_FindPin,
BaseFilterImpl_QueryFilterInfo,
BaseFilterImpl_JoinFilterGraph,
BaseFilterImpl_QueryVendorInfo
};
static const IVideoWindowVtbl IVideoWindow_VTable = static const IVideoWindowVtbl IVideoWindow_VTable =
{ {
BaseControlWindowImpl_QueryInterface, BaseControlWindowImpl_QueryInterface,
...@@ -2247,7 +2228,7 @@ static HRESULT vmr_create(IUnknown *outer, void **out, const CLSID *clsid) ...@@ -2247,7 +2228,7 @@ static HRESULT vmr_create(IUnknown *outer, void **out, const CLSID *clsid)
pVMR->IVMRWindowlessControl9_iface.lpVtbl = &VMR9_WindowlessControl_Vtbl; pVMR->IVMRWindowlessControl9_iface.lpVtbl = &VMR9_WindowlessControl_Vtbl;
pVMR->IOverlay_iface.lpVtbl = &overlay_vtbl; pVMR->IOverlay_iface.lpVtbl = &overlay_vtbl;
hr = strmbase_renderer_init(&pVMR->renderer, &VMR_Vtbl, outer, clsid, sink_name, &BaseFuncTable); hr = strmbase_renderer_init(&pVMR->renderer, outer, clsid, sink_name, &BaseFuncTable);
if (FAILED(hr)) if (FAILED(hr))
goto fail; goto fail;
......
...@@ -250,15 +250,15 @@ static const BaseInputPinFuncTable input_BaseInputFuncTable = ...@@ -250,15 +250,15 @@ static const BaseInputPinFuncTable input_BaseInputFuncTable =
.pfnReceive = BaseRenderer_Receive, .pfnReceive = BaseRenderer_Receive,
}; };
static const IBaseFilterVtbl strmbase_renderer_vtbl;
HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, const IBaseFilterVtbl *vtbl, HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, IUnknown *outer,
IUnknown *outer, const CLSID *clsid, const WCHAR *sink_name, const CLSID *clsid, const WCHAR *sink_name, const BaseRendererFuncTable *pBaseFuncsTable)
const BaseRendererFuncTable *pBaseFuncsTable)
{ {
HRESULT hr; HRESULT hr;
memset(filter, 0, sizeof(*filter)); memset(filter, 0, sizeof(*filter));
strmbase_filter_init(&filter->filter, vtbl, outer, clsid, &filter_ops); strmbase_filter_init(&filter->filter, &strmbase_renderer_vtbl, outer, clsid, &filter_ops);
filter->pFuncsTable = pBaseFuncsTable; filter->pFuncsTable = pBaseFuncsTable;
...@@ -407,7 +407,7 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp ...@@ -407,7 +407,7 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
return hr; return hr;
} }
HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter * iface) static HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter *iface)
{ {
BaseRenderer *This = impl_from_IBaseFilter(iface); BaseRenderer *This = impl_from_IBaseFilter(iface);
...@@ -427,7 +427,7 @@ HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter * iface) ...@@ -427,7 +427,7 @@ HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter * iface)
return S_OK; return S_OK;
} }
HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart) static HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
{ {
BaseRenderer *This = impl_from_IBaseFilter(iface); BaseRenderer *This = impl_from_IBaseFilter(iface);
...@@ -461,7 +461,7 @@ out: ...@@ -461,7 +461,7 @@ out:
return S_OK; return S_OK;
} }
HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface) static HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter *iface)
{ {
BaseRenderer *This = impl_from_IBaseFilter(iface); BaseRenderer *This = impl_from_IBaseFilter(iface);
HRESULT hr = S_OK; HRESULT hr = S_OK;
...@@ -497,7 +497,7 @@ HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface) ...@@ -497,7 +497,7 @@ HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface)
return hr; return hr;
} }
HRESULT WINAPI BaseRendererImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *clock) static HRESULT WINAPI BaseRendererImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *clock)
{ {
BaseRenderer *This = impl_from_IBaseFilter(iface); BaseRenderer *This = impl_from_IBaseFilter(iface);
HRESULT hr; HRESULT hr;
...@@ -510,7 +510,7 @@ HRESULT WINAPI BaseRendererImpl_SetSyncSource(IBaseFilter *iface, IReferenceCloc ...@@ -510,7 +510,7 @@ HRESULT WINAPI BaseRendererImpl_SetSyncSource(IBaseFilter *iface, IReferenceCloc
} }
HRESULT WINAPI BaseRendererImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState) static HRESULT WINAPI BaseRendererImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
{ {
HRESULT hr; HRESULT hr;
BaseRenderer *This = impl_from_IBaseFilter(iface); BaseRenderer *This = impl_from_IBaseFilter(iface);
...@@ -527,6 +527,25 @@ HRESULT WINAPI BaseRendererImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsT ...@@ -527,6 +527,25 @@ HRESULT WINAPI BaseRendererImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsT
return hr; return hr;
} }
static const IBaseFilterVtbl strmbase_renderer_vtbl =
{
BaseFilterImpl_QueryInterface,
BaseFilterImpl_AddRef,
BaseFilterImpl_Release,
BaseFilterImpl_GetClassID,
BaseRendererImpl_Stop,
BaseRendererImpl_Pause,
BaseRendererImpl_Run,
BaseRendererImpl_GetState,
BaseRendererImpl_SetSyncSource,
BaseFilterImpl_GetSyncSource,
BaseFilterImpl_EnumPins,
BaseFilterImpl_FindPin,
BaseFilterImpl_QueryFilterInfo,
BaseFilterImpl_JoinFilterGraph,
BaseFilterImpl_QueryVendorInfo
};
HRESULT WINAPI BaseRendererImpl_EndOfStream(BaseRenderer* iface) HRESULT WINAPI BaseRendererImpl_EndOfStream(BaseRenderer* iface)
{ {
IMediaEventSink* pEventSink; IMediaEventSink* pEventSink;
......
...@@ -565,19 +565,13 @@ typedef struct BaseRendererFuncTable { ...@@ -565,19 +565,13 @@ typedef struct BaseRendererFuncTable {
} BaseRendererFuncTable; } BaseRendererFuncTable;
HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSample); HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSample);
HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter * iface);
HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter * iface, REFERENCE_TIME tStart);
HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface);
HRESULT WINAPI BaseRendererImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *clock);
HRESULT WINAPI BaseRendererImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState);
HRESULT WINAPI BaseRendererImpl_EndOfStream(BaseRenderer* iface); HRESULT WINAPI BaseRendererImpl_EndOfStream(BaseRenderer* iface);
HRESULT WINAPI BaseRendererImpl_BeginFlush(BaseRenderer* iface); HRESULT WINAPI BaseRendererImpl_BeginFlush(BaseRenderer* iface);
HRESULT WINAPI BaseRendererImpl_EndFlush(BaseRenderer* iface); HRESULT WINAPI BaseRendererImpl_EndFlush(BaseRenderer* iface);
HRESULT WINAPI BaseRendererImpl_ClearPendingSample(BaseRenderer *iface); HRESULT WINAPI BaseRendererImpl_ClearPendingSample(BaseRenderer *iface);
HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, const IBaseFilterVtbl *vtbl, HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, IUnknown *outer,
IUnknown *outer, const CLSID *clsid, const WCHAR *sink_name, const CLSID *clsid, const WCHAR *sink_name, const BaseRendererFuncTable *func_table);
const BaseRendererFuncTable *func_table);
void strmbase_renderer_cleanup(BaseRenderer *filter); void strmbase_renderer_cleanup(BaseRenderer *filter);
/* Dll Functions */ /* Dll Functions */
......
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