evr: Store background color property for the mixer.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-06-29 15:43:39 +03:00 committed by Alexandre Julliard
parent 43eebcd3e6
commit 7a2dc025a3
2 changed files with 26 additions and 9 deletions

View File

@ -67,6 +67,8 @@ struct video_mixer
unsigned int input_count;
struct output_stream output;
COLORREF bkgnd_color;
IDirect3DDeviceManager9 *device_manager;
CRITICAL_SECTION cs;
@ -1187,16 +1189,31 @@ static HRESULT WINAPI video_mixer_processor_SetFilteringValue(IMFVideoProcessor
static HRESULT WINAPI video_mixer_processor_GetBackgroundColor(IMFVideoProcessor *iface, COLORREF *color)
{
FIXME("%p, %p.\n", iface, color);
struct video_mixer *mixer = impl_from_IMFVideoProcessor(iface);
return E_NOTIMPL;
TRACE("%p, %p.\n", iface, color);
if (!color)
return E_POINTER;
EnterCriticalSection(&mixer->cs);
*color = mixer->bkgnd_color;
LeaveCriticalSection(&mixer->cs);
return S_OK;
}
static HRESULT WINAPI video_mixer_processor_SetBackgroundColor(IMFVideoProcessor *iface, COLORREF color)
{
FIXME("%p, %#x.\n", iface, color);
struct video_mixer *mixer = impl_from_IMFVideoProcessor(iface);
return E_NOTIMPL;
TRACE("%p, %#x.\n", iface, color);
EnterCriticalSection(&mixer->cs);
mixer->bkgnd_color = color;
LeaveCriticalSection(&mixer->cs);
return S_OK;
}
static const IMFVideoProcessorVtbl video_mixer_processor_vtbl =

View File

@ -413,21 +413,21 @@ static void test_default_mixer(void)
hr = IMFGetService_GetService(gs, &MR_VIDEO_MIXER_SERVICE, &IID_IMFVideoProcessor, (void **)&processor);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFVideoProcessor_GetBackgroundColor(processor, NULL);
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
color = 1;
hr = IMFVideoProcessor_GetBackgroundColor(processor, &color);
todo_wine {
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(!color, "Unexpected color %#x.\n", color);
}
hr = IMFVideoProcessor_SetBackgroundColor(processor, 0x00121212);
todo_wine
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFVideoProcessor_GetBackgroundColor(processor, &color);
todo_wine {
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(color == 0x121212, "Unexpected color %#x.\n", color);
}
hr = IMFVideoProcessor_GetFilteringRange(processor, DXVA2_DetailFilterChromaLevel, &range);
todo_wine
ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#x.\n", hr);