Rémi Bernon : mf/tests: Add some H264 decoder SetInputType tests.
Alexandre Julliard
julliard at winehq.org
Mon Feb 21 16:15:11 CST 2022
Module: wine
Branch: master
Commit: 1d11c63331070a7c2c47b3e17c071fc53c8a5fd8
URL: https://source.winehq.org/git/wine.git/?a=commit;h=1d11c63331070a7c2c47b3e17c071fc53c8a5fd8
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Thu Feb 17 11:38:47 2022 +0100
mf/tests: Add some H264 decoder SetInputType tests.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45988
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47084
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49715
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52183
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/mf/tests/mf.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index 5ec6e0dd5ea..527241b067e 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -6408,6 +6408,12 @@ static void test_h264_decoder(void)
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_YUY2),
},
};
+ static const struct attribute_desc input_type_desc[] =
+ {
+ ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
+ ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_H264),
+ {0},
+ };
MFT_REGISTER_TYPE_INFO input_type = {MFMediaType_Video, MFVideoFormat_H264};
MFT_REGISTER_TYPE_INFO output_type = {MFMediaType_Video, MFVideoFormat_NV12};
@@ -6442,6 +6448,25 @@ static void test_h264_decoder(void)
todo_wine
ok(i == 2 || broken(i == 1) /* Win7 */, "%u input media types\n", i);
+ /* check required input media type attributes */
+
+ hr = MFCreateMediaType(&media_type);
+ ok(hr == S_OK, "MFCreateMediaType returned %#x\n", hr);
+ hr = IMFTransform_SetInputType(transform, 0, media_type, 0);
+ todo_wine
+ ok(hr == E_INVALIDARG, "SetInputType returned %#x.\n", hr);
+ init_media_type(media_type, input_type_desc, 1);
+ hr = IMFTransform_SetInputType(transform, 0, media_type, 0);
+ todo_wine
+ ok(hr == MF_E_INVALIDMEDIATYPE, "SetInputType returned %#x.\n", hr);
+ init_media_type(media_type, input_type_desc, 2);
+ hr = IMFTransform_SetInputType(transform, 0, media_type, 0);
+ todo_wine
+ ok(hr == S_OK, "SetInputType returned %#x.\n", hr);
+ ret = IMFMediaType_Release(media_type);
+ todo_wine
+ ok(ret == 1, "Release returned %u\n", ret);
+
ret = IMFTransform_Release(transform);
ok(ret == 0, "Release returned %u\n", ret);
More information about the wine-cvs
mailing list