diff options
author | Thiago Santos <thiagoss@osg.samsung.com> | 2016-01-05 10:41:27 -0300 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2016-01-06 10:23:13 -0300 |
commit | eb56cfe201764b74ca851ea0d244c230c3a602d2 (patch) | |
tree | 8eacee7dbfa34ef334641220d356973908451a58 /tests/check | |
parent | f57109ad2e59e0494833ca213d50ba342c00cd98 (diff) | |
download | gstreamer-plugins-bad-eb56cfe201764b74ca851ea0d244c230c3a602d2.tar.gz |
tests: hlsdemux: add tests for seek with reverse rate and snap flags
Add tests to ensure snap flags work as expected for reverse
rates
Diffstat (limited to 'tests/check')
-rw-r--r-- | tests/check/elements/hls_demux.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/check/elements/hls_demux.c b/tests/check/elements/hls_demux.c index d1f532db9..3fb65134b 100644 --- a/tests/check/elements/hls_demux.c +++ b/tests/check/elements/hls_demux.c @@ -495,6 +495,26 @@ GST_START_TEST (testSeekSnapAfterPosition) GST_END_TEST; + +GST_START_TEST (testReverseSeekSnapBeforePosition) +{ + run_seek_position_test (-1.0, 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_END_TEST; + + +GST_START_TEST (testReverseSeekSnapAfterPosition) +{ + run_seek_position_test (-1.0, 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_END_TEST; + static void testDownloadErrorMessageCallback (GstAdaptiveDemuxTestEngine * engine, GstMessage * msg, gpointer user_data) @@ -696,6 +716,8 @@ hls_demux_suite (void) tcase_add_test (tc_basicTest, testSeekPosition); tcase_add_test (tc_basicTest, testSeekSnapBeforePosition); tcase_add_test (tc_basicTest, testSeekSnapAfterPosition); + tcase_add_test (tc_basicTest, testReverseSeekSnapBeforePosition); + tcase_add_test (tc_basicTest, testReverseSeekSnapAfterPosition); tcase_add_unchecked_fixture (tc_basicTest, gst_adaptive_demux_test_setup, gst_adaptive_demux_test_teardown); |