strmbase: Get rid of the BaseFilterFuncTable typedef.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
5e8234b3c4
commit
cfe3b05c83
|
@ -122,7 +122,8 @@ static HRESULT audio_record_query_interface(BaseFilter *iface, REFIID iid, void
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static const BaseFilterFuncTable AudioRecordFuncs = {
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = audio_record_get_pin,
|
||||
.filter_destroy = audio_record_destroy,
|
||||
.filter_query_interface = audio_record_query_interface,
|
||||
|
@ -213,7 +214,7 @@ IUnknown* WINAPI QCAP_createAudioCaptureFilter(IUnknown *outer, HRESULT *phr)
|
|||
memset(This, 0, sizeof(*This));
|
||||
This->IPersistPropertyBag_iface.lpVtbl = &PersistPropertyBagVtbl;
|
||||
|
||||
strmbase_filter_init(&This->filter, &AudioRecordVtbl, outer, &CLSID_AudioRecord, &AudioRecordFuncs);
|
||||
strmbase_filter_init(&This->filter, &AudioRecordVtbl, outer, &CLSID_AudioRecord, &filter_ops);
|
||||
|
||||
*phr = S_OK;
|
||||
return &This->filter.IUnknown_inner;
|
||||
|
|
|
@ -215,7 +215,8 @@ static HRESULT avi_compressor_query_interface(BaseFilter *iface, REFIID iid, voi
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static const BaseFilterFuncTable filter_func_table = {
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = avi_compressor_get_pin,
|
||||
.filter_destroy = avi_compressor_destroy,
|
||||
.filter_query_interface = avi_compressor_query_interface,
|
||||
|
@ -600,7 +601,7 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
strmbase_filter_init(&compressor->filter, &AVICompressorVtbl, outer, &CLSID_AVICo, &filter_func_table);
|
||||
strmbase_filter_init(&compressor->filter, &AVICompressorVtbl, outer, &CLSID_AVICo, &filter_ops);
|
||||
|
||||
compressor->IPersistPropertyBag_iface.lpVtbl = &PersistPropertyBagVtbl;
|
||||
|
||||
|
|
|
@ -167,7 +167,8 @@ static HRESULT avi_mux_query_interface(BaseFilter *iface, REFIID iid, void **out
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static const BaseFilterFuncTable filter_func_table = {
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = avi_mux_get_pin,
|
||||
.filter_destroy = avi_mux_destroy,
|
||||
.filter_query_interface = avi_mux_query_interface,
|
||||
|
@ -2251,7 +2252,7 @@ IUnknown * WINAPI QCAP_createAVIMux(IUnknown *outer, HRESULT *phr)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
strmbase_filter_init(&avimux->filter, &AviMuxVtbl, outer, &CLSID_AviDest, &filter_func_table);
|
||||
strmbase_filter_init(&avimux->filter, &AviMuxVtbl, outer, &CLSID_AviDest, &filter_ops);
|
||||
avimux->IConfigAviMux_iface.lpVtbl = &ConfigAviMuxVtbl;
|
||||
avimux->IConfigInterleaving_iface.lpVtbl = &ConfigInterleavingVtbl;
|
||||
avimux->IMediaSeeking_iface.lpVtbl = &MediaSeekingVtbl;
|
||||
|
|
|
@ -141,7 +141,8 @@ static void smart_tee_destroy(BaseFilter *iface)
|
|||
CoTaskMemFree(filter);
|
||||
}
|
||||
|
||||
static const BaseFilterFuncTable SmartTeeFilterFuncs = {
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = smart_tee_get_pin,
|
||||
.filter_destroy = smart_tee_destroy,
|
||||
};
|
||||
|
@ -483,7 +484,7 @@ IUnknown* WINAPI QCAP_createSmartTeeFilter(IUnknown *outer, HRESULT *phr)
|
|||
}
|
||||
memset(This, 0, sizeof(*This));
|
||||
|
||||
strmbase_filter_init(&This->filter, &SmartTeeFilterVtbl, outer, &CLSID_SmartTee, &SmartTeeFilterFuncs);
|
||||
strmbase_filter_init(&This->filter, &SmartTeeFilterVtbl, outer, &CLSID_SmartTee, &filter_ops);
|
||||
|
||||
inputPinInfo.pFilter = &This->filter.IBaseFilter_iface;
|
||||
strmbase_sink_init(&This->sink, &SmartTeeFilterInputVtbl, &inputPinInfo,
|
||||
|
|
|
@ -134,7 +134,8 @@ static HRESULT vfw_capture_query_interface(BaseFilter *iface, REFIID iid, void *
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static const BaseFilterFuncTable BaseFuncTable = {
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = vfw_capture_get_pin,
|
||||
.filter_destroy = vfw_capture_destroy,
|
||||
.filter_query_interface = vfw_capture_query_interface,
|
||||
|
@ -642,7 +643,7 @@ IUnknown * WINAPI QCAP_createVFWCaptureFilter(IUnknown *outer, HRESULT *phr)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
strmbase_filter_init(&object->filter, &VfwCapture_Vtbl, outer, &CLSID_VfwCapture, &BaseFuncTable);
|
||||
strmbase_filter_init(&object->filter, &VfwCapture_Vtbl, outer, &CLSID_VfwCapture, &filter_ops);
|
||||
|
||||
object->IAMStreamConfig_iface.lpVtbl = &IAMStreamConfig_VTable;
|
||||
object->IAMVideoProcAmp_iface.lpVtbl = &IAMVideoProcAmp_VTable;
|
||||
|
|
|
@ -306,7 +306,8 @@ static HRESULT sample_grabber_query_interface(BaseFilter *iface, REFIID iid, voi
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
static const BaseFilterFuncTable basefunc_vtbl = {
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = sample_grabber_get_pin,
|
||||
.filter_destroy = sample_grabber_destroy,
|
||||
.filter_query_interface = sample_grabber_query_interface,
|
||||
|
@ -1154,7 +1155,7 @@ HRESULT SampleGrabber_create(IUnknown *outer, void **out)
|
|||
}
|
||||
ZeroMemory(obj, sizeof(SG_Impl));
|
||||
|
||||
strmbase_filter_init(&obj->filter, &IBaseFilter_VTable, outer, &CLSID_SampleGrabber, &basefunc_vtbl);
|
||||
strmbase_filter_init(&obj->filter, &IBaseFilter_VTable, outer, &CLSID_SampleGrabber, &filter_ops);
|
||||
obj->ISampleGrabber_iface.lpVtbl = &ISampleGrabber_VTable;
|
||||
obj->IMemInputPin_iface.lpVtbl = &IMemInputPin_VTable;
|
||||
obj->pin_in.IPin_iface.lpVtbl = &IPin_In_VTable;
|
||||
|
|
|
@ -1411,7 +1411,7 @@ static void avi_splitter_destroy(BaseFilter *iface)
|
|||
Parser_Destroy(&filter->Parser);
|
||||
}
|
||||
|
||||
static const BaseFilterFuncTable avi_splitter_func_table =
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = parser_get_pin,
|
||||
.filter_destroy = avi_splitter_destroy,
|
||||
|
@ -1432,7 +1432,7 @@ HRESULT AVISplitter_create(IUnknown *outer, void **out)
|
|||
This->oldindex = NULL;
|
||||
|
||||
hr = Parser_Create(&This->Parser, &AVISplitterImpl_Vtbl, outer, &CLSID_AviSplitter,
|
||||
&avi_splitter_func_table, sink_name, AVISplitter_Sample, AVISplitter_QueryAccept,
|
||||
&filter_ops, sink_name, AVISplitter_Sample, AVISplitter_QueryAccept,
|
||||
AVISplitter_InputPin_PreConnect, AVISplitter_Flush,
|
||||
AVISplitter_Disconnect, AVISplitter_first_request,
|
||||
AVISplitter_done_process, NULL, AVISplitter_seek, NULL);
|
||||
|
|
|
@ -393,7 +393,7 @@ static HRESULT async_reader_query_interface(BaseFilter *iface, REFIID iid, void
|
|||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static const BaseFilterFuncTable BaseFuncTable =
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = async_reader_get_pin,
|
||||
.filter_destroy = async_reader_destroy,
|
||||
|
@ -409,7 +409,7 @@ HRESULT AsyncReader_create(IUnknown *outer, void **out)
|
|||
if (!pAsyncRead)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
strmbase_filter_init(&pAsyncRead->filter, &AsyncReader_Vtbl, outer, &CLSID_AsyncReader, &BaseFuncTable);
|
||||
strmbase_filter_init(&pAsyncRead->filter, &AsyncReader_Vtbl, outer, &CLSID_AsyncReader, &filter_ops);
|
||||
|
||||
pAsyncRead->IFileSourceFilter_iface.lpVtbl = &FileSource_Vtbl;
|
||||
|
||||
|
|
|
@ -856,7 +856,7 @@ static HRESULT mpeg_splitter_query_interface(BaseFilter *iface, REFIID iid, void
|
|||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static const BaseFilterFuncTable mpeg_splitter_func_table =
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = parser_get_pin,
|
||||
.filter_destroy = mpeg_splitter_destroy,
|
||||
|
@ -877,7 +877,7 @@ HRESULT MPEGSplitter_create(IUnknown *outer, void **out)
|
|||
|
||||
ZeroMemory(This, sizeof(MPEGSplitterImpl));
|
||||
hr = Parser_Create(&This->Parser, &MPEGSplitter_Vtbl, outer, &CLSID_MPEG1Splitter,
|
||||
&mpeg_splitter_func_table, sink_name, MPEGSplitter_process_sample, MPEGSplitter_query_accept,
|
||||
&filter_ops, sink_name, MPEGSplitter_process_sample, MPEGSplitter_query_accept,
|
||||
MPEGSplitter_pre_connect, MPEGSplitter_cleanup, MPEGSplitter_disconnect,
|
||||
MPEGSplitter_first_request, NULL, NULL, MPEGSplitter_seek, NULL);
|
||||
if (FAILED(hr))
|
||||
|
|
|
@ -73,7 +73,7 @@ IPin *parser_get_pin(BaseFilter *iface, unsigned int index)
|
|||
}
|
||||
|
||||
HRESULT Parser_Create(ParserImpl *pParser, const IBaseFilterVtbl *vtbl, IUnknown *outer,
|
||||
const CLSID *clsid, const BaseFilterFuncTable *func_table, const WCHAR *sink_name,
|
||||
const CLSID *clsid, const struct strmbase_filter_ops *func_table, const WCHAR *sink_name,
|
||||
PFN_PROCESS_SAMPLE fnProcessSample, PFN_QUERY_ACCEPT fnQueryAccept, PFN_PRE_CONNECT fnPreConnect,
|
||||
PFN_CLEANUP fnCleanup, PFN_DISCONNECT fnDisconnect, REQUESTPROC fnRequest,
|
||||
STOPPROCESSPROC fnDone, SourceSeeking_ChangeStop stop,
|
||||
|
|
|
@ -53,7 +53,7 @@ struct ParserImpl
|
|||
extern HRESULT Parser_AddPin(ParserImpl * This, const PIN_INFO * piOutput, ALLOCATOR_PROPERTIES * props, const AM_MEDIA_TYPE * amt);
|
||||
|
||||
HRESULT Parser_Create(ParserImpl *parser, const IBaseFilterVtbl *vtbl, IUnknown *outer,
|
||||
const CLSID *clsid, const BaseFilterFuncTable *func_table, const WCHAR *sink_name,
|
||||
const CLSID *clsid, const struct strmbase_filter_ops *func_table, const WCHAR *sink_name,
|
||||
PFN_PROCESS_SAMPLE, PFN_QUERY_ACCEPT, PFN_PRE_CONNECT, PFN_CLEANUP, PFN_DISCONNECT,
|
||||
REQUESTPROC, STOPPROCESSPROC, SourceSeeking_ChangeStop,
|
||||
SourceSeeking_ChangeStart, SourceSeeking_ChangeRate) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -414,7 +414,7 @@ static void wave_parser_destroy(BaseFilter *iface)
|
|||
Parser_Destroy(&filter->Parser);
|
||||
}
|
||||
|
||||
static const BaseFilterFuncTable wave_parser_func_table =
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = parser_get_pin,
|
||||
.filter_destroy = wave_parser_destroy,
|
||||
|
@ -432,7 +432,7 @@ HRESULT WAVEParser_create(IUnknown *outer, void **out)
|
|||
This = CoTaskMemAlloc(sizeof(WAVEParserImpl));
|
||||
|
||||
hr = Parser_Create(&This->Parser, &WAVEParser_Vtbl, outer, &CLSID_WAVEParser,
|
||||
&wave_parser_func_table, sink_name, WAVEParser_Sample, WAVEParser_QueryAccept,
|
||||
&filter_ops, sink_name, WAVEParser_Sample, WAVEParser_QueryAccept,
|
||||
WAVEParser_InputPin_PreConnect, WAVEParser_Cleanup, WAVEParser_disconnect,
|
||||
WAVEParser_first_request, NULL, NULL, WAVEParserImpl_seek, NULL);
|
||||
|
||||
|
|
|
@ -292,7 +292,7 @@ VOID WINAPI BaseFilterImpl_IncrementPinVersion(BaseFilter *filter)
|
|||
}
|
||||
|
||||
void strmbase_filter_init(BaseFilter *filter, const IBaseFilterVtbl *vtbl, IUnknown *outer,
|
||||
const CLSID *clsid, const BaseFilterFuncTable *func_table)
|
||||
const CLSID *clsid, const struct strmbase_filter_ops *func_table)
|
||||
{
|
||||
memset(filter, 0, sizeof(*filter));
|
||||
|
||||
|
|
|
@ -204,7 +204,8 @@ static HRESULT renderer_query_interface(BaseFilter *iface, REFIID iid, void **ou
|
|||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
static const BaseFilterFuncTable RendererBaseFilterFuncTable = {
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = renderer_get_pin,
|
||||
.filter_destroy = renderer_destroy,
|
||||
.filter_query_interface = renderer_query_interface,
|
||||
|
@ -239,7 +240,7 @@ HRESULT WINAPI strmbase_renderer_init(BaseRenderer *filter, const IBaseFilterVtb
|
|||
HRESULT hr;
|
||||
|
||||
memset(filter, 0, sizeof(*filter));
|
||||
strmbase_filter_init(&filter->filter, vtbl, outer, clsid, &RendererBaseFilterFuncTable);
|
||||
strmbase_filter_init(&filter->filter, vtbl, outer, clsid, &filter_ops);
|
||||
|
||||
filter->pFuncsTable = pBaseFuncsTable;
|
||||
|
||||
|
|
|
@ -156,7 +156,8 @@ static void transform_destroy(BaseFilter *iface)
|
|||
CoTaskMemFree(filter);
|
||||
}
|
||||
|
||||
static const BaseFilterFuncTable tfBaseFuncTable = {
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = transform_get_pin,
|
||||
.filter_destroy = transform_destroy,
|
||||
};
|
||||
|
@ -277,7 +278,7 @@ static HRESULT strmbase_transform_init(IUnknown *outer, const CLSID *clsid,
|
|||
PIN_INFO piInput;
|
||||
PIN_INFO piOutput;
|
||||
|
||||
strmbase_filter_init(&filter->filter, &transform_vtbl, outer, clsid, &tfBaseFuncTable);
|
||||
strmbase_filter_init(&filter->filter, &transform_vtbl, outer, clsid, &filter_ops);
|
||||
|
||||
InitializeCriticalSection(&filter->csReceive);
|
||||
filter->csReceive.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": TransformFilter.csReceive");
|
||||
|
|
|
@ -1245,7 +1245,8 @@ static void gstdemux_destroy(BaseFilter *iface)
|
|||
CoTaskMemFree(filter);
|
||||
}
|
||||
|
||||
static const BaseFilterFuncTable BaseFuncTable = {
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = gstdemux_get_pin,
|
||||
.filter_destroy = gstdemux_destroy,
|
||||
};
|
||||
|
@ -1271,7 +1272,7 @@ IUnknown * CALLBACK Gstreamer_Splitter_create(IUnknown *outer, HRESULT *phr)
|
|||
}
|
||||
memset(This, 0, sizeof(*This));
|
||||
|
||||
strmbase_filter_init(&This->filter, &GST_Vtbl, outer, &CLSID_Gstreamer_Splitter, &BaseFuncTable);
|
||||
strmbase_filter_init(&This->filter, &GST_Vtbl, outer, &CLSID_Gstreamer_Splitter, &filter_ops);
|
||||
|
||||
This->cStreams = 0;
|
||||
This->ppPins = NULL;
|
||||
|
|
|
@ -278,7 +278,8 @@ static void qt_splitter_destroy(BaseFilter *iface)
|
|||
CoTaskMemFree(filter);
|
||||
}
|
||||
|
||||
static const BaseFilterFuncTable BaseFuncTable = {
|
||||
static const struct strmbase_filter_ops filter_ops =
|
||||
{
|
||||
.filter_get_pin = qt_splitter_get_pin,
|
||||
.filter_destroy = qt_splitter_destroy,
|
||||
};
|
||||
|
@ -301,7 +302,7 @@ IUnknown * CALLBACK QTSplitter_create(IUnknown *outer, HRESULT *phr)
|
|||
}
|
||||
ZeroMemory(This,sizeof(*This));
|
||||
|
||||
strmbase_filter_init(&This->filter, &QT_Vtbl, outer, &CLSID_QTSplitter, &BaseFuncTable);
|
||||
strmbase_filter_init(&This->filter, &QT_Vtbl, outer, &CLSID_QTSplitter, &filter_ops);
|
||||
|
||||
InitializeCriticalSection(&This->csReceive);
|
||||
This->csReceive.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": QTSplitter.csReceive");
|
||||
|
|
|
@ -171,15 +171,15 @@ typedef struct BaseFilter
|
|||
CLSID clsid;
|
||||
LONG pin_version;
|
||||
|
||||
const struct BaseFilterFuncTable* pFuncsTable;
|
||||
const struct strmbase_filter_ops *pFuncsTable;
|
||||
} BaseFilter;
|
||||
|
||||
typedef struct BaseFilterFuncTable
|
||||
struct strmbase_filter_ops
|
||||
{
|
||||
IPin *(*filter_get_pin)(BaseFilter *iface, unsigned int index);
|
||||
void (*filter_destroy)(BaseFilter *iface);
|
||||
HRESULT (*filter_query_interface)(BaseFilter *iface, REFIID iid, void **out);
|
||||
} BaseFilterFuncTable;
|
||||
};
|
||||
|
||||
HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv);
|
||||
ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter * iface);
|
||||
|
@ -200,7 +200,7 @@ HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVend
|
|||
VOID WINAPI BaseFilterImpl_IncrementPinVersion(BaseFilter* This);
|
||||
|
||||
void strmbase_filter_init(BaseFilter *filter, const IBaseFilterVtbl *vtbl, IUnknown *outer,
|
||||
const CLSID *clsid, const BaseFilterFuncTable *func_table);
|
||||
const CLSID *clsid, const struct strmbase_filter_ops *func_table);
|
||||
void strmbase_filter_cleanup(BaseFilter *filter);
|
||||
|
||||
/* Enums */
|
||||
|
|
Loading…
Reference in New Issue