Nikolay Sivov : mf/evr: Forward mixer service requests to the mixer.

Alexandre Julliard julliard at winehq.org
Wed Jul 8 15:34:36 CDT 2020


Module: wine
Branch: master
Commit: 58f7c7823be66e81b1a212ab8be458185472d2bc
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=58f7c7823be66e81b1a212ab8be458185472d2bc

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Jul  8 18:10:37 2020 +0300

mf/evr: Forward mixer service requests to the mixer.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mf/evr.c      | 23 +++++++++++++++++++++--
 dlls/mf/tests/mf.c |  6 ++++++
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/dlls/mf/evr.c b/dlls/mf/evr.c
index ebb3fd4c2c..8b7de5c76b 100644
--- a/dlls/mf/evr.c
+++ b/dlls/mf/evr.c
@@ -468,9 +468,28 @@ static ULONG WINAPI video_renderer_get_service_Release(IMFGetService *iface)
 
 static HRESULT WINAPI video_renderer_get_service_GetService(IMFGetService *iface, REFGUID service, REFIID riid, void **obj)
 {
-    FIXME("%p, %s, %s, %p.\n", iface, debugstr_guid(service), debugstr_guid(riid), obj);
+    struct video_renderer *renderer = impl_from_IMFGetService(iface);
+    HRESULT hr = E_NOINTERFACE;
+    IMFGetService *gs = NULL;
 
-    return E_NOTIMPL;
+    TRACE("%p, %s, %s, %p.\n", iface, debugstr_guid(service), debugstr_guid(riid), obj);
+
+    if (IsEqualGUID(service, &MR_VIDEO_MIXER_SERVICE))
+    {
+        hr = IMFTransform_QueryInterface(renderer->mixer, &IID_IMFGetService, (void **)&gs);
+    }
+    else
+    {
+        FIXME("Unsupported service %s.\n", debugstr_guid(service));
+    }
+
+    if (gs)
+    {
+        hr = IMFGetService_GetService(gs, service, riid, obj);
+        IMFGetService_Release(gs);
+    }
+
+    return hr;
 }
 
 static const IMFGetServiceVtbl video_renderer_get_service_vtbl =
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index 3fad309bcf..aa2c5199b9 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -3235,6 +3235,7 @@ static void test_evr(void)
     IMFActivate *activate;
     DWORD flags, count;
     IMFGetService *gs;
+    IUnknown *unk;
     UINT64 value;
     HRESULT hr;
 
@@ -3280,6 +3281,11 @@ static void test_evr(void)
 
     hr = IMFMediaSink_QueryInterface(sink, &IID_IMFGetService, (void **)&gs);
     ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+
+    hr = IMFGetService_GetService(gs, &MR_VIDEO_MIXER_SERVICE, &IID_IMFVideoMixerControl, (void **)&unk);
+    ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+    IUnknown_Release(unk);
+
     IMFGetService_Release(gs);
 
     hr = IMFActivate_ShutdownObject(activate);




More information about the wine-cvs mailing list