mp3dmod: Implement IMediaObject::GetStreamCount().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-02-21 19:34:54 -06:00 committed by Alexandre Julliard
parent c4ebd986b8
commit 06fa9bd3f7
2 changed files with 23 additions and 2 deletions

View File

@ -136,9 +136,11 @@ static ULONG WINAPI MediaObject_Release(IMediaObject *iface)
static HRESULT WINAPI MediaObject_GetStreamCount(IMediaObject *iface, DWORD *input, DWORD *output)
{
FIXME("(%p)->(%p, %p) stub!\n", iface, input, output);
TRACE("iface %p, input %p, output %p.\n", iface, input, output);
return E_NOTIMPL;
*input = *output = 1;
return S_OK;
}
static HRESULT WINAPI MediaObject_GetInputStreamInfo(IMediaObject *iface, DWORD index, DWORD *flags)

View File

@ -286,6 +286,24 @@ static void test_aggregation(void)
ok(hr == E_NOINTERFACE, "got %#x\n", hr);
}
static void test_stream_info(void)
{
DWORD input_count, output_count, flags;
IMediaObject *dmo;
HRESULT hr;
hr = CoCreateInstance(&CLSID_CMP3DecMediaObject, NULL, CLSCTX_INPROC_SERVER,
&IID_IMediaObject, (void **)&dmo);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IMediaObject_GetStreamCount(dmo, &input_count, &output_count);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(input_count == 1, "Got input count %u.\n", input_count);
ok(output_count == 1, "Got output count %u.\n", output_count);
IMediaObject_Release(dmo);
}
START_TEST(mp3dmod)
{
IMediaObject *dmo;
@ -304,6 +322,7 @@ START_TEST(mp3dmod)
test_convert();
test_aggregation();
test_stream_info();
CoUninitialize();
}