[PATCH 3/3] strmbase: Get rid of the "pfnGetMediaTypeVersion" callback.
Zebediah Figura
z.figura12 at gmail.com
Thu May 9 10:12:34 CDT 2019
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/amstream/mediastream.c | 12 ------------
dlls/qcap/avico.c | 13 -------------
dlls/qcap/avimux.c | 12 ------------
dlls/qcap/smartteefilter.c | 22 ----------------------
dlls/qcap/vfwcapture.c | 1 -
dlls/quartz/filesource.c | 1 -
dlls/quartz/parser.c | 1 -
dlls/strmbase/pin.c | 11 +++++------
dlls/strmbase/renderer.c | 1 -
dlls/strmbase/transform.c | 2 --
dlls/winegstreamer/gstdemux.c | 1 -
dlls/wineqtdecoder/qtsplitter.c | 1 -
include/wine/strmbase.h | 1 -
13 files changed, 5 insertions(+), 74 deletions(-)
diff --git a/dlls/amstream/mediastream.c b/dlls/amstream/mediastream.c
index 9b51351931..28c3c01f7b 100644
--- a/dlls/amstream/mediastream.c
+++ b/dlls/amstream/mediastream.c
@@ -532,11 +532,6 @@ static HRESULT WINAPI DirectDrawMediaStreamInputPin_CheckMediaType(BasePin *base
return S_FALSE;
}
-static LONG WINAPI DirectDrawMediaStreamInputPin_GetMediaTypeVersion(BasePin *base)
-{
- return 0;
-}
-
static HRESULT WINAPI DirectDrawMediaStreamInputPin_GetMediaType(BasePin *base, int index, AM_MEDIA_TYPE *media_type)
{
DirectDrawMediaStreamInputPin *This = impl_from_DirectDrawMediaStreamInputPin_IPin(&base->IPin_iface);
@@ -591,7 +586,6 @@ static const BaseInputPinFuncTable DirectDrawMediaStreamInputPin_FuncTable =
{
{
DirectDrawMediaStreamInputPin_CheckMediaType,
- DirectDrawMediaStreamInputPin_GetMediaTypeVersion,
DirectDrawMediaStreamInputPin_GetMediaType,
},
DirectDrawMediaStreamInputPin_Receive,
@@ -1098,11 +1092,6 @@ static HRESULT WINAPI AudioMediaStreamInputPin_CheckMediaType(BasePin *base, con
return S_OK;
}
-static LONG WINAPI AudioMediaStreamInputPin_GetMediaTypeVersion(BasePin *base)
-{
- return 0;
-}
-
static HRESULT WINAPI AudioMediaStreamInputPin_GetMediaType(BasePin *base, int index, AM_MEDIA_TYPE *media_type)
{
AudioMediaStreamInputPin *This = impl_from_AudioMediaStreamInputPin_IPin(&base->IPin_iface);
@@ -1134,7 +1123,6 @@ static const BaseInputPinFuncTable AudioMediaStreamInputPin_FuncTable =
{
{
AudioMediaStreamInputPin_CheckMediaType,
- AudioMediaStreamInputPin_GetMediaTypeVersion,
AudioMediaStreamInputPin_GetMediaType,
},
AudioMediaStreamInputPin_Receive,
diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c
index bff1da474c..49ac2d864d 100644
--- a/dlls/qcap/avico.c
+++ b/dlls/qcap/avico.c
@@ -473,11 +473,6 @@ static HRESULT WINAPI AVICompressorIn_CheckMediaType(BasePin *base, const AM_MED
return res == ICERR_OK ? S_OK : S_FALSE;
}
-static LONG WINAPI AVICompressorIn_GetMediaTypeVersion(BasePin *base)
-{
- return 0;
-}
-
static HRESULT WINAPI AVICompressorIn_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
{
TRACE("(%p)->(%d %p)\n", base, iPosition, amt);
@@ -574,7 +569,6 @@ static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample *
static const BaseInputPinFuncTable AVICompressorBaseInputPinVtbl = {
{
AVICompressorIn_CheckMediaType,
- AVICompressorIn_GetMediaTypeVersion,
AVICompressorIn_GetMediaType
},
AVICompressorIn_Receive
@@ -618,12 +612,6 @@ static const IPinVtbl AVICompressorOutputPinVtbl = {
BasePinImpl_NewSegment
};
-static LONG WINAPI AVICompressorOut_GetMediaTypeVersion(BasePin *base)
-{
- FIXME("(%p)\n", base);
- return 0;
-}
-
static HRESULT WINAPI AVICompressorOut_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
{
AVICompressor *This = impl_from_IBaseFilter(base->pinInfo.pFilter);
@@ -678,7 +666,6 @@ static HRESULT WINAPI AVICompressorOut_BreakConnect(BaseOutputPin *base)
static const BaseOutputPinFuncTable AVICompressorBaseOutputPinVtbl = {
{
NULL,
- AVICompressorOut_GetMediaTypeVersion,
AVICompressorOut_GetMediaType
},
BaseOutputPinImpl_AttemptConnection,
diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c
index 6ddff8f93b..2bb6e12826 100644
--- a/dlls/qcap/avimux.c
+++ b/dlls/qcap/avimux.c
@@ -1245,11 +1245,6 @@ static HRESULT WINAPI AviMuxOut_AttemptConnection(BaseOutputPin *base,
return BaseOutputPinImpl_AttemptConnection(base, pReceivePin, pmt);
}
-static LONG WINAPI AviMuxOut_GetMediaTypeVersion(BasePin *base)
-{
- return 0;
-}
-
static HRESULT WINAPI AviMuxOut_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
{
TRACE("(%p)->(%d %p)\n", base, iPosition, amt);
@@ -1306,7 +1301,6 @@ static HRESULT WINAPI AviMuxOut_BreakConnect(BaseOutputPin *base)
static const BaseOutputPinFuncTable AviMuxOut_BaseOutputFuncTable = {
{
AviMuxOut_CheckMediaType,
- AviMuxOut_GetMediaTypeVersion,
AviMuxOut_GetMediaType
},
AviMuxOut_AttemptConnection,
@@ -1585,11 +1579,6 @@ static HRESULT WINAPI AviMuxIn_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE
return S_FALSE;
}
-static LONG WINAPI AviMuxIn_GetMediaTypeVersion(BasePin *base)
-{
- return 0;
-}
-
static HRESULT WINAPI AviMuxIn_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
{
return S_FALSE;
@@ -1701,7 +1690,6 @@ static HRESULT WINAPI AviMuxIn_Receive(BaseInputPin *base, IMediaSample *pSample
static const BaseInputPinFuncTable AviMuxIn_BaseInputFuncTable = {
{
AviMuxIn_CheckMediaType,
- AviMuxIn_GetMediaTypeVersion,
AviMuxIn_GetMediaType
},
AviMuxIn_Receive
diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c
index 09176e3b16..72794d01e6 100644
--- a/dlls/qcap/smartteefilter.c
+++ b/dlls/qcap/smartteefilter.c
@@ -279,11 +279,6 @@ static HRESULT WINAPI SmartTeeFilterInput_CheckMediaType(BasePin *base, const AM
return S_OK;
}
-static LONG WINAPI SmartTeeFilterInput_GetMediaTypeVersion(BasePin *base)
-{
- return 0;
-}
-
static HRESULT WINAPI SmartTeeFilterInput_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
{
SmartTeeFilter *This = impl_from_BasePin(base);
@@ -425,7 +420,6 @@ static HRESULT WINAPI SmartTeeFilterInput_Receive(BaseInputPin *base, IMediaSamp
static const BaseInputPinFuncTable SmartTeeFilterInputFuncs = {
{
SmartTeeFilterInput_CheckMediaType,
- SmartTeeFilterInput_GetMediaTypeVersion,
SmartTeeFilterInput_GetMediaType
},
SmartTeeFilterInput_Receive
@@ -484,13 +478,6 @@ static HRESULT WINAPI SmartTeeFilterCapture_CheckMediaType(BasePin *base, const
return S_OK;
}
-static LONG WINAPI SmartTeeFilterCapture_GetMediaTypeVersion(BasePin *base)
-{
- SmartTeeFilter *This = impl_from_BasePin(base);
- TRACE("(%p)\n", This);
- return 0;
-}
-
static HRESULT WINAPI SmartTeeFilterCapture_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
{
SmartTeeFilter *This = impl_from_BasePin(base);
@@ -521,7 +508,6 @@ static HRESULT WINAPI SmartTeeFilterCapture_BreakConnect(BaseOutputPin *base)
static const BaseOutputPinFuncTable SmartTeeFilterCaptureFuncs = {
{
SmartTeeFilterCapture_CheckMediaType,
- SmartTeeFilterCapture_GetMediaTypeVersion,
SmartTeeFilterCapture_GetMediaType
},
BaseOutputPinImpl_AttemptConnection,
@@ -583,13 +569,6 @@ static HRESULT WINAPI SmartTeeFilterPreview_CheckMediaType(BasePin *base, const
return S_OK;
}
-static LONG WINAPI SmartTeeFilterPreview_GetMediaTypeVersion(BasePin *base)
-{
- SmartTeeFilter *This = impl_from_BasePin(base);
- TRACE("(%p)\n", This);
- return 0;
-}
-
static HRESULT WINAPI SmartTeeFilterPreview_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
{
SmartTeeFilter *This = impl_from_BasePin(base);
@@ -620,7 +599,6 @@ static HRESULT WINAPI SmartTeeFilterPreview_BreakConnect(BaseOutputPin *base)
static const BaseOutputPinFuncTable SmartTeeFilterPreviewFuncs = {
{
SmartTeeFilterPreview_CheckMediaType,
- SmartTeeFilterPreview_GetMediaTypeVersion,
SmartTeeFilterPreview_GetMediaType
},
BaseOutputPinImpl_AttemptConnection,
diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c
index 015f04a214..06831561f1 100644
--- a/dlls/qcap/vfwcapture.c
+++ b/dlls/qcap/vfwcapture.c
@@ -707,7 +707,6 @@ static HRESULT WINAPI VfwPin_DecideBufferSize(BaseOutputPin *iface, IMemAllocato
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
{
VfwPin_CheckMediaType,
- VfwPin_GetMediaTypeVersion,
VfwPin_GetMediaType
},
BaseOutputPinImpl_AttemptConnection,
diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c
index c561424bdd..293914dc6f 100644
--- a/dlls/quartz/filesource.c
+++ b/dlls/quartz/filesource.c
@@ -909,7 +909,6 @@ static HRESULT WINAPI FileAsyncReaderPin_DecideBufferSize(BaseOutputPin *iface,
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
{
FileAsyncReaderPin_CheckMediaType,
- BasePinImpl_GetMediaTypeVersion,
FileAsyncReaderPin_GetMediaType
},
FileAsyncReaderPin_AttemptConnection,
diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c
index 4145a3bf2a..9278a58bf7 100644
--- a/dlls/quartz/parser.c
+++ b/dlls/quartz/parser.c
@@ -424,7 +424,6 @@ HRESULT WINAPI Parser_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo)
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
{
Parser_OutputPin_CheckMediaType,
- BasePinImpl_GetMediaTypeVersion,
Parser_OutputPin_GetMediaType
},
BaseOutputPinImpl_AttemptConnection,
diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c
index 376db5cdbe..58fe0e55e2 100644
--- a/dlls/strmbase/pin.c
+++ b/dlls/strmbase/pin.c
@@ -306,15 +306,14 @@ HRESULT WINAPI BasePinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt)
return (This->pFuncsTable->pfnCheckMediaType(This, pmt) == S_OK ? S_OK : S_FALSE);
}
-HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum)
+HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_media_types)
{
- BasePin *This = impl_from_IPin(iface);
-
- TRACE("(%p)->(%p)\n", This, ppEnum);
+ BasePin *pin = impl_from_IPin(iface);
- /* override this method to allow enumeration of your types */
+ TRACE("iface %p, enum_media_types %p.\n", iface, enum_media_types);
- return EnumMediaTypes_Construct(This, This->pFuncsTable->pfnGetMediaType, This->pFuncsTable->pfnGetMediaTypeVersion , ppEnum);
+ return EnumMediaTypes_Construct(pin, pin->pFuncsTable->pfnGetMediaType,
+ BasePinImpl_GetMediaTypeVersion, enum_media_types);
}
HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin)
diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c
index 082400a26b..438dbb5e91 100644
--- a/dlls/strmbase/renderer.c
+++ b/dlls/strmbase/renderer.c
@@ -197,7 +197,6 @@ static const BaseFilterFuncTable RendererBaseFilterFuncTable = {
static const BaseInputPinFuncTable input_BaseInputFuncTable = {
{
BaseRenderer_Input_CheckMediaType,
- BasePinImpl_GetMediaTypeVersion,
BasePinImpl_GetMediaType
},
BaseRenderer_Receive
diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c
index 6bb75c1e6f..1ce628335b 100644
--- a/dlls/strmbase/transform.c
+++ b/dlls/strmbase/transform.c
@@ -152,7 +152,6 @@ static const BaseFilterFuncTable tfBaseFuncTable = {
static const BaseInputPinFuncTable tf_input_BaseInputFuncTable = {
{
TransformFilter_Input_CheckMediaType,
- BasePinImpl_GetMediaTypeVersion,
BasePinImpl_GetMediaType
},
TransformFilter_Input_Receive
@@ -161,7 +160,6 @@ static const BaseInputPinFuncTable tf_input_BaseInputFuncTable = {
static const BaseOutputPinFuncTable tf_output_BaseOutputFuncTable = {
{
TransformFilter_Output_CheckMediaType,
- BasePinImpl_GetMediaTypeVersion,
TransformFilter_Output_GetMediaType
},
BaseOutputPinImpl_AttemptConnection,
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c
index 1552e9e6c7..8b167483f6 100644
--- a/dlls/winegstreamer/gstdemux.c
+++ b/dlls/winegstreamer/gstdemux.c
@@ -1868,7 +1868,6 @@ static const IPinVtbl GST_OutputPin_Vtbl = {
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
{
GSTOutPin_CheckMediaType,
- BasePinImpl_GetMediaTypeVersion,
GSTOutPin_GetMediaType
},
BaseOutputPinImpl_AttemptConnection,
diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c
index 056bd564db..33edf25e12 100644
--- a/dlls/wineqtdecoder/qtsplitter.c
+++ b/dlls/wineqtdecoder/qtsplitter.c
@@ -1515,7 +1515,6 @@ static const IQualityControlVtbl QTOutPin_QualityControl_Vtbl = {
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = {
{
QTOutPin_CheckMediaType,
- BasePinImpl_GetMediaTypeVersion,
QTOutPin_GetMediaType
},
BaseOutputPinImpl_AttemptConnection,
diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h
index fd241c8925..119dec7d62 100644
--- a/include/wine/strmbase.h
+++ b/include/wine/strmbase.h
@@ -51,7 +51,6 @@ typedef struct BasePinFuncTable {
/* Required for QueryAccept(), Connect(), ReceiveConnection(). */
BasePin_CheckMediaType pfnCheckMediaType;
/* Required for BasePinImpl_EnumMediaTypes */
- BasePin_GetMediaTypeVersion pfnGetMediaTypeVersion;
BasePin_GetMediaType pfnGetMediaType;
} BasePinFuncTable;
--
2.21.0
More information about the wine-devel
mailing list