gst_element_seek is returning false.

James Le james at jamesle.net
Tue Mar 24 18:18:35 PDT 2015


Hi everyone,

I'm new to programming with gstreamer and my current application is a
simple command line mp3 player. I am currently attempting to modify
playback speed using gst_element_seek, however, it is returning false
everytime I specify a start position time.

Here is a snippet of code:

gst_element_query_position(data->pipeline,GST_FORMAT_TIME, &pos);
g_print("speed up, pos = %" G_GINT64_FORMAT " \n", pos);
if(!gst_element_seek (data->pipeline, 2.0, GST_FORMAT_TIME,
      GST_SEEK_FLAG_ACCURATE, GST_SEEK_TYPE_SET, pos, GST_SEEK_TYPE_NONE,
    GST_CLOCK_TIME_NONE))
   {
   g_print("Seek Failed!\n");
   }
if I set the start type and start position to GST_SEEK_TYPE_NONE and
GST_CLOCK_TIME_NONE respectively, playback speed will double from the
beginning as expected. But obviously I want to change playback speed
without restarting the song.

gst_element_query is working as expected and returns the time in
nanoseconds to my pos variable(i.e. 1234567890 is 1.23secs into the song).

Any insight would be greatly appreciated.

Thanks,
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150324/aaf5ae5b/attachment.html>


More information about the gstreamer-devel mailing list