diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c index 0371cd74c17..43cca04a064 100644 --- a/dlls/qcap/avico.c +++ b/dlls/qcap/avico.c @@ -406,12 +406,6 @@ static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE return res == ICERR_OK ? S_OK : S_FALSE; } -static HRESULT WINAPI AVICompressorIn_GetMediaType(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) -{ - TRACE("(%p)->(%d %p)\n", base, iPosition, amt); - return S_FALSE; -} - static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample *pSample) { AVICompressor *This = impl_from_strmbase_pin(&base->pin); @@ -502,7 +496,7 @@ static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample * static const BaseInputPinFuncTable AVICompressorBaseInputPinVtbl = { .base.pin_query_accept = sink_query_accept, - .base.pfnGetMediaType = AVICompressorIn_GetMediaType, + .base.pin_get_media_type = strmbase_pin_get_media_type, .pfnReceive = AVICompressorIn_Receive, }; @@ -532,7 +526,7 @@ static const IPinVtbl AVICompressorOutputPinVtbl = { BasePinImpl_NewSegment }; -static HRESULT WINAPI AVICompressorOut_GetMediaType(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) +static HRESULT source_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) { AVICompressor *This = impl_from_strmbase_filter(base->filter); @@ -580,13 +574,10 @@ static HRESULT WINAPI AVICompressorOut_DecideAllocator(struct strmbase_source *b static const struct strmbase_source_ops source_ops = { - { - NULL, - AVICompressorOut_GetMediaType - }, - BaseOutputPinImpl_AttemptConnection, - AVICompressorOut_DecideBufferSize, - AVICompressorOut_DecideAllocator, + .base.pin_get_media_type = source_get_media_type, + .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection, + .pfnDecideBufferSize = AVICompressorOut_DecideBufferSize, + .pfnDecideAllocator = AVICompressorOut_DecideAllocator, }; IUnknown* WINAPI QCAP_createAVICompressor(IUnknown *outer, HRESULT *phr) diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c index a61ae5600e9..f969e73a8ca 100644 --- a/dlls/qcap/avimux.c +++ b/dlls/qcap/avimux.c @@ -1174,7 +1174,7 @@ static HRESULT WINAPI AviMuxOut_AttemptConnection(struct strmbase_source *base, return BaseOutputPinImpl_AttemptConnection(base, pReceivePin, pmt); } -static HRESULT WINAPI AviMuxOut_GetMediaType(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) +static HRESULT source_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) { TRACE("(%p)->(%d %p)\n", base, iPosition, amt); @@ -1224,7 +1224,7 @@ static HRESULT WINAPI AviMuxOut_DecideAllocator(struct strmbase_source *base, static const struct strmbase_source_ops source_ops = { .base.pin_query_accept = source_query_accept, - .base.pfnGetMediaType = AviMuxOut_GetMediaType, + .base.pin_get_media_type = source_get_media_type, .pfnAttemptConnection = AviMuxOut_AttemptConnection, .pfnDecideAllocator = AviMuxOut_DecideAllocator, }; @@ -1384,11 +1384,6 @@ static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE return S_FALSE; } -static HRESULT WINAPI AviMuxIn_GetMediaType(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) -{ - return S_FALSE; -} - static HRESULT WINAPI AviMuxIn_Receive(BaseInputPin *base, IMediaSample *pSample) { AviMux *avimux = impl_from_strmbase_filter(base->pin.filter); @@ -1495,7 +1490,7 @@ static HRESULT WINAPI AviMuxIn_Receive(BaseInputPin *base, IMediaSample *pSample static const BaseInputPinFuncTable AviMuxIn_BaseInputFuncTable = { .base.pin_query_accept = sink_query_accept, - .base.pfnGetMediaType = AviMuxIn_GetMediaType, + .base.pin_get_media_type = strmbase_pin_get_media_type, .pfnReceive = AviMuxIn_Receive, }; diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c index 98293fb4d8e..390bfa8e20d 100644 --- a/dlls/qcap/smartteefilter.c +++ b/dlls/qcap/smartteefilter.c @@ -179,7 +179,7 @@ static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE return S_OK; } -static HRESULT WINAPI SmartTeeFilterInput_GetMediaType(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) +static HRESULT sink_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) { SmartTeeFilter *This = impl_from_strmbase_pin(base); HRESULT hr; @@ -322,7 +322,7 @@ static HRESULT WINAPI SmartTeeFilterInput_Receive(BaseInputPin *base, IMediaSamp static const BaseInputPinFuncTable SmartTeeFilterInputFuncs = { .base.pin_query_accept = sink_query_accept, - .base.pfnGetMediaType = SmartTeeFilterInput_GetMediaType, + .base.pin_get_media_type = sink_get_media_type, .pfnReceive = SmartTeeFilterInput_Receive, }; @@ -367,7 +367,7 @@ static HRESULT capture_query_accept(struct strmbase_pin *base, const AM_MEDIA_TY return S_OK; } -static HRESULT WINAPI SmartTeeFilterCapture_GetMediaType(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) +static HRESULT capture_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) { SmartTeeFilter *This = impl_from_strmbase_pin(base); TRACE("(%p, %d, %p)\n", This, iPosition, amt); @@ -391,7 +391,7 @@ static HRESULT WINAPI SmartTeeFilterCapture_DecideAllocator(struct strmbase_sour static const struct strmbase_source_ops capture_ops = { .base.pin_query_accept = capture_query_accept, - .base.pfnGetMediaType = SmartTeeFilterCapture_GetMediaType, + .base.pin_get_media_type = capture_get_media_type, .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection, .pfnDecideAllocator = SmartTeeFilterCapture_DecideAllocator, }; @@ -437,7 +437,7 @@ static HRESULT preview_query_accept(struct strmbase_pin *base, const AM_MEDIA_TY return S_OK; } -static HRESULT WINAPI SmartTeeFilterPreview_GetMediaType(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) +static HRESULT preview_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt) { SmartTeeFilter *This = impl_from_strmbase_pin(base); TRACE("(%p, %d, %p)\n", This, iPosition, amt); @@ -461,7 +461,7 @@ static HRESULT WINAPI SmartTeeFilterPreview_DecideAllocator(struct strmbase_sour static const struct strmbase_source_ops preview_ops = { .base.pin_query_accept = preview_query_accept, - .base.pfnGetMediaType = SmartTeeFilterPreview_GetMediaType, + .base.pin_get_media_type = preview_get_media_type, .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection, .pfnDecideAllocator = SmartTeeFilterPreview_DecideAllocator, }; diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index c84baa7abc6..551dad61f33 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -518,7 +518,7 @@ static HRESULT source_query_accept(struct strmbase_pin *pin, const AM_MEDIA_TYPE return qcap_driver_check_format(filter->driver_info, mt); } -static HRESULT WINAPI VfwPin_GetMediaType(struct strmbase_pin *pin, int iPosition, AM_MEDIA_TYPE *pmt) +static HRESULT source_get_media_type(struct strmbase_pin *pin, int iPosition, AM_MEDIA_TYPE *pmt) { VfwCapture *filter = impl_from_strmbase_pin(pin); AM_MEDIA_TYPE *vfw_pmt; @@ -557,7 +557,7 @@ static HRESULT WINAPI VfwPin_DecideBufferSize(struct strmbase_source *iface, static const struct strmbase_source_ops source_ops = { .base.pin_query_accept = source_query_accept, - .base.pfnGetMediaType = VfwPin_GetMediaType, + .base.pin_get_media_type = source_get_media_type, .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection, .pfnDecideBufferSize = VfwPin_DecideBufferSize, .pfnDecideAllocator = BaseOutputPinImpl_DecideAllocator, diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index ac210824f07..031307e1839 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -591,7 +591,7 @@ static HRESULT source_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TY return S_FALSE; } -static HRESULT WINAPI FileAsyncReaderPin_GetMediaType(struct strmbase_pin *iface, int index, AM_MEDIA_TYPE *mt) +static HRESULT source_get_media_type(struct strmbase_pin *iface, int index, AM_MEDIA_TYPE *mt) { AsyncReader *filter = impl_from_strmbase_pin(iface); @@ -704,7 +704,7 @@ static HRESULT WINAPI FileAsyncReaderPin_DecideBufferSize(struct strmbase_source static const struct strmbase_source_ops source_ops = { .base.pin_query_accept = source_query_accept, - .base.pfnGetMediaType = FileAsyncReaderPin_GetMediaType, + .base.pin_get_media_type = source_get_media_type, .pfnAttemptConnection = FileAsyncReaderPin_AttemptConnection, .pfnDecideBufferSize = FileAsyncReaderPin_DecideBufferSize, .pfnDecideAllocator = BaseOutputPinImpl_DecideAllocator, diff --git a/dlls/strmbase/mediatype.c b/dlls/strmbase/mediatype.c index df8d5702933..931e00a5cba 100644 --- a/dlls/strmbase/mediatype.c +++ b/dlls/strmbase/mediatype.c @@ -169,7 +169,7 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Next(IEnumMediaTypes *iface, for (i = 0; i < count && enummt->uIndex + i < enummt->count; i++) { if (!(mts[i] = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE))) - || FAILED(enummt->basePin->pFuncsTable->pfnGetMediaType(enummt->basePin, enummt->uIndex + i, mts[i]))) + || FAILED(enummt->basePin->pFuncsTable->pin_get_media_type(enummt->basePin, enummt->uIndex + i, mts[i]))) { while (i--) DeleteMediaType(mts[i]); @@ -206,7 +206,7 @@ static HRESULT WINAPI IEnumMediaTypesImpl_Reset(IEnumMediaTypes * iface) TRACE("(%p)->()\n", iface); i = 0; - while (This->basePin->pFuncsTable->pfnGetMediaType(This->basePin, i, &amt) == S_OK) + while (This->basePin->pFuncsTable->pin_get_media_type(This->basePin, i, &amt) == S_OK) { FreeMediaType(&amt); i++; diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index 3b05e5c62a1..4a7b3b20bfe 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -153,7 +153,7 @@ static BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE * } /*** Common Base Pin function */ -HRESULT WINAPI BasePinImpl_GetMediaType(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt) +HRESULT strmbase_pin_get_media_type(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt) { if (iPosition < 0) return E_INVALIDARG; diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 6df54146568..c8a6249227c 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -226,7 +226,7 @@ static HRESULT WINAPI BaseRenderer_Receive(BaseInputPin *pin, IMediaSample *samp static const BaseInputPinFuncTable input_BaseInputFuncTable = { .base.pin_query_accept = sink_query_accept, - .base.pfnGetMediaType = BasePinImpl_GetMediaType, + .base.pin_get_media_type = strmbase_pin_get_media_type, .pfnReceive = BaseRenderer_Receive, }; diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index 4bb9e7fa005..fc2f0b1d2d4 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -110,7 +110,7 @@ static HRESULT WINAPI TransformFilter_Output_DecideBufferSize(struct strmbase_so return pTransformFilter->pFuncsTable->pfnDecideBufferSize(pTransformFilter, pAlloc, ppropInputRequest); } -static HRESULT WINAPI TransformFilter_Output_GetMediaType(struct strmbase_pin *This, int iPosition, AM_MEDIA_TYPE *pmt) +static HRESULT source_get_media_type(struct strmbase_pin *This, int iPosition, AM_MEDIA_TYPE *pmt) { TransformFilter *pTransform = impl_from_source_IPin(&This->IPin_iface); @@ -166,14 +166,14 @@ static const struct strmbase_filter_ops filter_ops = static const BaseInputPinFuncTable tf_input_BaseInputFuncTable = { .base.pin_query_accept = sink_query_accept, - .base.pfnGetMediaType = BasePinImpl_GetMediaType, + .base.pin_get_media_type = strmbase_pin_get_media_type, .pfnReceive = TransformFilter_Input_Receive, }; static const struct strmbase_source_ops source_ops = { .base.pin_query_accept = source_query_accept, - .base.pfnGetMediaType = TransformFilter_Output_GetMediaType, + .base.pin_get_media_type = source_get_media_type, .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection, .pfnDecideBufferSize = TransformFilter_Output_DecideBufferSize, .pfnDecideAllocator = BaseOutputPinImpl_DecideAllocator, diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 7b1080207ee..b9ff1fdc039 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1250,7 +1250,7 @@ static HRESULT sink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE static const BasePinFuncTable sink_ops = { .pin_query_accept = sink_query_accept, - .pfnGetMediaType = BasePinImpl_GetMediaType, + .pin_get_media_type = strmbase_pin_get_media_type, }; static BOOL gstdecoder_init_gst(struct gstdemux *filter) @@ -1799,7 +1799,7 @@ static HRESULT source_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYP return S_OK; } -static HRESULT WINAPI GSTOutPin_GetMediaType(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt) +static HRESULT source_get_media_type(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt) { struct gstdemux_source *This = impl_source_from_IPin(&iface->IPin_iface); @@ -1907,7 +1907,7 @@ static const IPinVtbl GST_OutputPin_Vtbl = { static const struct strmbase_source_ops source_ops = { .base.pin_query_accept = source_query_accept, - .base.pfnGetMediaType = GSTOutPin_GetMediaType, + .base.pin_get_media_type = source_get_media_type, .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection, .pfnDecideBufferSize = GSTOutPin_DecideBufferSize, .pfnDecideAllocator = GSTOutPin_DecideAllocator, @@ -2316,7 +2316,7 @@ static HRESULT wave_parser_sink_query_accept(struct strmbase_pin *iface, const A static const BasePinFuncTable wave_parser_sink_ops = { .pin_query_accept = wave_parser_sink_query_accept, - .pfnGetMediaType = BasePinImpl_GetMediaType, + .pin_get_media_type = strmbase_pin_get_media_type, }; static BOOL wave_parser_init_gst(struct gstdemux *filter) @@ -2422,7 +2422,7 @@ static HRESULT avi_splitter_sink_query_accept(struct strmbase_pin *iface, const static const BasePinFuncTable avi_splitter_sink_ops = { .pin_query_accept = avi_splitter_sink_query_accept, - .pfnGetMediaType = BasePinImpl_GetMediaType, + .pin_get_media_type = strmbase_pin_get_media_type, }; static BOOL avi_splitter_init_gst(struct gstdemux *filter) @@ -2534,7 +2534,7 @@ static HRESULT mpeg_splitter_sink_query_accept(struct strmbase_pin *iface, const static const BasePinFuncTable mpeg_splitter_sink_ops = { .pin_query_accept = mpeg_splitter_sink_query_accept, - .pfnGetMediaType = BasePinImpl_GetMediaType, + .pin_get_media_type = strmbase_pin_get_media_type, }; static BOOL mpeg_splitter_init_gst(struct gstdemux *filter) diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c index 371c0f1ddaf..17d22b4d8da 100644 --- a/dlls/wineqtdecoder/qtsplitter.c +++ b/dlls/wineqtdecoder/qtsplitter.c @@ -305,7 +305,7 @@ static HRESULT sink_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TYPE static const BasePinFuncTable sink_ops = { .pin_query_accept = sink_query_accept, - .pfnGetMediaType = BasePinImpl_GetMediaType, + .pin_get_media_type = strmbase_pin_get_media_type, }; IUnknown * CALLBACK QTSplitter_create(IUnknown *outer, HRESULT *phr) @@ -1295,7 +1295,7 @@ static HRESULT source_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYP return S_OK; } -static HRESULT WINAPI QTOutPin_GetMediaType(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt) +static HRESULT source_get_media_type(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt) { QTOutPin *This = impl_sink_from_strmbase_pin(iface); @@ -1407,7 +1407,7 @@ static const IQualityControlVtbl QTOutPin_QualityControl_Vtbl = { static const struct strmbase_source_ops source_ops = { .base.pin_query_accept = source_query_accept, - .base.pfnGetMediaType = QTOutPin_GetMediaType, + .base.pin_get_media_type = source_get_media_type, .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection, .pfnDecideBufferSize = QTOutPin_DecideBufferSize, .pfnDecideAllocator = QTOutPin_DecideAllocator, diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index cd9448775e6..fc18b22d6d3 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -42,14 +42,11 @@ struct strmbase_pin const struct BasePinFuncTable* pFuncsTable; }; -typedef LONG (WINAPI *BasePin_GetMediaTypeVersion)(struct strmbase_pin *pin); -typedef HRESULT (WINAPI *BasePin_GetMediaType)(struct strmbase_pin *pin, int index, AM_MEDIA_TYPE *mt); - typedef struct BasePinFuncTable { /* Required for QueryAccept(), Connect(), ReceiveConnection(). */ HRESULT (*pin_query_accept)(struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt); /* Required for EnumMediaTypes(). */ - BasePin_GetMediaType pfnGetMediaType; + HRESULT (*pin_get_media_type)(struct strmbase_pin *pin, int index, AM_MEDIA_TYPE *mt); } BasePinFuncTable; struct strmbase_source @@ -98,7 +95,7 @@ typedef struct BaseInputPinFuncTable { } BaseInputPinFuncTable; /* Base Pin */ -HRESULT WINAPI BasePinImpl_GetMediaType(struct strmbase_pin *pin, int index, AM_MEDIA_TYPE *mt); +HRESULT strmbase_pin_get_media_type(struct strmbase_pin *pin, int index, AM_MEDIA_TYPE *mt); LONG WINAPI BasePinImpl_GetMediaTypeVersion(struct strmbase_pin *pin); ULONG WINAPI BasePinImpl_AddRef(IPin *iface); ULONG WINAPI BasePinImpl_Release(IPin *iface);