diff options
author | Florin Apostol <florin.apostol@oregan.net> | 2015-10-30 14:31:21 +0000 |
---|---|---|
committer | Vincent Penquerc'h <vincent.penquerch@collabora.co.uk> | 2015-10-30 14:31:21 +0000 |
commit | 013655d886db60c0d47b1e5efccd597e48fb84f0 (patch) | |
tree | c908c6db16dea3ca18e9623d5bcc62039f285abd /tests | |
parent | 77f4776acb919391e7b3e3c2c57ebe7817bfe535 (diff) | |
download | gstreamer-plugins-bad-013655d886db60c0d47b1e5efccd597e48fb84f0.tar.gz |
dashdemux: inherited segment URLs are ignored if they are defined again in a lower SegmentList
According to the standard:
"SegmentBase, SegmentTemplate and SegmentList shall inherit
attributes and elements from the same element on a higher level.
If the same attribute or element is present on both levels,
the one on the lower level shall take precedence over the one
on the higher level."
gst_mpdparser_parse_segment_list_node will now discard any inherited
segment URLs if the parsed element defines some too.
https://bugzilla.gnome.org/show_bug.cgi?id=751832
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/elements/dash_mpd.c | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/tests/check/elements/dash_mpd.c b/tests/check/elements/dash_mpd.c index 8200d77cf..6ea64bcb8 100644 --- a/tests/check/elements/dash_mpd.c +++ b/tests/check/elements/dash_mpd.c @@ -4163,36 +4163,11 @@ GST_START_TEST (dash_mpdparser_inherited_segmentURL) expectedDuration = duration_to_ms (0, 0, 0, 0, 0, 110, 0); expectedTimestamp = duration_to_ms (0, 0, 0, 0, 0, 0, 0); - /* the representation contains 2 segments - * - one inherited from AdaptationSet (duration 100) - * - the second defined in the Representation (duration 110) - * - * Both will have the duration specified in the Representation (110) - */ + /* the representation contains 1 segment (the one from Representation) */ /* check first segment */ ret = gst_mpd_client_get_next_fragment (mpdclient, 0, &fragment); assert_equals_int (ret, TRUE); - assert_equals_string (fragment.uri, "/TestMediaAdaptation"); - assert_equals_int64 (fragment.range_start, 10); - assert_equals_int64 (fragment.range_end, 20); - assert_equals_string (fragment.index_uri, "/TestIndexAdaptation"); - assert_equals_int64 (fragment.index_range_start, 30); - assert_equals_int64 (fragment.index_range_end, 40); - assert_equals_uint64 (fragment.duration, expectedDuration * GST_MSECOND); - assert_equals_uint64 (fragment.timestamp, expectedTimestamp * GST_MSECOND); - gst_media_fragment_info_clear (&fragment); - - /* advance to next segment */ - flow = gst_mpd_client_advance_segment (mpdclient, activeStream, TRUE); - assert_equals_int (flow, GST_FLOW_OK); - - /* second segment starts after first ends */ - expectedTimestamp = expectedTimestamp + expectedDuration; - - /* check second segment */ - ret = gst_mpd_client_get_next_fragment (mpdclient, 0, &fragment); - assert_equals_int (ret, TRUE); assert_equals_string (fragment.uri, "/TestMediaRep"); assert_equals_int64 (fragment.range_start, 100); assert_equals_int64 (fragment.range_end, 200); @@ -4203,6 +4178,10 @@ GST_START_TEST (dash_mpdparser_inherited_segmentURL) assert_equals_uint64 (fragment.timestamp, expectedTimestamp * GST_MSECOND); gst_media_fragment_info_clear (&fragment); + /* try to advance to next segment. Should fail */ + flow = gst_mpd_client_advance_segment (mpdclient, activeStream, TRUE); + assert_equals_int (flow, GST_FLOW_EOS); + gst_mpd_client_free (mpdclient); } |