Commit e438824a authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

strmbase: Get rid of the BaseInputPinFuncTable typedef.

parent 580ca755
......@@ -499,7 +499,7 @@ static HRESULT WINAPI AVICompressorIn_Receive(struct strmbase_sink *base, IMedia
return hres;
}
static const BaseInputPinFuncTable AVICompressorBaseInputPinVtbl =
static const struct strmbase_sink_ops sink_ops =
{
.base.pin_query_accept = sink_query_accept,
.base.pin_get_media_type = strmbase_pin_get_media_type,
......@@ -597,7 +597,7 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr)
compressor->IPersistPropertyBag_iface.lpVtbl = &PersistPropertyBagVtbl;
strmbase_sink_init(&compressor->sink, &AVICompressorInputPinVtbl,
&compressor->filter, sink_name, &AVICompressorBaseInputPinVtbl, NULL);
&compressor->filter, sink_name, &sink_ops, NULL);
strmbase_source_init(&compressor->source, &AVICompressorOutputPinVtbl,
&compressor->filter, source_name, &source_ops);
......
......@@ -1483,7 +1483,7 @@ static HRESULT WINAPI AviMuxIn_Receive(struct strmbase_sink *base, IMediaSample
return hr;
}
static const BaseInputPinFuncTable AviMuxIn_BaseInputFuncTable =
static const struct strmbase_sink_ops sink_ops =
{
.base.pin_query_accept = sink_query_accept,
.base.pin_get_media_type = strmbase_pin_get_media_type,
......@@ -1944,8 +1944,7 @@ static HRESULT create_input_pin(AviMux *avimux)
if (!(object = heap_alloc_zero(sizeof(*object))))
return E_OUTOFMEMORY;
strmbase_sink_init(&object->pin, &AviMuxIn_PinVtbl, &avimux->filter, name,
&AviMuxIn_BaseInputFuncTable, NULL);
strmbase_sink_init(&object->pin, &AviMuxIn_PinVtbl, &avimux->filter, name, &sink_ops, NULL);
object->pin.IMemInputPin_iface.lpVtbl = &AviMuxIn_MemInputPinVtbl;
object->IAMStreamControl_iface.lpVtbl = &AviMuxIn_AMStreamControlVtbl;
object->IPropertyBag_iface.lpVtbl = &AviMuxIn_PropertyBagVtbl;
......
......@@ -285,7 +285,7 @@ static HRESULT WINAPI SmartTeeFilterInput_Receive(struct strmbase_sink *base, IM
return hrPreview;
}
static const BaseInputPinFuncTable SmartTeeFilterInputFuncs =
static const struct strmbase_sink_ops sink_ops =
{
.base.pin_query_accept = sink_query_accept,
.base.pin_get_media_type = sink_get_media_type,
......@@ -418,8 +418,7 @@ IUnknown* WINAPI QCAP_createSmartTeeFilter(IUnknown *outer, HRESULT *phr)
memset(object, 0, sizeof(*object));
strmbase_filter_init(&object->filter, &SmartTeeFilterVtbl, outer, &CLSID_SmartTee, &filter_ops);
strmbase_sink_init(&object->sink, &SmartTeeFilterInputVtbl, &object->filter,
inputW, &SmartTeeFilterInputFuncs, NULL);
strmbase_sink_init(&object->sink, &SmartTeeFilterInputVtbl, &object->filter, inputW, &sink_ops, NULL);
hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER,
&IID_IMemAllocator, (void **)&object->sink.pAllocator);
if (FAILED(hr))
......
......@@ -1001,7 +1001,7 @@ static const IMemInputPinVtbl MemInputPin_Vtbl =
};
void strmbase_sink_init(struct strmbase_sink *pin, const IPinVtbl *vtbl, struct strmbase_filter *filter,
const WCHAR *name, const BaseInputPinFuncTable *func_table, IMemAllocator *allocator)
const WCHAR *name, const struct strmbase_sink_ops *func_table, IMemAllocator *allocator)
{
memset(pin, 0, sizeof(*pin));
pin->pin.IPin_iface.lpVtbl = vtbl;
......
......@@ -302,7 +302,7 @@ static HRESULT WINAPI BaseRenderer_Receive(struct strmbase_sink *pin, IMediaSamp
return BaseRendererImpl_Receive(filter, sample);
}
static const BaseInputPinFuncTable input_BaseInputFuncTable =
static const struct strmbase_sink_ops sink_ops =
{
.base.pin_query_accept = sink_query_accept,
.base.pin_query_interface = sink_query_interface,
......@@ -511,7 +511,7 @@ HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown
filter->pFuncsTable = ops;
strmbase_sink_init(&filter->sink, &BaseRenderer_InputPin_Vtbl, &filter->filter,
sink_name, &input_BaseInputFuncTable, NULL);
sink_name, &sink_ops, NULL);
hr = CreatePosPassThru(outer ? outer : (IUnknown *)&filter->filter.IBaseFilter_iface,
TRUE, &filter->sink.pin.IPin_iface, &filter->pPosition);
......
......@@ -210,7 +210,7 @@ static HRESULT sink_query_interface(struct strmbase_pin *iface, REFIID iid, void
return S_OK;
}
static const BaseInputPinFuncTable tf_input_BaseInputFuncTable =
static const struct strmbase_sink_ops sink_ops =
{
.base.pin_query_accept = sink_query_accept,
.base.pin_get_media_type = strmbase_pin_get_media_type,
......@@ -353,7 +353,7 @@ static HRESULT strmbase_transform_init(IUnknown *outer, const CLSID *clsid,
ZeroMemory(&filter->pmt, sizeof(filter->pmt));
strmbase_sink_init(&filter->sink, &TransformFilter_InputPin_Vtbl, &filter->filter,
wcsInputPinName, &tf_input_BaseInputFuncTable, NULL);
wcsInputPinName, &sink_ops, NULL);
strmbase_source_init(&filter->source, &TransformFilter_OutputPin_Vtbl, &filter->filter,
wcsOutputPinName, &source_ops);
......
......@@ -84,16 +84,17 @@ struct strmbase_sink
BOOL flushing, end_of_stream;
IMemAllocator *preferred_allocator;
const struct BaseInputPinFuncTable *pFuncsTable;
const struct strmbase_sink_ops *pFuncsTable;
};
typedef HRESULT (WINAPI *BaseInputPin_Receive)(struct strmbase_sink *This, IMediaSample *pSample);
typedef struct BaseInputPinFuncTable {
struct strmbase_sink_ops
{
BasePinFuncTable base;
/* Optional */
BaseInputPin_Receive pfnReceive;
} BaseInputPinFuncTable;
};
/* Base Pin */
HRESULT strmbase_pin_get_media_type(struct strmbase_pin *pin, unsigned int index, AM_MEDIA_TYPE *mt);
......@@ -143,7 +144,7 @@ HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface);
HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate);
void strmbase_sink_init(struct strmbase_sink *pin, const IPinVtbl *vtbl, struct strmbase_filter *filter,
const WCHAR *name, const BaseInputPinFuncTable *func_table, IMemAllocator *allocator);
const WCHAR *name, const struct strmbase_sink_ops *ops, IMemAllocator *allocator);
void strmbase_sink_cleanup(struct strmbase_sink *pin);
struct strmbase_filter
......
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