tests: Make sure to provide the KEY_UNIT flag always together with the SNAP flags...
authorSebastian Dröge <sebastian@centricular.com>
Mon, 18 Jun 2018 09:18:07 +0000 (12:18 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 18 Jun 2018 09:18:07 +0000 (12:18 +0300)
SNAP flags alone make no sense and nowadays cause warnings.

tests/check/elements/dash_demux.c
tests/check/elements/dash_mpd.c
tests/check/elements/hls_demux.c
tests/check/elements/mssdemux.c

index c822538..9cc0eed 100644 (file)
@@ -756,7 +756,8 @@ GST_START_TEST (testSeekSnapBeforePosition)
 {
   /* Seek to 1.5s, snap before, it go to 1s */
   run_seek_position_test (1.0, GST_SEEK_TYPE_SET, 1500 * GST_MSECOND,
-      GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_BEFORE,
+      GST_SEEK_TYPE_NONE, 0,
+      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE,
       1000 * GST_MSECOND, -1, 3, 0);
 }
 
@@ -767,7 +768,8 @@ GST_START_TEST (testSeekSnapAfterPosition)
 {
   /* Seek to 1.5s with snap after, it should move to 2s */
   run_seek_position_test (1.0, GST_SEEK_TYPE_SET, 1500 * GST_MSECOND,
-      GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_AFTER,
+      GST_SEEK_TYPE_NONE, 0,
+      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER,
       2000 * GST_MSECOND, -1, 2, 0);
 }
 
@@ -778,7 +780,8 @@ GST_START_TEST (testSeekSnapBeforeSamePosition)
 {
   /* Snap seek without position */
   run_seek_position_test (1.0, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE,
-      GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_BEFORE,
+      GST_SEEK_TYPE_NONE, 0,
+      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE,
       2 * GST_MSECOND, -1, 2, SEGMENT_SIZE * 3 + 1);
 }
 
@@ -789,7 +792,8 @@ GST_START_TEST (testSeekSnapAfterSamePosition)
 {
   /* Snap seek without position */
   run_seek_position_test (1.0, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE,
-      GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_AFTER,
+      GST_SEEK_TYPE_NONE, 0,
+      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER,
       3 * GST_MSECOND, -1, 1, SEGMENT_SIZE * 3 + 1);
 }
 
@@ -801,8 +805,8 @@ GST_START_TEST (testReverseSeekSnapBeforePosition)
 {
   run_seek_position_test (-1.0, GST_SEEK_TYPE_SET, 1000 * GST_MSECOND,
       GST_SEEK_TYPE_SET, 2500 * GST_MSECOND,
-      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_BEFORE, 1000 * GST_MSECOND,
-      3000 * GST_MSECOND, 2, 0);
+      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE,
+      1000 * GST_MSECOND, 3000 * GST_MSECOND, 2, 0);
 }
 
 GST_END_TEST;
@@ -812,8 +816,8 @@ GST_START_TEST (testReverseSeekSnapAfterPosition)
 {
   run_seek_position_test (-1.0, GST_SEEK_TYPE_SET, 1000 * GST_MSECOND,
       GST_SEEK_TYPE_SET, 2500 * GST_MSECOND,
-      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_AFTER, 1000 * GST_MSECOND,
-      2000 * GST_MSECOND, 1, 0);
+      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER,
+      1000 * GST_MSECOND, 2000 * GST_MSECOND, 1, 0);
 }
 
 GST_END_TEST;
index 06cc31f..d0cf1a4 100644 (file)
@@ -5812,7 +5812,8 @@ GST_START_TEST (dash_mpdparser_datetime_with_tz_offset)
   assert_equals_int (gst_date_time_get_minute (availabilityStartTime), 10);
   assert_equals_int (gst_date_time_get_second (availabilityStartTime), 50);
   assert_equals_int (gst_date_time_get_microsecond (availabilityStartTime), 0);
-  assert_equals_float (gst_date_time_get_time_zone_offset (availabilityStartTime), 8.0);
+  assert_equals_float (gst_date_time_get_time_zone_offset
+      (availabilityStartTime), 8.0);
 
   availabilityEndTime = mpdclient->mpd_node->availabilityEndTime;
   assert_equals_int (gst_date_time_get_year (availabilityEndTime), 2015);
@@ -5823,7 +5824,8 @@ GST_START_TEST (dash_mpdparser_datetime_with_tz_offset)
   assert_equals_int (gst_date_time_get_second (availabilityEndTime), 50);
   assert_equals_int (gst_date_time_get_microsecond (availabilityEndTime),
       123456);
-  assert_equals_float (gst_date_time_get_time_zone_offset (availabilityEndTime), -4.5);
+  assert_equals_float (gst_date_time_get_time_zone_offset (availabilityEndTime),
+      -4.5);
 
   gst_mpd_client_free (mpdclient);
 }
index 8f21af7..3a9e8e3 100644 (file)
@@ -493,7 +493,8 @@ GST_START_TEST (testSeekSnapBeforePosition)
 {
   /* Seek to 1.5s, snap before, it go to 1s */
   run_seek_position_test (1.0, GST_SEEK_TYPE_SET, 1500 * GST_MSECOND,
-      GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_BEFORE,
+      GST_SEEK_TYPE_NONE, 0,
+      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE,
       1000 * GST_MSECOND, -1, 3);
 }
 
@@ -504,7 +505,8 @@ GST_START_TEST (testSeekSnapAfterPosition)
 {
   /* Seek to 1.5s with snap after, it should move to 2s */
   run_seek_position_test (1.0, GST_SEEK_TYPE_SET, 1500 * GST_MSECOND,
-      GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_AFTER,
+      GST_SEEK_TYPE_NONE, 0,
+      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER,
       2000 * GST_MSECOND, -1, 2);
 }
 
@@ -515,8 +517,8 @@ GST_START_TEST (testReverseSeekSnapBeforePosition)
 {
   run_seek_position_test (-1.0, GST_SEEK_TYPE_SET, 1000 * GST_MSECOND,
       GST_SEEK_TYPE_SET, 2500 * GST_MSECOND,
-      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_BEFORE, 1000 * GST_MSECOND,
-      3000 * GST_MSECOND, 2);
+      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE,
+      1000 * GST_MSECOND, 3000 * GST_MSECOND, 2);
 }
 
 GST_END_TEST;
@@ -526,8 +528,8 @@ GST_START_TEST (testReverseSeekSnapAfterPosition)
 {
   run_seek_position_test (-1.0, GST_SEEK_TYPE_SET, 1000 * GST_MSECOND,
       GST_SEEK_TYPE_SET, 2500 * GST_MSECOND,
-      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_AFTER, 1000 * GST_MSECOND,
-      2000 * GST_MSECOND, 1);
+      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER,
+      1000 * GST_MSECOND, 2000 * GST_MSECOND, 1);
 }
 
 GST_END_TEST;
index cb8258b..ab1f23e 100644 (file)
@@ -313,7 +313,8 @@ GST_START_TEST (testSeekSnapBeforePosition)
 {
   /* Seek to 1.5s, snap before, it go to 1s */
   run_seek_position_test (1.0, GST_SEEK_TYPE_SET, 1500 * GST_MSECOND,
-      GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_BEFORE,
+      GST_SEEK_TYPE_NONE, 0,
+      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE,
       1000 * GST_MSECOND, -1, 3);
 }
 
@@ -324,7 +325,8 @@ GST_START_TEST (testSeekSnapAfterPosition)
 {
   /* Seek to 1.5s with snap after, it should move to 2s */
   run_seek_position_test (1.0, GST_SEEK_TYPE_SET, 1500 * GST_MSECOND,
-      GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_AFTER,
+      GST_SEEK_TYPE_NONE, 0,
+      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER,
       2000 * GST_MSECOND, -1, 2);
 }
 
@@ -335,8 +337,8 @@ GST_START_TEST (testReverseSeekSnapBeforePosition)
 {
   run_seek_position_test (-1.0, GST_SEEK_TYPE_SET, 1000 * GST_MSECOND,
       GST_SEEK_TYPE_SET, 2500 * GST_MSECOND,
-      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_BEFORE, 1000 * GST_MSECOND,
-      3000 * GST_MSECOND, 2);
+      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_BEFORE,
+      1000 * GST_MSECOND, 3000 * GST_MSECOND, 2);
 }
 
 GST_END_TEST;
@@ -346,8 +348,8 @@ GST_START_TEST (testReverseSeekSnapAfterPosition)
 {
   run_seek_position_test (-1.0, GST_SEEK_TYPE_SET, 1000 * GST_MSECOND,
       GST_SEEK_TYPE_SET, 2500 * GST_MSECOND,
-      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_SNAP_AFTER, 1000 * GST_MSECOND,
-      2000 * GST_MSECOND, 1);
+      GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_SNAP_AFTER,
+      1000 * GST_MSECOND, 2000 * GST_MSECOND, 1);
 }
 
 GST_END_TEST;