From edf1e7696f36b650cddb76275d3a460c271a93ce Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Mon, 1 Apr 2019 21:38:25 -0500 Subject: [PATCH] quartz/vmr9: Implement IVMRFilterConfig::SetRenderingMode(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42372 Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/quartz/tests/vmr7.c | 20 ++++++++++---------- dlls/quartz/vmr9.c | 7 ++++--- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index b420991b47a..105e6b23c7d 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -40,14 +40,14 @@ static void test_filter_config(void) ok(mode == VMRMode_Windowed, "Got mode %#x.\n", mode); hr = IVMRFilterConfig_SetRenderingMode(config, VMRMode_Windowed); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IVMRFilterConfig_GetRenderingMode(config, &mode); ok(hr == S_OK, "Got hr %#x.\n", hr); ok(mode == VMRMode_Windowed, "Got mode %#x.\n", mode); hr = IVMRFilterConfig_SetRenderingMode(config, VMRMode_Windowed); - todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); ref = IVMRFilterConfig_Release(config); ok(!ref, "Got outstanding refcount %d.\n", ref); @@ -57,14 +57,14 @@ static void test_filter_config(void) ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IVMRFilterConfig_SetRenderingMode(config, VMRMode_Windowless); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IVMRFilterConfig_GetRenderingMode(config, &mode); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(mode == VMRMode_Windowless, "Got mode %#x.\n", mode); + ok(mode == VMRMode_Windowless, "Got mode %#x.\n", mode); hr = IVMRFilterConfig_SetRenderingMode(config, VMRMode_Windowed); - todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); ref = IVMRFilterConfig_Release(config); ok(!ref, "Got outstanding refcount %d.\n", ref); @@ -74,14 +74,14 @@ static void test_filter_config(void) ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IVMRFilterConfig_SetRenderingMode(config, VMRMode_Renderless); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IVMRFilterConfig_GetRenderingMode(config, &mode); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(mode == VMRMode_Renderless, "Got mode %#x.\n", mode); + ok(mode == VMRMode_Renderless, "Got mode %#x.\n", mode); hr = IVMRFilterConfig_SetRenderingMode(config, VMRMode_Windowless); - todo_wine ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); + ok(hr == VFW_E_WRONG_STATE, "Got hr %#x.\n", hr); ref = IVMRFilterConfig_Release(config); ok(!ref, "Got outstanding refcount %d.\n", ref); @@ -111,11 +111,11 @@ static void test_filter_config(void) /* Despite MSDN, you can still change the rendering mode after setting the * stream count. */ hr = IVMRFilterConfig_SetRenderingMode(config, VMRMode_Windowless); - todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IVMRFilterConfig_GetRenderingMode(config, &mode); ok(hr == S_OK, "Got hr %#x.\n", hr); - todo_wine ok(mode == VMRMode_Windowless, "Got mode %#x.\n", mode); + ok(mode == VMRMode_Windowless, "Got mode %#x.\n", mode); hr = IVMRFilterConfig_GetNumberOfStreams(config, &count); todo_wine { diff --git a/dlls/quartz/vmr9.c b/dlls/quartz/vmr9.c index 885fbe2245e..2a39d11d575 100644 --- a/dlls/quartz/vmr9.c +++ b/dlls/quartz/vmr9.c @@ -1246,10 +1246,11 @@ static HRESULT WINAPI VMR7FilterConfig_GetRenderingPrefs(IVMRFilterConfig *iface static HRESULT WINAPI VMR7FilterConfig_SetRenderingMode(IVMRFilterConfig *iface, DWORD mode) { - struct quartz_vmr *This = impl_from_IVMRFilterConfig(iface); + struct quartz_vmr *filter = impl_from_IVMRFilterConfig(iface); - FIXME("(%p/%p)->(%u) stub\n", iface, This, mode); - return E_NOTIMPL; + TRACE("iface %p, mode %#x.\n", iface, mode); + + return IVMRFilterConfig9_SetRenderingMode(&filter->IVMRFilterConfig9_iface, mode); } static HRESULT WINAPI VMR7FilterConfig_GetRenderingMode(IVMRFilterConfig *iface, DWORD *mode)