strmbase: Get rid of the BaseRendererFuncTable typedef.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
487ea5df22
commit
0f8dbcdf80
|
@ -61,7 +61,7 @@ static HRESULT WINAPI evr_CheckMediaType(struct strmbase_renderer *iface, const
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const BaseRendererFuncTable renderer_ops =
|
static const struct strmbase_renderer_ops renderer_ops =
|
||||||
{
|
{
|
||||||
.pfnCheckMediaType = evr_CheckMediaType,
|
.pfnCheckMediaType = evr_CheckMediaType,
|
||||||
.pfnDoRenderSample = evr_DoRenderSample,
|
.pfnDoRenderSample = evr_DoRenderSample,
|
||||||
|
|
|
@ -55,7 +55,7 @@ static void null_renderer_destroy(struct strmbase_renderer *iface)
|
||||||
CoTaskMemFree(filter);
|
CoTaskMemFree(filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const BaseRendererFuncTable RendererFuncTable =
|
static const struct strmbase_renderer_ops renderer_ops =
|
||||||
{
|
{
|
||||||
.pfnCheckMediaType = NullRenderer_CheckMediaType,
|
.pfnCheckMediaType = NullRenderer_CheckMediaType,
|
||||||
.pfnDoRenderSample = NullRenderer_DoRenderSample,
|
.pfnDoRenderSample = NullRenderer_DoRenderSample,
|
||||||
|
@ -74,7 +74,7 @@ HRESULT NullRenderer_create(IUnknown *outer, void **out)
|
||||||
pNullRenderer = CoTaskMemAlloc(sizeof(NullRendererImpl));
|
pNullRenderer = CoTaskMemAlloc(sizeof(NullRendererImpl));
|
||||||
|
|
||||||
hr = strmbase_renderer_init(&pNullRenderer->renderer, outer,
|
hr = strmbase_renderer_init(&pNullRenderer->renderer, outer,
|
||||||
&CLSID_NullRenderer, sink_name, &RendererFuncTable);
|
&CLSID_NullRenderer, sink_name, &renderer_ops);
|
||||||
|
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
CoTaskMemFree(pNullRenderer);
|
CoTaskMemFree(pNullRenderer);
|
||||||
|
|
|
@ -580,7 +580,7 @@ static HRESULT dsound_render_query_interface(struct strmbase_renderer *iface, RE
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const BaseRendererFuncTable BaseFuncTable =
|
static const struct strmbase_renderer_ops renderer_ops =
|
||||||
{
|
{
|
||||||
.pfnCheckMediaType = DSoundRender_CheckMediaType,
|
.pfnCheckMediaType = DSoundRender_CheckMediaType,
|
||||||
.pfnDoRenderSample = DSoundRender_DoRenderSample,
|
.pfnDoRenderSample = DSoundRender_DoRenderSample,
|
||||||
|
@ -611,7 +611,7 @@ HRESULT DSoundRender_create(IUnknown *outer, void **out)
|
||||||
ZeroMemory(pDSoundRender, sizeof(DSoundRenderImpl));
|
ZeroMemory(pDSoundRender, sizeof(DSoundRenderImpl));
|
||||||
|
|
||||||
hr = strmbase_renderer_init(&pDSoundRender->renderer,
|
hr = strmbase_renderer_init(&pDSoundRender->renderer,
|
||||||
outer, &CLSID_DSoundRender, sink_name, &BaseFuncTable);
|
outer, &CLSID_DSoundRender, sink_name, &renderer_ops);
|
||||||
|
|
||||||
pDSoundRender->IBasicAudio_iface.lpVtbl = &IBasicAudio_Vtbl;
|
pDSoundRender->IBasicAudio_iface.lpVtbl = &IBasicAudio_Vtbl;
|
||||||
pDSoundRender->IReferenceClock_iface.lpVtbl = &IReferenceClock_Vtbl;
|
pDSoundRender->IReferenceClock_iface.lpVtbl = &IReferenceClock_Vtbl;
|
||||||
|
|
|
@ -367,7 +367,7 @@ static BOOL WINAPI VideoRenderer_OnSize(BaseWindow *iface, LONG Width, LONG Heig
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const BaseRendererFuncTable BaseFuncTable =
|
static const struct strmbase_renderer_ops renderer_ops =
|
||||||
{
|
{
|
||||||
.pfnCheckMediaType = VideoRenderer_CheckMediaType,
|
.pfnCheckMediaType = VideoRenderer_CheckMediaType,
|
||||||
.pfnDoRenderSample = VideoRenderer_DoRenderSample,
|
.pfnDoRenderSample = VideoRenderer_DoRenderSample,
|
||||||
|
@ -760,7 +760,7 @@ 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, outer,
|
hr = strmbase_renderer_init(&pVideoRenderer->renderer, outer,
|
||||||
&CLSID_VideoRenderer, sink_name, &BaseFuncTable);
|
&CLSID_VideoRenderer, sink_name, &renderer_ops);
|
||||||
|
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
|
@ -555,7 +555,7 @@ static HRESULT vmr_pin_query_interface(struct strmbase_renderer *iface, REFIID i
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const BaseRendererFuncTable BaseFuncTable =
|
static const struct strmbase_renderer_ops renderer_ops =
|
||||||
{
|
{
|
||||||
.pfnCheckMediaType = VMR9_CheckMediaType,
|
.pfnCheckMediaType = VMR9_CheckMediaType,
|
||||||
.pfnDoRenderSample = VMR9_DoRenderSample,
|
.pfnDoRenderSample = VMR9_DoRenderSample,
|
||||||
|
@ -2229,7 +2229,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, outer, clsid, sink_name, &BaseFuncTable);
|
hr = strmbase_renderer_init(&pVMR->renderer, outer, clsid, sink_name, &renderer_ops);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
|
|
@ -561,14 +561,14 @@ HRESULT WINAPI BaseRendererImpl_ClearPendingSample(struct strmbase_renderer *ifa
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer,
|
HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer,
|
||||||
const CLSID *clsid, const WCHAR *sink_name, const BaseRendererFuncTable *func_table)
|
const CLSID *clsid, const WCHAR *sink_name, const struct strmbase_renderer_ops *ops)
|
||||||
{
|
{
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
memset(filter, 0, sizeof(*filter));
|
memset(filter, 0, sizeof(*filter));
|
||||||
strmbase_filter_init(&filter->filter, &strmbase_renderer_vtbl, outer, clsid, &filter_ops);
|
strmbase_filter_init(&filter->filter, &strmbase_renderer_vtbl, outer, clsid, &filter_ops);
|
||||||
|
|
||||||
filter->pFuncsTable = func_table;
|
filter->pFuncsTable = ops;
|
||||||
|
|
||||||
strmbase_sink_init(&filter->sink, &BaseRenderer_InputPin_Vtbl, &filter->filter,
|
strmbase_sink_init(&filter->sink, &BaseRenderer_InputPin_Vtbl, &filter->filter,
|
||||||
sink_name, &input_BaseInputFuncTable, NULL);
|
sink_name, &input_BaseInputFuncTable, NULL);
|
||||||
|
|
|
@ -527,7 +527,7 @@ struct strmbase_renderer
|
||||||
IQualityControl *pQSink;
|
IQualityControl *pQSink;
|
||||||
struct QualityControlImpl *qcimpl;
|
struct QualityControlImpl *qcimpl;
|
||||||
|
|
||||||
const struct BaseRendererFuncTable *pFuncsTable;
|
const struct strmbase_renderer_ops *pFuncsTable;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef HRESULT (WINAPI *BaseRenderer_CheckMediaType)(struct strmbase_renderer *iface, const AM_MEDIA_TYPE *mt);
|
typedef HRESULT (WINAPI *BaseRenderer_CheckMediaType)(struct strmbase_renderer *iface, const AM_MEDIA_TYPE *mt);
|
||||||
|
@ -541,7 +541,8 @@ typedef HRESULT (WINAPI *BaseRenderer_EndFlush) (struct strmbase_renderer *iface
|
||||||
typedef HRESULT (WINAPI *BaseRenderer_BreakConnect) (struct strmbase_renderer *iface);
|
typedef HRESULT (WINAPI *BaseRenderer_BreakConnect) (struct strmbase_renderer *iface);
|
||||||
typedef HRESULT (WINAPI *BaseRenderer_CompleteConnect) (struct strmbase_renderer *iface, IPin *peer);
|
typedef HRESULT (WINAPI *BaseRenderer_CompleteConnect) (struct strmbase_renderer *iface, IPin *peer);
|
||||||
|
|
||||||
typedef struct BaseRendererFuncTable {
|
struct strmbase_renderer_ops
|
||||||
|
{
|
||||||
BaseRenderer_CheckMediaType pfnCheckMediaType;
|
BaseRenderer_CheckMediaType pfnCheckMediaType;
|
||||||
BaseRenderer_DoRenderSample pfnDoRenderSample;
|
BaseRenderer_DoRenderSample pfnDoRenderSample;
|
||||||
void (*renderer_init_stream)(struct strmbase_renderer *iface);
|
void (*renderer_init_stream)(struct strmbase_renderer *iface);
|
||||||
|
@ -556,7 +557,7 @@ typedef struct BaseRendererFuncTable {
|
||||||
void (*renderer_destroy)(struct strmbase_renderer *iface);
|
void (*renderer_destroy)(struct strmbase_renderer *iface);
|
||||||
HRESULT (*renderer_query_interface)(struct strmbase_renderer *iface, REFIID iid, void **out);
|
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);
|
HRESULT (*renderer_pin_query_interface)(struct strmbase_renderer *iface, REFIID iid, void **out);
|
||||||
} BaseRendererFuncTable;
|
};
|
||||||
|
|
||||||
HRESULT WINAPI BaseRendererImpl_BeginFlush(struct strmbase_renderer *filter);
|
HRESULT WINAPI BaseRendererImpl_BeginFlush(struct strmbase_renderer *filter);
|
||||||
HRESULT WINAPI BaseRendererImpl_ClearPendingSample(struct strmbase_renderer *filter);
|
HRESULT WINAPI BaseRendererImpl_ClearPendingSample(struct strmbase_renderer *filter);
|
||||||
|
@ -565,7 +566,7 @@ HRESULT WINAPI BaseRendererImpl_EndFlush(struct strmbase_renderer *filter);
|
||||||
HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *filter, IMediaSample *sample);
|
HRESULT WINAPI BaseRendererImpl_Receive(struct strmbase_renderer *filter, IMediaSample *sample);
|
||||||
|
|
||||||
HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer,
|
HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown *outer,
|
||||||
const CLSID *clsid, const WCHAR *sink_name, const BaseRendererFuncTable *func_table);
|
const CLSID *clsid, const WCHAR *sink_name, const struct strmbase_renderer_ops *ops);
|
||||||
void strmbase_renderer_cleanup(struct strmbase_renderer *filter);
|
void strmbase_renderer_cleanup(struct strmbase_renderer *filter);
|
||||||
|
|
||||||
/* Dll Functions */
|
/* Dll Functions */
|
||||||
|
|
Loading…
Reference in New Issue