[PATCH 1/5] winegstreamer: Implement IWMReader::GetOutputFormat().

Zebediah Figura zfigura at codeweavers.com
Thu Nov 4 15:46:24 CDT 2021


Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 dlls/winegstreamer/wm_asyncreader.c | 11 +++++++----
 dlls/wmvcore/tests/wmvcore.c        | 23 ++++++++++-------------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c
index 6771b590a71..dd5b01b3e5c 100644
--- a/dlls/winegstreamer/wm_asyncreader.c
+++ b/dlls/winegstreamer/wm_asyncreader.c
@@ -137,11 +137,14 @@ static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD outp
     return E_NOTIMPL;
 }
 
-static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output_num, DWORD format_num, IWMOutputMediaProps **props)
+static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output,
+        DWORD index, IWMOutputMediaProps **props)
 {
-    struct async_reader *This = impl_from_IWMReader(iface);
-    FIXME("(%p)->(%u %u %p)\n", This, output_num, format_num, props);
-    return E_NOTIMPL;
+    struct async_reader *reader = impl_from_IWMReader(iface);
+
+    TRACE("reader %p, output %u, index %u, props %p.\n", reader, output, index, props);
+
+    return wm_reader_get_output_format(&reader->reader, output, index, props);
 }
 
 static HRESULT WINAPI WMReader_Start(IWMReader *iface, QWORD start, QWORD duration, float rate, void *context)
diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c
index 148b4f5f373..6fbc2ed6a3e 100644
--- a/dlls/wmvcore/tests/wmvcore.c
+++ b/dlls/wmvcore/tests/wmvcore.c
@@ -1419,21 +1419,18 @@ static void test_async_reader_types(void)
              * with. In particular it has to be PCM. */
 
             hr = IWMReader_GetOutputFormat(reader, output_number, 0, &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)
-            {
-                ret_size = sizeof(mt2_buffer);
-                hr = IWMOutputMediaProps_GetMediaType(output_props, mt2, &ret_size);
-                ok(hr == S_OK, "Got hr %#x.\n", hr);
+            ret_size = sizeof(mt2_buffer);
+            hr = IWMOutputMediaProps_GetMediaType(output_props, mt2, &ret_size);
+            ok(hr == S_OK, "Got hr %#x.\n", hr);
 
-                ref = IWMOutputMediaProps_Release(output_props);
-                ok(!ref, "Got outstanding refcount %d.\n", ref);
+            ref = IWMOutputMediaProps_Release(output_props);
+            ok(!ref, "Got outstanding refcount %d.\n", ref);
 
-                /* The sample size might differ. */
-                mt2->lSampleSize = mt->lSampleSize;
-                ok(compare_media_types(mt, mt2), "Media types didn't match.\n");
-            }
+            /* The sample size might differ. */
+            mt2->lSampleSize = mt->lSampleSize;
+            ok(compare_media_types(mt, mt2), "Media types didn't match.\n");
         }
         else
         {
@@ -1553,7 +1550,7 @@ static void test_async_reader_types(void)
 
     output_props = (void *)0xdeadbeef;
     hr = IWMReader_GetOutputFormat(reader, 2, 0, &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);
 
     IWMReaderAdvanced2_Release(advanced);
-- 
2.33.0




More information about the wine-devel mailing list