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

Nikolay Sivov nsivov at codeweavers.com
Wed Apr 6 07:44:49 CDT 2022



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?



More information about the wine-devel mailing list