[gst-devel] Properly seeking in a track with gst-python

Adam Olsen synic at jbother.org
Tue Feb 21 07:37:02 CET 2006


I'm setting up the pipeline like so:


play = gst.element_factory_make("playbin")
audio_sink = gst.element_factory_make('esdsink')
play.set_property("audio-sink", audio_sink)
play.set_property("volume", 1)

play.set_property("uri", "file://%s" % self.loc)
play.set_state(gst.STATE_PLAYING)

When trying to seek, I use the following:

value = 10
play.set_state(gst.STATE_PAUSED)
event = gst.event_new_seek(gst.FORMAT_TIME |
                                    gst.SEEK_METHOD_SET |
                                    gst.SEEK_FLAG_FLUSH, value)

play.send_event(event)
play.set_state(gst.STATE_PLAYING)

This doesn't seem to be working, it just resets playback on the track.

What am I doing wrong?

Adam




More information about the gstreamer-devel mailing list