Gstreamer 1.0 python bindings, how to implement a proper seek event
t.i.m at zen.co.uk
Fri Mar 1 02:11:33 PST 2013
On Thu, 2013-02-28 at 20:25 +0000, Peter Rennert wrote:
> I am starting to test Gstreamer 1.0 with its Python bindings. I simply
> want to increase the playback speed of the video. In gstreamer 0.10 it
> worked like this.
> self.pbRate += 3
> (gst.SEEK_FLAG_SKIP), gst.SEEK_TYPE_NONE, 0,
> gst.SEEK_TYPE_NONE, 0))
> What would be the equivalent for gstreamer 1.0 and python? Is there some
> documentation about the bindings somewhere?
Instead of creating a seek event an sending it you could also use
gst_element_seek(), which does the same.
The code should then be something like this I think:
self.pipeline.seek (self.pbRate, Gst.Format.TIME,
Gst.SeekFlags.SKIP, Gst.SeekType.NONE, 0,
(Though not sure why you have the SKIP flag there, it's not implemented
anywhere yet I think.)
How well that will work will depend a bit on the parser/demuxer in
question. If it doesn't work, please file a bug.
More information about the gstreamer-devel