[PATCH 5/5] winegstreamer: Implement IWMReader::GetOutputProps().
Zebediah Figura
zfigura at codeweavers.com
Tue Nov 2 19:12:59 CDT 2021
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
dlls/winegstreamer/wm_asyncreader.c | 10 +++++----
dlls/wmvcore/tests/wmvcore.c | 32 +++++++++++------------------
2 files changed, 18 insertions(+), 24 deletions(-)
diff --git a/dlls/winegstreamer/wm_asyncreader.c b/dlls/winegstreamer/wm_asyncreader.c
index 8caf21a2de0..6771b590a71 100644
--- a/dlls/winegstreamer/wm_asyncreader.c
+++ b/dlls/winegstreamer/wm_asyncreader.c
@@ -114,11 +114,13 @@ static HRESULT WINAPI WMReader_GetOutputCount(IWMReader *iface, DWORD *count)
return S_OK;
}
-static HRESULT WINAPI WMReader_GetOutputProps(IWMReader *iface, DWORD output_num, IWMOutputMediaProps **output)
+static HRESULT WINAPI WMReader_GetOutputProps(IWMReader *iface, DWORD output, IWMOutputMediaProps **props)
{
- struct async_reader *This = impl_from_IWMReader(iface);
- FIXME("(%p)->(%u %p)\n", This, output_num, output);
- return E_NOTIMPL;
+ struct async_reader *reader = impl_from_IWMReader(iface);
+
+ TRACE("reader %p, output %u, props %p.\n", reader, output, props);
+
+ return wm_reader_get_output_props(&reader->reader, output, props);
}
static HRESULT WINAPI WMReader_SetOutputProps(IWMReader *iface, DWORD output_num, IWMOutputMediaProps *output)
diff --git a/dlls/wmvcore/tests/wmvcore.c b/dlls/wmvcore/tests/wmvcore.c
index 786160ec756..4b36392e570 100644
--- a/dlls/wmvcore/tests/wmvcore.c
+++ b/dlls/wmvcore/tests/wmvcore.c
@@ -1387,12 +1387,7 @@ static void test_async_reader_types(void)
output_number = i;
hr = IWMReader_GetOutputProps(reader, output_number, &output_props);
- todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr);
- if (hr != S_OK)
- {
- winetest_pop_context();
- continue;
- }
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
ret_size = sizeof(mt_buffer);
hr = IWMOutputMediaProps_GetMediaType(output_props, mt, &ret_size);
@@ -1519,25 +1514,22 @@ static void test_async_reader_types(void)
todo_wine ok(hr == NS_E_INVALID_OUTPUT_FORMAT, "Got hr %#x.\n", hr);
hr = IWMReader_GetOutputProps(reader, output_number, &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)
- {
- hr = IWMReader_GetOutputProps(reader, output_number, &output_props2);
- ok(hr == S_OK, "Got hr %#x.\n", hr);
- ok(output_props2 != output_props, "Expected different objects.\n");
+ hr = IWMReader_GetOutputProps(reader, output_number, &output_props2);
+ ok(hr == S_OK, "Got hr %#x.\n", hr);
+ ok(output_props2 != output_props, "Expected different objects.\n");
- ref = IWMOutputMediaProps_Release(output_props2);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
- ref = IWMOutputMediaProps_Release(output_props);
- ok(!ref, "Got outstanding refcount %d.\n", ref);
- }
+ ref = IWMOutputMediaProps_Release(output_props2);
+ ok(!ref, "Got outstanding refcount %d.\n", ref);
+ ref = IWMOutputMediaProps_Release(output_props);
+ ok(!ref, "Got outstanding refcount %d.\n", ref);
winetest_pop_context();
}
- todo_wine ok(got_audio, "No audio stream was enumerated.\n");
- todo_wine ok(got_video, "No video stream was enumerated.\n");
+ ok(got_audio, "No audio stream was enumerated.\n");
+ ok(got_video, "No video stream was enumerated.\n");
count = 0xdeadbeef;
hr = IWMReader_GetOutputFormatCount(reader, 2, &count);
@@ -1546,7 +1538,7 @@ static void test_async_reader_types(void)
output_props = (void *)0xdeadbeef;
hr = IWMReader_GetOutputProps(reader, 2, &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);
output_props = (void *)0xdeadbeef;
--
2.33.0
More information about the wine-devel
mailing list