summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFlorin Apostol <florin.apostol@oregan.net>2015-06-29 22:18:38 +0100
committerThiago Santos <thiagoss@osg.samsung.com>2015-06-29 19:28:56 -0300
commite2d112639145b8a1e2a9611667d106b13d270f7e (patch)
tree20c7a90e27af52c370ede9e0a95c761b2ac44209 /tests
parentd5a676aec8cd95f76888ae253b0a9976816a41b6 (diff)
downloadgstreamer-plugins-bad-e2d112639145b8a1e2a9611667d106b13d270f7e.tar.gz
dashdemux: corrected recognition of $$$ in segment templates
fixed recognition of $$ after a $ that ends an identifier, eg $Time$$$ https://bugzilla.gnome.org/show_bug.cgi?id=751682
Diffstat (limited to 'tests')
-rw-r--r--tests/check/elements/dash_mpd.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/check/elements/dash_mpd.c b/tests/check/elements/dash_mpd.c
index 696c46cad..373802f99 100644
--- a/tests/check/elements/dash_mpd.c
+++ b/tests/check/elements/dash_mpd.c
@@ -2126,6 +2126,30 @@ GST_START_TEST (dash_mpdparser_type_dynamic)
GST_END_TEST;
/*
+ * Validate gst_mpdparser_build_URL_from_template function
+ *
+ */
+GST_START_TEST (dash_mpdparser_template_parsing)
+{
+ const gchar *url_template;
+ const gchar *id = "TestId";
+ guint number = 7;
+ guint bandwidth = 2500;
+ guint64 time = 100;
+ gchar *result;
+
+ url_template = "TestMedia$Bandwidth$$$test";
+ result =
+ gst_mpdparser_build_URL_from_template (url_template, id, number,
+ bandwidth, time);
+ assert_equals_string (result, "TestMedia2500$test");
+ g_free (result);
+
+}
+
+GST_END_TEST;
+
+/*
* Test handling Representation selection
*
*/
@@ -2468,6 +2492,7 @@ dash_suite (void)
/* tests checking other possible values for attributes */
tcase_add_test (tc_simpleMPD, dash_mpdparser_type_dynamic);
+ tcase_add_test (tc_simpleMPD, dash_mpdparser_template_parsing);
tcase_add_test (tc_complexMPD, dash_mpdparser_representation_selection);
/* tests checking the parsing of missing/incomplete attributes of xml */