From: Anton Baskanov baskanov@gmail.com
Signed-off-by: Anton Baskanov baskanov@gmail.com --- dlls/quartz/tests/mpegaudio.c | 4 ++-- dlls/winegstreamer/Makefile.in | 2 +- dlls/winegstreamer/quartz_transform.c | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/dlls/quartz/tests/mpegaudio.c b/dlls/quartz/tests/mpegaudio.c index 48f5517336c..48322d019a8 100644 --- a/dlls/quartz/tests/mpegaudio.c +++ b/dlls/quartz/tests/mpegaudio.c @@ -253,8 +253,8 @@ static void test_interfaces(void) IBaseFilter_FindPin(filter, L"Out", &pin);
check_interface(pin, &IID_IPin, TRUE); - todo_wine check_interface(pin, &IID_IMediaPosition, TRUE); - todo_wine check_interface(pin, &IID_IMediaSeeking, TRUE); + check_interface(pin, &IID_IMediaPosition, TRUE); + check_interface(pin, &IID_IMediaSeeking, TRUE); todo_wine check_interface(pin, &IID_IQualityControl, TRUE); check_interface(pin, &IID_IUnknown, TRUE);
diff --git a/dlls/winegstreamer/Makefile.in b/dlls/winegstreamer/Makefile.in index 00b7c72a5f3..e4c2636d02d 100644 --- a/dlls/winegstreamer/Makefile.in +++ b/dlls/winegstreamer/Makefile.in @@ -1,7 +1,7 @@ MODULE = winegstreamer.dll UNIXLIB = winegstreamer.so IMPORTLIB = winegstreamer -IMPORTS = strmbase ole32 msdmo +IMPORTS = strmbase ole32 oleaut32 msdmo DELAYIMPORTS = mfplat EXTRAINCL = $(GSTREAMER_CFLAGS) EXTRALIBS = $(GSTREAMER_LIBS) $(PTHREAD_LIBS) diff --git a/dlls/winegstreamer/quartz_transform.c b/dlls/winegstreamer/quartz_transform.c index 447f331d474..7fa18aa7673 100644 --- a/dlls/winegstreamer/quartz_transform.c +++ b/dlls/winegstreamer/quartz_transform.c @@ -33,6 +33,7 @@ struct transform
struct strmbase_sink sink; struct strmbase_source source; + struct strmbase_passthrough passthrough;
struct wg_transform *transform;
@@ -66,6 +67,7 @@ static void transform_destroy(struct strmbase_filter *iface) { struct transform *filter = impl_from_strmbase_filter(iface);
+ strmbase_passthrough_cleanup(&filter->passthrough); strmbase_source_cleanup(&filter->source); strmbase_sink_cleanup(&filter->sink); strmbase_filter_cleanup(&filter->filter); @@ -409,6 +411,21 @@ static HRESULT transform_source_get_media_type(struct strmbase_pin *pin, unsigne return filter->ops->source_get_media_type(filter, index, mt); }
+static HRESULT transform_source_query_interface(struct strmbase_pin *pin, REFIID iid, void **out) +{ + struct transform *filter = impl_from_strmbase_filter(pin->filter); + + if (IsEqualGUID(iid, &IID_IMediaPosition)) + *out = &filter->passthrough.IMediaPosition_iface; + else if (IsEqualGUID(iid, &IID_IMediaSeeking)) + *out = &filter->passthrough.IMediaSeeking_iface; + else + return E_NOINTERFACE; + + IUnknown_AddRef((IUnknown *)*out); + return S_OK; +} + static HRESULT WINAPI transform_source_DecideBufferSize(struct strmbase_source *pin, IMemAllocator *allocator, ALLOCATOR_PROPERTIES *props) { struct transform *filter = impl_from_strmbase_filter(pin->pin.filter); @@ -420,6 +437,7 @@ static const struct strmbase_source_ops source_ops = { .base.pin_query_accept = transform_source_query_accept, .base.pin_get_media_type = transform_source_get_media_type, + .base.pin_query_interface = transform_source_query_interface, .pfnAttemptConnection = BaseOutputPinImpl_AttemptConnection, .pfnDecideAllocator = BaseOutputPinImpl_DecideAllocator, .pfnDecideBufferSize = transform_source_DecideBufferSize, @@ -437,6 +455,10 @@ static HRESULT transform_create(IUnknown *outer, const CLSID *clsid, const struc strmbase_sink_init(&object->sink, &object->filter, L"In", &sink_ops, NULL); strmbase_source_init(&object->source, &object->filter, L"Out", &source_ops);
+ strmbase_passthrough_init(&object->passthrough, (IUnknown *)&object->source.pin.IPin_iface); + ISeekingPassThru_Init(&object->passthrough.ISeekingPassThru_iface, FALSE, + &object->sink.pin.IPin_iface); + object->ops = ops;
*out = object;