winegstreamer: Implement IWMReader::GetOutputFormat().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-11-04 15:46:24 -05:00 committed by Alexandre Julliard
parent beb7966d47
commit 00bc5eb73b
2 changed files with 17 additions and 17 deletions

View File

@ -137,11 +137,14 @@ static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD outp
return E_NOTIMPL; return E_NOTIMPL;
} }
static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output_num, DWORD format_num, IWMOutputMediaProps **props) static HRESULT WINAPI WMReader_GetOutputFormat(IWMReader *iface, DWORD output,
DWORD index, IWMOutputMediaProps **props)
{ {
struct async_reader *This = impl_from_IWMReader(iface); struct async_reader *reader = impl_from_IWMReader(iface);
FIXME("(%p)->(%u %u %p)\n", This, output_num, format_num, props);
return E_NOTIMPL; TRACE("reader %p, output %u, index %u, props %p.\n", reader, output, index, props);
return wm_reader_get_output_format(&reader->reader, output, index, props);
} }
static HRESULT WINAPI WMReader_Start(IWMReader *iface, QWORD start, QWORD duration, float rate, void *context) static HRESULT WINAPI WMReader_Start(IWMReader *iface, QWORD start, QWORD duration, float rate, void *context)

View File

@ -1419,21 +1419,18 @@ static void test_async_reader_types(void)
* with. In particular it has to be PCM. */ * with. In particular it has to be PCM. */
hr = IWMReader_GetOutputFormat(reader, output_number, 0, &output_props); hr = IWMReader_GetOutputFormat(reader, output_number, 0, &output_props);
todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); ok(hr == S_OK, "Got hr %#x.\n", hr);
if (hr == S_OK) ret_size = sizeof(mt2_buffer);
{ hr = IWMOutputMediaProps_GetMediaType(output_props, mt2, &ret_size);
ret_size = sizeof(mt2_buffer); ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IWMOutputMediaProps_GetMediaType(output_props, mt2, &ret_size);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ref = IWMOutputMediaProps_Release(output_props); ref = IWMOutputMediaProps_Release(output_props);
ok(!ref, "Got outstanding refcount %d.\n", ref); ok(!ref, "Got outstanding refcount %d.\n", ref);
/* The sample size might differ. */ /* The sample size might differ. */
mt2->lSampleSize = mt->lSampleSize; mt2->lSampleSize = mt->lSampleSize;
ok(compare_media_types(mt, mt2), "Media types didn't match.\n"); ok(compare_media_types(mt, mt2), "Media types didn't match.\n");
}
} }
else else
{ {
@ -1553,7 +1550,7 @@ static void test_async_reader_types(void)
output_props = (void *)0xdeadbeef; output_props = (void *)0xdeadbeef;
hr = IWMReader_GetOutputFormat(reader, 2, 0, &output_props); hr = IWMReader_GetOutputFormat(reader, 2, 0, &output_props);
todo_wine ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr);
ok(output_props == (void *)0xdeadbeef, "Got output props %p.\n", output_props); ok(output_props == (void *)0xdeadbeef, "Got output props %p.\n", output_props);
IWMReaderAdvanced2_Release(advanced); IWMReaderAdvanced2_Release(advanced);