+ def set_seek(self, position, flush=False):
+ flags = Gst.SeekFlags.SEGMENT | Gst.SeekFlags.SKIP | Gst.SeekFlags.ACCURATE
+
+ if flush:
+ flags |= Gst.SeekFlags.FLUSH
+
+ if self._rate >= 0:
+ seek_event = Gst.Event.new_seek(self._rate,
+ Gst.Format.TIME,
+ flags,
+ Gst.SeekType.SET, position,
+ Gst.SeekType.NONE, 0)