mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 21:16:24 +00:00
segment: Add unit test for GST_SEEK_FLAG_INSTANT_RATE_CHANGE
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/528>
This commit is contained in:
parent
f63b5cbade
commit
6dea5d2c7b
1 changed files with 13 additions and 0 deletions
|
@ -675,6 +675,19 @@ GST_START_TEST (segment_seek_noupdate)
|
|||
fail_unless_equals_uint64 (segment.position, 50);
|
||||
fail_unless_equals_uint64 (segment.base, 0);
|
||||
fail_unless_equals_uint64 (segment.offset, 50);
|
||||
|
||||
/* FALSE should be returned when GST_SEEK_FLAG_INSTANT_RATE_CHANGE */
|
||||
fail_unless (gst_segment_do_seek (&segment, 1.5,
|
||||
GST_FORMAT_TIME,
|
||||
GST_SEEK_FLAG_INSTANT_RATE_CHANGE,
|
||||
GST_SEEK_TYPE_NONE, 0, GST_SEEK_TYPE_NONE, 0, NULL) == FALSE);
|
||||
fail_unless (segment.format == GST_FORMAT_TIME);
|
||||
fail_unless_equals_uint64 (segment.start, 0);
|
||||
fail_unless_equals_uint64 (segment.stop, 200);
|
||||
fail_unless_equals_uint64 (segment.time, 0);
|
||||
fail_unless_equals_uint64 (segment.position, 50);
|
||||
fail_unless_equals_uint64 (segment.base, 0);
|
||||
fail_unless_equals_uint64 (segment.offset, 50);
|
||||
}
|
||||
|
||||
GST_END_TEST;
|
||||
|
|
Loading…
Reference in a new issue