fail_unless (segment.stop == -1);
fail_unless (update == TRUE);
+#if 0
/* configure segment to stop relative, should not do anything since
* size is unknown. */
gst_segment_do_seek (&segment, 1.0,
fail_unless (segment.start == 100);
fail_unless (segment.stop == -1);
fail_unless (update == FALSE);
+#endif
/* do some clipping on the open range */
/* completely outside */
gst_segment_do_seek (&segment, 1.0,
GST_FORMAT_BYTES,
GST_SEEK_FLAG_NONE,
- GST_SEEK_TYPE_CUR, 100, GST_SEEK_TYPE_SET, 300, &update);
+ GST_SEEK_TYPE_SET, 100 + 100, GST_SEEK_TYPE_SET, 300, &update);
fail_unless (segment.start == 200);
fail_unless (segment.stop == 300);
fail_unless (update == TRUE);
ASSERT_CRITICAL (gst_segment_do_seek (&segment, 1.0,
GST_FORMAT_BYTES,
GST_SEEK_FLAG_NONE,
- GST_SEEK_TYPE_CUR, 100, GST_SEEK_TYPE_SET, 200, &update));
+ GST_SEEK_TYPE_SET, 200 + 100, GST_SEEK_TYPE_SET, 200, &update));
fail_unless (segment.start == 200);
fail_unless (segment.stop == 300);
/* update didn't change */
fail_unless (segment.stop == -1);
fail_unless (update == TRUE);
+#if 0
/* configure segment to stop relative, does not update stop
* since we did not set it before. */
gst_segment_do_seek (&segment, 1.0,
fail_unless (segment.start == 100);
fail_unless (segment.stop == -1);
fail_unless (update == FALSE);
+#endif
/* do some clipping on the open range */
/* completely outside */
gst_segment_do_seek (&segment, 1.0,
GST_FORMAT_BYTES,
GST_SEEK_FLAG_NONE,
- GST_SEEK_TYPE_CUR, 100, GST_SEEK_TYPE_SET, 300, &update);
+ GST_SEEK_TYPE_SET, 100 + 100, GST_SEEK_TYPE_SET, 300, &update);
fail_unless (segment.start == 200);
fail_unless (segment.stop == 200);
gst_segment_do_seek (&segment, 1.0,
GST_FORMAT_BYTES,
GST_SEEK_FLAG_NONE,
- GST_SEEK_TYPE_CUR, 100, GST_SEEK_TYPE_SET, 200, &update);
+ GST_SEEK_TYPE_SET, 200 + 100, GST_SEEK_TYPE_SET, 200, &update);
fail_unless (segment.start == 200);
fail_unless (segment.stop == 200);
fail_unless (update == FALSE);
gst_segment_do_seek (&segment, -1.0,
GST_FORMAT_BYTES,
GST_SEEK_FLAG_NONE,
- GST_SEEK_TYPE_SET, 10, GST_SEEK_TYPE_CUR, -20, &update);
+ GST_SEEK_TYPE_SET, 10, GST_SEEK_TYPE_SET, 100 - 20, &update);
fail_unless (segment.start == 10);
fail_unless (segment.stop == 80);
fail_unless (segment.time == 10);
fail_unless (segment.stop == 200);
fail_unless (segment.duration == 200);
+#if 0
/* add 300 to the start, this should be clamped to the duration */
gst_segment_do_seek (&segment, 2.0,
GST_FORMAT_BYTES, GST_SEEK_FLAG_NONE,
fail_unless (segment.start == 0);
fail_unless (segment.stop == 200);
fail_unless (segment.duration == 200);
+#endif
}
GST_END_TEST;