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
BaseRenderer renderer;
} 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)
{
return CONTAINING_RECORD(iface, evr_filter, renderer);
......@@ -98,7 +79,7 @@ HRESULT evr_filter_create(IUnknown *outer, void **out)
if (!object)
return E_OUTOFMEMORY;
strmbase_renderer_init(&object->renderer, &basefilter_vtbl, outer,
strmbase_renderer_init(&object->renderer, outer,
&CLSID_EnhancedVideoRenderer, sink_name, &renderer_ops);
*out = &object->renderer.filter.IUnknown_inner;
......
......@@ -62,25 +62,6 @@ static const BaseRendererFuncTable RendererFuncTable =
.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)
{
static const WCHAR sink_name[] = {'I','n',0};
......@@ -92,7 +73,7 @@ HRESULT NullRenderer_create(IUnknown *outer, void **out)
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);
if (FAILED(hr))
......
......@@ -39,7 +39,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(quartz);
*/
static const REFERENCE_TIME DSoundRenderer_Max_Fill = 150 * 10000;
static const IBaseFilterVtbl DSoundRender_Vtbl;
static const IBasicAudioVtbl IBasicAudio_Vtbl;
static const IReferenceClockVtbl IReferenceClock_Vtbl;
static const IAMDirectSoundVtbl IAMDirectSound_Vtbl;
......@@ -610,7 +609,7 @@ HRESULT DSoundRender_create(IUnknown *outer, void **out)
return E_OUTOFMEMORY;
ZeroMemory(pDSoundRender, sizeof(DSoundRenderImpl));
hr = strmbase_renderer_init(&pDSoundRender->renderer, &DSoundRender_Vtbl,
hr = strmbase_renderer_init(&pDSoundRender->renderer,
outer, &CLSID_DSoundRender, sink_name, &BaseFuncTable);
pDSoundRender->IBasicAudio_iface.lpVtbl = &IBasicAudio_Vtbl;
......@@ -652,25 +651,6 @@ HRESULT DSoundRender_create(IUnknown *outer, void **out)
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 ***/
static HRESULT WINAPI Basicaudio_QueryInterface(IBasicAudio *iface,
REFIID riid,
......
......@@ -543,25 +543,6 @@ static const BaseControlVideoFuncTable renderer_BaseControlVideoFuncTable = {
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,
LONG *FullScreenMode)
{
......@@ -777,8 +758,8 @@ HRESULT VideoRenderer_create(IUnknown *outer, void **out)
pVideoRenderer->IOverlay_iface.lpVtbl = &overlay_vtbl;
hr = strmbase_renderer_init(&pVideoRenderer->renderer, &VideoRenderer_Vtbl,
outer, &CLSID_VideoRenderer, sink_name, &BaseFuncTable);
hr = strmbase_renderer_init(&pVideoRenderer->renderer, outer,
&CLSID_VideoRenderer, sink_name, &BaseFuncTable);
if (FAILED(hr))
goto fail;
......
......@@ -758,25 +758,6 @@ static const BaseControlVideoFuncTable renderer_BaseControlVideoFuncTable = {
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 =
{
BaseControlWindowImpl_QueryInterface,
......@@ -2247,7 +2228,7 @@ static HRESULT vmr_create(IUnknown *outer, void **out, const CLSID *clsid)
pVMR->IVMRWindowlessControl9_iface.lpVtbl = &VMR9_WindowlessControl_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))
goto fail;
......
......@@ -250,15 +250,15 @@ static const BaseInputPinFuncTable input_BaseInputFuncTable =
.pfnReceive = BaseRenderer_Receive,
};
static const IBaseFilterVtbl strmbase_renderer_vtbl;
HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, const IBaseFilterVtbl *vtbl,
IUnknown *outer, const CLSID *clsid, const WCHAR *sink_name,
const BaseRendererFuncTable *pBaseFuncsTable)
HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, IUnknown *outer,
const CLSID *clsid, const WCHAR *sink_name, const BaseRendererFuncTable *pBaseFuncsTable)
{
HRESULT hr;
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;
......@@ -407,7 +407,7 @@ HRESULT WINAPI BaseRendererImpl_Receive(BaseRenderer *This, IMediaSample * pSamp
return hr;
}
HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter * iface)
static HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter *iface)
{
BaseRenderer *This = impl_from_IBaseFilter(iface);
......@@ -427,7 +427,7 @@ HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter * iface)
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);
......@@ -461,7 +461,7 @@ out:
return S_OK;
}
HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface)
static HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter *iface)
{
BaseRenderer *This = impl_from_IBaseFilter(iface);
HRESULT hr = S_OK;
......@@ -497,7 +497,7 @@ HRESULT WINAPI BaseRendererImpl_Pause(IBaseFilter * iface)
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);
HRESULT hr;
......@@ -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;
BaseRenderer *This = impl_from_IBaseFilter(iface);
......@@ -527,6 +527,25 @@ HRESULT WINAPI BaseRendererImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsT
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)
{
IMediaEventSink* pEventSink;
......
......@@ -565,19 +565,13 @@ typedef struct BaseRendererFuncTable {
} BaseRendererFuncTable;
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_BeginFlush(BaseRenderer* iface);
HRESULT WINAPI BaseRendererImpl_EndFlush(BaseRenderer* iface);
HRESULT WINAPI BaseRendererImpl_ClearPendingSample(BaseRenderer *iface);
HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, const IBaseFilterVtbl *vtbl,
IUnknown *outer, const CLSID *clsid, const WCHAR *sink_name,
const BaseRendererFuncTable *func_table);
HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, IUnknown *outer,
const CLSID *clsid, const WCHAR *sink_name, const BaseRendererFuncTable *func_table);
void strmbase_renderer_cleanup(BaseRenderer *filter);
/* 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