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 */
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/qcap/audiorecord.c | 18 ++++++------ dlls/qcap/avico.c | 20 ++++++------- dlls/qcap/avimux.c | 20 ++++++------- dlls/qcap/smartteefilter.c | 16 +++++----- dlls/qcap/vfwcapture.c | 16 +++++----- dlls/qedit/samplegrabber.c | 16 +++++----- dlls/quartz/avisplit.c | 2 +- dlls/quartz/filesource.c | 16 +++++----- dlls/quartz/mpegsplit.c | 4 +-- dlls/quartz/parser.c | 6 ++-- dlls/quartz/parser.h | 4 +-- dlls/quartz/waveparser.c | 2 +- dlls/strmbase/enumpins.c | 4 +-- dlls/strmbase/filter.c | 50 ++++++++++++++++---------------- dlls/strmbase/renderer.c | 14 ++++----- dlls/strmbase/strmbase_private.h | 2 +- dlls/strmbase/transform.c | 10 +++---- dlls/strmbase/video.c | 2 +- dlls/strmbase/window.c | 4 ++- dlls/winegstreamer/gstdemux.c | 6 ++-- dlls/wineqtdecoder/qtsplitter.c | 12 ++++---- include/wine/strmbase.h | 29 +++++++++--------- 22 files changed, 138 insertions(+), 135 deletions(-)
diff --git a/dlls/qcap/audiorecord.c b/dlls/qcap/audiorecord.c index fd0ca32ee18..6d487dbe2d9 100644 --- a/dlls/qcap/audiorecord.c +++ b/dlls/qcap/audiorecord.c @@ -35,20 +35,20 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap);
typedef struct { - BaseFilter filter; + struct strmbase_filter filter; IPersistPropertyBag IPersistPropertyBag_iface; BaseOutputPin *output; } AudioRecord;
-static inline AudioRecord *impl_from_BaseFilter(BaseFilter *filter) +static inline AudioRecord *impl_from_strmbase_filter(struct strmbase_filter *filter) { return CONTAINING_RECORD(filter, AudioRecord, filter); }
static inline AudioRecord *impl_from_IBaseFilter(IBaseFilter *iface) { - BaseFilter *filter = CONTAINING_RECORD(iface, BaseFilter, IBaseFilter_iface); - return impl_from_BaseFilter(filter); + struct strmbase_filter *filter = CONTAINING_RECORD(iface, struct strmbase_filter, IBaseFilter_iface); + return impl_from_strmbase_filter(filter); }
static inline AudioRecord *impl_from_IPersistPropertyBag(IPersistPropertyBag *iface) @@ -95,23 +95,23 @@ static const IBaseFilterVtbl AudioRecordVtbl = { BaseFilterImpl_QueryVendorInfo };
-static IPin *audio_record_get_pin(BaseFilter *iface, unsigned int index) +static IPin *audio_record_get_pin(struct strmbase_filter *iface, unsigned int index) { FIXME("iface %p, index %u, stub!\n", iface, index); return NULL; }
-static void audio_record_destroy(BaseFilter *iface) +static void audio_record_destroy(struct strmbase_filter *iface) { - AudioRecord *filter = impl_from_BaseFilter(iface); + AudioRecord *filter = impl_from_strmbase_filter(iface);
strmbase_filter_cleanup(&filter->filter); CoTaskMemFree(filter); }
-static HRESULT audio_record_query_interface(BaseFilter *iface, REFIID iid, void **out) +static HRESULT audio_record_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) { - AudioRecord *filter = impl_from_BaseFilter(iface); + AudioRecord *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_IPersistPropertyBag)) *out = &filter->IPersistPropertyBag_iface; diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c index 38ba2c70e10..5a2e35c7d11 100644 --- a/dlls/qcap/avico.c +++ b/dlls/qcap/avico.c @@ -34,7 +34,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap);
typedef struct { - BaseFilter filter; + struct strmbase_filter filter; IPersistPropertyBag IPersistPropertyBag_iface;
BaseInputPin sink; @@ -51,15 +51,15 @@ typedef struct { DWORD frame_cnt; } AVICompressor;
-static inline AVICompressor *impl_from_BaseFilter(BaseFilter *filter) +static inline AVICompressor *impl_from_strmbase_filter(struct strmbase_filter *filter) { return CONTAINING_RECORD(filter, AVICompressor, filter); }
static inline AVICompressor *impl_from_IBaseFilter(IBaseFilter *iface) { - BaseFilter *filter = CONTAINING_RECORD(iface, BaseFilter, IBaseFilter_iface); - return impl_from_BaseFilter(filter); + struct strmbase_filter *filter = CONTAINING_RECORD(iface, struct strmbase_filter, IBaseFilter_iface); + return impl_from_strmbase_filter(filter); }
static inline AVICompressor *impl_from_BasePin(BasePin *pin) @@ -178,9 +178,9 @@ static const IBaseFilterVtbl AVICompressorVtbl = { BaseFilterImpl_QueryVendorInfo, };
-static IPin *avi_compressor_get_pin(BaseFilter *iface, unsigned int index) +static IPin *avi_compressor_get_pin(struct strmbase_filter *iface, unsigned int index) { - AVICompressor *filter = impl_from_BaseFilter(iface); + AVICompressor *filter = impl_from_strmbase_filter(iface);
if (index == 0) return &filter->sink.pin.IPin_iface; @@ -189,9 +189,9 @@ static IPin *avi_compressor_get_pin(BaseFilter *iface, unsigned int index) return NULL; }
-static void avi_compressor_destroy(BaseFilter *iface) +static void avi_compressor_destroy(struct strmbase_filter *iface) { - AVICompressor *filter = impl_from_BaseFilter(iface); + AVICompressor *filter = impl_from_strmbase_filter(iface);
if (filter->hic) ICClose(filter->hic); @@ -202,9 +202,9 @@ static void avi_compressor_destroy(BaseFilter *iface) heap_free(filter); }
-static HRESULT avi_compressor_query_interface(BaseFilter *iface, REFIID iid, void **out) +static HRESULT avi_compressor_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) { - AVICompressor *filter = impl_from_BaseFilter(iface); + AVICompressor *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_IPersistPropertyBag)) *out = &filter->IPersistPropertyBag_iface; diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c index a825c121aff..9785ec50551 100644 --- a/dlls/qcap/avimux.c +++ b/dlls/qcap/avimux.c @@ -70,7 +70,7 @@ typedef struct { } AviMuxIn;
typedef struct { - BaseFilter filter; + struct strmbase_filter filter; IConfigAviMux IConfigAviMux_iface; IConfigInterleaving IConfigInterleaving_iface; IMediaSeeking IMediaSeeking_iface; @@ -108,14 +108,14 @@ typedef struct {
static HRESULT create_input_pin(AviMux*);
-static inline AviMux* impl_from_BaseFilter(BaseFilter *filter) +static inline AviMux* impl_from_strmbase_filter(struct strmbase_filter *filter) { return CONTAINING_RECORD(filter, AviMux, filter); }
-static IPin *avi_mux_get_pin(BaseFilter *iface, unsigned int index) +static IPin *avi_mux_get_pin(struct strmbase_filter *iface, unsigned int index) { - AviMux *filter = impl_from_BaseFilter(iface); + AviMux *filter = impl_from_strmbase_filter(iface);
if (!index) return &filter->source.pin.IPin_iface; @@ -124,9 +124,9 @@ static IPin *avi_mux_get_pin(BaseFilter *iface, unsigned int index) return NULL; }
-static void avi_mux_destroy(BaseFilter *iface) +static void avi_mux_destroy(struct strmbase_filter *iface) { - AviMux *filter = impl_from_BaseFilter(iface); + AviMux *filter = impl_from_strmbase_filter(iface); int i;
strmbase_source_cleanup(&filter->source); @@ -146,9 +146,9 @@ static void avi_mux_destroy(BaseFilter *iface) ObjectRefCount(FALSE); }
-static HRESULT avi_mux_query_interface(BaseFilter *iface, REFIID iid, void **out) +static HRESULT avi_mux_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) { - AviMux *filter = impl_from_BaseFilter(iface); + AviMux *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_IConfigAviMux)) *out = &filter->IConfigAviMux_iface; @@ -176,8 +176,8 @@ static const struct strmbase_filter_ops filter_ops =
static inline AviMux* impl_from_IBaseFilter(IBaseFilter *iface) { - BaseFilter *filter = CONTAINING_RECORD(iface, BaseFilter, IBaseFilter_iface); - return impl_from_BaseFilter(filter); + struct strmbase_filter *filter = CONTAINING_RECORD(iface, struct strmbase_filter, IBaseFilter_iface); + return impl_from_strmbase_filter(filter); }
static HRESULT out_flush(AviMux *This) diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c index ec124494e55..6d452287f88 100644 --- a/dlls/qcap/smartteefilter.c +++ b/dlls/qcap/smartteefilter.c @@ -36,20 +36,20 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap);
typedef struct { - BaseFilter filter; + struct strmbase_filter filter; BaseInputPin sink; BaseOutputPin capture, preview; } SmartTeeFilter;
-static inline SmartTeeFilter *impl_from_BaseFilter(BaseFilter *filter) +static inline SmartTeeFilter *impl_from_strmbase_filter(struct strmbase_filter *filter) { return CONTAINING_RECORD(filter, SmartTeeFilter, filter); }
static inline SmartTeeFilter *impl_from_IBaseFilter(IBaseFilter *iface) { - BaseFilter *filter = CONTAINING_RECORD(iface, BaseFilter, IBaseFilter_iface); - return impl_from_BaseFilter(filter); + struct strmbase_filter *filter = CONTAINING_RECORD(iface, struct strmbase_filter, IBaseFilter_iface); + return impl_from_strmbase_filter(filter); }
static inline SmartTeeFilter *impl_from_BasePin(BasePin *pin) @@ -117,9 +117,9 @@ static const IBaseFilterVtbl SmartTeeFilterVtbl = { BaseFilterImpl_QueryVendorInfo };
-static IPin *smart_tee_get_pin(BaseFilter *iface, unsigned int index) +static IPin *smart_tee_get_pin(struct strmbase_filter *iface, unsigned int index) { - SmartTeeFilter *filter = impl_from_BaseFilter(iface); + SmartTeeFilter *filter = impl_from_strmbase_filter(iface);
if (index == 0) return &filter->sink.pin.IPin_iface; @@ -130,9 +130,9 @@ static IPin *smart_tee_get_pin(BaseFilter *iface, unsigned int index) return NULL; }
-static void smart_tee_destroy(BaseFilter *iface) +static void smart_tee_destroy(struct strmbase_filter *iface) { - SmartTeeFilter *filter = impl_from_BaseFilter(iface); + SmartTeeFilter *filter = impl_from_strmbase_filter(iface);
strmbase_sink_cleanup(&filter->sink); strmbase_source_cleanup(&filter->capture); diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index c4208ea16d4..6010fad9c58 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -46,7 +46,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap);
typedef struct VfwCapture { - BaseFilter filter; + struct strmbase_filter filter; IAMStreamConfig IAMStreamConfig_iface; IAMVideoProcAmp IAMVideoProcAmp_iface; IPersistPropertyBag IPersistPropertyBag_iface; @@ -57,7 +57,7 @@ typedef struct VfwCapture IKsPropertySet IKsPropertySet_iface; } VfwCapture;
-static inline VfwCapture *impl_from_BaseFilter(BaseFilter *iface) +static inline VfwCapture *impl_from_strmbase_filter(struct strmbase_filter *iface) { return CONTAINING_RECORD(iface, VfwCapture, filter); } @@ -87,9 +87,9 @@ static inline VfwCapture *impl_from_IPin(IPin *iface) return CONTAINING_RECORD(iface, VfwCapture, source.pin.IPin_iface); }
-static IPin *vfw_capture_get_pin(BaseFilter *iface, unsigned int index) +static IPin *vfw_capture_get_pin(struct strmbase_filter *iface, unsigned int index) { - VfwCapture *This = impl_from_BaseFilter(iface); + VfwCapture *This = impl_from_strmbase_filter(iface);
if (index >= 1) return NULL; @@ -97,9 +97,9 @@ static IPin *vfw_capture_get_pin(BaseFilter *iface, unsigned int index) return &This->source.pin.IPin_iface; }
-static void vfw_capture_destroy(BaseFilter *iface) +static void vfw_capture_destroy(struct strmbase_filter *iface) { - VfwCapture *filter = impl_from_BaseFilter(iface); + VfwCapture *filter = impl_from_strmbase_filter(iface);
if (filter->init) { @@ -119,9 +119,9 @@ static void vfw_capture_destroy(BaseFilter *iface) ObjectRefCount(FALSE); }
-static HRESULT vfw_capture_query_interface(BaseFilter *iface, REFIID iid, void **out) +static HRESULT vfw_capture_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) { - VfwCapture *filter = impl_from_BaseFilter(iface); + VfwCapture *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_IPersistPropertyBag)) *out = &filter->IPersistPropertyBag_iface; diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index 4f923fa5dda..a275d56738b 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -211,7 +211,7 @@ static inline SG_Pin *impl_from_IPin(IPin *iface)
/* Sample Grabber filter implementation */ typedef struct _SG_Impl { - BaseFilter filter; + struct strmbase_filter filter; ISampleGrabber ISampleGrabber_iface; /* IMediaSeeking and IMediaPosition are implemented by ISeekingPassThru */ IUnknown* seekthru_unk; @@ -234,7 +234,7 @@ enum { OneShot_Past, };
-static inline SG_Impl *impl_from_BaseFilter(BaseFilter *iface) +static inline SG_Impl *impl_from_strmbase_filter(struct strmbase_filter *iface) { return CONTAINING_RECORD(iface, SG_Impl, filter); } @@ -273,9 +273,9 @@ static void SampleGrabber_cleanup(SG_Impl *This) IUnknown_Release(This->seekthru_unk); }
-static IPin *sample_grabber_get_pin(BaseFilter *iface, unsigned int index) +static IPin *sample_grabber_get_pin(struct strmbase_filter *iface, unsigned int index) { - SG_Impl *filter = impl_from_BaseFilter(iface); + SG_Impl *filter = impl_from_strmbase_filter(iface);
if (index == 0) return &filter->pin_in.IPin_iface; @@ -284,18 +284,18 @@ static IPin *sample_grabber_get_pin(BaseFilter *iface, unsigned int index) return NULL; }
-static void sample_grabber_destroy(BaseFilter *iface) +static void sample_grabber_destroy(struct strmbase_filter *iface) { - SG_Impl *filter = impl_from_BaseFilter(iface); + SG_Impl *filter = impl_from_strmbase_filter(iface);
SampleGrabber_cleanup(filter); strmbase_filter_cleanup(&filter->filter); CoTaskMemFree(filter); }
-static HRESULT sample_grabber_query_interface(BaseFilter *iface, REFIID iid, void **out) +static HRESULT sample_grabber_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) { - SG_Impl *filter = impl_from_BaseFilter(iface); + SG_Impl *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_ISampleGrabber)) *out = &filter->ISampleGrabber_iface; diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c index 27857c0171d..9d665b401c6 100644 --- a/dlls/quartz/avisplit.c +++ b/dlls/quartz/avisplit.c @@ -1404,7 +1404,7 @@ static const IBaseFilterVtbl AVISplitterImpl_Vtbl = BaseFilterImpl_QueryVendorInfo, };
-static void avi_splitter_destroy(BaseFilter *iface) +static void avi_splitter_destroy(struct strmbase_filter *iface) { AVISplitterImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface); AVISplitter_Flush(filter); diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index df2e071fc7f..5e1880c84e1 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -58,7 +58,7 @@ typedef struct DATAREQUEST
typedef struct AsyncReader { - BaseFilter filter; + struct strmbase_filter filter; IFileSourceFilter IFileSourceFilter_iface;
BaseOutputPin source; @@ -81,7 +81,7 @@ typedef struct AsyncReader static const IPinVtbl FileAsyncReaderPin_Vtbl; static const BaseOutputPinFuncTable output_BaseOutputFuncTable;
-static inline AsyncReader *impl_from_BaseFilter(BaseFilter *iface) +static inline AsyncReader *impl_from_strmbase_filter(struct strmbase_filter *iface) { return CONTAINING_RECORD(iface, AsyncReader, filter); } @@ -338,18 +338,18 @@ BOOL get_media_type(const WCHAR *filename, GUID *majortype, GUID *subtype, GUID return FALSE; }
-static IPin *async_reader_get_pin(BaseFilter *iface, unsigned int index) +static IPin *async_reader_get_pin(struct strmbase_filter *iface, unsigned int index) { - AsyncReader *filter = impl_from_BaseFilter(iface); + AsyncReader *filter = impl_from_strmbase_filter(iface);
if (!index && filter->pszFileName) return &filter->source.pin.IPin_iface; return NULL; }
-static void async_reader_destroy(BaseFilter *iface) +static void async_reader_destroy(struct strmbase_filter *iface) { - AsyncReader *filter = impl_from_BaseFilter(iface); + AsyncReader *filter = impl_from_strmbase_filter(iface);
if (filter->pszFileName) { @@ -379,9 +379,9 @@ static void async_reader_destroy(BaseFilter *iface) CoTaskMemFree(filter); }
-static HRESULT async_reader_query_interface(BaseFilter *iface, REFIID iid, void **out) +static HRESULT async_reader_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) { - AsyncReader *filter = impl_from_BaseFilter(iface); + AsyncReader *filter = impl_from_strmbase_filter(iface);
if (IsEqualGUID(iid, &IID_IFileSourceFilter)) { diff --git a/dlls/quartz/mpegsplit.c b/dlls/quartz/mpegsplit.c index 5c38596b1e9..48da7fb0b36 100644 --- a/dlls/quartz/mpegsplit.c +++ b/dlls/quartz/mpegsplit.c @@ -836,13 +836,13 @@ static const IAMStreamSelectVtbl AMStreamSelectVtbl = AMStreamSelect_Enable };
-static void mpeg_splitter_destroy(BaseFilter *iface) +static void mpeg_splitter_destroy(struct strmbase_filter *iface) { MPEGSplitterImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface); Parser_Destroy(&filter->Parser); }
-static HRESULT mpeg_splitter_query_interface(BaseFilter *iface, REFIID iid, void **out) +static HRESULT mpeg_splitter_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) { MPEGSplitterImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface);
diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 3a36dca7884..7382048eec2 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -56,14 +56,14 @@ static inline ParserImpl *impl_from_IBaseFilter( IBaseFilter *iface ) return CONTAINING_RECORD(iface, ParserImpl, filter.IBaseFilter_iface); }
-static inline ParserImpl *impl_from_BaseFilter( BaseFilter *iface ) +static inline ParserImpl *impl_from_strmbase_filter(struct strmbase_filter *iface) { return CONTAINING_RECORD(iface, ParserImpl, filter); }
-IPin *parser_get_pin(BaseFilter *iface, unsigned int index) +IPin *parser_get_pin(struct strmbase_filter *iface, unsigned int index) { - ParserImpl *filter = impl_from_BaseFilter(iface); + ParserImpl *filter = impl_from_strmbase_filter(iface);
if (!index) return &filter->pInputPin->pin.IPin_iface; diff --git a/dlls/quartz/parser.h b/dlls/quartz/parser.h index 70d6318af80..0caa8af831e 100644 --- a/dlls/quartz/parser.h +++ b/dlls/quartz/parser.h @@ -40,7 +40,7 @@ typedef struct Parser_OutputPin
struct ParserImpl { - BaseFilter filter; + struct strmbase_filter filter;
PFN_DISCONNECT fnDisconnect;
@@ -67,7 +67,7 @@ extern HRESULT WINAPI Parser_Run(IBaseFilter * iface, REFERENCE_TIME tStart); extern HRESULT WINAPI Parser_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState); extern HRESULT WINAPI Parser_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock);
-IPin *parser_get_pin(BaseFilter *iface, unsigned int index) DECLSPEC_HIDDEN; +IPin *parser_get_pin(struct strmbase_filter *iface, unsigned int index) DECLSPEC_HIDDEN;
/* COM helpers */ static inline Parser_OutputPin *unsafe_impl_Parser_OutputPin_from_IPin( IPin *iface ) diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c index d08cad144d2..03a39749cc6 100644 --- a/dlls/quartz/waveparser.c +++ b/dlls/quartz/waveparser.c @@ -408,7 +408,7 @@ static const IBaseFilterVtbl WAVEParser_Vtbl = BaseFilterImpl_QueryVendorInfo, };
-static void wave_parser_destroy(BaseFilter *iface) +static void wave_parser_destroy(struct strmbase_filter *iface) { WAVEParserImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface); Parser_Destroy(&filter->Parser); diff --git a/dlls/strmbase/enumpins.c b/dlls/strmbase/enumpins.c index 6e3357f5605..222f61c2fcd 100644 --- a/dlls/strmbase/enumpins.c +++ b/dlls/strmbase/enumpins.c @@ -28,7 +28,7 @@ typedef struct IEnumPinsImpl IEnumPins IEnumPins_iface; LONG refCount; unsigned int uIndex, count; - BaseFilter *base; + struct strmbase_filter *base; DWORD Version; } IEnumPinsImpl;
@@ -39,7 +39,7 @@ static inline IEnumPinsImpl *impl_from_IEnumPins(IEnumPins *iface)
static const struct IEnumPinsVtbl IEnumPinsImpl_Vtbl;
-HRESULT enum_pins_create(BaseFilter *base, IEnumPins **out) +HRESULT enum_pins_create(struct strmbase_filter *base, IEnumPins **out) { IEnumPinsImpl *object; IPin *pin; diff --git a/dlls/strmbase/filter.c b/dlls/strmbase/filter.c index 078d991c249..b52a99d25b2 100644 --- a/dlls/strmbase/filter.c +++ b/dlls/strmbase/filter.c @@ -22,14 +22,14 @@
WINE_DEFAULT_DEBUG_CHANNEL(strmbase);
-static inline BaseFilter *impl_from_IUnknown(IUnknown *iface) +static inline struct strmbase_filter *impl_from_IUnknown(IUnknown *iface) { - return CONTAINING_RECORD(iface, BaseFilter, IUnknown_inner); + return CONTAINING_RECORD(iface, struct strmbase_filter, IUnknown_inner); }
static HRESULT WINAPI filter_inner_QueryInterface(IUnknown *iface, REFIID iid, void **out) { - BaseFilter *filter = impl_from_IUnknown(iface); + struct strmbase_filter *filter = impl_from_IUnknown(iface); HRESULT hr;
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); @@ -62,7 +62,7 @@ static HRESULT WINAPI filter_inner_QueryInterface(IUnknown *iface, REFIID iid, v
static ULONG WINAPI filter_inner_AddRef(IUnknown *iface) { - BaseFilter *filter = impl_from_IUnknown(iface); + struct strmbase_filter *filter = impl_from_IUnknown(iface); ULONG refcount = InterlockedIncrement(&filter->refcount);
TRACE("%p increasing refcount to %u.\n", filter, refcount); @@ -72,7 +72,7 @@ static ULONG WINAPI filter_inner_AddRef(IUnknown *iface)
static ULONG WINAPI filter_inner_Release(IUnknown *iface) { - BaseFilter *filter = impl_from_IUnknown(iface); + struct strmbase_filter *filter = impl_from_IUnknown(iface); ULONG refcount = InterlockedDecrement(&filter->refcount);
TRACE("%p decreasing refcount to %u.\n", filter, refcount); @@ -90,32 +90,32 @@ static const IUnknownVtbl filter_inner_vtbl = filter_inner_Release, };
-static inline BaseFilter *impl_from_IBaseFilter(IBaseFilter *iface) +static inline struct strmbase_filter *impl_from_IBaseFilter(IBaseFilter *iface) { - return CONTAINING_RECORD(iface, BaseFilter, IBaseFilter_iface); + return CONTAINING_RECORD(iface, struct strmbase_filter, IBaseFilter_iface); }
HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter *iface, REFIID iid, void **out) { - BaseFilter *filter = impl_from_IBaseFilter(iface); + struct strmbase_filter *filter = impl_from_IBaseFilter(iface); return IUnknown_QueryInterface(filter->outer_unk, iid, out); }
ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter *iface) { - BaseFilter *filter = impl_from_IBaseFilter(iface); + struct strmbase_filter *filter = impl_from_IBaseFilter(iface); return IUnknown_AddRef(filter->outer_unk); }
ULONG WINAPI BaseFilterImpl_Release(IBaseFilter *iface) { - BaseFilter *filter = impl_from_IBaseFilter(iface); + struct strmbase_filter *filter = impl_from_IBaseFilter(iface); return IUnknown_Release(filter->outer_unk); }
HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter * iface, CLSID * pClsid) { - BaseFilter *This = impl_from_IBaseFilter(iface); + struct strmbase_filter *This = impl_from_IBaseFilter(iface); TRACE("(%p)->(%p)\n", This, pClsid);
*pClsid = This->clsid; @@ -125,7 +125,7 @@ HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter * iface, CLSID * pClsid)
HRESULT WINAPI BaseFilterImpl_Stop(IBaseFilter *iface) { - BaseFilter *filter = impl_from_IBaseFilter(iface); + struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
TRACE("iface %p.\n", iface);
@@ -138,7 +138,7 @@ HRESULT WINAPI BaseFilterImpl_Stop(IBaseFilter *iface)
HRESULT WINAPI BaseFilterImpl_Pause(IBaseFilter *iface) { - BaseFilter *filter = impl_from_IBaseFilter(iface); + struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
TRACE("iface %p.\n", iface);
@@ -151,7 +151,7 @@ HRESULT WINAPI BaseFilterImpl_Pause(IBaseFilter *iface)
HRESULT WINAPI BaseFilterImpl_Run(IBaseFilter *iface, REFERENCE_TIME start) { - BaseFilter *filter = impl_from_IBaseFilter(iface); + struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
TRACE("iface %p, start %s.\n", iface, wine_dbgstr_longlong(start));
@@ -164,7 +164,7 @@ HRESULT WINAPI BaseFilterImpl_Run(IBaseFilter *iface, REFERENCE_TIME start)
HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState ) { - BaseFilter *This = impl_from_IBaseFilter(iface); + struct strmbase_filter *This = impl_from_IBaseFilter(iface); TRACE("(%p)->(%d, %p)\n", This, dwMilliSecsTimeout, pState);
EnterCriticalSection(&This->csFilter); @@ -178,7 +178,7 @@ HRESULT WINAPI BaseFilterImpl_GetState(IBaseFilter * iface, DWORD dwMilliSecsTim
HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock) { - BaseFilter *This = impl_from_IBaseFilter(iface); + struct strmbase_filter *This = impl_from_IBaseFilter(iface); TRACE("(%p)->(%p)\n", This, pClock);
EnterCriticalSection(&This->csFilter); @@ -196,7 +196,7 @@ HRESULT WINAPI BaseFilterImpl_SetSyncSource(IBaseFilter * iface, IReferenceClock
HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter * iface, IReferenceClock **ppClock) { - BaseFilter *This = impl_from_IBaseFilter(iface); + struct strmbase_filter *This = impl_from_IBaseFilter(iface); TRACE("(%p)->(%p)\n", This, ppClock);
EnterCriticalSection(&This->csFilter); @@ -212,7 +212,7 @@ HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter * iface, IReferenceClock
HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **enum_pins) { - BaseFilter *filter = impl_from_IBaseFilter(iface); + struct strmbase_filter *filter = impl_from_IBaseFilter(iface);
TRACE("iface %p, enum_pins %p.\n", iface, enum_pins);
@@ -221,7 +221,7 @@ HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **enum_pins
HRESULT WINAPI BaseFilterImpl_FindPin(IBaseFilter *iface, const WCHAR *id, IPin **ret) { - BaseFilter *This = impl_from_IBaseFilter(iface); + struct strmbase_filter *This = impl_from_IBaseFilter(iface); unsigned int i; PIN_INFO info; HRESULT hr; @@ -249,7 +249,7 @@ HRESULT WINAPI BaseFilterImpl_FindPin(IBaseFilter *iface, const WCHAR *id, IPin
HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *pInfo) { - BaseFilter *This = impl_from_IBaseFilter(iface); + struct strmbase_filter *This = impl_from_IBaseFilter(iface); TRACE("(%p)->(%p)\n", This, pInfo);
lstrcpyW(pInfo->achName, This->filterInfo.achName); @@ -263,7 +263,7 @@ HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *
HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter * iface, IFilterGraph *pGraph, LPCWSTR pName ) { - BaseFilter *This = impl_from_IBaseFilter(iface); + struct strmbase_filter *This = impl_from_IBaseFilter(iface);
TRACE("(%p)->(%p, %s)\n", This, pGraph, debugstr_w(pName));
@@ -286,12 +286,12 @@ HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVend return E_NOTIMPL; }
-VOID WINAPI BaseFilterImpl_IncrementPinVersion(BaseFilter *filter) +VOID WINAPI BaseFilterImpl_IncrementPinVersion(struct strmbase_filter *filter) { InterlockedIncrement(&filter->pin_version); }
-void strmbase_filter_init(BaseFilter *filter, const IBaseFilterVtbl *vtbl, IUnknown *outer, +void strmbase_filter_init(struct strmbase_filter *filter, const IBaseFilterVtbl *vtbl, IUnknown *outer, const CLSID *clsid, const struct strmbase_filter_ops *func_table) { memset(filter, 0, sizeof(*filter)); @@ -302,13 +302,13 @@ void strmbase_filter_init(BaseFilter *filter, const IBaseFilterVtbl *vtbl, IUnkn filter->refcount = 1;
InitializeCriticalSection(&filter->csFilter); - filter->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": BaseFilter.csFilter"); + filter->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": strmbase_filter.csFilter"); filter->clsid = *clsid; filter->pin_version = 1; filter->pFuncsTable = func_table; }
-void strmbase_filter_cleanup(BaseFilter *This) +void strmbase_filter_cleanup(struct strmbase_filter *This) { if (This->pClock) IReferenceClock_Release(This->pClock); diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index c842120538c..d39700b7bcd 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -27,7 +27,7 @@ static inline BaseRenderer *impl_from_IBaseFilter(IBaseFilter *iface) return CONTAINING_RECORD(iface, BaseRenderer, filter.IBaseFilter_iface); }
-static inline BaseRenderer *impl_from_BaseFilter(BaseFilter *iface) +static inline BaseRenderer *impl_from_strmbase_filter(struct strmbase_filter *iface) { return CONTAINING_RECORD(iface, BaseRenderer, filter); } @@ -167,24 +167,24 @@ static const IPinVtbl BaseRenderer_InputPin_Vtbl = BaseInputPinImpl_NewSegment };
-static IPin *renderer_get_pin(BaseFilter *iface, unsigned int index) +static IPin *renderer_get_pin(struct strmbase_filter *iface, unsigned int index) { - BaseRenderer *filter = impl_from_BaseFilter(iface); + BaseRenderer *filter = impl_from_strmbase_filter(iface);
if (index == 0) return &filter->sink.pin.IPin_iface; return NULL; }
-static void renderer_destroy(BaseFilter *iface) +static void renderer_destroy(struct strmbase_filter *iface) { - BaseRenderer *filter = impl_from_BaseFilter(iface); + BaseRenderer *filter = impl_from_strmbase_filter(iface); filter->pFuncsTable->renderer_destroy(filter); }
-static HRESULT renderer_query_interface(BaseFilter *iface, REFIID iid, void **out) +static HRESULT renderer_query_interface(struct strmbase_filter *iface, REFIID iid, void **out) { - BaseRenderer *filter = impl_from_BaseFilter(iface); + BaseRenderer *filter = impl_from_strmbase_filter(iface); HRESULT hr;
if (filter->pFuncsTable->renderer_query_interface diff --git a/dlls/strmbase/strmbase_private.h b/dlls/strmbase/strmbase_private.h index 06fbe62a425..9904754e4a1 100644 --- a/dlls/strmbase/strmbase_private.h +++ b/dlls/strmbase/strmbase_private.h @@ -62,7 +62,7 @@ void QualityControlRender_DoQOS(QualityControlImpl *priv); void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME start, REFERENCE_TIME stop); void QualityControlRender_EndRender(QualityControlImpl *This);
-HRESULT enum_pins_create(BaseFilter *base, IEnumPins **enum_pins); +HRESULT enum_pins_create(struct strmbase_filter *filter, IEnumPins **enum_pins);
HRESULT WINAPI RendererPosPassThru_RegisterMediaTime(IUnknown *iface, REFERENCE_TIME start); HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface); diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index ff75f08f5c4..e03874b7d67 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -35,7 +35,7 @@ static inline TransformFilter *impl_from_IBaseFilter( IBaseFilter *iface ) return CONTAINING_RECORD(iface, TransformFilter, filter.IBaseFilter_iface); }
-static inline TransformFilter *impl_from_BaseFilter( BaseFilter *iface ) +static inline TransformFilter *impl_from_strmbase_filter(struct strmbase_filter *iface) { return CONTAINING_RECORD(iface, TransformFilter, filter); } @@ -121,9 +121,9 @@ static HRESULT WINAPI TransformFilter_Output_GetMediaType(BasePin *This, int iPo return S_OK; }
-static IPin *transform_get_pin(BaseFilter *iface, unsigned int index) +static IPin *transform_get_pin(struct strmbase_filter *iface, unsigned int index) { - TransformFilter *filter = impl_from_BaseFilter(iface); + TransformFilter *filter = impl_from_strmbase_filter(iface);
if (index == 0) return &filter->sink.pin.IPin_iface; @@ -132,9 +132,9 @@ static IPin *transform_get_pin(BaseFilter *iface, unsigned int index) return NULL; }
-static void transform_destroy(BaseFilter *iface) +static void transform_destroy(struct strmbase_filter *iface) { - TransformFilter *filter = impl_from_BaseFilter(iface); + TransformFilter *filter = impl_from_strmbase_filter(iface);
if (filter->sink.pin.pConnectedTo) IPin_Disconnect(filter->sink.pin.pConnectedTo); diff --git a/dlls/strmbase/video.c b/dlls/strmbase/video.c index 81478d6443e..3460b80fba2 100644 --- a/dlls/strmbase/video.c +++ b/dlls/strmbase/video.c @@ -647,7 +647,7 @@ static const IBasicVideoVtbl basic_video_vtbl = basic_video_IsUsingDefaultDestination };
-HRESULT WINAPI strmbase_video_init(BaseControlVideo *video, BaseFilter *filter, +HRESULT WINAPI strmbase_video_init(BaseControlVideo *video, struct strmbase_filter *filter, CRITICAL_SECTION *cs, BasePin *pin, const BaseControlVideoFuncTable *func_table) { video->IBasicVideo_iface.lpVtbl = &basic_video_vtbl; diff --git a/dlls/strmbase/window.c b/dlls/strmbase/window.c index 1ca06f77145..fe8b58565c0 100644 --- a/dlls/strmbase/window.c +++ b/dlls/strmbase/window.c @@ -193,7 +193,9 @@ BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg return FALSE; }
-HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, const IVideoWindowVtbl *lpVtbl, BaseFilter *owner, CRITICAL_SECTION *lock, BasePin* pPin,const BaseWindowFuncTable *pFuncsTable) +HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, + const IVideoWindowVtbl *lpVtbl, struct strmbase_filter *owner, + CRITICAL_SECTION *lock, BasePin* pPin,const BaseWindowFuncTable *pFuncsTable) { HRESULT hr;
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index acf83c89eac..babf98c67b3 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -55,7 +55,7 @@ typedef struct GSTInPin { } GSTInPin;
typedef struct GSTImpl { - BaseFilter filter; + struct strmbase_filter filter;
GSTInPin pInputPin; GSTOutPin **ppPins; @@ -1192,7 +1192,7 @@ static inline GSTOutPin *impl_from_IMediaSeeking( IMediaSeeking *iface ) return CONTAINING_RECORD(iface, GSTOutPin, seek.IMediaSeeking_iface); }
-static IPin *gstdemux_get_pin(BaseFilter *base, unsigned int index) +static IPin *gstdemux_get_pin(struct strmbase_filter *base, unsigned int index) { GSTImpl *filter = impl_from_IBaseFilter(&base->IBaseFilter_iface);
@@ -1203,7 +1203,7 @@ static IPin *gstdemux_get_pin(BaseFilter *base, unsigned int index) return NULL; }
-static void gstdemux_destroy(BaseFilter *iface) +static void gstdemux_destroy(struct strmbase_filter *iface) { GSTImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface); IPin *connected = NULL; diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c index ebffc94fc76..e7597e16ca8 100644 --- a/dlls/wineqtdecoder/qtsplitter.c +++ b/dlls/wineqtdecoder/qtsplitter.c @@ -144,7 +144,7 @@ typedef struct QTInPin { } QTInPin;
typedef struct QTSplitter { - BaseFilter filter; + struct strmbase_filter filter;
QTInPin pInputPin; QTOutPin *pVideo_Pin; @@ -188,7 +188,7 @@ static inline QTSplitter *impl_from_IMediaSeeking( IMediaSeeking *iface ) return CONTAINING_RECORD(iface, QTSplitter, sourceSeeking.IMediaSeeking_iface); }
-static inline QTSplitter *impl_from_BaseFilter( BaseFilter *iface ) +static inline QTSplitter *impl_from_strmbase_filter(struct strmbase_filter *iface) { return CONTAINING_RECORD(iface, QTSplitter, filter); } @@ -202,9 +202,9 @@ static inline QTSplitter *impl_from_IBaseFilter( IBaseFilter *iface ) * Base Filter */
-static IPin *qt_splitter_get_pin(BaseFilter *base, unsigned int index) +static IPin *qt_splitter_get_pin(struct strmbase_filter *base, unsigned int index) { - QTSplitter *filter = impl_from_BaseFilter(base); + QTSplitter *filter = impl_from_strmbase_filter(base);
if (index == 0) return &filter->pInputPin.pin.IPin_iface; @@ -221,9 +221,9 @@ static IPin *qt_splitter_get_pin(BaseFilter *base, unsigned int index) return NULL; }
-static void qt_splitter_destroy(BaseFilter *iface) +static void qt_splitter_destroy(struct strmbase_filter *iface) { - QTSplitter *filter = impl_from_BaseFilter(iface); + QTSplitter *filter = impl_from_strmbase_filter(iface); IPin *peer = NULL;
EnterCriticalSection(&filter->csReceive); diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 649d272b874..d23231e09a7 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -156,7 +156,7 @@ void strmbase_sink_init(BaseInputPin *pin, const IPinVtbl *vtbl, const PIN_INFO const BaseInputPinFuncTable *func_table, CRITICAL_SECTION *cs, IMemAllocator *allocator); void strmbase_sink_cleanup(BaseInputPin *pin);
-typedef struct BaseFilter +struct strmbase_filter { IBaseFilter IBaseFilter_iface; IUnknown IUnknown_inner; @@ -172,13 +172,13 @@ typedef struct BaseFilter LONG pin_version;
const struct strmbase_filter_ops *pFuncsTable; -} BaseFilter; +};
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); + IPin *(*filter_get_pin)(struct strmbase_filter *iface, unsigned int index); + void (*filter_destroy)(struct strmbase_filter *iface); + HRESULT (*filter_query_interface)(struct strmbase_filter *iface, REFIID iid, void **out); };
HRESULT WINAPI BaseFilterImpl_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv); @@ -197,11 +197,11 @@ HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO * HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter * iface, IFilterGraph *pGraph, LPCWSTR pName ); HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo);
-VOID WINAPI BaseFilterImpl_IncrementPinVersion(BaseFilter* This); +VOID WINAPI BaseFilterImpl_IncrementPinVersion(struct strmbase_filter *filter);
-void strmbase_filter_init(BaseFilter *filter, const IBaseFilterVtbl *vtbl, IUnknown *outer, +void strmbase_filter_init(struct strmbase_filter *filter, const IBaseFilterVtbl *vtbl, IUnknown *outer, const CLSID *clsid, const struct strmbase_filter_ops *func_table); -void strmbase_filter_cleanup(BaseFilter *filter); +void strmbase_filter_cleanup(struct strmbase_filter *filter);
/* Enums */ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enumFunc, BasePin_GetMediaTypeVersion versionFunc, IEnumMediaTypes ** ppEnum); @@ -209,7 +209,7 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *iface, BasePin_GetMediaType enu /* Transform Filter */ typedef struct TransformFilter { - BaseFilter filter; + struct strmbase_filter filter; BaseOutputPin source; BaseInputPin sink;
@@ -429,12 +429,13 @@ typedef struct tagBaseControlWindow BOOL AutoShow; HWND hwndDrain; HWND hwndOwner; - BaseFilter* pFilter; + struct strmbase_filter *pFilter; CRITICAL_SECTION* pInterfaceLock; BasePin* pPin; } BaseControlWindow;
-HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, const IVideoWindowVtbl *lpVtbl, BaseFilter *owner, CRITICAL_SECTION *lock, BasePin* pPin, const BaseWindowFuncTable* pFuncsTable); +HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *window, const IVideoWindowVtbl *vtbl, + struct strmbase_filter *filter, CRITICAL_SECTION *lock, BasePin *pin, const BaseWindowFuncTable *ops); HRESULT WINAPI BaseControlWindow_Destroy(BaseControlWindow *pControlWindow);
BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam); @@ -494,7 +495,7 @@ typedef struct tagBaseControlVideo { IBasicVideo IBasicVideo_iface;
- BaseFilter* pFilter; + struct strmbase_filter *pFilter; CRITICAL_SECTION* pInterfaceLock; BasePin* pPin;
@@ -526,7 +527,7 @@ typedef struct BaseControlVideoFuncTable { BaseControlVideo_SetTargetRect pfnSetTargetRect; } BaseControlVideoFuncTable;
-HRESULT WINAPI strmbase_video_init(BaseControlVideo *video, BaseFilter *filter, +HRESULT WINAPI strmbase_video_init(BaseControlVideo *video, struct strmbase_filter *filter, CRITICAL_SECTION *cs, BasePin *pin, const BaseControlVideoFuncTable *func_table); HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo); #endif @@ -535,7 +536,7 @@ HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo); /* BaseRenderer Filter */ typedef struct BaseRendererTag { - BaseFilter filter; + struct strmbase_filter filter;
BaseInputPin sink; IUnknown *pPosition;
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/amstream/mediastreamfilter.c | 33 ++++++++++++++++--------------- 1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/dlls/amstream/mediastreamfilter.c b/dlls/amstream/mediastreamfilter.c index 48dfc85a4f3..06144416afd 100644 --- a/dlls/amstream/mediastreamfilter.c +++ b/dlls/amstream/mediastreamfilter.c @@ -160,7 +160,8 @@ static const IEnumPinsVtbl enum_pins_vtbl = enum_pins_Clone, };
-typedef struct { +struct filter +{ IMediaStreamFilter IMediaStreamFilter_iface; LONG refcount; CRITICAL_SECTION cs; @@ -169,12 +170,12 @@ typedef struct { WCHAR name[128]; IFilterGraph *graph; ULONG nb_streams; - IAMMediaStream** streams; -} IMediaStreamFilterImpl; + IAMMediaStream **streams; +};
-static inline IMediaStreamFilterImpl *impl_from_IMediaStreamFilter(IMediaStreamFilter *iface) +static inline struct filter *impl_from_IMediaStreamFilter(IMediaStreamFilter *iface) { - return CONTAINING_RECORD(iface, IMediaStreamFilterImpl, IMediaStreamFilter_iface); + return CONTAINING_RECORD(iface, struct filter, IMediaStreamFilter_iface); }
static HRESULT WINAPI MediaStreamFilterImpl_QueryInterface(IMediaStreamFilter *iface, REFIID riid, void **ret_iface) @@ -201,7 +202,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_QueryInterface(IMediaStreamFilter *i
static ULONG WINAPI MediaStreamFilterImpl_AddRef(IMediaStreamFilter *iface) { - IMediaStreamFilterImpl *filter = impl_from_IMediaStreamFilter(iface); + struct filter *filter = impl_from_IMediaStreamFilter(iface); ULONG refcount = InterlockedIncrement(&filter->refcount);
TRACE("%p increasing refcount to %u.\n", iface, refcount); @@ -211,7 +212,7 @@ static ULONG WINAPI MediaStreamFilterImpl_AddRef(IMediaStreamFilter *iface)
static ULONG WINAPI MediaStreamFilterImpl_Release(IMediaStreamFilter *iface) { - IMediaStreamFilterImpl *filter = impl_from_IMediaStreamFilter(iface); + struct filter *filter = impl_from_IMediaStreamFilter(iface); ULONG refcount = InterlockedDecrement(&filter->refcount); unsigned int i;
@@ -271,7 +272,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_GetState(IMediaStreamFilter *iface,
static HRESULT WINAPI MediaStreamFilterImpl_SetSyncSource(IMediaStreamFilter *iface, IReferenceClock *clock) { - IMediaStreamFilterImpl *filter = impl_from_IMediaStreamFilter(iface); + struct filter *filter = impl_from_IMediaStreamFilter(iface);
TRACE("iface %p, clock %p.\n", iface, clock);
@@ -290,7 +291,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_SetSyncSource(IMediaStreamFilter *if
static HRESULT WINAPI MediaStreamFilterImpl_GetSyncSource(IMediaStreamFilter *iface, IReferenceClock **clock) { - IMediaStreamFilterImpl *filter = impl_from_IMediaStreamFilter(iface); + struct filter *filter = impl_from_IMediaStreamFilter(iface);
TRACE("iface %p, clock %p.\n", iface, clock);
@@ -307,7 +308,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_GetSyncSource(IMediaStreamFilter *if
static HRESULT WINAPI MediaStreamFilterImpl_EnumPins(IMediaStreamFilter *iface, IEnumPins **enum_pins) { - IMediaStreamFilterImpl *filter = impl_from_IMediaStreamFilter(iface); + struct filter *filter = impl_from_IMediaStreamFilter(iface); struct enum_pins *object; unsigned int i;
@@ -344,7 +345,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_EnumPins(IMediaStreamFilter *iface,
static HRESULT WINAPI MediaStreamFilterImpl_FindPin(IMediaStreamFilter *iface, const WCHAR *id, IPin **out) { - IMediaStreamFilterImpl *filter = impl_from_IMediaStreamFilter(iface); + struct filter *filter = impl_from_IMediaStreamFilter(iface); unsigned int i; WCHAR *ret_id; IPin *pin; @@ -382,7 +383,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_FindPin(IMediaStreamFilter *iface, c
static HRESULT WINAPI MediaStreamFilterImpl_QueryFilterInfo(IMediaStreamFilter *iface, FILTER_INFO *info) { - IMediaStreamFilterImpl *filter = impl_from_IMediaStreamFilter(iface); + struct filter *filter = impl_from_IMediaStreamFilter(iface);
TRACE("iface %p, info %p.\n", iface, info);
@@ -401,7 +402,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_QueryFilterInfo(IMediaStreamFilter * static HRESULT WINAPI MediaStreamFilterImpl_JoinFilterGraph(IMediaStreamFilter *iface, IFilterGraph *graph, const WCHAR *name) { - IMediaStreamFilterImpl *filter = impl_from_IMediaStreamFilter(iface); + struct filter *filter = impl_from_IMediaStreamFilter(iface);
TRACE("iface %p, graph %p, name.%s.\n", iface, graph, debugstr_w(name));
@@ -428,7 +429,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_QueryVendorInfo(IMediaStreamFilter *
static HRESULT WINAPI MediaStreamFilterImpl_AddMediaStream(IMediaStreamFilter* iface, IAMMediaStream *pAMMediaStream) { - IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); + struct filter *This = impl_from_IMediaStreamFilter(iface); IAMMediaStream** streams; HRESULT hr;
@@ -453,7 +454,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_AddMediaStream(IMediaStreamFilter* i
static HRESULT WINAPI MediaStreamFilterImpl_GetMediaStream(IMediaStreamFilter* iface, REFMSPID idPurpose, IMediaStream **ppMediaStream) { - IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface); + struct filter *This = impl_from_IMediaStreamFilter(iface); MSPID purpose_id; unsigned int i;
@@ -552,7 +553,7 @@ static const IMediaStreamFilterVtbl MediaStreamFilter_Vtbl =
HRESULT MediaStreamFilter_create(IUnknown *outer, void **out) { - IMediaStreamFilterImpl *object; + struct filter *object;
TRACE("outer %p, out %p.\n", outer, out);
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/amstream/Makefile.in | 4 +- dlls/amstream/amstream_private.h | 2 +- .../{mediastreamfilter.c => filter.c} | 104 +++++++++--------- dlls/amstream/main.c | 2 +- 4 files changed, 56 insertions(+), 56 deletions(-) rename dlls/amstream/{mediastreamfilter.c => filter.c} (77%)
diff --git a/dlls/amstream/Makefile.in b/dlls/amstream/Makefile.in index c38b9744e23..d2dfa68b726 100644 --- a/dlls/amstream/Makefile.in +++ b/dlls/amstream/Makefile.in @@ -6,9 +6,9 @@ EXTRADLLFLAGS = -mno-cygwin C_SRCS = \ amstream.c \ audiodata.c \ + filter.c \ main.c \ - mediastream.c \ - mediastreamfilter.c + mediastream.c
IDL_SRCS = amstream_classes.idl
diff --git a/dlls/amstream/amstream_private.h b/dlls/amstream/amstream_private.h index 3cbc5c8e64b..e44a9de7495 100644 --- a/dlls/amstream/amstream_private.h +++ b/dlls/amstream/amstream_private.h @@ -36,7 +36,7 @@
HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; HRESULT AMAudioData_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; -HRESULT MediaStreamFilter_create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HIDDEN; +HRESULT filter_create(IUnknown *outer, void **out) DECLSPEC_HIDDEN; HRESULT ddrawmediastream_create(IMultiMediaStream *Parent, const MSPID *pPurposeId, IUnknown *stream_object, STREAM_TYPE StreamType, IAMMediaStream **ppMediaStream) DECLSPEC_HIDDEN; HRESULT audiomediastream_create(IMultiMediaStream *parent, const MSPID *purpose_id, diff --git a/dlls/amstream/mediastreamfilter.c b/dlls/amstream/filter.c similarity index 77% rename from dlls/amstream/mediastreamfilter.c rename to dlls/amstream/filter.c index 06144416afd..bf7dda935a0 100644 --- a/dlls/amstream/mediastreamfilter.c +++ b/dlls/amstream/filter.c @@ -178,7 +178,7 @@ static inline struct filter *impl_from_IMediaStreamFilter(IMediaStreamFilter *if return CONTAINING_RECORD(iface, struct filter, IMediaStreamFilter_iface); }
-static HRESULT WINAPI MediaStreamFilterImpl_QueryInterface(IMediaStreamFilter *iface, REFIID riid, void **ret_iface) +static HRESULT WINAPI filter_QueryInterface(IMediaStreamFilter *iface, REFIID riid, void **ret_iface) { TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ret_iface);
@@ -200,7 +200,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_QueryInterface(IMediaStreamFilter *i return E_NOINTERFACE; }
-static ULONG WINAPI MediaStreamFilterImpl_AddRef(IMediaStreamFilter *iface) +static ULONG WINAPI filter_AddRef(IMediaStreamFilter *iface) { struct filter *filter = impl_from_IMediaStreamFilter(iface); ULONG refcount = InterlockedIncrement(&filter->refcount); @@ -210,7 +210,7 @@ static ULONG WINAPI MediaStreamFilterImpl_AddRef(IMediaStreamFilter *iface) return refcount; }
-static ULONG WINAPI MediaStreamFilterImpl_Release(IMediaStreamFilter *iface) +static ULONG WINAPI filter_Release(IMediaStreamFilter *iface) { struct filter *filter = impl_from_IMediaStreamFilter(iface); ULONG refcount = InterlockedDecrement(&filter->refcount); @@ -235,34 +235,34 @@ static ULONG WINAPI MediaStreamFilterImpl_Release(IMediaStreamFilter *iface) return refcount; }
-static HRESULT WINAPI MediaStreamFilterImpl_GetClassID(IMediaStreamFilter *iface, CLSID *clsid) +static HRESULT WINAPI filter_GetClassID(IMediaStreamFilter *iface, CLSID *clsid) { *clsid = CLSID_MediaStreamFilter; return S_OK; }
-static HRESULT WINAPI MediaStreamFilterImpl_Stop(IMediaStreamFilter *iface) +static HRESULT WINAPI filter_Stop(IMediaStreamFilter *iface) { FIXME("(%p)->(): Stub!\n", iface);
return E_NOTIMPL; }
-static HRESULT WINAPI MediaStreamFilterImpl_Pause(IMediaStreamFilter *iface) +static HRESULT WINAPI filter_Pause(IMediaStreamFilter *iface) { FIXME("(%p)->(): Stub!\n", iface);
return E_NOTIMPL; }
-static HRESULT WINAPI MediaStreamFilterImpl_Run(IMediaStreamFilter *iface, REFERENCE_TIME start) +static HRESULT WINAPI filter_Run(IMediaStreamFilter *iface, REFERENCE_TIME start) { FIXME("(%p)->(%s): Stub!\n", iface, wine_dbgstr_longlong(start));
return E_NOTIMPL; }
-static HRESULT WINAPI MediaStreamFilterImpl_GetState(IMediaStreamFilter *iface, DWORD timeout, FILTER_STATE *state) +static HRESULT WINAPI filter_GetState(IMediaStreamFilter *iface, DWORD timeout, FILTER_STATE *state) { FIXME("iface %p, timeout %u, state %p, stub!\n", iface, timeout, state);
@@ -270,7 +270,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_GetState(IMediaStreamFilter *iface, return S_OK; }
-static HRESULT WINAPI MediaStreamFilterImpl_SetSyncSource(IMediaStreamFilter *iface, IReferenceClock *clock) +static HRESULT WINAPI filter_SetSyncSource(IMediaStreamFilter *iface, IReferenceClock *clock) { struct filter *filter = impl_from_IMediaStreamFilter(iface);
@@ -289,7 +289,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_SetSyncSource(IMediaStreamFilter *if return S_OK; }
-static HRESULT WINAPI MediaStreamFilterImpl_GetSyncSource(IMediaStreamFilter *iface, IReferenceClock **clock) +static HRESULT WINAPI filter_GetSyncSource(IMediaStreamFilter *iface, IReferenceClock **clock) { struct filter *filter = impl_from_IMediaStreamFilter(iface);
@@ -306,7 +306,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_GetSyncSource(IMediaStreamFilter *if return S_OK; }
-static HRESULT WINAPI MediaStreamFilterImpl_EnumPins(IMediaStreamFilter *iface, IEnumPins **enum_pins) +static HRESULT WINAPI filter_EnumPins(IMediaStreamFilter *iface, IEnumPins **enum_pins) { struct filter *filter = impl_from_IMediaStreamFilter(iface); struct enum_pins *object; @@ -343,7 +343,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_EnumPins(IMediaStreamFilter *iface, return S_OK; }
-static HRESULT WINAPI MediaStreamFilterImpl_FindPin(IMediaStreamFilter *iface, const WCHAR *id, IPin **out) +static HRESULT WINAPI filter_FindPin(IMediaStreamFilter *iface, const WCHAR *id, IPin **out) { struct filter *filter = impl_from_IMediaStreamFilter(iface); unsigned int i; @@ -381,7 +381,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_FindPin(IMediaStreamFilter *iface, c return VFW_E_NOT_FOUND; }
-static HRESULT WINAPI MediaStreamFilterImpl_QueryFilterInfo(IMediaStreamFilter *iface, FILTER_INFO *info) +static HRESULT WINAPI filter_QueryFilterInfo(IMediaStreamFilter *iface, FILTER_INFO *info) { struct filter *filter = impl_from_IMediaStreamFilter(iface);
@@ -399,7 +399,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_QueryFilterInfo(IMediaStreamFilter * return S_OK; }
-static HRESULT WINAPI MediaStreamFilterImpl_JoinFilterGraph(IMediaStreamFilter *iface, +static HRESULT WINAPI filter_JoinFilterGraph(IMediaStreamFilter *iface, IFilterGraph *graph, const WCHAR *name) { struct filter *filter = impl_from_IMediaStreamFilter(iface); @@ -419,7 +419,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_JoinFilterGraph(IMediaStreamFilter * return S_OK; }
-static HRESULT WINAPI MediaStreamFilterImpl_QueryVendorInfo(IMediaStreamFilter *iface, LPWSTR *vendor_info) +static HRESULT WINAPI filter_QueryVendorInfo(IMediaStreamFilter *iface, LPWSTR *vendor_info) { WARN("iface %p, vendor_info %p, stub!\n", iface, vendor_info); return E_NOTIMPL; @@ -427,7 +427,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_QueryVendorInfo(IMediaStreamFilter *
/*** IMediaStreamFilter methods ***/
-static HRESULT WINAPI MediaStreamFilterImpl_AddMediaStream(IMediaStreamFilter* iface, IAMMediaStream *pAMMediaStream) +static HRESULT WINAPI filter_AddMediaStream(IMediaStreamFilter *iface, IAMMediaStream *pAMMediaStream) { struct filter *This = impl_from_IMediaStreamFilter(iface); IAMMediaStream** streams; @@ -452,7 +452,7 @@ static HRESULT WINAPI MediaStreamFilterImpl_AddMediaStream(IMediaStreamFilter* i return S_OK; }
-static HRESULT WINAPI MediaStreamFilterImpl_GetMediaStream(IMediaStreamFilter* iface, REFMSPID idPurpose, IMediaStream **ppMediaStream) +static HRESULT WINAPI filter_GetMediaStream(IMediaStreamFilter *iface, REFMSPID idPurpose, IMediaStream **ppMediaStream) { struct filter *This = impl_from_IMediaStreamFilter(iface); MSPID purpose_id; @@ -474,84 +474,84 @@ static HRESULT WINAPI MediaStreamFilterImpl_GetMediaStream(IMediaStreamFilter* i return MS_E_NOSTREAM; }
-static HRESULT WINAPI MediaStreamFilterImpl_EnumMediaStreams(IMediaStreamFilter* iface, LONG Index, IMediaStream **ppMediaStream) +static HRESULT WINAPI filter_EnumMediaStreams(IMediaStreamFilter *iface, LONG Index, IMediaStream **ppMediaStream) { FIXME("(%p)->(%d,%p): Stub!\n", iface, Index, ppMediaStream);
return E_NOTIMPL; }
-static HRESULT WINAPI MediaStreamFilterImpl_SupportSeeking(IMediaStreamFilter* iface, BOOL bRenderer) +static HRESULT WINAPI filter_SupportSeeking(IMediaStreamFilter *iface, BOOL bRenderer) { FIXME("(%p)->(%d): Stub!\n", iface, bRenderer);
return E_NOTIMPL; }
-static HRESULT WINAPI MediaStreamFilterImpl_ReferenceTimeToStreamTime(IMediaStreamFilter* iface, REFERENCE_TIME *pTime) +static HRESULT WINAPI filter_ReferenceTimeToStreamTime(IMediaStreamFilter *iface, REFERENCE_TIME *pTime) { FIXME("(%p)->(%p): Stub!\n", iface, pTime);
return E_NOTIMPL; }
-static HRESULT WINAPI MediaStreamFilterImpl_GetCurrentStreamTime(IMediaStreamFilter* iface, REFERENCE_TIME *pCurrentStreamTime) +static HRESULT WINAPI filter_GetCurrentStreamTime(IMediaStreamFilter *iface, REFERENCE_TIME *pCurrentStreamTime) { FIXME("(%p)->(%p): Stub!\n", iface, pCurrentStreamTime);
return E_NOTIMPL; }
-static HRESULT WINAPI MediaStreamFilterImpl_WaitUntil(IMediaStreamFilter* iface, REFERENCE_TIME WaitStreamTime) +static HRESULT WINAPI filter_WaitUntil(IMediaStreamFilter *iface, REFERENCE_TIME WaitStreamTime) { FIXME("(%p)->(%s): Stub!\n", iface, wine_dbgstr_longlong(WaitStreamTime));
return E_NOTIMPL; }
-static HRESULT WINAPI MediaStreamFilterImpl_Flush(IMediaStreamFilter* iface, BOOL bCancelEOS) +static HRESULT WINAPI filter_Flush(IMediaStreamFilter *iface, BOOL bCancelEOS) { FIXME("(%p)->(%d): Stub!\n", iface, bCancelEOS);
return E_NOTIMPL; }
-static HRESULT WINAPI MediaStreamFilterImpl_EndOfStream(IMediaStreamFilter* iface) +static HRESULT WINAPI filter_EndOfStream(IMediaStreamFilter *iface) { FIXME("(%p)->(): Stub!\n", iface);
return E_NOTIMPL; }
-static const IMediaStreamFilterVtbl MediaStreamFilter_Vtbl = -{ - MediaStreamFilterImpl_QueryInterface, - MediaStreamFilterImpl_AddRef, - MediaStreamFilterImpl_Release, - MediaStreamFilterImpl_GetClassID, - MediaStreamFilterImpl_Stop, - MediaStreamFilterImpl_Pause, - MediaStreamFilterImpl_Run, - MediaStreamFilterImpl_GetState, - MediaStreamFilterImpl_SetSyncSource, - MediaStreamFilterImpl_GetSyncSource, - MediaStreamFilterImpl_EnumPins, - MediaStreamFilterImpl_FindPin, - MediaStreamFilterImpl_QueryFilterInfo, - MediaStreamFilterImpl_JoinFilterGraph, - MediaStreamFilterImpl_QueryVendorInfo, - MediaStreamFilterImpl_AddMediaStream, - MediaStreamFilterImpl_GetMediaStream, - MediaStreamFilterImpl_EnumMediaStreams, - MediaStreamFilterImpl_SupportSeeking, - MediaStreamFilterImpl_ReferenceTimeToStreamTime, - MediaStreamFilterImpl_GetCurrentStreamTime, - MediaStreamFilterImpl_WaitUntil, - MediaStreamFilterImpl_Flush, - MediaStreamFilterImpl_EndOfStream +static const IMediaStreamFilterVtbl filter_vtbl = +{ + filter_QueryInterface, + filter_AddRef, + filter_Release, + filter_GetClassID, + filter_Stop, + filter_Pause, + filter_Run, + filter_GetState, + filter_SetSyncSource, + filter_GetSyncSource, + filter_EnumPins, + filter_FindPin, + filter_QueryFilterInfo, + filter_JoinFilterGraph, + filter_QueryVendorInfo, + filter_AddMediaStream, + filter_GetMediaStream, + filter_EnumMediaStreams, + filter_SupportSeeking, + filter_ReferenceTimeToStreamTime, + filter_GetCurrentStreamTime, + filter_WaitUntil, + filter_Flush, + filter_EndOfStream };
-HRESULT MediaStreamFilter_create(IUnknown *outer, void **out) +HRESULT filter_create(IUnknown *outer, void **out) { struct filter *object;
@@ -563,7 +563,7 @@ HRESULT MediaStreamFilter_create(IUnknown *outer, void **out) if (!(object = heap_alloc_zero(sizeof(*object)))) return E_OUTOFMEMORY;
- object->IMediaStreamFilter_iface.lpVtbl = &MediaStreamFilter_Vtbl; + object->IMediaStreamFilter_iface.lpVtbl = &filter_vtbl; object->refcount = 1; InitializeCriticalSection(&object->cs); object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": MediaStreamFilter.cs"); diff --git a/dlls/amstream/main.c b/dlls/amstream/main.c index 65aafba3e6f..b6705945a85 100644 --- a/dlls/amstream/main.c +++ b/dlls/amstream/main.c @@ -76,7 +76,7 @@ static const struct object_creation_info object_creation[] = { &CLSID_AMMultiMediaStream, AM_create }, { &CLSID_AMDirectDrawStream, AM_create }, { &CLSID_AMAudioData, AMAudioData_create }, - { &CLSID_MediaStreamFilter, MediaStreamFilter_create } + { &CLSID_MediaStreamFilter, filter_create } };
static HRESULT WINAPI AMCF_QueryInterface(IClassFactory *iface, REFIID riid, void **ppobj)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=55946
Your paranoid android.
=== debian10 (build log) ===
error: patch failed: dlls/amstream/mediastreamfilter.c:178 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: dlls/amstream/mediastreamfilter.c:178 Task: Patch failed to apply
From: Zebediah Figura zfigura@codeweavers.com
Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/amstream/amstream.c | 37 +++++++++++++++++----------------- dlls/amstream/tests/amstream.c | 20 ++---------------- 2 files changed, 21 insertions(+), 36 deletions(-)
diff --git a/dlls/amstream/amstream.c b/dlls/amstream/amstream.c index 8354df87dee..06fa564fb96 100644 --- a/dlls/amstream/amstream.c +++ b/dlls/amstream/amstream.c @@ -36,7 +36,7 @@ typedef struct { IGraphBuilder* pFilterGraph; IMediaSeeking* media_seeking; IMediaControl* media_control; - IMediaStreamFilter *media_stream_filter; + IMediaStreamFilter *filter; IPin* ipin; ULONG nbStreams; IAMMediaStream **pStreams; @@ -53,7 +53,8 @@ static const struct IAMMultiMediaStreamVtbl AM_Vtbl;
HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj) { - IAMMultiMediaStreamImpl* object; + IAMMultiMediaStreamImpl *object; + HRESULT hr;
TRACE("(%p,%p)\n", pUnkOuter, ppObj);
@@ -67,6 +68,14 @@ HRESULT AM_create(IUnknown *pUnkOuter, LPVOID *ppObj) object->IAMMultiMediaStream_iface.lpVtbl = &AM_Vtbl; object->ref = 1;
+ if (FAILED(hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL, + CLSCTX_INPROC_SERVER, &IID_IMediaStreamFilter, (void **)&object->filter))) + { + ERR("Failed to create stream filter, hr %#x.\n", hr); + heap_free(object); + return hr; + } + *ppObj = &object->IAMMultiMediaStream_iface;
return S_OK; @@ -117,8 +126,7 @@ static ULONG WINAPI IAMMultiMediaStreamImpl_Release(IAMMultiMediaStream* iface) CoTaskMemFree(This->pStreams); if (This->ipin) IPin_Release(This->ipin); - if (This->media_stream_filter) - IMediaStreamFilter_Release(This->media_stream_filter); + IMediaStreamFilter_Release(This->filter); if (This->media_seeking) IMediaSeeking_Release(This->media_seeking); if (This->media_control) @@ -258,9 +266,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* if if (SUCCEEDED(hr)) hr = IGraphBuilder_QueryInterface(This->pFilterGraph, &IID_IMediaControl, (void**)&This->media_control); if (SUCCEEDED(hr)) - hr = CoCreateInstance(&CLSID_MediaStreamFilter, NULL, CLSCTX_INPROC_SERVER, &IID_IMediaStreamFilter, (void**)&This->media_stream_filter); - if (SUCCEEDED(hr)) - hr = IGraphBuilder_AddFilter(This->pFilterGraph, (IBaseFilter*)This->media_stream_filter, filternameW); + hr = IGraphBuilder_AddFilter(This->pFilterGraph, (IBaseFilter*)This->filter, filternameW); if (SUCCEEDED(hr)) { IMediaEventEx* media_event = NULL; @@ -276,9 +282,6 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_Initialize(IAMMultiMediaStream* if
if (FAILED(hr)) { - if (This->media_stream_filter) - IMediaStreamFilter_Release(This->media_stream_filter); - This->media_stream_filter = NULL; if (This->media_seeking) IMediaSeeking_Release(This->media_seeking); This->media_seeking = NULL; @@ -310,18 +313,16 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilterGraph(IAMMultiMediaStream return S_OK; }
-static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream* iface, IMediaStreamFilter** ppFilter) +static HRESULT WINAPI IAMMultiMediaStreamImpl_GetFilter(IAMMultiMediaStream *iface, IMediaStreamFilter **filter) { - IAMMultiMediaStreamImpl *This = impl_from_IAMMultiMediaStream(iface); + IAMMultiMediaStreamImpl *mmstream = impl_from_IAMMultiMediaStream(iface);
- TRACE("(%p/%p)->(%p)\n", This, iface, ppFilter); + TRACE("mmstream %p, filter %p.\n", mmstream, filter);
- if (!ppFilter) + if (!filter) return E_POINTER;
- *ppFilter = This->media_stream_filter; - if (*ppFilter) - IMediaStreamFilter_AddRef(*ppFilter); + IMediaStreamFilter_AddRef(*filter = mmstream->filter);
return S_OK; } @@ -388,7 +389,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream if (SUCCEEDED(hr)) { /* Add stream to the media stream filter */ - IMediaStreamFilter_AddMediaStream(This->media_stream_filter, pStream); + IMediaStreamFilter_AddMediaStream(This->filter, pStream); }
return hr; diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index 72157755d1c..1089de5e90f 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -130,10 +130,6 @@ static void test_interfaces(void) HRESULT hr; ULONG ref;
- /* FIXME: This call should not be necessary. */ - hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); - check_interface(mmstream, &IID_IAMMultiMediaStream, TRUE); check_interface(mmstream, &IID_IMultiMediaStream, TRUE); check_interface(mmstream, &IID_IUnknown, TRUE); @@ -636,15 +632,11 @@ static void test_enum_pins(void) ULONG ref, count; HRESULT hr;
- /* FIXME: This call should not be necessary. */ - hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); - hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); ok(hr == S_OK, "Got hr %#x.\n", hr);
ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref);
hr = IMediaStreamFilter_EnumPins(filter, NULL); ok(hr == E_POINTER, "Got hr %#x.\n", hr); @@ -652,7 +644,7 @@ static void test_enum_pins(void) hr = IMediaStreamFilter_EnumPins(filter, &enum1); ok(hr == S_OK, "Got hr %#x.\n", hr); ref = get_refcount(filter); - ok(ref == 3, "Got unexpected refcount %d.\n", ref); + todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(enum1); ok(ref == 1, "Got unexpected refcount %d.\n", ref);
@@ -771,10 +763,6 @@ static void test_find_pin(void) HRESULT hr; ULONG ref;
- /* FIXME: This call should not be necessary. */ - hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); - hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); ok(hr == S_OK, "Got hr %#x.\n", hr);
@@ -809,10 +797,6 @@ static void test_pin_info(void) WCHAR *id; IPin *pin;
- /* FIXME: This call should not be necessary. */ - hr = IAMMultiMediaStream_Initialize(mmstream, STREAMTYPE_READ, 0, NULL); - ok(hr == S_OK, "Got hr %#x.\n", hr); - hr = IAMMultiMediaStream_GetFilter(mmstream, &filter); ok(hr == S_OK, "Got hr %#x.\n", hr);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=55947
Your paranoid android.
=== build (build log) ===
error: patch failed: dlls/amstream/mediastreamfilter.c:178 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: dlls/amstream/mediastreamfilter.c:178 Task: Patch failed to apply
=== debian10 (build log) ===
error: patch failed: dlls/amstream/mediastreamfilter.c:178 Task: Patch failed to apply