[gst-devel] Seek in a filesink

sebbil at gmx.de sebbil at gmx.de
Wed Jun 24 10:42:16 CEST 2009

Hi there!

I'm currently writing an application in the style of an old-fashioned dictaphone. Basically, the application uses a filesink to write recorded data to a file.

The application should have a button for "rewinding the tape" and anotherone for fast-forwarding it. After pressing the "record"-button, the application should start recording from the new position.

Here is a little example:

The app recorded the following:

time: 1       2       3       4       5
data: bla bla bla bla bla bla foo foo foo foo

The user rewinds 3 seconds and goes on recording "bar":

time: 1       2       3       4       5
data: bla bla bla bla bar bar bar bar bar bar

=> It overwrites the previous recorded stuff.

I tried to do so by using gst.Element.seek_simple, but it returns False...

Here is the relevant code:

The pipeline: "pulsesrc ! audioconvert ! vorbisenc ! oggmux ! filesink location=/tmp/test.ogg"

The seeking stuff: self.pipeline.get_by_name('filesink0').seek_simple(gst.FORMAT_TIME, gst.SEEK_TYPE_SET, 3000)

Thanks in advance!
Sebastian Billaudelle
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

More information about the gstreamer-devel mailing list