tests: integration: Be more precise with namings

Fully define formats in the namings

+ Add an mp3 + h264 in mov test
This commit is contained in:
Thibault Saunier 2013-07-17 16:06:09 -04:00
parent 1d40731e9d
commit 066c9ea5b7

View file

@ -23,8 +23,8 @@
/* *INDENT-OFF* */ /* *INDENT-OFF* */
static const char * const profile_specs[][4] = { static const char * const profile_specs[][4] = {
{ "application/ogg", "audio/x-vorbis", "video/x-theora", "ogv" }, { "application/ogg", "audio/x-vorbis", "video/x-theora", "vorbis_theora.rendered.ogv" },
{ "video/webm", "audio/x-vorbis", "video/x-vp8", "webm"}, { "video/webm", "audio/x-vorbis", "video/x-vp8", "vorbis_vp8.rendered.webm"},
}; };
/* *INDENT-ON* */ /* *INDENT-ON* */
@ -282,11 +282,7 @@ check_timeline (GESTimeline * timeline)
ges_timeline_commit (timeline); ges_timeline_commit (timeline);
pipeline = ges_timeline_pipeline_new (); pipeline = ges_timeline_pipeline_new ();
if (current_profile != PROFILE_NONE) { if (current_profile != PROFILE_NONE) {
gchar *filename = g_strdup_printf ("render.%s", render_uri = ges_test_file_name (profile_specs[current_profile][3]);
profile_specs[current_profile][3]);
render_uri = ges_test_file_name (filename);
g_free (filename);
profile = create_audio_video_profile (current_profile); profile = create_audio_video_profile (current_profile);
ges_timeline_pipeline_set_render_settings (pipeline, render_uri, profile); ges_timeline_pipeline_set_render_settings (pipeline, render_uri, profile);
@ -580,26 +576,34 @@ test_image (void)
} }
#define CREATE_TEST(name, func, profile) \ #define CREATE_TEST(name, func, profile) \
GST_START_TEST (test_##name##_mov ) \ GST_START_TEST (test_##name##_raw_h264_mov) \
{ \ { \
testfilename1 = "test1.MOV"; \ testfilename1 = "raw_h264.0.mov"; \
testfilename2 = "test2.MOV"; \ testfilename2 = "raw_h264.1.mov"; \
current_profile = profile; \ current_profile = profile; \
func (); \ func (); \
} \ } \
GST_END_TEST; \ GST_END_TEST; \
GST_START_TEST (test_##name##_ogv ) \ GST_START_TEST (test_##name##_vorbis_theora_ogv) \
{ \ { \
testfilename1 = "test1.ogv"; \ testfilename1 = "vorbis_theora.0.ogg"; \
testfilename2 = "test2.ogv"; \ testfilename2 = "vorbis_theora.1.ogg"; \
current_profile = profile; \ current_profile = profile; \
func (); \ func (); \
} \ } \
GST_END_TEST; \ GST_END_TEST; \
GST_START_TEST (test_##name##_webm ) \ GST_START_TEST (test_##name##_vorbis_vp8_webm) \
{ \ { \
testfilename1 = "test1.webm"; \ testfilename1 = "vorbis_vp8.0.webm"; \
testfilename2 = "test2.webm"; \ testfilename2 = "vorbis_vp8.1.webm"; \
current_profile = profile; \
func (); \
} \
GST_END_TEST; \
GST_START_TEST (test_##name##_mp3_h264_mov) \
{ \
testfilename1 = "mp3_h264.0.mov"; \
testfilename2 = "mp3_h264.1.mov"; \
current_profile = profile; \ current_profile = profile; \
func (); \ func (); \
} \ } \
@ -609,8 +613,8 @@ GST_END_TEST;
CREATE_TEST( name##to, test_##name, profile) CREATE_TEST( name##to, test_##name, profile)
#define CREATE_RENDERING_TEST(name, func) \ #define CREATE_RENDERING_TEST(name, func) \
CREATE_TEST_FROM_NAMES(name, _render_to_ogg, PROFILE_OGG) \ CREATE_TEST_FROM_NAMES(name, _render_to_vorbis_theora_ogg, PROFILE_OGG) \
CREATE_TEST_FROM_NAMES(name, _render_to_webm, PROFILE_WEBM) CREATE_TEST_FROM_NAMES(name, _render_to_vorbis_vp8_webm, PROFILE_WEBM)
#define CREATE_PLAYBACK_TEST(name) \ #define CREATE_PLAYBACK_TEST(name) \
CREATE_TEST_FROM_NAMES(name, _playback, PROFILE_NONE) CREATE_TEST_FROM_NAMES(name, _playback, PROFILE_NONE)
@ -620,17 +624,20 @@ GST_END_TEST;
CREATE_RENDERING_TEST(name, func) CREATE_RENDERING_TEST(name, func)
#define ADD_PLAYBACK_TESTS(name) \ #define ADD_PLAYBACK_TESTS(name) \
tcase_add_test (tc_chain, test_##name##_playback_webm); \ tcase_add_test (tc_chain, test_##name##_playback_vorbis_vp8_webm); \
tcase_add_test (tc_chain, test_##name##_playback_ogv); \ tcase_add_test (tc_chain, test_##name##_playback_vorbis_theora_ogv); \
tcase_add_test (tc_chain, test_##name##_playback_mov); \ tcase_add_test (tc_chain, test_##name##_playback_raw_h264_mov); \
tcase_add_test (tc_chain, test_##name##_playback_mp3_h264_mov);
#define ADD_RENDERING_TESTS(name) \ #define ADD_RENDERING_TESTS(name) \
tcase_add_test (tc_chain, test_##name##_render_to_ogg_mov); \ tcase_add_test (tc_chain, test_##name##_render_to_vorbis_theora_ogg_raw_h264_mov); \
tcase_add_test (tc_chain, test_##name##_render_to_ogg_webm); \ tcase_add_test (tc_chain, test_##name##_render_to_vorbis_theora_ogg_mp3_h264_mov); \
tcase_add_test (tc_chain, test_##name##_render_to_ogg_ogv); \ tcase_add_test (tc_chain, test_##name##_render_to_vorbis_theora_ogg_vorbis_vp8_webm); \
tcase_add_test (tc_chain, test_##name##_render_to_webm_webm); \ tcase_add_test (tc_chain, test_##name##_render_to_vorbis_theora_ogg_vorbis_theora_ogv); \
tcase_add_test (tc_chain, test_##name##_render_to_webm_mov); \ tcase_add_test (tc_chain, test_##name##_render_to_vorbis_vp8_webm_vorbis_vp8_webm); \
tcase_add_test (tc_chain, test_##name##_render_to_webm_ogv); tcase_add_test (tc_chain, test_##name##_render_to_vorbis_vp8_webm_raw_h264_mov); \
tcase_add_test (tc_chain, test_##name##_render_to_vorbis_vp8_webm_mp3_h264_mov); \
tcase_add_test (tc_chain, test_##name##_render_to_vorbis_vp8_webm_vorbis_theora_ogv);
#define ADD_TESTS(name) \ #define ADD_TESTS(name) \
ADD_PLAYBACK_TESTS(name) \ ADD_PLAYBACK_TESTS(name) \
@ -676,22 +683,28 @@ ges_suite (void)
static gboolean static gboolean
generate_all_files (void) generate_all_files (void)
{ {
if (!ges_generate_test_file_audio_video ("test1.webm", "vorbisenc", "vp8enc", if (!ges_generate_test_file_audio_video ("vorbis_vp8.0.webm", "vorbisenc",
"webmmux", "18", "11")) "vp8enc", "webmmux", "18", "11"))
return FALSE; return FALSE;
if (!ges_generate_test_file_audio_video ("test2.webm", "vorbisenc", "vp8enc", if (!ges_generate_test_file_audio_video ("vorbis_vp8.1.webm", "vorbisenc",
"webmmux", "0", "0")) "vp8enc", "webmmux", "0", "0"))
return FALSE; return FALSE;
if (!ges_generate_test_file_audio_video ("test1.ogv", "vorbisenc", if (!ges_generate_test_file_audio_video ("vorbis_theora.0.ogg", "vorbisenc",
"theoraenc", "oggmux", "18", "11")) "theoraenc", "oggmux", "18", "11"))
return FALSE; return FALSE;
if (!ges_generate_test_file_audio_video ("test2.ogv", "vorbisenc", if (!ges_generate_test_file_audio_video ("vorbis_theora.1.ogg", "vorbisenc",
"theoraenc", "oggmux", "0", "0")) "theoraenc", "oggmux", "0", "0"))
return FALSE; return FALSE;
if (!ges_generate_test_file_audio_video ("test1.MOV", NULL, if (!ges_generate_test_file_audio_video ("raw_h264.0.mov", NULL,
"x264enc", "qtmux", "18", "11")) "x264enc", "qtmux", "18", "11"))
return FALSE; return FALSE;
if (!ges_generate_test_file_audio_video ("test2.MOV", NULL, if (!ges_generate_test_file_audio_video ("raw_h264.1.mov", NULL,
"x264enc", "qtmux", "0", "0"))
return FALSE;
if (!ges_generate_test_file_audio_video ("mp3_h264.0.mov", "lamemp3enc",
"x264enc", "qtmux", "18", "11"))
return FALSE;
if (!ges_generate_test_file_audio_video ("mp3_h264.1.mov", "lamemp3enc",
"x264enc", "qtmux", "0", "0")) "x264enc", "qtmux", "0", "0"))
return FALSE; return FALSE;