diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2016-01-26 23:15:10 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2016-02-01 15:34:36 -0300 |
commit | f0ecdcefb3bba8cd27338a6b1d59fd465ff1e853 (patch) | |
tree | f293bce5809a5c2618274465f25f22467cd64f49 /tests/check | |
parent | d4b4069041c883d51bd1b33406afe07e10a466a8 (diff) | |
download | gstreamer-plugins-bad-f0ecdcefb3bba8cd27338a6b1d59fd465ff1e853.tar.gz |
tests: dashdemux: add test for updating stop position
Test that a seek that only updates the stop position works
as expected
Diffstat (limited to 'tests/check')
-rw-r--r-- | tests/check/elements/dash_demux.c | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/tests/check/elements/dash_demux.c b/tests/check/elements/dash_demux.c index 8ee40b685..e49230d20 100644 --- a/tests/check/elements/dash_demux.c +++ b/tests/check/elements/dash_demux.c @@ -505,9 +505,10 @@ GST_END_TEST; static void -run_seek_position_test (gdouble rate, guint64 seek_start, GstSeekType stop_type, - guint64 seek_stop, GstSeekFlags flags, guint64 segment_start, - guint64 segment_stop, gint segments) +run_seek_position_test (gdouble rate, GstSeekType start_type, + guint64 seek_start, GstSeekType stop_type, guint64 seek_stop, + GstSeekFlags flags, guint64 segment_start, guint64 segment_stop, + gint segments) { const gchar *mpd = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" @@ -578,7 +579,7 @@ run_seek_position_test (gdouble rate, guint64 seek_start, GstSeekType stop_type, * downloaded again */ testData->seek_event = - gst_event_new_seek (rate, GST_FORMAT_TIME, flags, GST_SEEK_TYPE_SET, + gst_event_new_seek (rate, GST_FORMAT_TIME, flags, start_type, seek_start, stop_type, seek_stop); gst_test_http_src_install_callbacks (&http_src_callbacks, inputTestData); @@ -591,8 +592,18 @@ GST_START_TEST (testSeekKeyUnitPosition) { /* Seek to 1.5s with key unit, it should go back to 1.0s. 3 segments will be * pushed */ - run_seek_position_test (1.0, 1500 * GST_MSECOND, GST_SEEK_TYPE_NONE, 0, - GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT, 1000 * GST_MSECOND, -1, 3); + 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_KEY_UNIT, + 1000 * GST_MSECOND, -1, 3); +} + +GST_END_TEST; + + +GST_START_TEST (testSeekUpdateStopPosition) +{ + run_seek_position_test (1.0, GST_SEEK_TYPE_NONE, 1500 * GST_MSECOND, + GST_SEEK_TYPE_SET, 3000 * GST_MSECOND, 0, 0, 3000 * GST_MSECOND, 3); } GST_END_TEST; @@ -602,8 +613,8 @@ GST_START_TEST (testSeekPosition) /* Seek to 1.5s without key unit, it should keep the 1.5s, but still push * from the 1st segment, so 3 segments will be * pushed */ - run_seek_position_test (1.0, 1500 * GST_MSECOND, GST_SEEK_TYPE_NONE, 0, - GST_SEEK_FLAG_FLUSH, 1500 * GST_MSECOND, -1, 3); + run_seek_position_test (1.0, GST_SEEK_TYPE_SET, 1500 * GST_MSECOND, + GST_SEEK_TYPE_NONE, 0, GST_SEEK_FLAG_FLUSH, 1500 * GST_MSECOND, -1, 3); } GST_END_TEST; @@ -933,6 +944,7 @@ dash_demux_suite (void) tcase_add_test (tc_basicTest, testSeek); tcase_add_test (tc_basicTest, testSeekKeyUnitPosition); tcase_add_test (tc_basicTest, testSeekPosition); + tcase_add_test (tc_basicTest, testSeekUpdateStopPosition); tcase_add_test (tc_basicTest, testDownloadError); tcase_add_test (tc_basicTest, testFragmentDownloadError); tcase_add_test (tc_basicTest, testQuery); |