Zebediah Figura : winegstreamer: Implement IWMSyncReader::GetOutputCount().
Alexandre Julliard
julliard at winehq.org
Wed Oct 27 16:26:02 CDT 2021
Module: wine
Branch: master
Commit: 8bd3c8bf5a9ea4765f791f1f78f60bcf7060eba6
URL: https://source.winehq.org/git/wine.git/?a=commit;h=8bd3c8bf5a9ea4765f791f1f78f60bcf7060eba6
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Tue Oct 26 22:22:04 2021 -0500
winegstreamer: Implement IWMSyncReader::GetOutputCount().
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winegstreamer/wm_syncreader.c | 13 +++++++++----
dlls/wmvcore/tests/wmvcore.c | 4 ++--
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/dlls/winegstreamer/wm_syncreader.c b/dlls/winegstreamer/wm_syncreader.c
index bb98a60ad48..32b668f68c6 100644
--- a/dlls/winegstreamer/wm_syncreader.c
+++ b/dlls/winegstreamer/wm_syncreader.c
@@ -85,11 +85,16 @@ static HRESULT WINAPI WMSyncReader_GetNextSample(IWMSyncReader2 *iface, WORD str
return E_NOTIMPL;
}
-static HRESULT WINAPI WMSyncReader_GetOutputCount(IWMSyncReader2 *iface, DWORD *outputs)
+static HRESULT WINAPI WMSyncReader_GetOutputCount(IWMSyncReader2 *iface, DWORD *count)
{
- struct sync_reader *This = impl_from_IWMSyncReader2(iface);
- FIXME("(%p)->(%p): stub!\n", This, outputs);
- return E_NOTIMPL;
+ struct sync_reader *reader = impl_from_IWMSyncReader2(iface);
+
+ TRACE("reader %p, count %p.\n", reader, count);
+
+ EnterCriticalSection(&reader->reader.cs);
+ *count = reader->reader.stream_count;
+ LeaveCriticalSection(&reader->reader.cs);
+ return S_OK;
}
static HRESULT WINAPI WMSyncReader_GetOutputFormat(IWMSyncReader2 *iface, DWORD output_num, DWORD format_num,
diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c
index ad58f53d552..5576018b1d6 100644
--- a/dlls/wmvcore/tests/wmvcore.c
+++ b/dlls/wmvcore/tests/wmvcore.c
@@ -463,8 +463,8 @@ static void test_sync_reader_streaming(void)
count = 0xdeadbeef;
hr = IWMSyncReader_GetOutputCount(reader, &count);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
- todo_wine ok(count == 2, "Got count %u.\n", count);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(count == 2, "Got count %u.\n", count);
for (i = 0; i < 2; ++i)
{
More information about the wine-cvs
mailing list