diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2018-06-18 12:18:07 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2018-06-18 12:18:07 +0300 |
commit | be6afc6a90c81749997f34f5b1d573646c43eb66 (patch) | |
tree | 654290563ee43b2dc5db235c05a67f1543628ff4 /tests | |
parent | 44f0814855209092381f0f35d3684a57d5a40070 (diff) |
tests: Make sure to provide the KEY_UNIT flag always together with the SNAP flags in seeks
SNAP flags alone make no sense and nowadays cause warnings.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/check/elements/dash_demux.c | 20 | ||||
-rw-r--r-- | tests/check/elements/dash_mpd.c | 6 | ||||
-rw-r--r-- | tests/check/elements/hls_demux.c | 14 | ||||
-rw-r--r-- | tests/check/elements/mssdemux.c | 14 |
4 files changed, 32 insertions, 22 deletions
diff --git a/tests/check/elements/dash_demux.c b/tests/check/elements/dash_demux.c index c82253877..9cc0eed3b 100644 --- a/tests/check/elements/dash_demux.c +++ b/tests/check/elements/dash_demux.c @@ -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; diff --git a/tests/check/elements/dash_mpd.c b/tests/check/elements/dash_mpd.c index 06cc31f96..d0cf1a4ab 100644 --- a/tests/check/elements/dash_mpd.c +++ b/tests/check/elements/dash_mpd.c @@ -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); } diff --git a/tests/check/elements/hls_demux.c b/tests/check/elements/hls_demux.c index 8f21af751..3a9e8e3f6 100644 --- a/tests/check/elements/hls_demux.c +++ b/tests/check/elements/hls_demux.c @@ -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; diff --git a/tests/check/elements/mssdemux.c b/tests/check/elements/mssdemux.c index cb8258b6a..ab1f23e1d 100644 --- a/tests/check/elements/mssdemux.c +++ b/tests/check/elements/mssdemux.c @@ -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; |