quartz/vmr9: Fake success from IVMRMixerConrol9::SetMixingPrefs().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2020-05-27 14:26:22 -05:00 committed by Alexandre Julliard
parent 912d5437ea
commit dc93d5f856
2 changed files with 44 additions and 3 deletions

View File

@ -3876,6 +3876,38 @@ out:
DestroyWindow(window);
}
static void test_mixing_prefs(void)
{
IBaseFilter *filter = create_vmr9(VMR9Mode_Windowed);
IVMRMixerControl9 *mixer_control;
DWORD flags;
HRESULT hr;
ULONG ref;
set_mixing_mode(filter, 1);
hr = IBaseFilter_QueryInterface(filter, &IID_IVMRMixerControl9, (void **)&mixer_control);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IVMRMixerControl9_GetMixingPrefs(mixer_control, &flags);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(flags == (MixerPref9_NoDecimation | MixerPref9_ARAdjustXorY | MixerPref9_BiLinearFiltering
| MixerPref9_RenderTargetRGB), "Got flags %#x.\n", flags);
hr = IVMRMixerControl9_SetMixingPrefs(mixer_control, MixerPref9_NoDecimation
| MixerPref9_ARAdjustXorY | MixerPref9_PointFiltering | MixerPref9_RenderTargetRGB);
ok(hr == S_OK, "Got hr %#x.\n", hr);
hr = IVMRMixerControl9_GetMixingPrefs(mixer_control, &flags);
ok(hr == S_OK, "Got hr %#x.\n", hr);
ok(flags == (MixerPref9_NoDecimation | MixerPref9_ARAdjustXorY | MixerPref9_PointFiltering
| MixerPref9_RenderTargetRGB), "Got flags %#x.\n", flags);
IVMRMixerControl9_Release(mixer_control);
ref = IBaseFilter_Release(filter);
ok(!ref, "Got outstanding refcount %d.\n", ref);
}
START_TEST(vmr9)
{
IBaseFilter *filter;
@ -3910,6 +3942,7 @@ START_TEST(vmr9)
test_surface_allocator_notify_refcount();
test_basic_video();
test_windowless_size();
test_mixing_prefs();
CoUninitialize();
}

View File

@ -84,6 +84,7 @@ struct quartz_vmr
BOOL allocator_is_ex;
DWORD stream_count;
DWORD mixing_prefs;
/*
* The Video Mixing Renderer supports 3 modes, renderless, windowless and windowed
@ -2227,7 +2228,10 @@ static HRESULT WINAPI mixer_control9_SetMixingPrefs(IVMRMixerControl9 *iface, DW
FIXME("filter %p, flags %#x, stub!\n", filter, flags);
return E_NOTIMPL;
EnterCriticalSection(&filter->renderer.filter.csFilter);
filter->mixing_prefs = flags;
LeaveCriticalSection(&filter->renderer.filter.csFilter);
return S_OK;
}
static HRESULT WINAPI mixer_control9_GetMixingPrefs(IVMRMixerControl9 *iface, DWORD *flags)
@ -2236,8 +2240,9 @@ static HRESULT WINAPI mixer_control9_GetMixingPrefs(IVMRMixerControl9 *iface, DW
FIXME("filter %p, flags %p, stub!\n", filter, flags);
*flags = MixerPref9_NoDecimation | MixerPref9_ARAdjustXorY | MixerPref9_BiLinearFiltering | MixerPref9_RenderTargetRGB;
EnterCriticalSection(&filter->renderer.filter.csFilter);
*flags = filter->mixing_prefs;
LeaveCriticalSection(&filter->renderer.filter.csFilter);
return S_OK;
}
@ -2500,6 +2505,9 @@ static HRESULT vmr_create(IUnknown *outer, IUnknown **out, const CLSID *clsid)
object->run_event = CreateEventW(NULL, TRUE, FALSE, NULL);
object->mixing_prefs = MixerPref9_NoDecimation | MixerPref9_ARAdjustXorY
| MixerPref9_BiLinearFiltering | MixerPref9_RenderTargetRGB;
TRACE("Created VMR %p.\n", object);
*out = &object->renderer.filter.IUnknown_inner;
return S_OK;