Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/amstream/mediastream.c | 4 ++-- dlls/qcap/avimux.c | 8 +++++++- dlls/qcap/smartteefilter.c | 16 ++++++++++++++-- dlls/qcap/vfwcapture.c | 8 +++++++- dlls/quartz/filesource.c | 11 +++++------ dlls/quartz/parser.c | 10 +++++----- dlls/strmbase/pin.c | 13 +++---------- dlls/strmbase/renderer.c | 2 +- dlls/strmbase/transform.c | 10 ++++------ dlls/winegstreamer/gstdemux.c | 17 ++++++++--------- dlls/wineqtdecoder/qtsplitter.c | 8 +++++++- 11 files changed, 63 insertions(+), 44 deletions(-)
diff --git a/dlls/amstream/mediastream.c b/dlls/amstream/mediastream.c index 787690d..4971bf1 100644 --- a/dlls/amstream/mediastream.c +++ b/dlls/amstream/mediastream.c @@ -499,7 +499,7 @@ static const IPinVtbl DirectDrawMediaStreamInputPin_IPin_Vtbl = BasePinImpl_QueryPinInfo, BasePinImpl_QueryDirection, BasePinImpl_QueryId, - BaseInputPinImpl_QueryAccept, + BasePinImpl_QueryAccept, BasePinImpl_EnumMediaTypes, BasePinImpl_QueryInternalConnections, BaseInputPinImpl_EndOfStream, @@ -1068,7 +1068,7 @@ static const IPinVtbl AudioMediaStreamInputPin_IPin_Vtbl = BasePinImpl_QueryPinInfo, BasePinImpl_QueryDirection, BasePinImpl_QueryId, - BaseInputPinImpl_QueryAccept, + BasePinImpl_QueryAccept, BasePinImpl_EnumMediaTypes, BasePinImpl_QueryInternalConnections, BaseInputPinImpl_EndOfStream, diff --git a/dlls/qcap/avimux.c b/dlls/qcap/avimux.c index c335737..427b019 100644 --- a/dlls/qcap/avimux.c +++ b/dlls/qcap/avimux.c @@ -1223,6 +1223,12 @@ static const ISpecifyPropertyPagesVtbl SpecifyPropertyPagesVtbl = { SpecifyPropertyPages_GetPages };
+static HRESULT WINAPI AviMuxOut_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *amt) +{ + FIXME("(%p) stub\n", base); + return S_OK; +} + static HRESULT WINAPI AviMuxOut_AttemptConnection(BasePin *base, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt) { @@ -1299,7 +1305,7 @@ static HRESULT WINAPI AviMuxOut_BreakConnect(BaseOutputPin *base)
static const BaseOutputPinFuncTable AviMuxOut_BaseOutputFuncTable = { { - NULL, + AviMuxOut_CheckMediaType, AviMuxOut_AttemptConnection, AviMuxOut_GetMediaTypeVersion, AviMuxOut_GetMediaType diff --git a/dlls/qcap/smartteefilter.c b/dlls/qcap/smartteefilter.c index 27aee47..220f5eb 100644 --- a/dlls/qcap/smartteefilter.c +++ b/dlls/qcap/smartteefilter.c @@ -499,6 +499,12 @@ static const IPinVtbl SmartTeeFilterCaptureVtbl = { BasePinImpl_NewSegment };
+static HRESULT WINAPI SmartTeeFilterCapture_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *amt) +{ + FIXME("(%p) stub\n", base); + return S_OK; +} + static LONG WINAPI SmartTeeFilterCapture_GetMediaTypeVersion(BasePin *base) { SmartTeeFilter *This = impl_from_BasePin(base); @@ -535,7 +541,7 @@ static HRESULT WINAPI SmartTeeFilterCapture_BreakConnect(BaseOutputPin *base)
static const BaseOutputPinFuncTable SmartTeeFilterCaptureFuncs = { { - NULL, + SmartTeeFilterCapture_CheckMediaType, BaseOutputPinImpl_AttemptConnection, SmartTeeFilterCapture_GetMediaTypeVersion, SmartTeeFilterCapture_GetMediaType @@ -592,6 +598,12 @@ static const IPinVtbl SmartTeeFilterPreviewVtbl = { BasePinImpl_NewSegment };
+static HRESULT WINAPI SmartTeeFilterPreview_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *amt) +{ + FIXME("(%p) stub\n", base); + return S_OK; +} + static LONG WINAPI SmartTeeFilterPreview_GetMediaTypeVersion(BasePin *base) { SmartTeeFilter *This = impl_from_BasePin(base); @@ -628,7 +640,7 @@ static HRESULT WINAPI SmartTeeFilterPreview_BreakConnect(BaseOutputPin *base)
static const BaseOutputPinFuncTable SmartTeeFilterPreviewFuncs = { { - NULL, + SmartTeeFilterPreview_CheckMediaType, BaseOutputPinImpl_AttemptConnection, SmartTeeFilterPreview_GetMediaTypeVersion, SmartTeeFilterPreview_GetMediaType diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index 46ae6c0..fd35b26 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -665,6 +665,12 @@ static inline VfwPinImpl *impl_from_BasePin(BasePin *pin) return CONTAINING_RECORD(pin, VfwPinImpl, pin.pin); }
+static HRESULT WINAPI VfwPin_CheckMediaType(BasePin *pin, const AM_MEDIA_TYPE *amt) +{ + FIXME("(%p) stub\n", pin); + return E_NOTIMPL; +} + static HRESULT WINAPI VfwPin_GetMediaType(BasePin *pin, int iPosition, AM_MEDIA_TYPE *pmt) { VfwPinImpl *This = impl_from_BasePin(pin); @@ -707,7 +713,7 @@ static HRESULT WINAPI VfwPin_DecideBufferSize(BaseOutputPin *iface, IMemAllocato
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = { { - NULL, + VfwPin_CheckMediaType, BaseOutputPinImpl_AttemptConnection, VfwPin_GetMediaTypeVersion, VfwPin_GetMediaType diff --git a/dlls/quartz/filesource.c b/dlls/quartz/filesource.c index 4290ac3..0413eb4 100644 --- a/dlls/quartz/filesource.c +++ b/dlls/quartz/filesource.c @@ -783,12 +783,11 @@ static inline FileAsyncReader *impl_from_IAsyncReader(IAsyncReader *iface) return CONTAINING_RECORD(iface, FileAsyncReader, IAsyncReader_iface); }
-static HRESULT WINAPI FileAsyncReaderPin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt) +static HRESULT WINAPI FileAsyncReaderPin_CheckMediaType(BasePin *pin, const AM_MEDIA_TYPE *pmt) { - FileAsyncReader *This = impl_from_IPin(iface); - AM_MEDIA_TYPE *pmt_filter = impl_from_IBaseFilter(This->pin.pin.pinInfo.pFilter)->pmt; + AM_MEDIA_TYPE *pmt_filter = impl_from_IBaseFilter(pin->pinInfo.pFilter)->pmt;
- FIXME("(%p, %p)\n", iface, pmt); + FIXME("(%p, %p)\n", pin, pmt);
if (IsEqualGUID(&pmt->majortype, &pmt_filter->majortype) && IsEqualGUID(&pmt->subtype, &pmt_filter->subtype) && @@ -874,7 +873,7 @@ static const IPinVtbl FileAsyncReaderPin_Vtbl = BasePinImpl_QueryPinInfo, BasePinImpl_QueryDirection, BasePinImpl_QueryId, - FileAsyncReaderPin_QueryAccept, + BasePinImpl_QueryAccept, BasePinImpl_EnumMediaTypes, BasePinImpl_QueryInternalConnections, BaseOutputPinImpl_EndOfStream, @@ -933,7 +932,7 @@ static HRESULT WINAPI FileAsyncReaderPin_DecideBufferSize(BaseOutputPin *iface,
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = { { - NULL, + FileAsyncReaderPin_CheckMediaType, FileAsyncReaderPin_AttemptConnection, BasePinImpl_GetMediaTypeVersion, FileAsyncReaderPin_GetMediaType diff --git a/dlls/quartz/parser.c b/dlls/quartz/parser.c index a2ff407..f15f364 100644 --- a/dlls/quartz/parser.c +++ b/dlls/quartz/parser.c @@ -44,6 +44,7 @@ static HRESULT WINAPI Parser_ChangeStart(IMediaSeeking *iface); static HRESULT WINAPI Parser_ChangeStop(IMediaSeeking *iface); static HRESULT WINAPI Parser_ChangeRate(IMediaSeeking *iface); static HRESULT WINAPI Parser_OutputPin_DecideBufferSize(BaseOutputPin *iface, IMemAllocator *pAlloc, ALLOCATOR_PROPERTIES *ppropInputRequest); +static HRESULT WINAPI Parser_OutputPin_CheckMediaType(BasePin *pin, const AM_MEDIA_TYPE *pmt); static HRESULT WINAPI Parser_OutputPin_GetMediaType(BasePin *iface, int iPosition, AM_MEDIA_TYPE *pmt); static HRESULT WINAPI Parser_OutputPin_DecideAllocator(BaseOutputPin *This, IMemInputPin *pPin, IMemAllocator **pAlloc); static HRESULT WINAPI Parser_OutputPin_BreakConnect(BaseOutputPin *This); @@ -428,7 +429,7 @@ HRESULT WINAPI Parser_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo)
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = { { - NULL, + Parser_OutputPin_CheckMediaType, BaseOutputPinImpl_AttemptConnection, BasePinImpl_GetMediaTypeVersion, Parser_OutputPin_GetMediaType @@ -695,11 +696,10 @@ static HRESULT WINAPI Parser_OutputPin_Connect(IPin * iface, IPin * pReceivePin, return BaseOutputPinImpl_Connect(iface, pReceivePin, pmt); }
-static HRESULT WINAPI Parser_OutputPin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE * pmt) +static HRESULT WINAPI Parser_OutputPin_CheckMediaType(BasePin *pin, const AM_MEDIA_TYPE *pmt) { - Parser_OutputPin *This = unsafe_impl_Parser_OutputPin_from_IPin(iface); + Parser_OutputPin *This = (Parser_OutputPin *)pin;
- TRACE("()\n"); dump_AM_MEDIA_TYPE(pmt);
return (memcmp(This->pmt, pmt, sizeof(AM_MEDIA_TYPE)) == 0); @@ -718,7 +718,7 @@ static const IPinVtbl Parser_OutputPin_Vtbl = BasePinImpl_QueryPinInfo, BasePinImpl_QueryDirection, BasePinImpl_QueryId, - Parser_OutputPin_QueryAccept, + BasePinImpl_QueryAccept, BasePinImpl_EnumMediaTypes, BasePinImpl_QueryInternalConnections, BaseOutputPinImpl_EndOfStream, diff --git a/dlls/strmbase/pin.c b/dlls/strmbase/pin.c index a3117dd..59a80bd 100644 --- a/dlls/strmbase/pin.c +++ b/dlls/strmbase/pin.c @@ -310,9 +310,11 @@ HRESULT WINAPI BasePinImpl_QueryId(IPin * iface, LPWSTR * Id)
HRESULT WINAPI BasePinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt) { + BasePin *This = impl_from_IPin(iface); + TRACE("(%p)->(%p)\n", iface, pmt);
- return S_OK; + return (This->pFuncsTable->pfnCheckMediaType(This, pmt) == S_OK ? S_OK : S_FALSE); }
HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin * iface, IEnumMediaTypes ** ppEnum) @@ -933,15 +935,6 @@ static HRESULT deliver_endofstream(IPin* pin, LPVOID unused) return IPin_EndOfStream( pin ); }
-HRESULT WINAPI BaseInputPinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt) -{ - BaseInputPin *This = impl_BaseInputPin_from_IPin(iface); - - TRACE("(%p/%p)->(%p)\n", This, iface, pmt); - - return (This->pin.pFuncsTable->pfnCheckMediaType(&This->pin, pmt) == S_OK ? S_OK : S_FALSE); -} - HRESULT WINAPI BaseInputPinImpl_EndOfStream(IPin * iface) { HRESULT hr = S_OK; diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index 366e6d6..dc1ece2 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -185,7 +185,7 @@ static const IPinVtbl BaseRenderer_InputPin_Vtbl = BasePinImpl_QueryPinInfo, BasePinImpl_QueryDirection, BasePinImpl_QueryId, - BaseInputPinImpl_QueryAccept, + BasePinImpl_QueryAccept, BasePinImpl_EnumMediaTypes, BasePinImpl_QueryInternalConnections, BaseRenderer_InputPin_EndOfStream, diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index accb4f1..139c581 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -120,12 +120,10 @@ static HRESULT WINAPI TransformFilter_Input_Receive(BaseInputPin *This, IMediaSa return hr; }
-static HRESULT WINAPI TransformFilter_Output_QueryAccept(IPin *iface, const AM_MEDIA_TYPE * pmt) +static HRESULT WINAPI TransformFilter_Output_CheckMediaType(BasePin *This, const AM_MEDIA_TYPE *pmt) { - BasePin *This = impl_BasePin_from_IPin(iface); TransformFilter *pTransformFilter = impl_from_IBaseFilter(This->pinInfo.pFilter); AM_MEDIA_TYPE* outpmt = &pTransformFilter->pmt; - TRACE("%p\n", iface);
if (IsEqualIID(&pmt->majortype, &outpmt->majortype) && (IsEqualIID(&pmt->subtype, &outpmt->subtype) || IsEqualIID(&outpmt->subtype, &GUID_NULL))) @@ -186,7 +184,7 @@ static const BaseInputPinFuncTable tf_input_BaseInputFuncTable = {
static const BaseOutputPinFuncTable tf_output_BaseOutputFuncTable = { { - NULL, + TransformFilter_Output_CheckMediaType, BaseOutputPinImpl_AttemptConnection, BasePinImpl_GetMediaTypeVersion, TransformFilter_Output_GetMediaType @@ -571,7 +569,7 @@ static const IPinVtbl TransformFilter_InputPin_Vtbl = BasePinImpl_QueryPinInfo, BasePinImpl_QueryDirection, BasePinImpl_QueryId, - BaseInputPinImpl_QueryAccept, + BasePinImpl_QueryAccept, BasePinImpl_EnumMediaTypes, BasePinImpl_QueryInternalConnections, TransformFilter_InputPin_EndOfStream, @@ -593,7 +591,7 @@ static const IPinVtbl TransformFilter_OutputPin_Vtbl = BasePinImpl_QueryPinInfo, BasePinImpl_QueryDirection, BasePinImpl_QueryId, - TransformFilter_Output_QueryAccept, + BasePinImpl_QueryAccept, BasePinImpl_EnumMediaTypes, BasePinImpl_QueryInternalConnections, BaseOutputPinImpl_EndOfStream, diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index fc33ca4..f133ce6 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -598,13 +598,6 @@ static DWORD CALLBACK push_data(LPVOID iface) return 0; }
-static HRESULT WINAPI GST_OutPin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt) -{ - GSTOutPin *pin = (GSTOutPin*)iface; - FIXME("stub %p\n", pin); - return S_OK; -} - static GstFlowReturn got_data_sink(GstPad *pad, GstObject *parent, GstBuffer *buf) { GSTOutPin *pin = gst_pad_get_element_private(pad); @@ -1783,6 +1776,12 @@ static ULONG WINAPI GSTOutPin_Release(IPin *iface) return refCount; }
+static HRESULT WINAPI GSTOutPin_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *amt) +{ + FIXME("(%p) stub\n", base); + return S_OK; +} + static HRESULT WINAPI GSTOutPin_GetMediaType(BasePin *iface, int iPosition, AM_MEDIA_TYPE *pmt) { GSTOutPin *This = (GSTOutPin *)iface; @@ -1863,7 +1862,7 @@ static const IPinVtbl GST_OutputPin_Vtbl = { BasePinImpl_QueryPinInfo, BasePinImpl_QueryDirection, BasePinImpl_QueryId, - GST_OutPin_QueryAccept, + BasePinImpl_QueryAccept, BasePinImpl_EnumMediaTypes, BasePinImpl_QueryInternalConnections, BaseOutputPinImpl_EndOfStream, @@ -1874,7 +1873,7 @@ static const IPinVtbl GST_OutputPin_Vtbl = {
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = { { - NULL, + GSTOutPin_CheckMediaType, BaseOutputPinImpl_AttemptConnection, BasePinImpl_GetMediaTypeVersion, GSTOutPin_GetMediaType diff --git a/dlls/wineqtdecoder/qtsplitter.c b/dlls/wineqtdecoder/qtsplitter.c index 7db7a28..096d384 100644 --- a/dlls/wineqtdecoder/qtsplitter.c +++ b/dlls/wineqtdecoder/qtsplitter.c @@ -1388,6 +1388,12 @@ static ULONG WINAPI QTOutPin_Release(IPin *iface) return refCount; }
+static HRESULT WINAPI QTOutPin_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *amt) +{ + FIXME("(%p) stub\n", base); + return S_OK; +} + static HRESULT WINAPI QTOutPin_GetMediaType(BasePin *iface, int iPosition, AM_MEDIA_TYPE *pmt) { QTOutPin *This = impl_QTOutPin_from_BasePin(iface); @@ -1516,7 +1522,7 @@ static const IQualityControlVtbl QTOutPin_QualityControl_Vtbl = {
static const BaseOutputPinFuncTable output_BaseOutputFuncTable = { { - NULL, + QTOutPin_CheckMediaType, BaseOutputPinImpl_AttemptConnection, BasePinImpl_GetMediaTypeVersion, QTOutPin_GetMediaType