Commit b173aa7a authored by Ziqing Hui's avatar Ziqing Hui Committed by Alexandre Julliard

winegstreamer: Implement media_object_GetStreamCount for WMV decoder.

parent 9d1c7692
...@@ -4501,22 +4501,16 @@ static void test_wmv_decoder_media_object(void) ...@@ -4501,22 +4501,16 @@ static void test_wmv_decoder_media_object(void)
/* Test GetStreamCount. */ /* Test GetStreamCount. */
in_count = out_count = 0xdeadbeef; in_count = out_count = 0xdeadbeef;
hr = IMediaObject_GetStreamCount(media_object, &in_count, &out_count); hr = IMediaObject_GetStreamCount(media_object, &in_count, &out_count);
todo_wine
ok(hr == S_OK, "GetStreamCount returned %#lx.\n", hr); ok(hr == S_OK, "GetStreamCount returned %#lx.\n", hr);
if (hr == S_OK)
{
ok(in_count == 1, "Got unexpected in_count %lu.\n", in_count); ok(in_count == 1, "Got unexpected in_count %lu.\n", in_count);
ok(out_count == 1, "Got unexpected in_count %lu.\n", out_count); ok(out_count == 1, "Got unexpected in_count %lu.\n", out_count);
}
/* Test GetStreamCount with invalid arguments. */ /* Test GetStreamCount with invalid arguments. */
in_count = out_count = 0xdeadbeef; in_count = out_count = 0xdeadbeef;
hr = IMediaObject_GetStreamCount(media_object, NULL, &out_count); hr = IMediaObject_GetStreamCount(media_object, NULL, &out_count);
todo_wine
ok(hr == E_POINTER, "GetStreamCount returned %#lx.\n", hr); ok(hr == E_POINTER, "GetStreamCount returned %#lx.\n", hr);
ok(out_count == 0xdeadbeef, "Got unexpected out_count %lu.\n", out_count); ok(out_count == 0xdeadbeef, "Got unexpected out_count %lu.\n", out_count);
hr = IMediaObject_GetStreamCount(media_object, &in_count, NULL); hr = IMediaObject_GetStreamCount(media_object, &in_count, NULL);
todo_wine
ok(hr == E_POINTER, "GetStreamCount returned %#lx.\n", hr); ok(hr == E_POINTER, "GetStreamCount returned %#lx.\n", hr);
ok(in_count == 0xdeadbeef, "Got unexpected in_count %lu.\n", in_count); ok(in_count == 0xdeadbeef, "Got unexpected in_count %lu.\n", in_count);
......
...@@ -320,8 +320,14 @@ static ULONG WINAPI media_object_Release(IMediaObject *iface) ...@@ -320,8 +320,14 @@ static ULONG WINAPI media_object_Release(IMediaObject *iface)
static HRESULT WINAPI media_object_GetStreamCount(IMediaObject *iface, DWORD *input, DWORD *output) static HRESULT WINAPI media_object_GetStreamCount(IMediaObject *iface, DWORD *input, DWORD *output)
{ {
FIXME("iface %p, input %p, output %p stub!\n", iface, input, output); TRACE("iface %p, input %p, output %p.\n", iface, input, output);
return E_NOTIMPL;
if (!input || !output)
return E_POINTER;
*input = *output = 1;
return S_OK;
} }
static HRESULT WINAPI media_object_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags) static HRESULT WINAPI media_object_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)
......
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