1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

mfplay/tests: Add MF_SD_LANGUAGE and MF_SD_STREAM_NAME value tests.

This commit is contained in:
Paul Gofman 2022-11-24 17:48:27 -06:00 committed by Alexandre Julliard
parent 05c99cd6da
commit 148f996c2f
3 changed files with 14 additions and 2 deletions

View File

@ -1,5 +1,5 @@
TESTDLL = mfplay.dll
IMPORTS = mfplay user32 uuid mfuuid mfplat
IMPORTS = mfplay user32 uuid mfuuid mfplat ole32
C_SRCS = \
mfplay.c

View File

@ -356,7 +356,19 @@ static void test_media_item(void)
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFPMediaItem_GetStreamAttribute(item, 0, &MF_SD_LANGUAGE, &propvar);
ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(propvar.vt == VT_LPWSTR, "Unexpected vt %u.\n", propvar.vt);
ok(!wcscmp(propvar.pwszVal, L"en"), "Unexpected value %s.\n", debugstr_w(propvar.pwszVal));
PropVariantClear(&propvar);
hr = IMFPMediaItem_GetStreamAttribute(item, 0, &MF_SD_STREAM_NAME, &propvar);
ok(hr == S_OK || broken(hr == MF_E_ATTRIBUTENOTFOUND) /* Before Win10 1607. */, "Unexpected hr %#lx.\n", hr);
if (hr == S_OK)
{
ok(propvar.vt == VT_LPWSTR, "Unexpected vt %u.\n", propvar.vt);
ok(!wcscmp(propvar.pwszVal, L"test"), "Unexpected value %s.\n", debugstr_w(propvar.pwszVal));
PropVariantClear(&propvar);
}
hr = IMFPMediaItem_GetPresentationAttribute(item, &MF_PD_DURATION, &propvar);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);

Binary file not shown.