Commit 148f996c authored by Paul Gofman's avatar Paul Gofman Committed by Alexandre Julliard

mfplay/tests: Add MF_SD_LANGUAGE and MF_SD_STREAM_NAME value tests.

parent 05c99cd6
TESTDLL = mfplay.dll
IMPORTS = mfplay user32 uuid mfuuid mfplat
IMPORTS = mfplay user32 uuid mfuuid mfplat ole32
C_SRCS = \
mfplay.c
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment