support reverse playback by negative rates such as -1,-2,-4??

Tim-Philipp Müller t.i.m at zen.co.uk
Wed Jun 1 04:06:00 PDT 2011


On Wed, 2011-06-01 at 16:23 +0800, zwresh wrote:

> it seems that the gstreamer can't support to reverse playback by
> negative playback rates such as  -1,-2,-4.

"GStreamer" (the framework) supports this just fine.


> The arguments I set in gst_element_seek are as below.

>         gst_element_seek (pipeline,
>             -2.0 , 
>             GST_FORMAT_TIME, 
>             GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT,
>             GST_SEEK_TYPE_SET, 
>             0,
>             GST_SEEK_TYPE_SET, 
>             cur_pos);
>
> -- cur_pos is the position from where i want to seek.
>
> Can anybody help me ???

Whether this will work or not depends a lot on the exact elements
involved (demuxer, parsers, decoders). So it might work for some
formats/files, but not for others, depending on the elements used.

 Cheers
  -Tim




More information about the gstreamer-devel mailing list