[PATCH v2 2/6] mf/tests: Check expected class GUID in create_transform.

Rémi Bernon rbernon at codeweavers.com
Wed Apr 6 07:56:04 CDT 2022


On 4/6/22 14:44, Nikolay Sivov wrote:
> 
> 
> On 4/5/22 11:36, Rémi Bernon wrote:
>>   static IMFSample *create_sample(const BYTE *data, ULONG size)
>>   {
>>       IMFMediaBuffer *media_buffer;
>> @@ -5820,9 +5833,9 @@ static void test_wma_encoder(void)
>>       hr = CoInitialize(NULL);
>>       ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr);
>> -    if (!create_transform(MFT_CATEGORY_AUDIO_ENCODER, &input_type, 
>> &output_type, L"WMAudio Encoder MFT",
>> +    if (!enum_transform(MFT_CATEGORY_AUDIO_ENCODER, &input_type, 
>> &output_type, L"WMAudio Encoder MFT",
>>               transform_inputs, ARRAY_SIZE(transform_inputs), 
>> transform_outputs, ARRAY_SIZE(transform_outputs),
>> -            &transform, &class_id))
>> +            &transform, &CLSID_CWMAEncMediaObject, &class_id))
>>           goto failed;
>>       check_interface(transform, &IID_IMediaObject, TRUE);
>> @@ -6056,9 +6069,9 @@ static void test_wma_decoder(void)
>>       hr = CoInitialize(NULL);
>>       ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr);
>> -    if (!create_transform(MFT_CATEGORY_AUDIO_DECODER, &input_type, 
>> &output_type, L"WMAudio Decoder MFT",
>> +    if (!enum_transform(MFT_CATEGORY_AUDIO_DECODER, &input_type, 
>> &output_type, L"WMAudio Decoder MFT",
>>               transform_inputs, ARRAY_SIZE(transform_inputs), 
>> transform_outputs, ARRAY_SIZE(transform_outputs),
>> -            &transform, &class_id))
>> +            &transform, &CLSID_CWMADecMediaObject, &class_id))
>>           goto failed;
>>       check_interface(transform, &IID_IMediaObject, TRUE);
>> @@ -6642,9 +6655,9 @@ static void test_h264_decoder(void)
>>       hr = CoInitialize(NULL);
>>       ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr);
>> -    if (!create_transform(MFT_CATEGORY_VIDEO_DECODER, &input_type, 
>> &output_type, L"Microsoft H264 Video Decoder MFT",
>> +    if (!enum_transform(MFT_CATEGORY_VIDEO_DECODER, &input_type, 
>> &output_type, L"Microsoft H264 Video Decoder MFT",
>>               transform_inputs, ARRAY_SIZE(transform_inputs), 
>> transform_outputs, ARRAY_SIZE(transform_outputs),
>> -            &transform, &class_id))
>> +            &transform, &CLSID_MSH264DecoderMFT, &class_id))
>>           goto failed;
>>       hr = IMFTransform_GetAttributes(transform, &attributes);
> If the purpose is to check known transforms, do we need to MFTEnum for 
> that? It seems it should be enough to use GetInfo and that create by CLSID?
> 


I also couldn't find a way to find the transform category where it's 
registered to. Some transforms seem to exist and MFGetInfo works for 
their class, but they aren't enumerated (or I couldn't find the right 
category yet).

It's also how the tests were initially written and I didn't find it 
useful to change.


Not that this series has been superseded by the new series I just sent.

-- 
Rémi Bernon <rbernon at codeweavers.com>



More information about the wine-devel mailing list