From d021b5d2626a31a2ab75fbd112a48b2a7a47ae66 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Tue, 18 Jun 2019 20:17:36 -0500 Subject: [PATCH] quartz: Use strmbase pin reference counting methods. Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/quartz/filesource.c | 16 ++-------------- dlls/quartz/parser.c | 20 ++++---------------- dlls/quartz/pin.c | 12 ------------ dlls/quartz/pin.h | 2 -- 4 files changed, 6 insertions(+), 44 deletions(-) diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 25bffe6c36c..afac6f7d319 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -777,23 +777,11 @@ static HRESULT WINAPI FileAsyncReaderPin_QueryInterface(IPin * iface, REFIID rii return E_NOINTERFACE; } -static ULONG WINAPI FileAsyncReaderPin_AddRef(IPin *iface) -{ - FileAsyncReader *pin = impl_from_IPin(iface); - return IBaseFilter_AddRef(pin->pin.pin.pinInfo.pFilter); -} - -static ULONG WINAPI FileAsyncReaderPin_Release(IPin * iface) -{ - FileAsyncReader *pin = impl_from_IPin(iface); - return IBaseFilter_Release(pin->pin.pin.pinInfo.pFilter); -} - static const IPinVtbl FileAsyncReaderPin_Vtbl = { FileAsyncReaderPin_QueryInterface, - FileAsyncReaderPin_AddRef, - FileAsyncReaderPin_Release, + BasePinImpl_AddRef, + BasePinImpl_Release, BaseOutputPinImpl_Connect, BaseOutputPinImpl_ReceiveConnection, BasePinImpl_Disconnect, diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index 5743a53fd2e..652d4109f41 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -564,18 +564,6 @@ static HRESULT WINAPI Parser_OutputPin_QueryInterface(IPin * iface, REFIID riid, return E_NOINTERFACE; } -static ULONG WINAPI Parser_OutputPin_AddRef(IPin *iface) -{ - Parser_OutputPin *pin = unsafe_impl_Parser_OutputPin_from_IPin(iface); - return IBaseFilter_AddRef(pin->pin.pin.pinInfo.pFilter); -} - -static ULONG WINAPI Parser_OutputPin_Release(IPin * iface) -{ - Parser_OutputPin *pin = unsafe_impl_Parser_OutputPin_from_IPin(iface); - return IBaseFilter_Release(pin->pin.pin.pinInfo.pFilter); -} - static HRESULT WINAPI Parser_OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) { Parser_OutputPin *This = unsafe_impl_Parser_OutputPin_from_IPin(iface); @@ -601,8 +589,8 @@ static HRESULT WINAPI Parser_OutputPin_CheckMediaType(BasePin *pin, const AM_MED static const IPinVtbl Parser_OutputPin_Vtbl = { Parser_OutputPin_QueryInterface, - Parser_OutputPin_AddRef, - Parser_OutputPin_Release, + BasePinImpl_AddRef, + BasePinImpl_Release, Parser_OutputPin_Connect, BaseOutputPinImpl_ReceiveConnection, BaseOutputPinImpl_Disconnect, @@ -714,8 +702,8 @@ static HRESULT WINAPI Parser_PullPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes static const IPinVtbl Parser_InputPin_Vtbl = { Parser_PullPin_QueryInterface, - PullPin_AddRef, - PullPin_Release, + BasePinImpl_AddRef, + BasePinImpl_Release, BaseInputPinImpl_Connect, Parser_PullPin_ReceiveConnection, Parser_PullPin_Disconnect, diff --git a/dlls/quartz/pin.c b/dlls/quartz/pin.c index e99a493d0b5..03ca4e6edea 100644 --- a/dlls/quartz/pin.c +++ b/dlls/quartz/pin.c @@ -381,18 +381,6 @@ void PullPin_destroy(PullPin *pin) CoTaskMemFree(pin); } -ULONG WINAPI PullPin_AddRef(IPin *iface) -{ - PullPin *pin = impl_PullPin_from_IPin(iface); - return IBaseFilter_AddRef(pin->pin.pinInfo.pFilter); -} - -ULONG WINAPI PullPin_Release(IPin *iface) -{ - PullPin *pin = impl_PullPin_from_IPin(iface); - return IBaseFilter_Release(pin->pin.pinInfo.pFilter); -} - static void PullPin_Flush(PullPin *This) { IMediaSample *pSample; diff --git a/dlls/quartz/pin.h b/dlls/quartz/pin.h index b65d2239fb8..efed724c394 100644 --- a/dlls/quartz/pin.h +++ b/dlls/quartz/pin.h @@ -115,8 +115,6 @@ void PullPin_destroy(PullPin *pin) DECLSPEC_HIDDEN; HRESULT WINAPI PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt); HRESULT WINAPI PullPin_Disconnect(IPin * iface); HRESULT WINAPI PullPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv); -ULONG WINAPI PullPin_AddRef(IPin *iface) DECLSPEC_HIDDEN; -ULONG WINAPI PullPin_Release(IPin *iface) DECLSPEC_HIDDEN; HRESULT WINAPI PullPin_EndOfStream(IPin * iface); HRESULT WINAPI PullPin_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt); HRESULT WINAPI PullPin_BeginFlush(IPin * iface);