Rémi Bernon : mf/tests: Add some H264 decoder GetInputStreamInfo tests.
Alexandre Julliard
julliard at winehq.org
Wed Feb 23 16:00:02 CST 2022
Module: wine
Branch: master
Commit: 65cb088386bb90840ea2535c01079d83cc74eb65
URL: https://source.winehq.org/git/wine.git/?a=commit;h=65cb088386bb90840ea2535c01079d83cc74eb65
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Tue Feb 22 16:47:18 2022 +0100
mf/tests: Add some H264 decoder GetInputStreamInfo 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 | 35 ++++++++++++++++++++++++++++++++++-
1 file changed, 34 insertions(+), 1 deletion(-)
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c
index 07f4c28052d..a62b8837fd6 100644
--- a/dlls/mf/tests/mf.c
+++ b/dlls/mf/tests/mf.c
@@ -6535,10 +6535,11 @@ 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_INPUT_STREAM_INFO input_info;
IMFMediaType *media_type;
IMFTransform *transform;
+ ULONG flags, i, ret;
GUID class_id;
- ULONG i, ret;
HRESULT hr;
hr = CoInitialize(NULL);
@@ -6568,6 +6569,22 @@ static void test_h264_decoder(void)
/* check available input types */
+ flags = MFT_INPUT_STREAM_WHOLE_SAMPLES | MFT_INPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_INPUT_STREAM_FIXED_SAMPLE_SIZE;
+ memset(&input_info, 0xcd, sizeof(input_info));
+ hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info);
+ todo_wine
+ ok(hr == S_OK, "GetInputStreamInfo returned %#x\n", hr);
+ todo_wine
+ ok(input_info.hnsMaxLatency == 0, "got hnsMaxLatency %s\n", wine_dbgstr_longlong(input_info.hnsMaxLatency));
+ todo_wine
+ ok(input_info.dwFlags == flags, "got dwFlags %#x\n", input_info.dwFlags);
+ todo_wine
+ ok(input_info.cbSize == 0x1000, "got cbSize %u\n", input_info.cbSize);
+ todo_wine
+ ok(input_info.cbMaxLookahead == 0, "got cbMaxLookahead %#x\n", input_info.cbMaxLookahead);
+ todo_wine
+ ok(input_info.cbAlignment == 0, "got cbAlignment %#x\n", input_info.cbAlignment);
+
i = -1;
while (SUCCEEDED(hr = IMFTransform_GetInputAvailableType(transform, 0, ++i, &media_type)))
{
@@ -6654,6 +6671,22 @@ static void test_h264_decoder(void)
todo_wine
ok(ret == 1, "Release returned %u\n", ret);
+ flags = MFT_INPUT_STREAM_WHOLE_SAMPLES | MFT_INPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER | MFT_INPUT_STREAM_FIXED_SAMPLE_SIZE;
+ memset(&input_info, 0xcd, sizeof(input_info));
+ hr = IMFTransform_GetInputStreamInfo(transform, 0, &input_info);
+ todo_wine
+ ok(hr == S_OK, "GetInputStreamInfo returned %#x\n", hr);
+ todo_wine
+ ok(input_info.hnsMaxLatency == 0, "got hnsMaxLatency %s\n", wine_dbgstr_longlong(input_info.hnsMaxLatency));
+ todo_wine
+ ok(input_info.dwFlags == flags, "got dwFlags %#x\n", input_info.dwFlags);
+ todo_wine
+ ok(input_info.cbSize == 0x1000, "got cbSize %u\n", input_info.cbSize);
+ todo_wine
+ ok(input_info.cbMaxLookahead == 0, "got cbMaxLookahead %#x\n", input_info.cbMaxLookahead);
+ todo_wine
+ ok(input_info.cbAlignment == 0, "got cbAlignment %#x\n", input_info.cbAlignment);
+
ret = IMFTransform_Release(transform);
ok(ret == 0, "Release returned %u\n", ret);
More information about the wine-cvs
mailing list