Commit b075af74 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard
parent 8550994b
......@@ -5624,6 +5624,17 @@ static void test_wma_decoder(void)
ATTR_UINT32(MF_MT_AUDIO_NUM_CHANNELS, 2),
{0},
};
static const struct attribute_desc output_type_desc[] =
{
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Audio),
ATTR_GUID(MF_MT_SUBTYPE, MFAudioFormat_Float),
ATTR_UINT32(MF_MT_AUDIO_AVG_BYTES_PER_SECOND, 176400),
ATTR_UINT32(MF_MT_AUDIO_BITS_PER_SAMPLE, 32),
ATTR_UINT32(MF_MT_AUDIO_NUM_CHANNELS, 2),
ATTR_UINT32(MF_MT_AUDIO_SAMPLES_PER_SECOND, 22050),
ATTR_UINT32(MF_MT_AUDIO_BLOCK_ALIGNMENT, 8),
{0},
};
MFT_REGISTER_TYPE_INFO input_type = {MFMediaType_Audio, MFAudioFormat_WMAudioV8};
MFT_REGISTER_TYPE_INFO output_type = {MFMediaType_Audio, MFAudioFormat_Float};
......@@ -5644,6 +5655,17 @@ static void test_wma_decoder(void)
todo_wine
check_interface(transform, &IID_IMediaObject, TRUE);
/* setting output media type first doesn't work */
hr = MFCreateMediaType(&media_type);
ok(hr == S_OK, "MFCreateMediaType returned %#x\n", hr);
init_media_type(media_type, output_type_desc, -1);
hr = IMFTransform_SetOutputType(transform, 0, media_type, 0);
todo_wine
ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "SetOutputType returned %#x.\n", hr);
ret = IMFMediaType_Release(media_type);
ok(ret == 0, "Release returned %u\n", ret);
/* check required input media type attributes */
hr = MFCreateMediaType(&media_type);
......@@ -5669,6 +5691,31 @@ static void test_wma_decoder(void)
ret = IMFMediaType_Release(media_type);
ok(ret == 0, "Release returned %u\n", ret);
/* check required output media type attributes */
hr = MFCreateMediaType(&media_type);
ok(hr == S_OK, "MFCreateMediaType returned %#x\n", hr);
hr = IMFTransform_SetOutputType(transform, 0, media_type, 0);
todo_wine
ok(hr == MF_E_ATTRIBUTENOTFOUND, "SetOutputType returned %#x.\n", hr);
init_media_type(media_type, output_type_desc, 1);
hr = IMFTransform_SetOutputType(transform, 0, media_type, 0);
todo_wine
ok(hr == MF_E_ATTRIBUTENOTFOUND, "SetOutputType returned %#x.\n", hr);
init_media_type(media_type, output_type_desc, 2);
for (i = 2; i < ARRAY_SIZE(output_type_desc) - 1; ++i)
{
hr = IMFTransform_SetOutputType(transform, 0, media_type, 0);
todo_wine
ok(hr == MF_E_INVALIDMEDIATYPE, "SetOutputType returned %#x.\n", hr);
init_media_type(media_type, output_type_desc, i + 1);
}
hr = IMFTransform_SetOutputType(transform, 0, media_type, 0);
todo_wine
ok(hr == S_OK, "SetOutputType 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);
......
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