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

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


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

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

winegstreamer: Implement IWMReader::GetOutputCount().

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

---

 dlls/winegstreamer/wm_asyncreader.c | 12 ++++++------
 dlls/wmvcore/tests/wmvcore.c        |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c
index 3448e156fa0..8caf21a2de0 100644
--- a/dlls/winegstreamer/wm_asyncreader.c
+++ b/dlls/winegstreamer/wm_asyncreader.c
@@ -102,15 +102,15 @@ static HRESULT WINAPI WMReader_Close(IWMReader *iface)
     return hr;
 }
 
-static HRESULT WINAPI WMReader_GetOutputCount(IWMReader *iface, DWORD *outputs)
+static HRESULT WINAPI WMReader_GetOutputCount(IWMReader *iface, DWORD *count)
 {
-    struct async_reader *This = impl_from_IWMReader(iface);
-    FIXME("(%p)->(%p)\n", This, outputs);
+    struct async_reader *reader = impl_from_IWMReader(iface);
 
-    if(!outputs)
-        return E_INVALIDARG;
+    TRACE("reader %p, count %p.\n", reader, count);
 
-    *outputs = 0;
+    EnterCriticalSection(&reader->reader.cs);
+    *count = reader->reader.stream_count;
+    LeaveCriticalSection(&reader->reader.cs);
     return S_OK;
 }
 
diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c
index 9d9c4a571f2..553f79656d6 100644
--- a/dlls/wmvcore/tests/wmvcore.c
+++ b/dlls/wmvcore/tests/wmvcore.c
@@ -1264,7 +1264,7 @@ static void test_async_reader_streaming(void)
     count = 0xdeadbeef;
     hr = IWMReader_GetOutputCount(reader, &count);
     ok(hr == S_OK, "Got hr %#x.\n", hr);
-    todo_wine ok(count == 2, "Got count %u.\n", count);
+    ok(count == 2, "Got count %u.\n", count);
 
     for (i = 0; i < 2; ++i)
     {




More information about the wine-cvs mailing list