Commit 87e4c289 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

winegstreamer: Implement IWMProfile::GetStreamCount().

parent 51b6d455
......@@ -129,6 +129,8 @@ struct wm_reader
bool read_thread_shutdown;
struct wg_parser *wg_parser;
WORD stream_count;
const struct wm_reader_ops *ops;
};
......
......@@ -188,12 +188,16 @@ static HRESULT WINAPI profile_SetDescription(IWMProfile3 *iface, const WCHAR *de
static HRESULT WINAPI profile_GetStreamCount(IWMProfile3 *iface, DWORD *count)
{
FIXME("iface %p, count %p, stub!\n", iface, count);
struct wm_reader *reader = impl_from_IWMProfile3(iface);
TRACE("reader %p, count %p.\n", reader, count);
if (!count)
return E_INVALIDARG;
*count = 0;
EnterCriticalSection(&reader->cs);
*count = reader->stream_count;
LeaveCriticalSection(&reader->cs);
return S_OK;
}
......@@ -853,6 +857,8 @@ HRESULT wm_reader_open_stream(struct wm_reader *reader, IStream *stream)
goto out_shutdown_thread;
}
reader->stream_count = wg_parser_get_stream_count(reader->wg_parser);
LeaveCriticalSection(&reader->cs);
return S_OK;
......
......@@ -459,7 +459,7 @@ static void test_sync_reader_streaming(void)
count = 0xdeadbeef;
hr = IWMProfile_GetStreamCount(profile, &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);
count = 0xdeadbeef;
hr = IWMSyncReader_GetOutputCount(reader, &count);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment