From: Brendan McGrath <bmcgrath@codeweavers.com> --- dlls/quartz/colorconv.c | 19 +++++++++++++++++++ dlls/quartz/tests/colorconv.c | 1 - 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/dlls/quartz/colorconv.c b/dlls/quartz/colorconv.c index 35909502bde..42a3976daac 100644 --- a/dlls/quartz/colorconv.c +++ b/dlls/quartz/colorconv.c @@ -31,6 +31,7 @@ struct color_converter struct strmbase_filter filter; struct strmbase_source source; + struct strmbase_passthrough passthrough; struct strmbase_sink sink; }; @@ -65,8 +66,22 @@ static HRESULT WINAPI color_source_DecideBufferSize( return IMemAllocator_SetProperties(alloc, props, &actual); } +static HRESULT color_source_query_interface(struct strmbase_pin *iface, REFIID iid, void **out) +{ + struct color_converter *filter = impl_from_strmbase_filter(iface->filter); + + if (IsEqualGUID(iid, &IID_IMediaSeeking)) + *out = &filter->passthrough.IMediaSeeking_iface; + else + return E_NOINTERFACE; + + IUnknown_AddRef((IUnknown *)*out); + return S_OK; +} + static const struct strmbase_source_ops source_ops = { + .base.pin_query_interface = color_source_query_interface, .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection, .pfnDecideAllocator = BaseOutputPinImpl_DecideAllocator, .pfnDecideBufferSize = color_source_DecideBufferSize, @@ -97,6 +112,7 @@ static void color_destroy(struct strmbase_filter *iface) strmbase_sink_cleanup(&filter->sink); strmbase_source_cleanup(&filter->source); + strmbase_passthrough_cleanup(&filter->passthrough); strmbase_filter_cleanup(&filter->filter); free(filter); @@ -160,6 +176,9 @@ HRESULT color_create(IUnknown *outer, IUnknown **out) strmbase_source_init(&object->source, &object->filter, L"Out", &source_ops); wcscpy(object->source.pin.name, L"XForm Out"); + strmbase_passthrough_init(&object->passthrough, (IUnknown *)&object->source.pin.IPin_iface); + ISeekingPassThru_Init(&object->passthrough.ISeekingPassThru_iface, FALSE, &object->sink.pin.IPin_iface); + TRACE("Created Color Converter %p.\n", object); *out = &object->filter.IUnknown_inner; diff --git a/dlls/quartz/tests/colorconv.c b/dlls/quartz/tests/colorconv.c index 6ccb6f0b769..4f03f7228df 100644 --- a/dlls/quartz/tests/colorconv.c +++ b/dlls/quartz/tests/colorconv.c @@ -920,7 +920,6 @@ static void test_interfaces(void) check_interface(pin, &IID_IPin, TRUE); todo_wine check_interface(pin, &IID_IMediaPosition, TRUE); - todo_wine check_interface(pin, &IID_IMediaSeeking, TRUE); todo_wine check_interface(pin, &IID_IQualityControl, TRUE); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/11679