Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qcap/audiorecord.c | 5 +++-- dlls/qcap/avico.c | 5 +++-- dlls/qcap/avimux.c | 5 +++-- dlls/qcap/smartteefilter.c | 5 +++-- dlls/qcap/vfwcapture.c | 5 +++-- dlls/qedit/samplegrabber.c | 5 +++-- dlls/quartz/avisplit.c | 4 ++-- dlls/quartz/filesource.c | 4 ++-- dlls/quartz/mpegsplit.c | 4 ++-- dlls/quartz/parser.c | 2 +- dlls/quartz/parser.h | 2 +- dlls/quartz/waveparser.c | 4 ++-- dlls/strmbase/filter.c | 2 +- dlls/strmbase/renderer.c | 5 +++-- dlls/strmbase/transform.c | 5 +++-- dlls/winegstreamer/gstdemux.c | 5 +++-- dlls/wineqtdecoder/qtsplitter.c | 5 +++-- include/wine/strmbase.h | 8 ++++---- 18 files changed, 45 insertions(+), 35 deletions(-)
diff --git a/dlls/qcap/audiorecord.c b/dlls/qcap/audiorecord.c index de2d271aa53..fd0ca32ee18 100644 --- a/dlls/qcap/audiorecord.c +++ b/dlls/qcap/audiorecord.c @@ -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; diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c index 7ef7b51b11d..38ba2c70e10 100644 --- a/dlls/qcap/avico.c +++ b/dlls/qcap/avico.c @@ -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;
diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c index fb0ae4188e7..a825c121aff 100644 --- a/dlls/qcap/avimux.c +++ b/dlls/qcap/avimux.c @@ -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; diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c index b93b3324d75..ec124494e55 100644 --- a/dlls/qcap/smartteefilter.c +++ b/dlls/qcap/smartteefilter.c @@ -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, diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index e194bbf010e..c4208ea16d4 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -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; diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index 20525401335..4f923fa5dda 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -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; diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c index fd67379f2be..27857c0171d 100644 --- a/dlls/quartz/avisplit.c +++ b/dlls/quartz/avisplit.c @@ -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); diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index d93375e1e9c..df2e071fc7f 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -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;
diff --git a/dlls/quartz/mpegsplit.c b/dlls/quartz/mpegsplit.c index 5e5a88e4612..5c38596b1e9 100644 --- a/dlls/quartz/mpegsplit.c +++ b/dlls/quartz/mpegsplit.c @@ -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)) diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index ee6a4a57938..3a36dca7884 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -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, diff --git a/dlls/quartz/parser.h b/dlls/quartz/parser.h index 95b98d1f74d..70d6318af80 100644 --- a/dlls/quartz/parser.h +++ b/dlls/quartz/parser.h @@ -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; diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c index 149e69cdb61..d08cad144d2 100644 --- a/dlls/quartz/waveparser.c +++ b/dlls/quartz/waveparser.c @@ -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);
diff --git a/dlls/strmbase/filter.c b/dlls/strmbase/filter.c index b1c955825d3..078d991c249 100644 --- a/dlls/strmbase/filter.c +++ b/dlls/strmbase/filter.c @@ -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));
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 0d53934af2d..c842120538c 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -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;
diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index c14142fcf4d..ff75f08f5c4 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -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"); diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 0ce64e2b9a8..acf83c89eac 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1241,7 +1241,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, }; @@ -1267,7 +1268,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; diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c index fb85d576dbd..ebffc94fc76 100644 --- a/dlls/wineqtdecoder/qtsplitter.c +++ b/dlls/wineqtdecoder/qtsplitter.c @@ -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"); diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index b1483fc26c9..649d272b874 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -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 */