mf/tests: Add some WMA decoder SetInputType tests.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51931 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52391 Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
32cfcd66a9
commit
8550994b27
|
@ -5614,12 +5614,24 @@ static void test_wma_decoder(void)
|
|||
},
|
||||
};
|
||||
|
||||
const struct attribute_desc input_type_desc[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Audio),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFAudioFormat_WMAudioV8),
|
||||
ATTR_BLOB(MF_MT_USER_DATA, wma_codec_data, sizeof(wma_codec_data)),
|
||||
ATTR_UINT32(MF_MT_AUDIO_BLOCK_ALIGNMENT, wma_block_size),
|
||||
ATTR_UINT32(MF_MT_AUDIO_SAMPLES_PER_SECOND, 22050),
|
||||
ATTR_UINT32(MF_MT_AUDIO_NUM_CHANNELS, 2),
|
||||
{0},
|
||||
};
|
||||
|
||||
MFT_REGISTER_TYPE_INFO input_type = {MFMediaType_Audio, MFAudioFormat_WMAudioV8};
|
||||
MFT_REGISTER_TYPE_INFO output_type = {MFMediaType_Audio, MFAudioFormat_Float};
|
||||
IMFMediaType *media_type;
|
||||
IMFTransform *transform;
|
||||
GUID class_id;
|
||||
ULONG i, ret;
|
||||
HRESULT hr;
|
||||
ULONG ret;
|
||||
|
||||
hr = CoInitialize(NULL);
|
||||
ok(hr == S_OK, "Failed to initialize, hr %#x.\n", hr);
|
||||
|
@ -5632,6 +5644,31 @@ static void test_wma_decoder(void)
|
|||
todo_wine
|
||||
check_interface(transform, &IID_IMediaObject, TRUE);
|
||||
|
||||
/* 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 == MF_E_ATTRIBUTENOTFOUND, "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_ATTRIBUTENOTFOUND, "SetInputType returned %#x.\n", hr);
|
||||
init_media_type(media_type, input_type_desc, 2);
|
||||
for (i = 2; i < ARRAY_SIZE(input_type_desc) - 1; ++i)
|
||||
{
|
||||
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, i + 1);
|
||||
}
|
||||
hr = IMFTransform_SetInputType(transform, 0, media_type, 0);
|
||||
todo_wine
|
||||
ok(hr == S_OK, "SetInputType returned %#x.\n", hr);
|
||||
ret = IMFMediaType_Release(media_type);
|
||||
ok(ret == 0, "Release returned %u\n", ret);
|
||||
|
||||
ret = IMFTransform_Release(transform);
|
||||
ok(ret == 0, "Release returned %u\n", ret);
|
||||
|
||||
|
|
Loading…
Reference in New Issue