Zebediah Figura : winegstreamer: Implement IWMReader::GetOutputFormat().
Alexandre Julliard
julliard at winehq.org
Fri Nov 5 17:15:52 CDT 2021
Module: wine
Branch: master
Commit: 00bc5eb73b95cbfe404fe18e1d0aadacc8ab4662
URL: https://source.winehq.org/git/wine.git/?a=commit;h=00bc5eb73b95cbfe404fe18e1d0aadacc8ab4662
Author: Zebediah Figura <zfigura at codeweavers.com>
Date: Thu Nov 4 15:46:24 2021 -0500
winegstreamer: Implement IWMReader::GetOutputFormat().
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winegstreamer/wm_asyncreader.c | 11 +++++++----
dlls/wmvcore/tests/wmvcore.c | 23 ++++++++++-------------
2 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c
index 6771b590a71..dd5b01b3e5c 100644
--- a/dlls/winegstreamer/wm_asyncreader.c
+++ b/dlls/winegstreamer/wm_asyncreader.c
@@ -137,11 +137,14 @@ static HRESULT WINAPI WMReader_GetOutputFormatCount(IWMReader *iface, DWORD outp
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);
- FIXME("(%p)->(%u %u %p)\n", This, output_num, format_num, props);
- return E_NOTIMPL;
+ struct async_reader *reader = impl_from_IWMReader(iface);
+
+ 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)
diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c
index 148b4f5f373..6fbc2ed6a3e 100644
--- a/dlls/wmvcore/tests/wmvcore.c
+++ b/dlls/wmvcore/tests/wmvcore.c
@@ -1419,21 +1419,18 @@ static void test_async_reader_types(void)
* with. In particular it has to be PCM. */
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);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ret_size = sizeof(mt2_buffer);
+ hr = IWMOutputMediaProps_GetMediaType(output_props, mt2, &ret_size);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
- ref = IWMOutputMediaProps_Release(output_props);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ref = IWMOutputMediaProps_Release(output_props);
+ ok(!ref, "Got outstanding refcount %d.\n", ref);
- /* The sample size might differ. */
- mt2->lSampleSize = mt->lSampleSize;
- ok(compare_media_types(mt, mt2), "Media types didn't match.\n");
- }
+ /* The sample size might differ. */
+ mt2->lSampleSize = mt->lSampleSize;
+ ok(compare_media_types(mt, mt2), "Media types didn't match.\n");
}
else
{
@@ -1553,7 +1550,7 @@ static void test_async_reader_types(void)
output_props = (void *)0xdeadbeef;
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);
IWMReaderAdvanced2_Release(advanced);
More information about the wine-cvs
mailing list