strmbase: Introduce BasePinImpl_QueryInterface().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
df509be8c6
commit
fa280172e8
|
@ -157,6 +157,31 @@ HRESULT strmbase_pin_get_media_type(struct strmbase_pin *iface, unsigned int ind
|
||||||
return VFW_S_NO_MORE_ITEMS;
|
return VFW_S_NO_MORE_ITEMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HRESULT WINAPI BasePinImpl_QueryInterface(IPin *iface)
|
||||||
|
{
|
||||||
|
struct strmbase_pin *pin = impl_from_IPin(iface);
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
|
||||||
|
|
||||||
|
*out = NULL;
|
||||||
|
|
||||||
|
if (pin->pFuncsTable->pin_query_interface
|
||||||
|
&& SUCCEEDED(hr = pin->pFuncsTable->pin_query_interface(filter, iid, out)))
|
||||||
|
return hr;
|
||||||
|
|
||||||
|
if (IsEqualIID(iid, &IID_IUnknown) || IsEqualIID(iid, &IID_IPin))
|
||||||
|
*out = iface;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
|
||||||
|
return E_NOINTERFACE;
|
||||||
|
}
|
||||||
|
|
||||||
|
IUnknown_AddRef((IUnknown *)*out);
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
|
||||||
ULONG WINAPI BasePinImpl_AddRef(IPin *iface)
|
ULONG WINAPI BasePinImpl_AddRef(IPin *iface)
|
||||||
{
|
{
|
||||||
struct strmbase_pin *pin = impl_from_IPin(iface);
|
struct strmbase_pin *pin = impl_from_IPin(iface);
|
||||||
|
|
|
@ -47,6 +47,7 @@ typedef struct BasePinFuncTable {
|
||||||
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, unsigned int index, AM_MEDIA_TYPE *mt);
|
HRESULT (*pin_get_media_type)(struct strmbase_pin *pin, unsigned int index, AM_MEDIA_TYPE *mt);
|
||||||
|
HRESULT (*pin_query_interface)(struct strmbase_pin *pin, REFIID iid, void **out);
|
||||||
} BasePinFuncTable;
|
} BasePinFuncTable;
|
||||||
|
|
||||||
struct strmbase_source
|
struct strmbase_source
|
||||||
|
@ -97,6 +98,7 @@ typedef struct BaseInputPinFuncTable {
|
||||||
/* Base Pin */
|
/* Base Pin */
|
||||||
HRESULT strmbase_pin_get_media_type(struct strmbase_pin *pin, unsigned 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);
|
||||||
|
HRESULT WINAPI BasePinImpl_QueryInterface(IPin *iface, REFIID iid, void **out);
|
||||||
ULONG WINAPI BasePinImpl_AddRef(IPin *iface);
|
ULONG WINAPI BasePinImpl_AddRef(IPin *iface);
|
||||||
ULONG WINAPI BasePinImpl_Release(IPin *iface);
|
ULONG WINAPI BasePinImpl_Release(IPin *iface);
|
||||||
HRESULT WINAPI BasePinImpl_Disconnect(IPin * iface);
|
HRESULT WINAPI BasePinImpl_Disconnect(IPin * iface);
|
||||||
|
|
Loading…
Reference in New Issue