strmbase/transform: Don't expose IMediaSeeking from the filter.

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-05-18 21:38:47 -05:00 committed by Alexandre Julliard
parent ba8023e925
commit 25c3bf9c10
3 changed files with 26 additions and 7 deletions

View File

@ -74,7 +74,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IBasicVideo, FALSE);
check_interface(filter, &IID_IKsPropertySet, FALSE);
todo_wine check_interface(filter, &IID_IMediaPosition, FALSE);
todo_wine check_interface(filter, &IID_IMediaSeeking, FALSE);
check_interface(filter, &IID_IMediaSeeking, FALSE);
check_interface(filter, &IID_IPin, FALSE);
todo_wine check_interface(filter, &IID_IQualityControl, FALSE);
check_interface(filter, &IID_IQualProp, FALSE);
@ -89,7 +89,7 @@ static void test_interfaces(void)
check_interface(pin, &IID_IUnknown, TRUE);
check_interface(pin, &IID_IMediaPosition, FALSE);
todo_wine check_interface(pin, &IID_IMediaSeeking, FALSE);
check_interface(pin, &IID_IMediaSeeking, FALSE);
IPin_Release(pin);

View File

@ -98,7 +98,7 @@ static void test_interfaces(void)
check_interface(filter, &IID_IBasicVideo, FALSE);
check_interface(filter, &IID_IKsPropertySet, FALSE);
todo_wine check_interface(filter, &IID_IMediaPosition, FALSE);
todo_wine check_interface(filter, &IID_IMediaSeeking, FALSE);
check_interface(filter, &IID_IMediaSeeking, FALSE);
check_interface(filter, &IID_IPersistPropertyBag, FALSE);
check_interface(filter, &IID_IPin, FALSE);
todo_wine check_interface(filter, &IID_IQualityControl, FALSE);
@ -114,7 +114,7 @@ static void test_interfaces(void)
check_interface(pin, &IID_IUnknown, TRUE);
check_interface(pin, &IID_IMediaPosition, FALSE);
todo_wine check_interface(pin, &IID_IMediaSeeking, FALSE);
check_interface(pin, &IID_IMediaSeeking, FALSE);
IPin_Release(pin);

View File

@ -172,8 +172,7 @@ static HRESULT WINAPI TransformFilterImpl_QueryInterface(IBaseFilter * iface, RE
IUnknown_AddRef((IUnknown*)*ppv);
return S_OK;
}
else if (IsEqualIID(riid, &IID_IMediaSeeking) ||
IsEqualIID(riid, &IID_IMediaPosition))
else if (IsEqualIID(riid, &IID_IMediaPosition))
{
return IUnknown_QueryInterface(This->seekthru_unk, riid, ppv);
}
@ -558,9 +557,29 @@ static const IPinVtbl TransformFilter_InputPin_Vtbl =
TransformFilter_InputPin_NewSegment
};
static HRESULT WINAPI transform_source_QueryInterface(IPin *iface, REFIID iid, void **out)
{
TransformFilter *filter = impl_from_IBaseFilter(impl_BaseOutputPin_from_IPin(iface)->pin.pinInfo.pFilter);
if (IsEqualGUID(iid, &IID_IUnknown) || IsEqualGUID(iid, &IID_IPin))
*out = iface;
else if (IsEqualGUID(iid, &IID_IQualityControl))
*out = &filter->qcimpl->IQualityControl_iface;
else if (IsEqualGUID(iid, &IID_IMediaSeeking))
return IUnknown_QueryInterface(filter->seekthru_unk, iid, out);
else
{
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
*out = NULL;
return E_NOINTERFACE;
}
IUnknown_AddRef((IUnknown *)*out);
return S_OK;
}
static const IPinVtbl TransformFilter_OutputPin_Vtbl =
{
BaseOutputPinImpl_QueryInterface,
transform_source_QueryInterface,
BasePinImpl_AddRef,
BaseOutputPinImpl_Release,
BaseOutputPinImpl_Connect,