dashdemux: tests: added unit test for 6d1eda9391d3143b5fc633edfd94b89dbba209ab
authorFlorin Apostol <florin.apostol@oregan.net>
Wed, 16 Sep 2015 09:40:33 +0000 (10:40 +0100)
committerVincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Fri, 30 Oct 2015 12:57:54 +0000 (12:57 +0000)
Commit 6d1eda9391d3143b5fc633edfd94b89dbba209ab fixed the period start
time scaling. This patch updates the unit tests to cover that scenario.

https://bugzilla.gnome.org/show_bug.cgi?id=755105

tests/check/elements/dash_mpd.c

index 00799fa..d6b3ac0 100644 (file)
@@ -3572,7 +3572,7 @@ GST_START_TEST (dash_mpdparser_segments)
       "     profiles=\"urn:mpeg:dash:profile:isoff-main:2011\""
       "     availabilityStartTime=\"2015-03-24T0:0:0\""
       "     mediaPresentationDuration=\"P0Y0M0DT3H3M30S\">"
-      "  <Period id=\"Period0\">"
+      "  <Period id=\"Period0\" start=\"P0Y0M0DT0H0M10S\">"
       "    <AdaptationSet mimeType=\"video/mp4\">"
       "      <Representation>"
       "        <SegmentList duration=\"45\">"
@@ -3664,6 +3664,7 @@ GST_START_TEST (dash_mpdparser_segments)
   /* each segment has a duration of 0 hours, 0 min 45 seconds
    * segment index is 1.
    * End time is at the end of segment 1, so 2 * segment_duration = 2 * 45s
+   * We also add period start time (10s)
    */
   segmentEndTime =
       gst_mpd_client_get_next_segment_availability_end_time (mpdclient,
@@ -3673,7 +3674,7 @@ GST_START_TEST (dash_mpdparser_segments)
   assert_equals_int (gst_date_time_get_day (segmentEndTime), 24);
   assert_equals_int (gst_date_time_get_hour (segmentEndTime), 0);
   assert_equals_int (gst_date_time_get_minute (segmentEndTime), 1);
-  assert_equals_int (gst_date_time_get_second (segmentEndTime), 30);
+  assert_equals_int (gst_date_time_get_second (segmentEndTime), 40);
   gst_date_time_unref (segmentEndTime);
 
   /* seek to time */