Nikolay Sivov : mf/tests: Add a test for EVRConfig_ handling for already initialized presenter.

Alexandre Julliard julliard at winehq.org
Fri Oct 16 15:55:39 CDT 2020


Module: wine
Branch: master
Commit: bfeae85fdd210ebecd69923ad172fb490c784f21
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=bfeae85fdd210ebecd69923ad172fb490c784f21

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Oct 16 16:38:08 2020 +0300

mf/tests: Add a test for EVRConfig_ handling for already initialized presenter.

Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mf/tests/mf.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index 465bd7e3c43..7dc325424a6 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -39,6 +39,7 @@ DEFINE_GUID(MFVideoFormat_ABGR32, 0x00000020, 0x0000, 0x0010, 0x80, 0x00, 0x00,
 #include "mferror.h"
 #include "mfidl.h"
 #include "initguid.h"
+#include "uuids.h"
 #include "mmdeviceapi.h"
 #include "audioclient.h"
 #include "evr.h"
@@ -3237,6 +3238,7 @@ static void test_evr(void)
 {
     IMFVideoSampleAllocatorCallback *allocator_callback;
     IMFStreamSink *stream_sink, *stream_sink2;
+    IMFVideoDisplayControl *display_control;
     IMFMediaType *media_type, *media_type2;
     IMFMediaEventGenerator *ev_generator;
     IMFVideoSampleAllocator *allocator;
@@ -3292,6 +3294,15 @@ static void test_evr(void)
     hr = IMFAttributes_GetCount(attributes, &count);
     ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
     ok(!!count, "Unexpected count %u.\n", count);
+    /* Rendering preferences are not immediately propagated to the presenter. */
+    hr = IMFAttributes_SetUINT32(attributes, &EVRConfig_ForceBob, 1);
+    ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+    hr = MFGetService((IUnknown *)sink, &MR_VIDEO_RENDER_SERVICE, &IID_IMFVideoDisplayControl, (void **)&display_control);
+    ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+    hr = IMFVideoDisplayControl_GetRenderingPrefs(display_control, &flags);
+    ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+    ok(!flags, "Unexpected flags %#x.\n", flags);
+    IMFVideoDisplayControl_Release(display_control);
     IMFAttributes_Release(attributes);
 
     /* Primary stream type handler. */




More information about the wine-cvs mailing list