[PATCH 3/5] evr: Store background color property for the mixer.
Nikolay Sivov
nsivov at codeweavers.com
Mon Jun 29 07:43:39 CDT 2020
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/evr/mixer.c | 25 +++++++++++++++++++++----
dlls/evr/tests/evr.c | 10 +++++-----
2 files changed, 26 insertions(+), 9 deletions(-)
diff --git a/dlls/evr/mixer.c b/dlls/evr/mixer.c
index 6fcad15ec64..23994375d45 100644
--- a/dlls/evr/mixer.c
+++ b/dlls/evr/mixer.c
@@ -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 =
diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c
index 6259e636328..70fc6b18e2f 100644
--- a/dlls/evr/tests/evr.c
+++ b/dlls/evr/tests/evr.c
@@ -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);
--
2.27.0
More information about the wine-devel
mailing list