strmbase: Pass an unsigned index to pin_get_media_type().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f46fe6d371
commit
b0e47ab9e7
|
@ -526,12 +526,10 @@ static const IPinVtbl AVICompressorOutputPinVtbl = {
|
||||||
BasePinImpl_NewSegment
|
BasePinImpl_NewSegment
|
||||||
};
|
};
|
||||||
|
|
||||||
static HRESULT source_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt)
|
static HRESULT source_get_media_type(struct strmbase_pin *base, unsigned int iPosition, AM_MEDIA_TYPE *amt)
|
||||||
{
|
{
|
||||||
AVICompressor *This = impl_from_strmbase_filter(base->filter);
|
AVICompressor *This = impl_from_strmbase_filter(base->filter);
|
||||||
|
|
||||||
TRACE("(%p)->(%d %p)\n", base, iPosition, amt);
|
|
||||||
|
|
||||||
if(iPosition || !This->videoinfo)
|
if(iPosition || !This->videoinfo)
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
|
|
||||||
|
|
|
@ -1174,12 +1174,10 @@ static HRESULT WINAPI AviMuxOut_AttemptConnection(struct strmbase_source *base,
|
||||||
return BaseOutputPinImpl_AttemptConnection(base, pReceivePin, pmt);
|
return BaseOutputPinImpl_AttemptConnection(base, pReceivePin, pmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT source_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt)
|
static HRESULT source_get_media_type(struct strmbase_pin *base, unsigned int iPosition, AM_MEDIA_TYPE *amt)
|
||||||
{
|
{
|
||||||
TRACE("(%p)->(%d %p)\n", base, iPosition, amt);
|
TRACE("(%p)->(%d %p)\n", base, iPosition, amt);
|
||||||
|
|
||||||
if(iPosition < 0)
|
|
||||||
return E_INVALIDARG;
|
|
||||||
if(iPosition > 0)
|
if(iPosition > 0)
|
||||||
return VFW_S_NO_MORE_ITEMS;
|
return VFW_S_NO_MORE_ITEMS;
|
||||||
|
|
||||||
|
|
|
@ -179,7 +179,8 @@ static HRESULT sink_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYPE
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT sink_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt)
|
static HRESULT sink_get_media_type(struct strmbase_pin *base,
|
||||||
|
unsigned int iPosition, AM_MEDIA_TYPE *amt)
|
||||||
{
|
{
|
||||||
SmartTeeFilter *This = impl_from_strmbase_pin(base);
|
SmartTeeFilter *This = impl_from_strmbase_pin(base);
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
@ -367,7 +368,8 @@ static HRESULT capture_query_accept(struct strmbase_pin *base, const AM_MEDIA_TY
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT capture_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt)
|
static HRESULT capture_get_media_type(struct strmbase_pin *base,
|
||||||
|
unsigned int iPosition, AM_MEDIA_TYPE *amt)
|
||||||
{
|
{
|
||||||
SmartTeeFilter *This = impl_from_strmbase_pin(base);
|
SmartTeeFilter *This = impl_from_strmbase_pin(base);
|
||||||
TRACE("(%p, %d, %p)\n", This, iPosition, amt);
|
TRACE("(%p, %d, %p)\n", This, iPosition, amt);
|
||||||
|
@ -437,7 +439,8 @@ static HRESULT preview_query_accept(struct strmbase_pin *base, const AM_MEDIA_TY
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT preview_get_media_type(struct strmbase_pin *base, int iPosition, AM_MEDIA_TYPE *amt)
|
static HRESULT preview_get_media_type(struct strmbase_pin *base,
|
||||||
|
unsigned int iPosition, AM_MEDIA_TYPE *amt)
|
||||||
{
|
{
|
||||||
SmartTeeFilter *This = impl_from_strmbase_pin(base);
|
SmartTeeFilter *This = impl_from_strmbase_pin(base);
|
||||||
TRACE("(%p, %d, %p)\n", This, iPosition, amt);
|
TRACE("(%p, %d, %p)\n", This, iPosition, amt);
|
||||||
|
|
|
@ -518,14 +518,13 @@ static HRESULT source_query_accept(struct strmbase_pin *pin, const AM_MEDIA_TYPE
|
||||||
return qcap_driver_check_format(filter->driver_info, mt);
|
return qcap_driver_check_format(filter->driver_info, mt);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT source_get_media_type(struct strmbase_pin *pin, int iPosition, AM_MEDIA_TYPE *pmt)
|
static HRESULT source_get_media_type(struct strmbase_pin *pin,
|
||||||
|
unsigned int iPosition, AM_MEDIA_TYPE *pmt)
|
||||||
{
|
{
|
||||||
VfwCapture *filter = impl_from_strmbase_pin(pin);
|
VfwCapture *filter = impl_from_strmbase_pin(pin);
|
||||||
AM_MEDIA_TYPE *vfw_pmt;
|
AM_MEDIA_TYPE *vfw_pmt;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
if (iPosition < 0)
|
|
||||||
return E_INVALIDARG;
|
|
||||||
if (iPosition > 0)
|
if (iPosition > 0)
|
||||||
return VFW_S_NO_MORE_ITEMS;
|
return VFW_S_NO_MORE_ITEMS;
|
||||||
|
|
||||||
|
|
|
@ -591,13 +591,11 @@ static HRESULT source_query_accept(struct strmbase_pin *iface, const AM_MEDIA_TY
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT source_get_media_type(struct strmbase_pin *iface, int index, AM_MEDIA_TYPE *mt)
|
static HRESULT source_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt)
|
||||||
{
|
{
|
||||||
AsyncReader *filter = impl_from_strmbase_pin(iface);
|
AsyncReader *filter = impl_from_strmbase_pin(iface);
|
||||||
|
|
||||||
if (index < 0)
|
if (index > 1)
|
||||||
return E_INVALIDARG;
|
|
||||||
else if (index > 1)
|
|
||||||
return VFW_S_NO_MORE_ITEMS;
|
return VFW_S_NO_MORE_ITEMS;
|
||||||
|
|
||||||
if (index == 0)
|
if (index == 0)
|
||||||
|
|
|
@ -152,11 +152,8 @@ static BOOL CompareMediaTypes(const AM_MEDIA_TYPE * pmt1, const AM_MEDIA_TYPE *
|
||||||
((bWildcards && (IsEqualGUID(&pmt1->subtype, &GUID_NULL) || IsEqualGUID(&pmt2->subtype, &GUID_NULL))) || IsEqualGUID(&pmt1->subtype, &pmt2->subtype)));
|
((bWildcards && (IsEqualGUID(&pmt1->subtype, &GUID_NULL) || IsEqualGUID(&pmt2->subtype, &GUID_NULL))) || IsEqualGUID(&pmt1->subtype, &pmt2->subtype)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** Common Base Pin function */
|
HRESULT strmbase_pin_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt)
|
||||||
HRESULT strmbase_pin_get_media_type(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt)
|
|
||||||
{
|
{
|
||||||
if (iPosition < 0)
|
|
||||||
return E_INVALIDARG;
|
|
||||||
return VFW_S_NO_MORE_ITEMS;
|
return VFW_S_NO_MORE_ITEMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,12 +110,10 @@ static HRESULT WINAPI TransformFilter_Output_DecideBufferSize(struct strmbase_so
|
||||||
return pTransformFilter->pFuncsTable->pfnDecideBufferSize(pTransformFilter, pAlloc, ppropInputRequest);
|
return pTransformFilter->pFuncsTable->pfnDecideBufferSize(pTransformFilter, pAlloc, ppropInputRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT source_get_media_type(struct strmbase_pin *This, int iPosition, AM_MEDIA_TYPE *pmt)
|
static HRESULT source_get_media_type(struct strmbase_pin *This, unsigned int iPosition, AM_MEDIA_TYPE *pmt)
|
||||||
{
|
{
|
||||||
TransformFilter *pTransform = impl_from_source_IPin(&This->IPin_iface);
|
TransformFilter *pTransform = impl_from_source_IPin(&This->IPin_iface);
|
||||||
|
|
||||||
if (iPosition < 0)
|
|
||||||
return E_INVALIDARG;
|
|
||||||
if (iPosition > 0)
|
if (iPosition > 0)
|
||||||
return VFW_S_NO_MORE_ITEMS;
|
return VFW_S_NO_MORE_ITEMS;
|
||||||
CopyMediaType(pmt, &pTransform->pmt);
|
CopyMediaType(pmt, &pTransform->pmt);
|
||||||
|
|
|
@ -1799,15 +1799,10 @@ static HRESULT source_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYP
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT source_get_media_type(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt)
|
static HRESULT source_get_media_type(struct strmbase_pin *iface, unsigned int iPosition, AM_MEDIA_TYPE *pmt)
|
||||||
{
|
{
|
||||||
struct gstdemux_source *This = impl_source_from_IPin(&iface->IPin_iface);
|
struct gstdemux_source *This = impl_source_from_IPin(&iface->IPin_iface);
|
||||||
|
|
||||||
TRACE("(%p)->(%i, %p)\n", This, iPosition, pmt);
|
|
||||||
|
|
||||||
if (iPosition < 0)
|
|
||||||
return E_INVALIDARG;
|
|
||||||
|
|
||||||
if (iPosition > 0)
|
if (iPosition > 0)
|
||||||
return VFW_S_NO_MORE_ITEMS;
|
return VFW_S_NO_MORE_ITEMS;
|
||||||
|
|
||||||
|
|
|
@ -1295,12 +1295,10 @@ static HRESULT source_query_accept(struct strmbase_pin *base, const AM_MEDIA_TYP
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT source_get_media_type(struct strmbase_pin *iface, int iPosition, AM_MEDIA_TYPE *pmt)
|
static HRESULT source_get_media_type(struct strmbase_pin *iface, unsigned int iPosition, AM_MEDIA_TYPE *pmt)
|
||||||
{
|
{
|
||||||
QTOutPin *This = impl_sink_from_strmbase_pin(iface);
|
QTOutPin *This = impl_sink_from_strmbase_pin(iface);
|
||||||
|
|
||||||
if (iPosition < 0)
|
|
||||||
return E_INVALIDARG;
|
|
||||||
if (iPosition > 0)
|
if (iPosition > 0)
|
||||||
return VFW_S_NO_MORE_ITEMS;
|
return VFW_S_NO_MORE_ITEMS;
|
||||||
CopyMediaType(pmt, This->pmt);
|
CopyMediaType(pmt, This->pmt);
|
||||||
|
|
|
@ -46,7 +46,7 @@ typedef struct BasePinFuncTable {
|
||||||
/* Required for QueryAccept(), Connect(), ReceiveConnection(). */
|
/* Required for QueryAccept(), Connect(), ReceiveConnection(). */
|
||||||
HRESULT (*pin_query_accept)(struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt);
|
HRESULT (*pin_query_accept)(struct strmbase_pin *pin, const AM_MEDIA_TYPE *mt);
|
||||||
/* Required for EnumMediaTypes(). */
|
/* Required for EnumMediaTypes(). */
|
||||||
HRESULT (*pin_get_media_type)(struct strmbase_pin *pin, int index, AM_MEDIA_TYPE *mt);
|
HRESULT (*pin_get_media_type)(struct strmbase_pin *pin, unsigned int index, AM_MEDIA_TYPE *mt);
|
||||||
} BasePinFuncTable;
|
} BasePinFuncTable;
|
||||||
|
|
||||||
struct strmbase_source
|
struct strmbase_source
|
||||||
|
@ -95,7 +95,7 @@ typedef struct BaseInputPinFuncTable {
|
||||||
} BaseInputPinFuncTable;
|
} BaseInputPinFuncTable;
|
||||||
|
|
||||||
/* Base Pin */
|
/* Base Pin */
|
||||||
HRESULT strmbase_pin_get_media_type(struct strmbase_pin *pin, int index, AM_MEDIA_TYPE *mt);
|
HRESULT strmbase_pin_get_media_type(struct strmbase_pin *pin, unsigned int index, AM_MEDIA_TYPE *mt);
|
||||||
LONG WINAPI BasePinImpl_GetMediaTypeVersion(struct strmbase_pin *pin);
|
LONG WINAPI BasePinImpl_GetMediaTypeVersion(struct strmbase_pin *pin);
|
||||||
ULONG WINAPI BasePinImpl_AddRef(IPin *iface);
|
ULONG WINAPI BasePinImpl_AddRef(IPin *iface);
|
||||||
ULONG WINAPI BasePinImpl_Release(IPin *iface);
|
ULONG WINAPI BasePinImpl_Release(IPin *iface);
|
||||||
|
|
Loading…
Reference in New Issue