summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorin Apostol <florin.apostol@oregan.net>2015-09-07 16:20:42 +0100
committerSebastian Dröge <sebastian@centricular.com>2015-10-02 17:09:50 +0300
commitebf2a0092673cb224a202fb3cfd36bfdf1950867 (patch)
treea71612c3773f2603842f011eeb38e3a93801b968
parent1bd5194c6cab9652bbd8b0358308e135aa8ed081 (diff)
downloadgstreamer-plugins-bad-ebf2a0092673cb224a202fb3cfd36bfdf1950867.tar.gz
dashdemux: test: added unit test for presentation time offset
https://bugzilla.gnome.org/show_bug.cgi?id=752409
-rw-r--r--tests/check/elements/dash_mpd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/check/elements/dash_mpd.c b/tests/check/elements/dash_mpd.c
index 7b67bbc76..23822ce6b 100644
--- a/tests/check/elements/dash_mpd.c
+++ b/tests/check/elements/dash_mpd.c
@@ -4082,6 +4082,7 @@ GST_START_TEST (dash_mpdparser_segment_template)
GstClockTime expectedDuration;
GstClockTime expectedTimestamp;
GstClockTime periodStartTime;
+ GstClockTime offset;
const gchar *xml =
"<?xml version=\"1.0\"?>"
"<MPD xmlns=\"urn:mpeg:dash:schema:mpd:2011\""
@@ -4092,6 +4093,7 @@ GST_START_TEST (dash_mpdparser_segment_template)
" <AdaptationSet mimeType=\"video/mp4\">"
" <Representation id=\"repId\" bandwidth=\"250000\">"
" <SegmentTemplate duration=\"12000\""
+ " presentationTimeOffset=\"15\""
" media=\"TestMedia_rep=$RepresentationID$number=$Number$bandwidth=$Bandwidth$time=$Time$\""
" index=\"TestIndex\">"
" </SegmentTemplate>"
@@ -4151,6 +4153,9 @@ GST_START_TEST (dash_mpdparser_segment_template)
periodStartTime = gst_mpd_parser_get_period_start_time (mpdclient);
assert_equals_uint64 (periodStartTime, 10 * GST_SECOND);
+ offset = gst_mpd_parser_get_stream_presentation_offset (mpdclient, 0);
+ assert_equals_uint64 (offset, 15 * GST_SECOND);
+
gst_media_fragment_info_clear (&fragment);
gst_mpd_client_free (mpdclient);