From 66ad83bd55013845757645f87111cda61aa2ca97 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Bernon?= Date: Tue, 6 Sep 2022 08:06:58 +0200 Subject: [PATCH] mf/tests: Add some winetest context to MFT tests. --- dlls/mf/tests/transform.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/dlls/mf/tests/transform.c b/dlls/mf/tests/transform.c index 72e44635992..85c36756631 100644 --- a/dlls/mf/tests/transform.c +++ b/dlls/mf/tests/transform.c @@ -351,6 +351,8 @@ static void test_sample_copier(void) return; } + winetest_push_context("copier"); + hr = pMFCreateSampleCopierMFT(&copier); ok(hr == S_OK, "Failed to create sample copier, hr %#lx.\n", hr); @@ -602,6 +604,8 @@ static void test_sample_copier(void) ok(ref == 0, "Release returned %ld\n", ref); ref = IMFMediaType_Release(mediatype); ok(ref == 0, "Release returned %ld\n", ref); + + winetest_pop_context(); } struct sample_metadata @@ -958,6 +962,8 @@ static void test_wma_encoder(void) hr = CoInitialize(NULL); ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr); + winetest_push_context("wmaenc"); + if (!create_transform(MFT_CATEGORY_AUDIO_ENCODER, &input_type, &output_type, L"WMAudio Encoder MFT", &MFMediaType_Audio, transform_inputs, ARRAY_SIZE(transform_inputs), transform_outputs, ARRAY_SIZE(transform_outputs), &transform, &CLSID_CWMAEncMediaObject, &class_id)) @@ -1080,6 +1086,7 @@ static void test_wma_encoder(void) ok(ret == 0, "Release returned %lu\n", ret); failed: + winetest_pop_context(); CoUninitialize(); } @@ -1210,6 +1217,8 @@ static void test_wma_decoder(void) hr = CoInitialize(NULL); ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr); + winetest_push_context("wmadec"); + if (!create_transform(MFT_CATEGORY_AUDIO_DECODER, &input_type, &output_type, L"WMAudio Decoder MFT", &MFMediaType_Audio, transform_inputs, ARRAY_SIZE(transform_inputs), transform_outputs, ARRAY_SIZE(transform_outputs), &transform, &CLSID_CWMADecMediaObject, &class_id)) @@ -1592,6 +1601,7 @@ static void test_wma_decoder(void) ok( ref == 0, "Release returned %lu\n", ref ); failed: + winetest_pop_context(); CoUninitialize(); } @@ -1849,6 +1859,8 @@ static void test_h264_decoder(void) hr = CoInitialize(NULL); ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr); + winetest_push_context("h264dec"); + if (!create_transform(MFT_CATEGORY_VIDEO_DECODER, &input_type, &output_type, L"Microsoft H264 Video Decoder MFT", &MFMediaType_Video, transform_inputs, ARRAY_SIZE(transform_inputs), transform_outputs, ARRAY_SIZE(transform_outputs), &transform, &CLSID_MSH264DecoderMFT, &class_id)) @@ -2353,6 +2365,7 @@ static void test_h264_decoder(void) ok(ret == 0, "Release returned %lu\n", ret); failed: + winetest_pop_context(); CoUninitialize(); } @@ -2464,6 +2477,8 @@ static void test_audio_convert(void) hr = CoInitialize(NULL); ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr); + winetest_push_context("resampler"); + if (!create_transform(MFT_CATEGORY_AUDIO_EFFECT, &input_type, &output_type, L"Resampler MFT", &MFMediaType_Audio, transform_inputs, ARRAY_SIZE(transform_inputs), transform_outputs, ARRAY_SIZE(transform_outputs), &transform, &CLSID_CResamplerMediaObject, &class_id)) @@ -2742,6 +2757,7 @@ static void test_audio_convert(void) ok(ret == 0, "Release returned %lu\n", ret); failed: + winetest_pop_context(); CoUninitialize(); } @@ -2921,6 +2937,8 @@ static void test_color_convert(void) hr = CoInitialize(NULL); ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr); + winetest_push_context("colorconv"); + if (!create_transform(MFT_CATEGORY_VIDEO_EFFECT, &input_type, &output_type, L"Color Converter MFT", &MFMediaType_Video, transform_inputs, ARRAY_SIZE(transform_inputs), transform_outputs, ARRAY_SIZE(transform_outputs), &transform, &CLSID_CColorConvertDMO, &class_id)) @@ -3117,6 +3135,7 @@ static void test_color_convert(void) ok(ret == 0, "Release returned %ld\n", ret); failed: + winetest_pop_context(); CoUninitialize(); } @@ -3309,6 +3328,8 @@ static void test_video_processor(void) hr = CoInitialize(NULL); ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr); + winetest_push_context("videoproc"); + if (!create_transform(MFT_CATEGORY_VIDEO_PROCESSOR, &input_type, &output_type, L"Microsoft Video Processor MFT", &MFMediaType_Video, transform_inputs, ARRAY_SIZE(transform_inputs), transform_outputs, ARRAY_SIZE(transform_outputs), &transform, &CLSID_VideoProcessorMFT, &class_id)) @@ -3867,6 +3888,7 @@ skip_output: ok(ret == 0, "Release returned %ld\n", ret); failed: + winetest_pop_context(); CoUninitialize(); } @@ -4004,6 +4026,8 @@ static void test_mp3_decoder(void) hr = CoInitialize(NULL); ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr); + winetest_push_context("mp3dec"); + if (!create_transform(MFT_CATEGORY_AUDIO_DECODER, &input_type, &output_type, L"MP3 Decoder MFT", &MFMediaType_Audio, transform_inputs, ARRAY_SIZE(transform_inputs), transform_outputs, ARRAY_SIZE(transform_outputs), &transform, &CLSID_CMP3DecMediaObject, &class_id)) @@ -4302,6 +4326,7 @@ static void test_mp3_decoder(void) ok(ret == 0, "Release returned %lu\n", ret); failed: + winetest_pop_context(); CoUninitialize(); } -- 2.11.4.GIT