Nikolay Sivov : evr: Store background color property for the mixer.
Alexandre Julliard
julliard at winehq.org
Mon Jun 29 14:59:21 CDT 2020
Module: wine
Branch: master
Commit: 7a2dc025a3342821de2810ab6e6cfedff1408f55
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7a2dc025a3342821de2810ab6e6cfedff1408f55
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Mon Jun 29 15:43:39 2020 +0300
evr: Store background color property for the mixer.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 6fcad15ec6..23994375d4 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 6259e63632..70fc6b18e2 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);
More information about the wine-cvs
mailing list