Commit 7a2dc025 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

evr: Store background color property for the mixer.

parent 43eebcd3
......@@ -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 =
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment