Rémi Bernon : mf/tests: Add some H264 decoder GetOutputStreamInfo tests.

Alexandre Julliard julliard at winehq.org
Wed Feb 23 16:00:02 CST 2022


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

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Tue Feb 22 16:47:19 2022 +0100

mf/tests: Add some H264 decoder GetOutputStreamInfo 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 | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index a62b8837fd6..be8505eb2d3 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -6535,6 +6535,7 @@ static void test_h264_decoder(void)
 
     MFT_REGISTER_TYPE_INFO input_type = {MFMediaType_Video, MFVideoFormat_H264};
     MFT_REGISTER_TYPE_INFO output_type = {MFMediaType_Video, MFVideoFormat_NV12};
+    MFT_OUTPUT_STREAM_INFO output_info;
     MFT_INPUT_STREAM_INFO input_info;
     IMFMediaType *media_type;
     IMFTransform *transform;
@@ -6585,6 +6586,18 @@ static void test_h264_decoder(void)
     todo_wine
     ok(input_info.cbAlignment == 0, "got cbAlignment %#x\n", input_info.cbAlignment);
 
+    flags = MFT_OUTPUT_STREAM_WHOLE_SAMPLES | MFT_OUTPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_OUTPUT_STREAM_FIXED_SAMPLE_SIZE;
+    memset(&output_info, 0xcd, sizeof(output_info));
+    hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info);
+    todo_wine
+    ok(hr == S_OK, "GetOutputStreamInfo returned %#x\n", hr);
+    todo_wine
+    ok(output_info.dwFlags == flags, "got dwFlags %#x\n", output_info.dwFlags);
+    todo_wine
+    ok(output_info.cbSize == 0x3fc000, "got cbSize %#x\n", output_info.cbSize);
+    todo_wine
+    ok(output_info.cbAlignment == 0, "got cbAlignment %#x\n", output_info.cbAlignment);
+
     i = -1;
     while (SUCCEEDED(hr = IMFTransform_GetInputAvailableType(transform, 0, ++i, &media_type)))
     {
@@ -6619,6 +6632,19 @@ static void test_h264_decoder(void)
     todo_wine
     ok(ret == 1, "Release returned %u\n", ret);
 
+    flags = MFT_OUTPUT_STREAM_WHOLE_SAMPLES | MFT_OUTPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_OUTPUT_STREAM_FIXED_SAMPLE_SIZE;
+    memset(&output_info, 0xcd, sizeof(output_info));
+    hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info);
+    todo_wine
+    ok(hr == S_OK, "GetOutputStreamInfo returned %#x\n", hr);
+    todo_wine
+    ok(output_info.dwFlags == flags, "got dwFlags %#x\n", output_info.dwFlags);
+    todo_wine
+    ok(output_info.cbSize == 0x3f4800 || broken(output_info.cbSize == 0x3fc000) /* Win7 */,
+            "got cbSize %#x\n", output_info.cbSize);
+    todo_wine
+    ok(output_info.cbAlignment == 0, "got cbAlignment %#x\n", output_info.cbAlignment);
+
     /* output types can now be enumerated (though they are actually the same for all input types) */
 
     i = -1;
@@ -6687,6 +6713,19 @@ static void test_h264_decoder(void)
     todo_wine
     ok(input_info.cbAlignment == 0, "got cbAlignment %#x\n", input_info.cbAlignment);
 
+    flags = MFT_OUTPUT_STREAM_WHOLE_SAMPLES | MFT_OUTPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_OUTPUT_STREAM_FIXED_SAMPLE_SIZE;
+    memset(&output_info, 0xcd, sizeof(output_info));
+    hr = IMFTransform_GetOutputStreamInfo(transform, 0, &output_info);
+    todo_wine
+    ok(hr == S_OK, "GetOutputStreamInfo returned %#x\n", hr);
+    todo_wine
+    ok(output_info.dwFlags == flags, "got dwFlags %#x\n", output_info.dwFlags);
+    todo_wine
+    ok(output_info.cbSize == 0x3f4800 || broken(output_info.cbSize == 0x3fc000) /* Win7 */,
+            "got cbSize %#x\n", output_info.cbSize);
+    todo_wine
+    ok(output_info.cbAlignment == 0, "got cbAlignment %#x\n", output_info.cbAlignment);
+
     ret = IMFTransform_Release(transform);
     ok(ret == 0, "Release returned %u\n", ret);
 




More information about the wine-cvs mailing list