strmbase: Get rid of the BasePin typedef.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-09-23 19:33:24 -05:00 committed by Alexandre Julliard
parent 750efd19a7
commit 8619eb9838
15 changed files with 97 additions and 101 deletions

View file

@ -62,7 +62,7 @@ static inline AVICompressor *impl_from_IBaseFilter(IBaseFilter *iface)
return impl_from_strmbase_filter(filter);
}
static inline AVICompressor *impl_from_BasePin(BasePin *pin)
static inline AVICompressor *impl_from_strmbase_pin(struct strmbase_pin *pin)
{
return impl_from_strmbase_filter(pin->filter);
}
@ -315,7 +315,7 @@ static const IPersistPropertyBagVtbl PersistPropertyBagVtbl = {
static inline AVICompressor *impl_from_IPin(IPin *iface)
{
return impl_from_strmbase_filter(CONTAINING_RECORD(iface, BasePin, IPin_iface)->filter);
return impl_from_strmbase_filter(CONTAINING_RECORD(iface, struct strmbase_pin, IPin_iface)->filter);
}
static HRESULT WINAPI AVICompressorIn_QueryInterface(IPin *iface, REFIID riid, void **ppv)
@ -379,9 +379,9 @@ static const IPinVtbl AVICompressorInputPinVtbl = {
BaseInputPinImpl_NewSegment
};
static HRESULT WINAPI AVICompressorIn_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *pmt)
static HRESULT WINAPI AVICompressorIn_CheckMediaType(struct strmbase_pin *base, const AM_MEDIA_TYPE *pmt)
{
AVICompressor *This = impl_from_BasePin(base);
AVICompressor *This = impl_from_strmbase_pin(base);
VIDEOINFOHEADER *videoinfo;
HRESULT hres;
DWORD res;
@ -406,7 +406,7 @@ static HRESULT WINAPI AVICompressorIn_CheckMediaType(BasePin *base, const AM_MED
return res == ICERR_OK ? S_OK : S_FALSE;
}
static HRESULT WINAPI AVICompressorIn_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
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;
@ -414,7 +414,7 @@ static HRESULT WINAPI AVICompressorIn_GetMediaType(BasePin *base, int iPosition,
static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample *pSample)
{
AVICompressor *This = impl_from_BasePin(&base->pin);
AVICompressor *This = impl_from_strmbase_pin(&base->pin);
VIDEOINFOHEADER *src_videoinfo;
REFERENCE_TIME start, stop;
IMediaSample *out_sample;
@ -533,7 +533,7 @@ static const IPinVtbl AVICompressorOutputPinVtbl = {
BasePinImpl_NewSegment
};
static HRESULT WINAPI AVICompressorOut_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
static HRESULT WINAPI AVICompressorOut_GetMediaType(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt)
{
AVICompressor *This = impl_from_strmbase_filter(base->filter);
@ -557,7 +557,7 @@ static HRESULT WINAPI AVICompressorOut_GetMediaType(BasePin *base, int iPosition
static HRESULT WINAPI AVICompressorOut_DecideBufferSize(struct strmbase_source *base,
IMemAllocator *alloc, ALLOCATOR_PROPERTIES *ppropInputRequest)
{
AVICompressor *This = impl_from_BasePin(&base->pin);
AVICompressor *This = impl_from_strmbase_pin(&base->pin);
ALLOCATOR_PROPERTIES actual;
TRACE("(%p)\n", This);

View file

@ -1152,7 +1152,7 @@ static const ISpecifyPropertyPagesVtbl SpecifyPropertyPagesVtbl = {
SpecifyPropertyPages_GetPages
};
static HRESULT WINAPI AviMuxOut_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *amt)
static HRESULT WINAPI AviMuxOut_CheckMediaType(struct strmbase_pin *base, const AM_MEDIA_TYPE *amt)
{
FIXME("(%p) stub\n", base);
return S_OK;
@ -1174,7 +1174,7 @@ static HRESULT WINAPI AviMuxOut_AttemptConnection(struct strmbase_source *base,
return BaseOutputPinImpl_AttemptConnection(base, pReceivePin, pmt);
}
static HRESULT WINAPI AviMuxOut_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
static HRESULT WINAPI AviMuxOut_GetMediaType(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt)
{
TRACE("(%p)->(%d %p)\n", base, iPosition, amt);
@ -1372,7 +1372,7 @@ static const IQualityControlVtbl AviMuxOut_QualityControlVtbl = {
AviMuxOut_QualityControl_SetSink
};
static HRESULT WINAPI AviMuxIn_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *pmt)
static HRESULT WINAPI AviMuxIn_CheckMediaType(struct strmbase_pin *base, const AM_MEDIA_TYPE *pmt)
{
if(IsEqualIID(&pmt->majortype, &MEDIATYPE_Audio) &&
IsEqualIID(&pmt->formattype, &FORMAT_WaveFormatEx))
@ -1387,7 +1387,7 @@ static HRESULT WINAPI AviMuxIn_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE
return S_FALSE;
}
static HRESULT WINAPI AviMuxIn_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
static HRESULT WINAPI AviMuxIn_GetMediaType(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt)
{
return S_FALSE;
}
@ -1505,15 +1505,13 @@ static const BaseInputPinFuncTable AviMuxIn_BaseInputFuncTable = {
static inline AviMux* impl_from_in_IPin(IPin *iface)
{
BasePin *pin = CONTAINING_RECORD(iface, BasePin, IPin_iface);
struct strmbase_pin *pin = CONTAINING_RECORD(iface, struct strmbase_pin, IPin_iface);
return impl_from_strmbase_filter(pin->filter);
}
static inline AviMuxIn* AviMuxIn_from_IPin(IPin *iface)
{
BasePin *bp = CONTAINING_RECORD(iface, BasePin, IPin_iface);
BaseInputPin *bip = CONTAINING_RECORD(bp, BaseInputPin, pin);
return CONTAINING_RECORD(bip, AviMuxIn, pin);
return CONTAINING_RECORD(iface, AviMuxIn, pin.pin.IPin_iface);
}
static HRESULT WINAPI AviMuxIn_QueryInterface(IPin *iface, REFIID riid, void **ppv)

View file

@ -52,14 +52,14 @@ static inline SmartTeeFilter *impl_from_IBaseFilter(IBaseFilter *iface)
return impl_from_strmbase_filter(filter);
}
static inline SmartTeeFilter *impl_from_BasePin(BasePin *pin)
static inline SmartTeeFilter *impl_from_strmbase_pin(struct strmbase_pin *pin)
{
return impl_from_strmbase_filter(pin->filter);
}
static inline SmartTeeFilter *impl_from_IPin(IPin *iface)
{
return impl_from_strmbase_filter(CONTAINING_RECORD(iface, BasePin, IPin_iface)->filter);
return impl_from_strmbase_filter(CONTAINING_RECORD(iface, struct strmbase_pin, IPin_iface)->filter);
}
static HRESULT WINAPI SmartTeeFilter_Stop(IBaseFilter *iface)
@ -167,9 +167,9 @@ static const IPinVtbl SmartTeeFilterInputVtbl = {
BaseInputPinImpl_NewSegment
};
static HRESULT WINAPI SmartTeeFilterInput_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *pmt)
static HRESULT WINAPI SmartTeeFilterInput_CheckMediaType(struct strmbase_pin *base, const AM_MEDIA_TYPE *pmt)
{
SmartTeeFilter *This = impl_from_BasePin(base);
SmartTeeFilter *This = impl_from_strmbase_pin(base);
TRACE("(%p, AM_MEDIA_TYPE(%p))\n", This, pmt);
dump_AM_MEDIA_TYPE(pmt);
if (!pmt)
@ -179,9 +179,9 @@ static HRESULT WINAPI SmartTeeFilterInput_CheckMediaType(BasePin *base, const AM
return S_OK;
}
static HRESULT WINAPI SmartTeeFilterInput_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
static HRESULT WINAPI SmartTeeFilterInput_GetMediaType(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt)
{
SmartTeeFilter *This = impl_from_BasePin(base);
SmartTeeFilter *This = impl_from_strmbase_pin(base);
HRESULT hr;
TRACE("(%p)->(%d, %p)\n", This, iPosition, amt);
if (iPosition)
@ -278,7 +278,7 @@ end:
static HRESULT WINAPI SmartTeeFilterInput_Receive(BaseInputPin *base, IMediaSample *inputSample)
{
SmartTeeFilter *This = impl_from_BasePin(&base->pin);
SmartTeeFilter *This = impl_from_strmbase_pin(&base->pin);
IMediaSample *captureSample = NULL;
IMediaSample *previewSample = NULL;
HRESULT hrCapture = VFW_E_NOT_CONNECTED, hrPreview = VFW_E_NOT_CONNECTED;
@ -362,15 +362,15 @@ static const IPinVtbl SmartTeeFilterCaptureVtbl = {
BasePinImpl_NewSegment
};
static HRESULT WINAPI SmartTeeFilterCapture_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *amt)
static HRESULT WINAPI SmartTeeFilterCapture_CheckMediaType(struct strmbase_pin *base, const AM_MEDIA_TYPE *amt)
{
FIXME("(%p) stub\n", base);
return S_OK;
}
static HRESULT WINAPI SmartTeeFilterCapture_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
static HRESULT WINAPI SmartTeeFilterCapture_GetMediaType(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt)
{
SmartTeeFilter *This = impl_from_BasePin(base);
SmartTeeFilter *This = impl_from_strmbase_pin(base);
TRACE("(%p, %d, %p)\n", This, iPosition, amt);
if (iPosition == 0) {
CopyMediaType(amt, &This->sink.pin.mtCurrent);
@ -382,7 +382,7 @@ static HRESULT WINAPI SmartTeeFilterCapture_GetMediaType(BasePin *base, int iPos
static HRESULT WINAPI SmartTeeFilterCapture_DecideAllocator(struct strmbase_source *base,
IMemInputPin *pPin, IMemAllocator **pAlloc)
{
SmartTeeFilter *This = impl_from_BasePin(&base->pin);
SmartTeeFilter *This = impl_from_strmbase_pin(&base->pin);
TRACE("(%p, %p, %p)\n", This, pPin, pAlloc);
*pAlloc = This->sink.pAllocator;
IMemAllocator_AddRef(This->sink.pAllocator);
@ -435,15 +435,15 @@ static const IPinVtbl SmartTeeFilterPreviewVtbl = {
BasePinImpl_NewSegment
};
static HRESULT WINAPI SmartTeeFilterPreview_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *amt)
static HRESULT WINAPI SmartTeeFilterPreview_CheckMediaType(struct strmbase_pin *base, const AM_MEDIA_TYPE *amt)
{
FIXME("(%p) stub\n", base);
return S_OK;
}
static HRESULT WINAPI SmartTeeFilterPreview_GetMediaType(BasePin *base, int iPosition, AM_MEDIA_TYPE *amt)
static HRESULT WINAPI SmartTeeFilterPreview_GetMediaType(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt)
{
SmartTeeFilter *This = impl_from_BasePin(base);
SmartTeeFilter *This = impl_from_strmbase_pin(base);
TRACE("(%p, %d, %p)\n", This, iPosition, amt);
if (iPosition == 0) {
CopyMediaType(amt, &This->sink.pin.mtCurrent);
@ -455,7 +455,7 @@ static HRESULT WINAPI SmartTeeFilterPreview_GetMediaType(BasePin *base, int iPos
static HRESULT WINAPI SmartTeeFilterPreview_DecideAllocator(struct strmbase_source *base,
IMemInputPin *pPin, IMemAllocator **pAlloc)
{
SmartTeeFilter *This = impl_from_BasePin(&base->pin);
SmartTeeFilter *This = impl_from_strmbase_pin(&base->pin);
TRACE("(%p, %p, %p)\n", This, pPin, pAlloc);
*pAlloc = This->sink.pAllocator;
IMemAllocator_AddRef(This->sink.pAllocator);

View file

@ -507,20 +507,20 @@ static const IKsPropertySetVtbl IKsPropertySet_VTable =
KSP_QuerySupported
};
static inline VfwCapture *impl_from_BasePin(BasePin *pin)
static inline VfwCapture *impl_from_strmbase_pin(struct strmbase_pin *pin)
{
return CONTAINING_RECORD(pin, VfwCapture, source.pin);
}
static HRESULT WINAPI VfwPin_CheckMediaType(BasePin *pin, const AM_MEDIA_TYPE *mt)
static HRESULT WINAPI VfwPin_CheckMediaType(struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt)
{
VfwCapture *filter = impl_from_BasePin(pin);
VfwCapture *filter = impl_from_strmbase_pin(pin);
return qcap_driver_check_format(filter->driver_info, mt);
}
static HRESULT WINAPI VfwPin_GetMediaType(BasePin *pin, int iPosition, AM_MEDIA_TYPE *pmt)
static HRESULT WINAPI VfwPin_GetMediaType(struct strmbase_pin *pin, int iPosition, AM_MEDIA_TYPE *pmt)
{
VfwCapture *filter = impl_from_BasePin(pin);
VfwCapture *filter = impl_from_strmbase_pin(pin);
AM_MEDIA_TYPE *vfw_pmt;
HRESULT hr;

View file

@ -565,7 +565,7 @@ static inline AsyncReader *impl_from_IPin(IPin *iface)
return CONTAINING_RECORD(iface, AsyncReader, source.pin.IPin_iface);
}
static inline AsyncReader *impl_from_BasePin(BasePin *iface)
static inline AsyncReader *impl_from_strmbase_pin(struct strmbase_pin *iface)
{
return CONTAINING_RECORD(iface, AsyncReader, source.pin);
}
@ -580,9 +580,9 @@ static inline AsyncReader *impl_from_IAsyncReader(IAsyncReader *iface)
return CONTAINING_RECORD(iface, AsyncReader, IAsyncReader_iface);
}
static HRESULT WINAPI FileAsyncReaderPin_CheckMediaType(BasePin *iface, const AM_MEDIA_TYPE *pmt)
static HRESULT WINAPI FileAsyncReaderPin_CheckMediaType(struct strmbase_pin *iface, const AM_MEDIA_TYPE *pmt)
{
AsyncReader *filter = impl_from_BasePin(iface);
AsyncReader *filter = impl_from_strmbase_pin(iface);
if (IsEqualGUID(&pmt->majortype, &filter->pmt->majortype) &&
IsEqualGUID(&pmt->subtype, &filter->pmt->subtype))
@ -591,9 +591,9 @@ static HRESULT WINAPI FileAsyncReaderPin_CheckMediaType(BasePin *iface, const AM
return S_FALSE;
}
static HRESULT WINAPI FileAsyncReaderPin_GetMediaType(BasePin *iface, int index, AM_MEDIA_TYPE *mt)
static HRESULT WINAPI FileAsyncReaderPin_GetMediaType(struct strmbase_pin *iface, int index, AM_MEDIA_TYPE *mt)
{
AsyncReader *filter = impl_from_BasePin(iface);
AsyncReader *filter = impl_from_strmbase_pin(iface);
if (index < 0)
return E_INVALIDARG;

View file

@ -81,7 +81,7 @@ typedef struct IEnumMediaTypesImpl
{
IEnumMediaTypes IEnumMediaTypes_iface;
LONG refCount;
BasePin *basePin;
struct strmbase_pin *basePin;
ULONG count;
ULONG uIndex;
} IEnumMediaTypesImpl;
@ -93,7 +93,7 @@ static inline IEnumMediaTypesImpl *impl_from_IEnumMediaTypes(IEnumMediaTypes *if
static const struct IEnumMediaTypesVtbl IEnumMediaTypesImpl_Vtbl;
HRESULT enum_media_types_create(BasePin *basePin, IEnumMediaTypes **ppEnum)
HRESULT enum_media_types_create(struct strmbase_pin *basePin, IEnumMediaTypes **ppEnum)
{
IEnumMediaTypesImpl * pEnumMediaTypes = CoTaskMemAlloc(sizeof(IEnumMediaTypesImpl));

View file

@ -27,9 +27,9 @@ static const IMemInputPinVtbl MemInputPin_Vtbl;
typedef HRESULT (*SendPinFunc)( IPin *to, LPVOID arg );
static inline BasePin *impl_from_IPin( IPin *iface )
static inline struct strmbase_pin *impl_from_IPin(IPin *iface)
{
return CONTAINING_RECORD(iface, BasePin, IPin_iface);
return CONTAINING_RECORD(iface, struct strmbase_pin, IPin_iface);
}
/** Helper function, there are a lot of places where the error code is inherited
@ -153,7 +153,7 @@ static BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE *
}
/*** Common Base Pin function */
HRESULT WINAPI BasePinImpl_GetMediaType(BasePin *iface, int iPosition, AM_MEDIA_TYPE *pmt)
HRESULT WINAPI BasePinImpl_GetMediaType(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt)
{
if (iPosition < 0)
return E_INVALIDARG;
@ -162,20 +162,20 @@ HRESULT WINAPI BasePinImpl_GetMediaType(BasePin *iface, int iPosition, AM_MEDIA_
ULONG WINAPI BasePinImpl_AddRef(IPin *iface)
{
BasePin *pin = impl_from_IPin(iface);
struct strmbase_pin *pin = impl_from_IPin(iface);
return IBaseFilter_AddRef(&pin->filter->IBaseFilter_iface);
}
ULONG WINAPI BasePinImpl_Release(IPin *iface)
{
BasePin *pin = impl_from_IPin(iface);
struct strmbase_pin *pin = impl_from_IPin(iface);
return IBaseFilter_Release(&pin->filter->IBaseFilter_iface);
}
HRESULT WINAPI BasePinImpl_Disconnect(IPin * iface)
{
struct strmbase_pin *This = impl_from_IPin(iface);
HRESULT hr;
BasePin *This = impl_from_IPin(iface);
TRACE("(%p)->()\n", This);
@ -199,8 +199,8 @@ HRESULT WINAPI BasePinImpl_Disconnect(IPin * iface)
HRESULT WINAPI BasePinImpl_ConnectedTo(IPin * iface, IPin ** ppPin)
{
struct strmbase_pin *This = impl_from_IPin(iface);
HRESULT hr;
BasePin *This = impl_from_IPin(iface);
TRACE("(%p)->(%p)\n", This, ppPin);
@ -225,8 +225,8 @@ HRESULT WINAPI BasePinImpl_ConnectedTo(IPin * iface, IPin ** ppPin)
HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt)
{
struct strmbase_pin *This = impl_from_IPin(iface);
HRESULT hr;
BasePin *This = impl_from_IPin(iface);
TRACE("(%p)->(%p)\n", This, pmt);
@ -250,7 +250,7 @@ HRESULT WINAPI BasePinImpl_ConnectionMediaType(IPin * iface, AM_MEDIA_TYPE * pmt
HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *info)
{
BasePin *pin = impl_from_IPin(iface);
struct strmbase_pin *pin = impl_from_IPin(iface);
TRACE("pin %p, info %p.\n", pin, info);
@ -263,7 +263,7 @@ HRESULT WINAPI BasePinImpl_QueryPinInfo(IPin *iface, PIN_INFO *info)
HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *dir)
{
BasePin *pin = impl_from_IPin(iface);
struct strmbase_pin *pin = impl_from_IPin(iface);
TRACE("pin %p, dir %p.\n", pin, dir);
@ -274,7 +274,7 @@ HRESULT WINAPI BasePinImpl_QueryDirection(IPin *iface, PIN_DIRECTION *dir)
HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, WCHAR **id)
{
BasePin *pin = impl_from_IPin(iface);
struct strmbase_pin *pin = impl_from_IPin(iface);
TRACE("pin %p, id %p.\n", pin, id);
@ -288,7 +288,7 @@ HRESULT WINAPI BasePinImpl_QueryId(IPin *iface, WCHAR **id)
HRESULT WINAPI BasePinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt)
{
BasePin *This = impl_from_IPin(iface);
struct strmbase_pin *This = impl_from_IPin(iface);
TRACE("(%p)->(%p)\n", iface, pmt);
@ -297,7 +297,7 @@ HRESULT WINAPI BasePinImpl_QueryAccept(IPin * iface, const AM_MEDIA_TYPE * pmt)
HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_media_types)
{
BasePin *pin = impl_from_IPin(iface);
struct strmbase_pin *pin = impl_from_IPin(iface);
TRACE("iface %p, enum_media_types %p.\n", iface, enum_media_types);
@ -306,7 +306,7 @@ HRESULT WINAPI BasePinImpl_EnumMediaTypes(IPin *iface, IEnumMediaTypes **enum_me
HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin)
{
BasePin *This = impl_from_IPin(iface);
struct strmbase_pin *This = impl_from_IPin(iface);
TRACE("(%p)->(%p, %p)\n", This, apPin, cPin);
@ -315,7 +315,7 @@ HRESULT WINAPI BasePinImpl_QueryInternalConnections(IPin * iface, IPin ** apPin,
HRESULT WINAPI BasePinImpl_NewSegment(IPin * iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
{
BasePin *This = impl_from_IPin(iface);
struct strmbase_pin *This = impl_from_IPin(iface);
TRACE("(%p)->(%s, %s, %e)\n", This, wine_dbgstr_longlong(tStart), wine_dbgstr_longlong(tStop), dRate);

View file

@ -211,7 +211,7 @@ static const struct strmbase_filter_ops filter_ops =
.filter_query_interface = renderer_query_interface,
};
static HRESULT WINAPI BaseRenderer_Input_CheckMediaType(BasePin *pin, const AM_MEDIA_TYPE *mt)
static HRESULT WINAPI BaseRenderer_Input_CheckMediaType(struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt)
{
BaseRenderer *filter = impl_from_IPin(&pin->IPin_iface);
return filter->pFuncsTable->pfnCheckMediaType(filter, mt);

View file

@ -63,7 +63,7 @@ void QualityControlRender_BeginRender(QualityControlImpl *This, REFERENCE_TIME s
void QualityControlRender_EndRender(QualityControlImpl *This);
HRESULT enum_pins_create(struct strmbase_filter *filter, IEnumPins **enum_pins);
HRESULT enum_media_types_create(BasePin *pin, IEnumMediaTypes **enum_media_types) DECLSPEC_HIDDEN;
HRESULT enum_media_types_create(struct strmbase_pin *pin, IEnumMediaTypes **enum_media_types) DECLSPEC_HIDDEN;
HRESULT WINAPI RendererPosPassThru_RegisterMediaTime(IUnknown *iface, REFERENCE_TIME start);
HRESULT WINAPI RendererPosPassThru_ResetMediaTime(IUnknown *iface);

View file

@ -45,7 +45,7 @@ static inline TransformFilter *impl_from_sink_IPin(IPin *iface)
return CONTAINING_RECORD(iface, TransformFilter, sink.pin.IPin_iface);
}
static HRESULT WINAPI TransformFilter_Input_CheckMediaType(BasePin *iface, const AM_MEDIA_TYPE * pmt)
static HRESULT WINAPI TransformFilter_Input_CheckMediaType(struct strmbase_pin *iface, const AM_MEDIA_TYPE *pmt)
{
TransformFilter *pTransform = impl_from_sink_IPin(&iface->IPin_iface);
@ -92,7 +92,7 @@ static inline TransformFilter *impl_from_source_IPin(IPin *iface)
return CONTAINING_RECORD(iface, TransformFilter, source.pin.IPin_iface);
}
static HRESULT WINAPI TransformFilter_Output_CheckMediaType(BasePin *This, const AM_MEDIA_TYPE *pmt)
static HRESULT WINAPI TransformFilter_Output_CheckMediaType(struct strmbase_pin *This, const AM_MEDIA_TYPE *pmt)
{
TransformFilter *pTransformFilter = impl_from_source_IPin(&This->IPin_iface);
AM_MEDIA_TYPE* outpmt = &pTransformFilter->pmt;
@ -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(BasePin *This, int iPosition, AM_MEDIA_TYPE *pmt)
static HRESULT WINAPI TransformFilter_Output_GetMediaType(struct strmbase_pin *This, int iPosition, AM_MEDIA_TYPE *pmt)
{
TransformFilter *pTransform = impl_from_source_IPin(&This->IPin_iface);

View file

@ -648,7 +648,7 @@ static const IBasicVideoVtbl basic_video_vtbl =
};
HRESULT WINAPI strmbase_video_init(BaseControlVideo *video, struct strmbase_filter *filter,
CRITICAL_SECTION *cs, BasePin *pin, const BaseControlVideoFuncTable *func_table)
CRITICAL_SECTION *cs, struct strmbase_pin *pin, const BaseControlVideoFuncTable *func_table)
{
video->IBasicVideo_iface.lpVtbl = &basic_video_vtbl;
video->pFilter = filter;

View file

@ -195,7 +195,7 @@ BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg
HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow,
const IVideoWindowVtbl *lpVtbl, struct strmbase_filter *owner,
CRITICAL_SECTION *lock, BasePin* pPin,const BaseWindowFuncTable *pFuncsTable)
CRITICAL_SECTION *lock, struct strmbase_pin *pPin, const BaseWindowFuncTable *pFuncsTable)
{
HRESULT hr;

View file

@ -52,7 +52,7 @@ struct gstdemux
struct strmbase_filter filter;
IAMStreamSelect IAMStreamSelect_iface;
BasePin sink;
struct strmbase_pin sink;
IAsyncReader *reader;
IMemAllocator *alloc;
struct gstdemux_source **ppPins;
@ -1240,7 +1240,7 @@ static const struct strmbase_filter_ops filter_ops =
.filter_destroy = gstdemux_destroy,
};
static HRESULT WINAPI sink_CheckMediaType(BasePin *iface, const AM_MEDIA_TYPE *mt)
static HRESULT WINAPI sink_CheckMediaType(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
{
if (IsEqualGUID(&mt->majortype, &MEDIATYPE_Stream))
return S_OK;
@ -1793,13 +1793,13 @@ static HRESULT WINAPI GSTOutPin_QueryInterface(IPin *iface, REFIID riid, void **
return E_NOINTERFACE;
}
static HRESULT WINAPI GSTOutPin_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *amt)
static HRESULT WINAPI GSTOutPin_CheckMediaType(struct strmbase_pin *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)
static HRESULT WINAPI GSTOutPin_GetMediaType(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt)
{
struct gstdemux_source *This = impl_source_from_IPin(&iface->IPin_iface);
@ -2304,7 +2304,7 @@ void start_dispatch_thread(void)
CloseHandle(CreateThread(NULL, 0, &dispatch_thread, NULL, 0, NULL));
}
static HRESULT WINAPI wave_parser_sink_CheckMediaType(BasePin *iface, const AM_MEDIA_TYPE *mt)
static HRESULT WINAPI wave_parser_sink_CheckMediaType(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
{
if (!IsEqualGUID(&mt->majortype, &MEDIATYPE_Stream))
return S_FALSE;
@ -2413,7 +2413,7 @@ IUnknown * CALLBACK wave_parser_create(IUnknown *outer, HRESULT *phr)
return &object->filter.IUnknown_inner;
}
static HRESULT WINAPI avi_splitter_sink_CheckMediaType(BasePin *iface, const AM_MEDIA_TYPE *mt)
static HRESULT WINAPI avi_splitter_sink_CheckMediaType(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
{
if (IsEqualGUID(&mt->majortype, &MEDIATYPE_Stream)
&& IsEqualGUID(&mt->subtype, &MEDIASUBTYPE_Avi))
@ -2520,7 +2520,7 @@ IUnknown * CALLBACK avi_splitter_create(IUnknown *outer, HRESULT *phr)
return &object->filter.IUnknown_inner;
}
static HRESULT WINAPI mpeg_splitter_sink_CheckMediaType(BasePin *iface, const AM_MEDIA_TYPE *mt)
static HRESULT WINAPI mpeg_splitter_sink_CheckMediaType(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
{
if (!IsEqualGUID(&mt->majortype, &MEDIATYPE_Stream))
return S_FALSE;

View file

@ -137,7 +137,7 @@ typedef struct QTOutPin {
} QTOutPin;
typedef struct QTInPin {
BasePin pin;
struct strmbase_pin pin;
GUID subType;
IAsyncReader *pReader;
@ -290,7 +290,7 @@ static const struct strmbase_filter_ops filter_ops =
.filter_destroy = qt_splitter_destroy,
};
static HRESULT WINAPI sink_CheckMediaType(BasePin *iface, const AM_MEDIA_TYPE *mt)
static HRESULT WINAPI sink_CheckMediaType(struct strmbase_pin *iface, const AM_MEDIA_TYPE *mt)
{
QTInPin *pin = impl_from_IPin(&iface->IPin_iface);
@ -1253,7 +1253,7 @@ static inline QTOutPin *impl_QTOutPin_from_IPin( IPin *iface )
return CONTAINING_RECORD(iface, QTOutPin, pin.pin.IPin_iface);
}
static inline QTOutPin *impl_QTOutPin_from_BasePin( BasePin *iface )
static inline QTOutPin *impl_sink_from_strmbase_pin(struct strmbase_pin *iface)
{
return CONTAINING_RECORD(iface, QTOutPin, pin.pin);
}
@ -1289,15 +1289,15 @@ static HRESULT WINAPI QTOutPin_QueryInterface(IPin *iface, REFIID riid, void **p
return E_NOINTERFACE;
}
static HRESULT WINAPI QTOutPin_CheckMediaType(BasePin *base, const AM_MEDIA_TYPE *amt)
static HRESULT WINAPI QTOutPin_CheckMediaType(struct strmbase_pin *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)
static HRESULT WINAPI QTOutPin_GetMediaType(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt)
{
QTOutPin *This = impl_QTOutPin_from_BasePin(iface);
QTOutPin *This = impl_sink_from_strmbase_pin(iface);
if (iPosition < 0)
return E_INVALIDARG;

View file

@ -28,7 +28,7 @@ void WINAPI DeleteMediaType(AM_MEDIA_TYPE * pMediaType);
/* Pin functions */
typedef struct BasePin
struct strmbase_pin
{
IPin IPin_iface;
struct strmbase_filter *filter;
@ -40,11 +40,11 @@ typedef struct BasePin
double dRate;
const struct BasePinFuncTable* pFuncsTable;
} BasePin;
};
typedef HRESULT (WINAPI *BasePin_CheckMediaType)(BasePin *This, const AM_MEDIA_TYPE *pmt);
typedef LONG (WINAPI *BasePin_GetMediaTypeVersion)(BasePin *This);
typedef HRESULT (WINAPI *BasePin_GetMediaType)(BasePin *This, int iPosition, AM_MEDIA_TYPE *amt);
typedef HRESULT (WINAPI *BasePin_CheckMediaType)(struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt);
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(). */
@ -55,12 +55,11 @@ typedef struct BasePinFuncTable {
struct strmbase_source
{
/* inheritance C style! */
BasePin pin;
IMemInputPin * pMemInputPin;
IMemAllocator * pAllocator;
struct strmbase_pin pin;
IMemInputPin *pMemInputPin;
IMemAllocator *pAllocator;
const struct strmbase_source_ops *pFuncsTable;
const struct strmbase_source_ops *pFuncsTable;
};
typedef HRESULT (WINAPI *BaseOutputPin_AttemptConnection)(struct strmbase_source *pin, IPin *peer, const AM_MEDIA_TYPE *mt);
@ -81,15 +80,14 @@ struct strmbase_source_ops
typedef struct BaseInputPin
{
/* inheritance C style! */
BasePin pin;
struct strmbase_pin pin;
IMemInputPin IMemInputPin_iface;
IMemAllocator * pAllocator;
BOOL flushing, end_of_stream;
IMemAllocator *preferred_allocator;
IMemInputPin IMemInputPin_iface;
IMemAllocator *pAllocator;
BOOL flushing, end_of_stream;
IMemAllocator *preferred_allocator;
const struct BaseInputPinFuncTable* pFuncsTable;
const struct BaseInputPinFuncTable *pFuncsTable;
} BaseInputPin;
typedef HRESULT (WINAPI *BaseInputPin_Receive)(BaseInputPin *This, IMediaSample *pSample);
@ -101,8 +99,8 @@ typedef struct BaseInputPinFuncTable {
} BaseInputPinFuncTable;
/* Base Pin */
HRESULT WINAPI BasePinImpl_GetMediaType(BasePin *This, int iPosition, AM_MEDIA_TYPE *pmt);
LONG WINAPI BasePinImpl_GetMediaTypeVersion(BasePin *This);
HRESULT WINAPI BasePinImpl_GetMediaType(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);
HRESULT WINAPI BasePinImpl_Disconnect(IPin * iface);
@ -424,11 +422,11 @@ typedef struct tagBaseControlWindow
HWND hwndOwner;
struct strmbase_filter *pFilter;
CRITICAL_SECTION* pInterfaceLock;
BasePin* pPin;
struct strmbase_pin *pPin;
} BaseControlWindow;
HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *window, const IVideoWindowVtbl *vtbl,
struct strmbase_filter *filter, CRITICAL_SECTION *lock, BasePin *pin, const BaseWindowFuncTable *ops);
struct strmbase_filter *filter, CRITICAL_SECTION *lock, struct strmbase_pin *pin, const BaseWindowFuncTable *ops);
HRESULT WINAPI BaseControlWindow_Destroy(BaseControlWindow *pControlWindow);
BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam);
@ -490,7 +488,7 @@ typedef struct tagBaseControlVideo
struct strmbase_filter *pFilter;
CRITICAL_SECTION* pInterfaceLock;
BasePin* pPin;
struct strmbase_pin *pPin;
const struct BaseControlVideoFuncTable* pFuncsTable;
} BaseControlVideo;
@ -521,7 +519,7 @@ typedef struct BaseControlVideoFuncTable {
} BaseControlVideoFuncTable;
HRESULT WINAPI strmbase_video_init(BaseControlVideo *video, struct strmbase_filter *filter,
CRITICAL_SECTION *cs, BasePin *pin, const BaseControlVideoFuncTable *func_table);
CRITICAL_SECTION *cs, struct strmbase_pin *pin, const BaseControlVideoFuncTable *func_table);
HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo);
#endif
#endif