diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2015-08-01 15:51:50 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2015-08-01 16:11:07 -0300 |
commit | 9d431e605f80835adf41f1865ba4215b4f153e9e (patch) | |
tree | 08d90abd2c69eab009e9f59eb5292cafc91d86cb /tests | |
parent | 9c291904f58d9cf5f7a84a2adf2abef79fe04c12 (diff) | |
download | gstreamer-plugins-bad-9d431e605f80835adf41f1865ba4215b4f153e9e.tar.gz |
tests: dash_mpd: add check for segmenttemplate inheritance
Checks if the values are properly inherited and overwriten
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/elements/dash_mpd.c | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/check/elements/dash_mpd.c b/tests/check/elements/dash_mpd.c index 9e55eb349..b1f776243 100644 --- a/tests/check/elements/dash_mpd.c +++ b/tests/check/elements/dash_mpd.c @@ -1853,6 +1853,51 @@ GST_START_TEST (dash_mpdparser_period_adaptationSet_segmentTemplate) GST_END_TEST; + +/* + * Test parsing Period AdaptationSet SegmentTemplate attributes with + * inheritance + */ +GST_START_TEST (dash_mpdparser_period_adaptationSet_segmentTemplate_inherit) +{ + GstPeriodNode *periodNode; + GstAdaptationSetNode *adaptationSet; + GstSegmentTemplateNode *segmentTemplate; + const gchar *xml = + "<?xml version=\"1.0\"?>" + "<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\"" + " profiles=\"urn:mpeg:dash:profile:isoff-main:2011\">" + " <Period>" + " <SegmentTemplate media=\"ParentMedia\" " + " initialization=\"ParentInitialization\">" + " </SegmentTemplate>" + " <AdaptationSet>" + " <SegmentTemplate media=\"TestMedia\"" + " index=\"TestIndex\"" + " bitstreamSwitching=\"TestBitstreamSwitching\">" + " </SegmentTemplate></AdaptationSet></Period></MPD>"; + + gboolean ret; + GstMpdClient *mpdclient = gst_mpd_client_new (); + + ret = gst_mpd_parse (mpdclient, xml, (gint) strlen (xml)); + assert_equals_int (ret, TRUE); + + periodNode = (GstPeriodNode *) mpdclient->mpd_node->Periods->data; + adaptationSet = (GstAdaptationSetNode *) periodNode->AdaptationSets->data; + segmentTemplate = adaptationSet->SegmentTemplate; + assert_equals_string (segmentTemplate->media, "TestMedia"); + assert_equals_string (segmentTemplate->index, "TestIndex"); + assert_equals_string (segmentTemplate->initialization, + "ParentInitialization"); + assert_equals_string (segmentTemplate->bitstreamSwitching, + "TestBitstreamSwitching"); + + gst_mpd_client_free (mpdclient); +} + +GST_END_TEST; + /* * Test parsing Period AdaptationSet Representation attributes * @@ -4270,6 +4315,8 @@ dash_suite (void) tcase_add_test (tc_simpleMPD, dash_mpdparser_period_adaptationSet_segmentTemplate); tcase_add_test (tc_simpleMPD, + dash_mpdparser_period_adaptationSet_segmentTemplate_inherit); + tcase_add_test (tc_simpleMPD, dash_mpdparser_period_adaptationSet_representation); tcase_add_test (tc_simpleMPD, dash_mpdparser_period_adaptationSet_representation_representationBase); |