From a6aea1cecd5b59e191be23e163319f13b7370450 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Thu, 12 Dec 2019 21:24:39 -0600 Subject: [PATCH] strmbase: Get rid of the "vtbl" parameter to strmbase_sink_init(). Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/qcap/avico.c | 24 +------- dlls/qcap/avimux.c | 23 +------- dlls/qcap/smartteefilter.c | 23 +------- dlls/qedit/samplegrabber.c | 24 +------- dlls/strmbase/pin.c | 101 +++++++++++++++++++------------- dlls/strmbase/renderer.c | 25 +------- dlls/strmbase/transform.c | 27 +-------- dlls/winegstreamer/gstdemux.c | 34 ++--------- dlls/wineqtdecoder/qtsplitter.c | 25 +------- include/wine/strmbase.h | 25 +------- 10 files changed, 73 insertions(+), 258 deletions(-) diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c index ecda162be86..53b8526f449 100644 --- a/dlls/qcap/avico.c +++ b/dlls/qcap/avico.c @@ -272,27 +272,6 @@ static const IPersistPropertyBagVtbl PersistPropertyBagVtbl = { AVICompressorPropertyBag_Save }; -static const IPinVtbl AVICompressorInputPinVtbl = { - BasePinImpl_QueryInterface, - BasePinImpl_AddRef, - BasePinImpl_Release, - BaseInputPinImpl_Connect, - BaseInputPinImpl_ReceiveConnection, - BaseInputPinImpl_Disconnect, - BasePinImpl_ConnectedTo, - BasePinImpl_ConnectionMediaType, - BasePinImpl_QueryPinInfo, - BasePinImpl_QueryDirection, - BasePinImpl_QueryId, - BasePinImpl_QueryAccept, - BasePinImpl_EnumMediaTypes, - BasePinImpl_QueryInternalConnections, - BaseInputPinImpl_EndOfStream, - BaseInputPinImpl_BeginFlush, - BaseInputPinImpl_EndFlush, - BaseInputPinImpl_NewSegment -}; - static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *pmt) { AVICompressor *This = impl_from_strmbase_pin(base); @@ -517,8 +496,7 @@ IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr) compressor->IPersistPropertyBag_iface.lpVtbl = &PersistPropertyBagVtbl; - strmbase_sink_init(&compressor->sink, &AVICompressorInputPinVtbl, - &compressor->filter, sink_name, &sink_ops, NULL); + strmbase_sink_init(&compressor->sink, &compressor->filter, sink_name, &sink_ops, NULL); strmbase_source_init(&compressor->source, &compressor->filter, source_name, &source_ops); *phr = S_OK; diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c index c17d91322bf..e402479fb17 100644 --- a/dlls/qcap/avimux.c +++ b/dlls/qcap/avimux.c @@ -1500,27 +1500,6 @@ static inline AviMux* impl_from_in_IPin(IPin *iface) return impl_from_strmbase_filter(pin->filter); } -static const IPinVtbl AviMuxIn_PinVtbl = { - BasePinImpl_QueryInterface, - BasePinImpl_AddRef, - BasePinImpl_Release, - BaseInputPinImpl_Connect, - BaseInputPinImpl_ReceiveConnection, - BaseInputPinImpl_Disconnect, - BasePinImpl_ConnectedTo, - BasePinImpl_ConnectionMediaType, - BasePinImpl_QueryPinInfo, - BasePinImpl_QueryDirection, - BasePinImpl_QueryId, - BasePinImpl_QueryAccept, - BasePinImpl_EnumMediaTypes, - BasePinImpl_QueryInternalConnections, - BaseInputPinImpl_EndOfStream, - BaseInputPinImpl_BeginFlush, - BaseInputPinImpl_EndFlush, - BasePinImpl_NewSegment -}; - static inline AviMuxIn* AviMuxIn_from_IAMStreamControl(IAMStreamControl *iface) { return CONTAINING_RECORD(iface, AviMuxIn, IAMStreamControl_iface); @@ -1825,7 +1804,7 @@ static HRESULT create_input_pin(AviMux *avimux) if (!(object = heap_alloc_zero(sizeof(*object)))) return E_OUTOFMEMORY; - strmbase_sink_init(&object->pin, &AviMuxIn_PinVtbl, &avimux->filter, name, &sink_ops, NULL); + strmbase_sink_init(&object->pin, &avimux->filter, name, &sink_ops, NULL); object->pin.IMemInputPin_iface.lpVtbl = &AviMuxIn_MemInputPinVtbl; object->IAMStreamControl_iface.lpVtbl = &AviMuxIn_AMStreamControlVtbl; object->IPropertyBag_iface.lpVtbl = &AviMuxIn_PropertyBagVtbl; diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c index e1fcea55f91..5339cb5134f 100644 --- a/dlls/qcap/smartteefilter.c +++ b/dlls/qcap/smartteefilter.c @@ -81,27 +81,6 @@ static const struct strmbase_filter_ops filter_ops = .filter_destroy = smart_tee_destroy, }; -static const IPinVtbl SmartTeeFilterInputVtbl = { - BasePinImpl_QueryInterface, - BasePinImpl_AddRef, - BasePinImpl_Release, - BaseInputPinImpl_Connect, - BaseInputPinImpl_ReceiveConnection, - BaseInputPinImpl_Disconnect, - BasePinImpl_ConnectedTo, - BasePinImpl_ConnectionMediaType, - BasePinImpl_QueryPinInfo, - BasePinImpl_QueryDirection, - BasePinImpl_QueryId, - BasePinImpl_QueryAccept, - BasePinImpl_EnumMediaTypes, - BasePinImpl_QueryInternalConnections, - BaseInputPinImpl_EndOfStream, - BaseInputPinImpl_BeginFlush, - BaseInputPinImpl_EndFlush, - BaseInputPinImpl_NewSegment -}; - static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE *pmt) { SmartTeeFilter *This = impl_from_strmbase_pin(base); @@ -358,7 +337,7 @@ IUnknown* WINAPI QCAP_createSmartTeeFilter(IUnknown *outer, HRESULT *phr) memset(object, 0, sizeof(*object)); strmbase_filter_init(&object->filter, outer, &CLSID_SmartTee, &filter_ops); - strmbase_sink_init(&object->sink, &SmartTeeFilterInputVtbl, &object->filter, inputW, &sink_ops, NULL); + strmbase_sink_init(&object->sink, &object->filter, inputW, &sink_ops, NULL); hr = CoCreateInstance(&CLSID_MemoryAllocator, NULL, CLSCTX_INPROC_SERVER, &IID_IMemAllocator, (void **)&object->sink.pAllocator); if (FAILED(hr)) diff --git a/dlls/qedit/samplegrabber.c b/dlls/qedit/samplegrabber.c index 91b8d9dce64..bbd43e79bfd 100644 --- a/dlls/qedit/samplegrabber.c +++ b/dlls/qedit/samplegrabber.c @@ -473,28 +473,6 @@ static const IMemInputPinVtbl IMemInputPin_VTable = SampleGrabber_IMemInputPin_ReceiveCanBlock, }; -static const IPinVtbl sink_vtbl = -{ - BasePinImpl_QueryInterface, - BasePinImpl_AddRef, - BasePinImpl_Release, - BaseInputPinImpl_Connect, - BaseInputPinImpl_ReceiveConnection, - BaseInputPinImpl_Disconnect, - BasePinImpl_ConnectedTo, - BasePinImpl_ConnectionMediaType, - BasePinImpl_QueryPinInfo, - BasePinImpl_QueryDirection, - BasePinImpl_QueryId, - BasePinImpl_QueryAccept, - BasePinImpl_EnumMediaTypes, - BasePinImpl_QueryInternalConnections, - BaseInputPinImpl_EndOfStream, - BaseInputPinImpl_BeginFlush, - BaseInputPinImpl_EndFlush, - BaseInputPinImpl_NewSegment -}; - static inline SG_Impl *impl_from_sink_pin(struct strmbase_pin *iface) { return CONTAINING_RECORD(iface, SG_Impl, sink.pin); @@ -663,7 +641,7 @@ HRESULT SampleGrabber_create(IUnknown *outer, void **out) obj->ISampleGrabber_iface.lpVtbl = &ISampleGrabber_VTable; obj->IMemInputPin_iface.lpVtbl = &IMemInputPin_VTable; - strmbase_sink_init(&obj->sink, &sink_vtbl, &obj->filter, L"In", &sink_ops, NULL); + strmbase_sink_init(&obj->sink, &obj->filter, L"In", &sink_ops, NULL); strmbase_source_init(&obj->source, &obj->filter, L"Out", &source_ops); obj->mtype.majortype = GUID_NULL; diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index 177d52740dc..6f22f249766 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -82,7 +82,7 @@ HRESULT strmbase_pin_get_media_type(struct strmbase_pin *iface, unsigned int ind return VFW_S_NO_MORE_ITEMS; } -HRESULT WINAPI BasePinImpl_QueryInterface(IPin *iface, REFIID iid, void **out) +static HRESULT WINAPI pin_QueryInterface(IPin *iface, REFIID iid, void **out) { struct strmbase_pin *pin = impl_from_IPin(iface); HRESULT hr; @@ -107,19 +107,19 @@ HRESULT WINAPI BasePinImpl_QueryInterface(IPin *iface, REFIID iid, void **out) return S_OK; } -ULONG WINAPI BasePinImpl_AddRef(IPin *iface) +static ULONG WINAPI pin_AddRef(IPin *iface) { struct strmbase_pin *pin = impl_from_IPin(iface); return IBaseFilter_AddRef(&pin->filter->IBaseFilter_iface); } -ULONG WINAPI BasePinImpl_Release(IPin *iface) +static ULONG WINAPI pin_Release(IPin *iface) { struct strmbase_pin *pin = impl_from_IPin(iface); return IBaseFilter_Release(&pin->filter->IBaseFilter_iface); } -HRESULT WINAPI BasePinImpl_ConnectedTo(IPin * iface, IPin ** ppPin) +static HRESULT WINAPI pin_ConnectedTo(IPin * iface, IPin ** ppPin) { struct strmbase_pin *This = impl_from_IPin(iface); HRESULT hr; @@ -145,7 +145,7 @@ HRESULT WINAPI BasePinImpl_ConnectedTo(IPin * iface, IPin ** ppPin) return hr; } -HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt) +static HRESULT WINAPI pin_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt) { struct strmbase_pin *This = impl_from_IPin(iface); HRESULT hr; @@ -171,7 +171,7 @@ HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt return hr; } -HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *info) +static HRESULT WINAPI pin_QueryPinInfo(IPin *iface, PIN_INFO *info) { struct strmbase_pin *pin = impl_from_IPin(iface); @@ -184,7 +184,7 @@ HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *info) return S_OK; } -HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *dir) +static HRESULT WINAPI pin_QueryDirection(IPin *iface, PIN_DIRECTION *dir) { struct strmbase_pin *pin = impl_from_IPin(iface); @@ -195,7 +195,7 @@ HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *dir) return S_OK; } -HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, WCHAR **id) +static HRESULT WINAPI pin_QueryId(IPin *iface, WCHAR **id) { struct strmbase_pin *pin = impl_from_IPin(iface); @@ -209,7 +209,7 @@ HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, WCHAR **id) return S_OK; } -HRESULT WINAPI BasePinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt) +static HRESULT WINAPI pin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt) { struct strmbase_pin *This = impl_from_IPin(iface); @@ -219,7 +219,7 @@ HRESULT WINAPI BasePinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt) return (This->pFuncsTable->pin_query_accept(This, pmt) == S_OK ? S_OK : S_FALSE); } -HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_media_types) +static HRESULT WINAPI pin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_media_types) { struct strmbase_pin *pin = impl_from_IPin(iface); AM_MEDIA_TYPE mt; @@ -235,7 +235,7 @@ HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_me return enum_media_types_create(pin, enum_media_types); } -HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin) +static HRESULT WINAPI pin_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *cPin) { struct strmbase_pin *This = impl_from_IPin(iface); @@ -244,14 +244,6 @@ HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, return E_NOTIMPL; /* to tell caller that all input pins connected to all output pins */ } -HRESULT WINAPI BasePinImpl_NewSegment(IPin * iface, REFERENCE_TIME start, REFERENCE_TIME stop, double rate) -{ - TRACE("iface %p, start %s, stop %s, rate %.16e.\n", - iface, debugstr_time(start), debugstr_time(stop), rate); - - return S_OK; -} - /*** OutputPin implementation ***/ static inline struct strmbase_source *impl_source_from_IPin( IPin *iface ) @@ -420,26 +412,33 @@ static HRESULT WINAPI source_EndFlush(IPin *iface) return E_UNEXPECTED; } +static HRESULT WINAPI source_NewSegment(IPin * iface, REFERENCE_TIME start, REFERENCE_TIME stop, double rate) +{ + TRACE("iface %p, start %s, stop %s, rate %.16e.\n", + iface, debugstr_time(start), debugstr_time(stop), rate); + return S_OK; +} + static const IPinVtbl source_vtbl = { - BasePinImpl_QueryInterface, - BasePinImpl_AddRef, - BasePinImpl_Release, + pin_QueryInterface, + pin_AddRef, + pin_Release, source_Connect, source_ReceiveConnection, source_Disconnect, - BasePinImpl_ConnectedTo, - BasePinImpl_ConnectionMediaType, - BasePinImpl_QueryPinInfo, - BasePinImpl_QueryDirection, - BasePinImpl_QueryId, - BasePinImpl_QueryAccept, - BasePinImpl_EnumMediaTypes, - BasePinImpl_QueryInternalConnections, + pin_ConnectedTo, + pin_ConnectionMediaType, + pin_QueryPinInfo, + pin_QueryDirection, + pin_QueryId, + pin_QueryAccept, + pin_EnumMediaTypes, + pin_QueryInternalConnections, source_EndOfStream, source_BeginFlush, source_EndFlush, - BasePinImpl_NewSegment, + source_NewSegment, }; HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(struct strmbase_source *This, @@ -617,14 +616,14 @@ static struct strmbase_sink *impl_sink_from_IPin(IPin *iface) return CONTAINING_RECORD(iface, struct strmbase_sink, pin.IPin_iface); } -HRESULT WINAPI BaseInputPinImpl_Connect(IPin *iface, IPin *pin, const AM_MEDIA_TYPE *pmt) +static HRESULT WINAPI sink_Connect(IPin *iface, IPin *pin, const AM_MEDIA_TYPE *pmt) { ERR("(%p)->(%p, %p) outgoing connection on an input pin!\n", iface, pin, pmt); return E_UNEXPECTED; } -HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) +static HRESULT WINAPI sink_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt) { struct strmbase_sink *This = impl_sink_from_IPin(iface); PIN_DIRECTION pindirReceive; @@ -678,7 +677,7 @@ HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceiveP return hr; } -HRESULT WINAPI BaseInputPinImpl_Disconnect(IPin *iface) +static HRESULT WINAPI sink_Disconnect(IPin *iface) { struct strmbase_sink *pin = impl_sink_from_IPin(iface); HRESULT hr; @@ -711,7 +710,7 @@ static HRESULT deliver_endofstream(IPin* pin, LPVOID unused) return IPin_EndOfStream( pin ); } -HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin * iface) +static HRESULT WINAPI sink_EndOfStream(IPin *iface) { struct strmbase_sink *This = impl_sink_from_IPin(iface); HRESULT hr = S_OK; @@ -736,7 +735,7 @@ static HRESULT deliver_beginflush(IPin* pin, LPVOID unused) return IPin_BeginFlush( pin ); } -HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin * iface) +static HRESULT WINAPI sink_BeginFlush(IPin *iface) { struct strmbase_sink *pin = impl_sink_from_IPin(iface); HRESULT hr; @@ -762,7 +761,7 @@ static HRESULT deliver_endflush(IPin* pin, LPVOID unused) return IPin_EndFlush( pin ); } -HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface) +static HRESULT WINAPI sink_EndFlush(IPin * iface) { struct strmbase_sink *pin = impl_sink_from_IPin(iface); HRESULT hr; @@ -795,7 +794,7 @@ static HRESULT deliver_newsegment(IPin *pin, LPVOID data) return IPin_NewSegment(pin, args->tStart, args->tStop, args->rate); } -HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME start, REFERENCE_TIME stop, double rate) +static HRESULT WINAPI sink_NewSegment(IPin *iface, REFERENCE_TIME start, REFERENCE_TIME stop, double rate) { struct strmbase_sink *pin = impl_sink_from_IPin(iface); newsegmentargs args; @@ -813,6 +812,28 @@ HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME start, R return SendFurther(pin, deliver_newsegment, &args); } +static const IPinVtbl sink_vtbl = +{ + pin_QueryInterface, + pin_AddRef, + pin_Release, + sink_Connect, + sink_ReceiveConnection, + sink_Disconnect, + pin_ConnectedTo, + pin_ConnectionMediaType, + pin_QueryPinInfo, + pin_QueryDirection, + pin_QueryId, + pin_QueryAccept, + pin_EnumMediaTypes, + pin_QueryInternalConnections, + sink_EndOfStream, + sink_BeginFlush, + sink_EndFlush, + sink_NewSegment, +}; + /*** IMemInputPin implementation ***/ static inline struct strmbase_sink *impl_from_IMemInputPin(IMemInputPin *iface) @@ -944,11 +965,11 @@ static const IMemInputPinVtbl MemInputPin_Vtbl = MemInputPin_ReceiveCanBlock }; -void strmbase_sink_init(struct strmbase_sink *pin, const IPinVtbl *vtbl, struct strmbase_filter *filter, +void strmbase_sink_init(struct strmbase_sink *pin, struct strmbase_filter *filter, const WCHAR *name, const struct strmbase_sink_ops *func_table, IMemAllocator *allocator) { memset(pin, 0, sizeof(*pin)); - pin->pin.IPin_iface.lpVtbl = vtbl; + pin->pin.IPin_iface.lpVtbl = &sink_vtbl; pin->pin.filter = filter; pin->pin.dir = PINDIR_INPUT; lstrcpyW(pin->pin.name, name); diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index aa2366d3aa3..1bc581963cf 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -40,28 +40,6 @@ static inline struct strmbase_renderer *impl_from_IPin(IPin *iface) return CONTAINING_RECORD(iface, struct strmbase_renderer, sink.pin.IPin_iface); } -static const IPinVtbl BaseRenderer_InputPin_Vtbl = -{ - BasePinImpl_QueryInterface, - BasePinImpl_AddRef, - BasePinImpl_Release, - BaseInputPinImpl_Connect, - BaseInputPinImpl_ReceiveConnection, - BaseInputPinImpl_Disconnect, - BasePinImpl_ConnectedTo, - BasePinImpl_ConnectionMediaType, - BasePinImpl_QueryPinInfo, - BasePinImpl_QueryDirection, - BasePinImpl_QueryId, - BasePinImpl_QueryAccept, - BasePinImpl_EnumMediaTypes, - BasePinImpl_QueryInternalConnections, - BaseInputPinImpl_EndOfStream, - BaseInputPinImpl_BeginFlush, - BaseInputPinImpl_EndFlush, - BaseInputPinImpl_NewSegment -}; - static struct strmbase_pin *renderer_get_pin(struct strmbase_filter *iface, unsigned int index) { struct strmbase_renderer *filter = impl_from_strmbase_filter(iface); @@ -436,8 +414,7 @@ HRESULT WINAPI strmbase_renderer_init(struct strmbase_renderer *filter, IUnknown filter->pFuncsTable = ops; - strmbase_sink_init(&filter->sink, &BaseRenderer_InputPin_Vtbl, &filter->filter, - sink_name, &sink_ops, NULL); + strmbase_sink_init(&filter->sink, &filter->filter, sink_name, &sink_ops, NULL); hr = CreatePosPassThru(outer ? outer : (IUnknown *)&filter->filter.IBaseFilter_iface, TRUE, &filter->sink.pin.IPin_iface, &filter->pPosition); diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index 69dc93affe1..74be6b107e5 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -26,8 +26,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(strmbase); static const WCHAR wcsInputPinName[] = {'I','n',0}; static const WCHAR wcsOutputPinName[] = {'O','u','t',0}; -static const IPinVtbl TransformFilter_InputPin_Vtbl; - static inline TransformFilter *impl_from_strmbase_filter(struct strmbase_filter *iface) { return CONTAINING_RECORD(iface, TransformFilter, filter); @@ -403,8 +401,7 @@ static HRESULT strmbase_transform_init(IUnknown *outer, const CLSID *clsid, filter->pFuncsTable = func_table; ZeroMemory(&filter->pmt, sizeof(filter->pmt)); - strmbase_sink_init(&filter->sink, &TransformFilter_InputPin_Vtbl, &filter->filter, - wcsInputPinName, &sink_ops, NULL); + strmbase_sink_init(&filter->sink, &filter->filter, wcsInputPinName, &sink_ops, NULL); strmbase_source_init(&filter->source, &filter->filter, wcsOutputPinName, &source_ops); filter->source_IQualityControl_iface.lpVtbl = &source_qc_vtbl; @@ -454,25 +451,3 @@ HRESULT strmbase_transform_create(LONG filter_size, IUnknown *outer, const CLSID CoTaskMemFree(pTf); return E_FAIL; } - -static const IPinVtbl TransformFilter_InputPin_Vtbl = -{ - BasePinImpl_QueryInterface, - BasePinImpl_AddRef, - BasePinImpl_Release, - BaseInputPinImpl_Connect, - BaseInputPinImpl_ReceiveConnection, - BaseInputPinImpl_Disconnect, - BasePinImpl_ConnectedTo, - BasePinImpl_ConnectionMediaType, - BasePinImpl_QueryPinInfo, - BasePinImpl_QueryDirection, - BasePinImpl_QueryId, - BasePinImpl_QueryAccept, - BasePinImpl_EnumMediaTypes, - BasePinImpl_QueryInternalConnections, - BaseInputPinImpl_EndOfStream, - BaseInputPinImpl_BeginFlush, - BaseInputPinImpl_EndFlush, - BaseInputPinImpl_NewSegment -}; diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 1eae0dae9af..3945d9da8fa 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -97,7 +97,6 @@ const char* media_quark_string = "media-sample"; static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0}; static const IMediaSeekingVtbl GST_Seeking_Vtbl; -static const IPinVtbl GST_InputPin_Vtbl; static const IQualityControlVtbl GSTOutPin_QualityControl_Vtbl; static struct gstdemux_source *create_pin(struct gstdemux *filter, const WCHAR *name); @@ -1502,8 +1501,7 @@ IUnknown * CALLBACK Gstreamer_Splitter_create(IUnknown *outer, HRESULT *phr) } strmbase_filter_init(&object->filter, outer, &CLSID_Gstreamer_Splitter, &filter_ops); - strmbase_sink_init(&object->sink, &GST_InputPin_Vtbl, &object->filter, - wcsInputPinName, &sink_ops, NULL); + strmbase_sink_init(&object->sink, &object->filter, wcsInputPinName, &sink_ops, NULL); object->no_more_pads_event = CreateEventW(NULL, FALSE, FALSE, NULL); object->init_gst = gstdecoder_init_gst; @@ -1967,27 +1965,6 @@ static HRESULT GST_RemoveOutputPins(struct gstdemux *This) return S_OK; } -static const IPinVtbl GST_InputPin_Vtbl = { - BasePinImpl_QueryInterface, - BasePinImpl_AddRef, - BasePinImpl_Release, - BaseInputPinImpl_Connect, - BaseInputPinImpl_ReceiveConnection, - BaseInputPinImpl_Disconnect, - BasePinImpl_ConnectedTo, - BasePinImpl_ConnectionMediaType, - BasePinImpl_QueryPinInfo, - BasePinImpl_QueryDirection, - BasePinImpl_QueryId, - BasePinImpl_QueryAccept, - BasePinImpl_EnumMediaTypes, - BasePinImpl_QueryInternalConnections, - BaseInputPinImpl_EndOfStream, - BaseInputPinImpl_BeginFlush, - BaseInputPinImpl_EndFlush, - BaseInputPinImpl_NewSegment -}; - pthread_mutex_t cb_list_lock = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t cb_list_cond = PTHREAD_COND_INITIALIZER; struct list cb_list = LIST_INIT(cb_list); @@ -2235,8 +2212,7 @@ IUnknown * CALLBACK wave_parser_create(IUnknown *outer, HRESULT *phr) } strmbase_filter_init(&object->filter, outer, &CLSID_WAVEParser, &filter_ops); - strmbase_sink_init(&object->sink, &GST_InputPin_Vtbl, &object->filter, - sink_name, &wave_parser_sink_ops, NULL); + strmbase_sink_init(&object->sink, &object->filter, sink_name, &wave_parser_sink_ops, NULL); object->init_gst = wave_parser_init_gst; *phr = S_OK; @@ -2339,8 +2315,7 @@ IUnknown * CALLBACK avi_splitter_create(IUnknown *outer, HRESULT *phr) } strmbase_filter_init(&object->filter, outer, &CLSID_AviSplitter, &filter_ops); - strmbase_sink_init(&object->sink, &GST_InputPin_Vtbl, &object->filter, - sink_name, &avi_splitter_sink_ops, NULL); + strmbase_sink_init(&object->sink, &object->filter, sink_name, &avi_splitter_sink_ops, NULL); object->no_more_pads_event = CreateEventW(NULL, FALSE, FALSE, NULL); object->init_gst = avi_splitter_init_gst; *phr = S_OK; @@ -2475,8 +2450,7 @@ IUnknown * CALLBACK mpeg_splitter_create(IUnknown *outer, HRESULT *phr) } strmbase_filter_init(&object->filter, outer, &CLSID_MPEG1Splitter, &mpeg_splitter_ops); - strmbase_sink_init(&object->sink, &GST_InputPin_Vtbl, &object->filter, - sink_name, &mpeg_splitter_sink_ops, NULL); + strmbase_sink_init(&object->sink, &object->filter, sink_name, &mpeg_splitter_sink_ops, NULL); object->IAMStreamSelect_iface.lpVtbl = &stream_select_vtbl; object->duration_event = CreateEventW(NULL, FALSE, FALSE, NULL); diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c index df6e8ea5d24..1421e0bf53c 100644 --- a/dlls/wineqtdecoder/qtsplitter.c +++ b/dlls/wineqtdecoder/qtsplitter.c @@ -171,7 +171,6 @@ typedef struct QTSplitter { HANDLE splitterThread; } QTSplitter; -static const IPinVtbl QT_InputPin_Vtbl; static const IBaseFilterVtbl QT_Vtbl; static const IMediaSeekingVtbl QT_Seeking_Vtbl; @@ -421,8 +420,7 @@ IUnknown * CALLBACK QTSplitter_create(IUnknown *outer, HRESULT *phr) ZeroMemory(This,sizeof(*This)); strmbase_filter_init(&This->filter, outer, &CLSID_QTSplitter, &filter_ops); - strmbase_sink_init(&This->pInputPin.pin, &QT_InputPin_Vtbl, &This->filter, - wcsInputPinName, &sink_ops, NULL); + strmbase_sink_init(&This->pInputPin.pin, &This->filter, wcsInputPinName, &sink_ops, NULL); InitializeCriticalSection(&This->csReceive); This->csReceive.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__": QTSplitter.csReceive"); @@ -1030,27 +1028,6 @@ static HRESULT QT_Process_Movie(QTSplitter* filter) return hr; } -static const IPinVtbl QT_InputPin_Vtbl = { - BasePinImpl_QueryInterface, - BasePinImpl_AddRef, - BasePinImpl_Release, - BaseInputPinImpl_Connect, - BaseInputPinImpl_ReceiveConnection, - BaseInputPinImpl_Disconnect, - BasePinImpl_ConnectedTo, - BasePinImpl_ConnectionMediaType, - BasePinImpl_QueryPinInfo, - BasePinImpl_QueryDirection, - BasePinImpl_QueryId, - BasePinImpl_QueryAccept, - BasePinImpl_EnumMediaTypes, - BasePinImpl_QueryInternalConnections, - BaseInputPinImpl_EndOfStream, - BaseInputPinImpl_BeginFlush, - BaseInputPinImpl_EndFlush, - BaseInputPinImpl_NewSegment -}; - static inline QTOutPin *impl_source_from_strmbase_pin(struct strmbase_pin *iface) { return CONTAINING_RECORD(iface, QTOutPin, pin.pin); diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index c01ef6133f4..48d7638ae16 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -103,20 +103,6 @@ struct strmbase_sink_ops /* Base Pin */ HRESULT strmbase_pin_get_media_type(struct strmbase_pin *pin, unsigned int index, AM_MEDIA_TYPE *mt); -LONG WINAPI BasePinImpl_GetMediaTypeVersion(struct strmbase_pin *pin); -HRESULT WINAPI BasePinImpl_QueryInterface(IPin *iface, REFIID iid, void **out); -ULONG WINAPI BasePinImpl_AddRef(IPin *iface); -ULONG WINAPI BasePinImpl_Release(IPin *iface); -HRESULT WINAPI BaseInputPinImpl_Disconnect(IPin * iface); -HRESULT WINAPI BasePinImpl_ConnectedTo(IPin * iface, IPin ** ppPin); -HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt); -HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin * iface, PIN_INFO * pInfo); -HRESULT WINAPI BasePinImpl_QueryDirection(IPin * iface, PIN_DIRECTION * pPinDir); -HRESULT WINAPI BasePinImpl_QueryId(IPin * iface, LPWSTR * Id); -HRESULT WINAPI BasePinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt); -HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum); -HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin); -HRESULT WINAPI BasePinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate); HRESULT WINAPI BaseOutputPinImpl_GetDeliveryBuffer(struct strmbase_source *pin, IMediaSample **sample, REFERENCE_TIME *start, REFERENCE_TIME *stop, DWORD flags); @@ -130,16 +116,7 @@ void strmbase_source_cleanup(struct strmbase_source *pin); void strmbase_source_init(struct strmbase_source *pin, struct strmbase_filter *filter, const WCHAR *name, const struct strmbase_source_ops *func_table); -/* Base Input Pin */ -HRESULT WINAPI BaseInputPinImpl_Connect(IPin * iface, IPin * pConnector, const AM_MEDIA_TYPE * pmt); -HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt); -HRESULT WINAPI BaseInputPinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt); -HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin * iface); -HRESULT WINAPI BaseInputPinImpl_BeginFlush(IPin * iface); -HRESULT WINAPI BaseInputPinImpl_EndFlush(IPin * iface); -HRESULT WINAPI BaseInputPinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate); - -void strmbase_sink_init(struct strmbase_sink *pin, const IPinVtbl *vtbl, struct strmbase_filter *filter, +void strmbase_sink_init(struct strmbase_sink *pin, struct strmbase_filter *filter, const WCHAR *name, const struct strmbase_sink_ops *ops, IMemAllocator *allocator); void strmbase_sink_cleanup(struct strmbase_sink *pin);