From 875ac6da5c3e59844f115e5006dfdd0d5ec77375 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Tue, 23 Mar 2010 17:34:30 -0300 Subject: [PATCH] tests: tagschecking: New tags tests Adds new tags checking tests. --- tests/check/pipelines/tagschecking.c | 44 ++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/tests/check/pipelines/tagschecking.c b/tests/check/pipelines/tagschecking.c index 9aa7ffa..35f4b35 100644 --- a/tests/check/pipelines/tagschecking.c +++ b/tests/check/pipelines/tagschecking.c @@ -253,24 +253,47 @@ test_tags (const gchar * tag_str, const gchar * caps, const gchar * muxer, "01401592ffe10017674d401592540a0fd8088000000300" \ "8000001e478b175001000468ee3c80, stream-format=(string)avc" +#define COMMON_TAGS \ + "taglist,title=test_title," \ + "artist=test_artist," \ + "keywords=\"key1,key2\"," \ + "description=test_desc" + GST_START_TEST (test_common_tags) { - test_tags ("taglist,title=(string)test_title", H264_CAPS, "qtmux", "qtdemux"); + test_tags (COMMON_TAGS, H264_CAPS, "qtmux", "qtdemux"); + test_tags (COMMON_TAGS, H264_CAPS, "mp4mux", "qtdemux"); + test_tags (COMMON_TAGS, H264_CAPS, "gppmux", "qtdemux"); } GST_END_TEST; +#define GEO_LOCATION_TAGS \ + "taglist,geo-location-country=Brazil," \ + "geo-location-city=\"Campina Grande\"," \ + "geo-location-sublocation=Bodocongo," \ + "geo-location-latitude=-12.125," \ + "geo-location-longitude=56.75," \ + "geo-location-elevation=327.5" + GST_START_TEST (test_geo_location_tags) { - test_tags ("taglist,geo-location-country=Brazil," - "geo-location-city=\"Campina Grande\"," - "geo-location-sublocation=Bodocongo", H264_CAPS, "qtmux", "qtdemux"); - test_tags ("taglist,geo-location-country=Brazil," - "geo-location-city=\"Campina Grande\"," - "geo-location-sublocation=Bodocongo", H264_CAPS, "mp4mux", "qtdemux"); - test_tags ("taglist,geo-location-country=Brazil," - "geo-location-city=\"Campina Grande\"," - "geo-location-sublocation=Bodocongo", H264_CAPS, "gppmux", "qtdemux"); + test_tags (GEO_LOCATION_TAGS, H264_CAPS, "qtmux", "qtdemux"); + test_tags (GEO_LOCATION_TAGS, H264_CAPS, "mp4mux", "qtdemux"); + test_tags (GEO_LOCATION_TAGS, H264_CAPS, "gppmux", "qtdemux"); +} + +GST_END_TEST; + + +#define USER_TAGS \ + "taglist,user-rating=(uint)85" + +GST_START_TEST (test_user_tags) +{ + test_tags (USER_TAGS, H264_CAPS, "qtmux", "qtdemux"); + test_tags (USER_TAGS, H264_CAPS, "mp4mux", "qtdemux"); + test_tags (USER_TAGS, H264_CAPS, "gppmux", "qtdemux"); } GST_END_TEST; @@ -288,6 +311,7 @@ metadata_suite (void) suite_add_tcase (s, tc_chain); tcase_add_test (tc_chain, test_common_tags); tcase_add_test (tc_chain, test_geo_location_tags); + tcase_add_test (tc_chain, test_user_tags); return s; } -- 2.7.4