strmbase: Use an unsigned int for the GetPin() callback.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
27bf52d12c
commit
97546ca0b7
|
@ -191,9 +191,9 @@ static const IBaseFilterVtbl basefilter_vtbl =
|
||||||
BaseFilterImpl_QueryVendorInfo
|
BaseFilterImpl_QueryVendorInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
static IPin* WINAPI filter_GetPin(BaseFilter *iface, int position)
|
static IPin * WINAPI filter_GetPin(BaseFilter *iface, unsigned int index)
|
||||||
{
|
{
|
||||||
FIXME("(%p, %d): stub!\n", iface, position);
|
FIXME("iface %p, index %u, stub!\n", iface, index);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,10 +171,9 @@ static const IBaseFilterVtbl AudioRecordVtbl = {
|
||||||
BaseFilterImpl_QueryVendorInfo
|
BaseFilterImpl_QueryVendorInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
static IPin* WINAPI AudioRecord_GetPin(BaseFilter *iface, int pos)
|
static IPin * WINAPI AudioRecord_GetPin(BaseFilter *iface, unsigned int index)
|
||||||
{
|
{
|
||||||
AudioRecord *This = impl_from_BaseFilter(iface);
|
FIXME("iface %p, index %u, stub!\n", iface, index);
|
||||||
FIXME("(%p, %d): stub\n", This, pos);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -244,24 +244,17 @@ static const IBaseFilterVtbl AVICompressorVtbl = {
|
||||||
AVICompressor_QueryVendorInfo
|
AVICompressor_QueryVendorInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
static IPin* WINAPI AVICompressor_GetPin(BaseFilter *iface, int pos)
|
static IPin * WINAPI AVICompressor_GetPin(BaseFilter *iface, unsigned int index)
|
||||||
{
|
{
|
||||||
AVICompressor *This = impl_from_BaseFilter(iface);
|
AVICompressor *This = impl_from_BaseFilter(iface);
|
||||||
IPin *ret;
|
IPin *ret;
|
||||||
|
|
||||||
TRACE("(%p)->(%d)\n", This, pos);
|
if (index == 0)
|
||||||
|
|
||||||
switch(pos) {
|
|
||||||
case 0:
|
|
||||||
ret = &This->in->pin.IPin_iface;
|
ret = &This->in->pin.IPin_iface;
|
||||||
break;
|
else if (index == 1)
|
||||||
case 1:
|
|
||||||
ret = &This->out->pin.IPin_iface;
|
ret = &This->out->pin.IPin_iface;
|
||||||
break;
|
else
|
||||||
default:
|
|
||||||
TRACE("No pin %d\n", pos);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
};
|
|
||||||
|
|
||||||
IPin_AddRef(ret);
|
IPin_AddRef(ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -116,18 +116,19 @@ static inline AviMux* impl_from_BaseFilter(BaseFilter *filter)
|
||||||
return CONTAINING_RECORD(filter, AviMux, filter);
|
return CONTAINING_RECORD(filter, AviMux, filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
static IPin* WINAPI AviMux_GetPin(BaseFilter *iface, int pos)
|
static IPin * WINAPI AviMux_GetPin(BaseFilter *iface, unsigned int index)
|
||||||
{
|
{
|
||||||
AviMux *This = impl_from_BaseFilter(iface);
|
AviMux *This = impl_from_BaseFilter(iface);
|
||||||
|
|
||||||
TRACE("(%p)->(%d)\n", This, pos);
|
if (!index)
|
||||||
|
{
|
||||||
if(pos == 0) {
|
|
||||||
IPin_AddRef(&This->out->pin.pin.IPin_iface);
|
IPin_AddRef(&This->out->pin.pin.IPin_iface);
|
||||||
return &This->out->pin.pin.IPin_iface;
|
return &This->out->pin.pin.IPin_iface;
|
||||||
}else if(pos>0 && pos<=This->input_pin_no) {
|
}
|
||||||
IPin_AddRef(&This->in[pos-1]->pin.pin.IPin_iface);
|
else if (index <= This->input_pin_no)
|
||||||
return &This->in[pos-1]->pin.pin.IPin_iface;
|
{
|
||||||
|
IPin_AddRef(&This->in[index - 1]->pin.pin.IPin_iface);
|
||||||
|
return &This->in[index - 1]->pin.pin.IPin_iface;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -199,27 +199,19 @@ static const IBaseFilterVtbl SmartTeeFilterVtbl = {
|
||||||
BaseFilterImpl_QueryVendorInfo
|
BaseFilterImpl_QueryVendorInfo
|
||||||
};
|
};
|
||||||
|
|
||||||
static IPin* WINAPI SmartTeeFilter_GetPin(BaseFilter *iface, int pos)
|
static IPin * WINAPI SmartTeeFilter_GetPin(BaseFilter *iface, unsigned int index)
|
||||||
{
|
{
|
||||||
SmartTeeFilter *This = impl_from_BaseFilter(iface);
|
SmartTeeFilter *This = impl_from_BaseFilter(iface);
|
||||||
IPin *ret;
|
IPin *ret;
|
||||||
|
|
||||||
TRACE("(%p)->(%d)\n", This, pos);
|
if (index == 0)
|
||||||
|
|
||||||
switch(pos) {
|
|
||||||
case 0:
|
|
||||||
ret = &This->input->pin.IPin_iface;
|
ret = &This->input->pin.IPin_iface;
|
||||||
break;
|
else if (index == 1)
|
||||||
case 1:
|
|
||||||
ret = &This->capture->pin.IPin_iface;
|
ret = &This->capture->pin.IPin_iface;
|
||||||
break;
|
else if (index == 2)
|
||||||
case 2:
|
|
||||||
ret = &This->preview->pin.IPin_iface;
|
ret = &This->preview->pin.IPin_iface;
|
||||||
break;
|
else
|
||||||
default:
|
|
||||||
TRACE("No pin %d\n", pos);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
IPin_AddRef(ret);
|
IPin_AddRef(ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -192,11 +192,11 @@ static const IUnknownVtbl unknown_inner_vtbl =
|
||||||
unknown_inner_Release,
|
unknown_inner_Release,
|
||||||
};
|
};
|
||||||
|
|
||||||
static IPin* WINAPI VfwCapture_GetPin(BaseFilter *iface, int pos)
|
static IPin * WINAPI VfwCapture_GetPin(BaseFilter *iface, unsigned int index)
|
||||||
{
|
{
|
||||||
VfwCapture *This = impl_from_BaseFilter(iface);
|
VfwCapture *This = impl_from_BaseFilter(iface);
|
||||||
|
|
||||||
if (pos >= 1 || pos < 0)
|
if (index >= 1)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
IPin_AddRef(This->pOutputPin);
|
IPin_AddRef(This->pOutputPin);
|
||||||
|
|
|
@ -339,14 +339,14 @@ static const IUnknownVtbl samplegrabber_vtbl =
|
||||||
SampleGrabber_Release,
|
SampleGrabber_Release,
|
||||||
};
|
};
|
||||||
|
|
||||||
static IPin *WINAPI SampleGrabber_GetPin(BaseFilter *iface, int pos)
|
static IPin * WINAPI SampleGrabber_GetPin(BaseFilter *iface, unsigned int index)
|
||||||
{
|
{
|
||||||
SG_Impl *This = impl_from_BaseFilter(iface);
|
SG_Impl *This = impl_from_BaseFilter(iface);
|
||||||
IPin *pin;
|
IPin *pin;
|
||||||
|
|
||||||
if (pos == 0)
|
if (index == 0)
|
||||||
pin = &This->pin_in.IPin_iface;
|
pin = &This->pin_in.IPin_iface;
|
||||||
else if (pos == 1)
|
else if (index == 1)
|
||||||
pin = &This->pin_out.IPin_iface;
|
pin = &This->pin_out.IPin_iface;
|
||||||
else
|
else
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -392,13 +392,11 @@ HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName, GUID *
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static IPin* WINAPI AsyncReader_GetPin(BaseFilter *iface, int pos)
|
static IPin * WINAPI AsyncReader_GetPin(BaseFilter *iface, unsigned int index)
|
||||||
{
|
{
|
||||||
AsyncReader *This = impl_from_BaseFilter(iface);
|
AsyncReader *This = impl_from_BaseFilter(iface);
|
||||||
|
|
||||||
TRACE("%p->(%d)\n", This, pos);
|
if (index >= 1 || !This->pOutputPin)
|
||||||
|
|
||||||
if (pos >= 1 || !This->pOutputPin)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
IPin_AddRef(This->pOutputPin);
|
IPin_AddRef(This->pOutputPin);
|
||||||
|
|
|
@ -62,19 +62,15 @@ static inline ParserImpl *impl_from_BaseFilter( BaseFilter *iface )
|
||||||
return CONTAINING_RECORD(iface, ParserImpl, filter);
|
return CONTAINING_RECORD(iface, ParserImpl, filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: WRONG */
|
static IPin * WINAPI Parser_GetPin(BaseFilter *iface, unsigned int index)
|
||||||
static IPin* WINAPI Parser_GetPin(BaseFilter *iface, int pos)
|
|
||||||
{
|
{
|
||||||
ParserImpl *This = impl_from_BaseFilter(iface);
|
ParserImpl *filter = impl_from_BaseFilter(iface);
|
||||||
|
|
||||||
TRACE("%p->(%x)\n", This, pos);
|
if (index > filter->cStreams)
|
||||||
|
|
||||||
/* Input pin also has a pin, hence the > and not >= */
|
|
||||||
if (pos > This->cStreams || pos < 0)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
IPin_AddRef(This->ppPins[pos]);
|
IPin_AddRef(filter->ppPins[index]);
|
||||||
return This->ppPins[pos];
|
return filter->ppPins[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
static const BaseFilterFuncTable BaseFuncTable = {
|
static const BaseFilterFuncTable BaseFuncTable = {
|
||||||
|
|
|
@ -137,10 +137,10 @@ HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **enum_pins
|
||||||
HRESULT WINAPI BaseFilterImpl_FindPin(IBaseFilter *iface, const WCHAR *id, IPin **ret)
|
HRESULT WINAPI BaseFilterImpl_FindPin(IBaseFilter *iface, const WCHAR *id, IPin **ret)
|
||||||
{
|
{
|
||||||
BaseFilter *This = impl_from_IBaseFilter(iface);
|
BaseFilter *This = impl_from_IBaseFilter(iface);
|
||||||
|
unsigned int i;
|
||||||
PIN_INFO info;
|
PIN_INFO info;
|
||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
IPin *pin;
|
IPin *pin;
|
||||||
int i;
|
|
||||||
|
|
||||||
TRACE("(%p)->(%s, %p)\n", This, debugstr_w(id), ret);
|
TRACE("(%p)->(%s, %p)\n", This, debugstr_w(id), ret);
|
||||||
|
|
||||||
|
|
|
@ -183,11 +183,11 @@ static const IPinVtbl BaseRenderer_InputPin_Vtbl =
|
||||||
BaseInputPinImpl_NewSegment
|
BaseInputPinImpl_NewSegment
|
||||||
};
|
};
|
||||||
|
|
||||||
static IPin* WINAPI BaseRenderer_GetPin(BaseFilter *iface, int pos)
|
static IPin * WINAPI BaseRenderer_GetPin(BaseFilter *iface, unsigned int index)
|
||||||
{
|
{
|
||||||
BaseRenderer *This = impl_from_BaseFilter(iface);
|
BaseRenderer *This = impl_from_BaseFilter(iface);
|
||||||
|
|
||||||
if (pos >= 1 || pos < 0)
|
if (index >= 1)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
IPin_AddRef(&This->pInputPin->pin.IPin_iface);
|
IPin_AddRef(&This->pInputPin->pin.IPin_iface);
|
||||||
|
|
|
@ -128,11 +128,11 @@ static HRESULT WINAPI TransformFilter_Output_GetMediaType(BasePin *This, int iPo
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static IPin *WINAPI TransformFilter_GetPin(BaseFilter *iface, int index)
|
static IPin *WINAPI TransformFilter_GetPin(BaseFilter *iface, unsigned int index)
|
||||||
{
|
{
|
||||||
TransformFilter *filter = impl_from_BaseFilter(iface);
|
TransformFilter *filter = impl_from_BaseFilter(iface);
|
||||||
|
|
||||||
if (index >= 2 || index < 0)
|
if (index >= 2)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
IPin_AddRef(filter->ppPins[index]);
|
IPin_AddRef(filter->ppPins[index]);
|
||||||
|
|
|
@ -1196,20 +1196,18 @@ static inline GSTOutPin *impl_from_IMediaSeeking( IMediaSeeking *iface )
|
||||||
return CONTAINING_RECORD(iface, GSTOutPin, seek.IMediaSeeking_iface);
|
return CONTAINING_RECORD(iface, GSTOutPin, seek.IMediaSeeking_iface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static IPin* WINAPI GST_GetPin(BaseFilter *base, int pos)
|
static IPin* WINAPI GST_GetPin(BaseFilter *base, unsigned int index)
|
||||||
{
|
{
|
||||||
GSTImpl *This = impl_from_IBaseFilter(&base->IBaseFilter_iface);
|
GSTImpl *This = impl_from_IBaseFilter(&base->IBaseFilter_iface);
|
||||||
IPin *pin;
|
IPin *pin;
|
||||||
|
|
||||||
TRACE("%p: Asking for pos %x\n", This, pos);
|
if (index > This->cStreams)
|
||||||
|
|
||||||
if (pos > This->cStreams || pos < 0)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (!pos)
|
if (!index)
|
||||||
pin = &This->pInputPin.pin.IPin_iface;
|
pin = &This->pInputPin.pin.IPin_iface;
|
||||||
else
|
else
|
||||||
pin = &This->ppPins[pos - 1]->pin.pin.IPin_iface;
|
pin = &This->ppPins[index - 1]->pin.pin.IPin_iface;
|
||||||
|
|
||||||
IPin_AddRef(pin);
|
IPin_AddRef(pin);
|
||||||
return pin;
|
return pin;
|
||||||
|
|
|
@ -202,7 +202,7 @@ static inline QTSplitter *impl_from_IBaseFilter( IBaseFilter *iface )
|
||||||
* Base Filter
|
* Base Filter
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static IPin * WINAPI QT_GetPin(BaseFilter *base, int index)
|
static IPin * WINAPI QT_GetPin(BaseFilter *base, unsigned int index)
|
||||||
{
|
{
|
||||||
QTSplitter *filter = impl_from_BaseFilter(base);
|
QTSplitter *filter = impl_from_BaseFilter(base);
|
||||||
|
|
||||||
|
|
|
@ -168,7 +168,7 @@ typedef struct BaseFilter
|
||||||
const struct BaseFilterFuncTable* pFuncsTable;
|
const struct BaseFilterFuncTable* pFuncsTable;
|
||||||
} BaseFilter;
|
} BaseFilter;
|
||||||
|
|
||||||
typedef IPin* (WINAPI *BaseFilter_GetPin)(BaseFilter* iface, int iPosition);
|
typedef IPin * (WINAPI *BaseFilter_GetPin)(BaseFilter *iface, unsigned int index);
|
||||||
|
|
||||||
typedef struct BaseFilterFuncTable {
|
typedef struct BaseFilterFuncTable {
|
||||||
/* Required */
|
/* Required */
|
||||||
|
|
Loading…
Reference in New Issue