Zebediah Figura : winegstreamer: Implement IWMReader::GetOutputProps().

Alexandre Julliard julliard at winehq.org
Wed Nov 3 16:42:00 CDT 2021


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

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Tue Nov  2 23:51:48 2021 -0500

winegstreamer: Implement IWMReader::GetOutputProps().

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winegstreamer/wm_asyncreader.c | 10 ++++++----
 dlls/wmvcore/tests/wmvcore.c        | 32 ++++++++++++--------------------
 2 files changed, 18 insertions(+), 24 deletions(-)

diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c
index 8caf21a2de0..6771b590a71 100644
--- a/dlls/winegstreamer/wm_asyncreader.c
+++ b/dlls/winegstreamer/wm_asyncreader.c
@@ -114,11 +114,13 @@ static HRESULT WINAPI WMReader_GetOutputCount(IWMReader *iface, DWORD *count)
     return S_OK;
 }
 
-static HRESULT WINAPI WMReader_GetOutputProps(IWMReader *iface, DWORD output_num, IWMOutputMediaProps **output)
+static HRESULT WINAPI WMReader_GetOutputProps(IWMReader *iface, DWORD output, IWMOutputMediaProps **props)
 {
-    struct async_reader *This = impl_from_IWMReader(iface);
-    FIXME("(%p)->(%u %p)\n", This, output_num, output);
-    return E_NOTIMPL;
+    struct async_reader *reader = impl_from_IWMReader(iface);
+
+    TRACE("reader %p, output %u, props %p.\n", reader, output, props);
+
+    return wm_reader_get_output_props(&reader->reader, output, props);
 }
 
 static HRESULT WINAPI WMReader_SetOutputProps(IWMReader *iface, DWORD output_num, IWMOutputMediaProps *output)
diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c
index 553f79656d6..148b4f5f373 100644
--- a/dlls/wmvcore/tests/wmvcore.c
+++ b/dlls/wmvcore/tests/wmvcore.c
@@ -1397,12 +1397,7 @@ static void test_async_reader_types(void)
         output_number = i;
 
         hr = IWMReader_GetOutputProps(reader, output_number, &output_props);
-        todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
-        if (hr != S_OK)
-        {
-            winetest_pop_context();
-            continue;
-        }
+        ok(hr == S_OK, "Got hr %#x.\n", hr);
 
         ret_size = sizeof(mt_buffer);
         hr = IWMOutputMediaProps_GetMediaType(output_props, mt, &ret_size);
@@ -1529,25 +1524,22 @@ static void test_async_reader_types(void)
         todo_wine ok(hr == NS_E_INVALID_OUTPUT_FORMAT, "Got hr %#x.\n", hr);
 
         hr = IWMReader_GetOutputProps(reader, output_number, &output_props);
-        todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
+        ok(hr == S_OK, "Got hr %#x.\n", hr);
 
-        if (hr == S_OK)
-        {
-            hr = IWMReader_GetOutputProps(reader, output_number, &output_props2);
-            ok(hr == S_OK, "Got hr %#x.\n", hr);
-            ok(output_props2 != output_props, "Expected different objects.\n");
+        hr = IWMReader_GetOutputProps(reader, output_number, &output_props2);
+        ok(hr == S_OK, "Got hr %#x.\n", hr);
+        ok(output_props2 != output_props, "Expected different objects.\n");
 
-            ref = IWMOutputMediaProps_Release(output_props2);
-            ok(!ref, "Got outstanding refcount %d.\n", ref);
-            ref = IWMOutputMediaProps_Release(output_props);
-            ok(!ref, "Got outstanding refcount %d.\n", ref);
-        }
+        ref = IWMOutputMediaProps_Release(output_props2);
+        ok(!ref, "Got outstanding refcount %d.\n", ref);
+        ref = IWMOutputMediaProps_Release(output_props);
+        ok(!ref, "Got outstanding refcount %d.\n", ref);
 
         winetest_pop_context();
     }
 
-    todo_wine ok(got_audio, "No audio stream was enumerated.\n");
-    todo_wine ok(got_video, "No video stream was enumerated.\n");
+    ok(got_audio, "No audio stream was enumerated.\n");
+    ok(got_video, "No video stream was enumerated.\n");
 
     count = 0xdeadbeef;
     hr = IWMReader_GetOutputFormatCount(reader, 2, &count);
@@ -1556,7 +1548,7 @@ static void test_async_reader_types(void)
 
     output_props = (void *)0xdeadbeef;
     hr = IWMReader_GetOutputProps(reader, 2, &output_props);
-    todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
+    ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
     ok(output_props == (void *)0xdeadbeef, "Got output props %p.\n", output_props);
 
     output_props = (void *)0xdeadbeef;




More information about the wine-cvs mailing list