[gstreamer-bugs] [Bug 356369] Problems with gst_element_seek

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Sun Sep 17 02:42:50 PDT 2006


Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=356369
 GStreamer | gstreamer (core) | Ver: 0.10.9





------- Comment #2 from Andreas Tunek  2006-09-17 09:42 UTC -------
The problem can also be solved by changing the code to the following:

bool GstPlayer::seek_relative(gint64 time){
  gst_element_set_state (GST_ELEMENT (player), GST_STATE_PAUSED);
  gint64 current_position;
  GstFormat time_format = GST_FORMAT_TIME;
  gst_element_query_position(player,
                             &time_format,
                             &current_position);
  if (!gst_element_seek (player, //the element
                         1.0, //new playback rate, same as before
                         GST_FORMAT_TIME, //the format of the time is in
microseconds
                         GST_SEEK_FLAG_FLUSH, //don't know really what this
means
                         GST_SEEK_TYPE_SET, // change from the current position
                         current_position + (time *  GST_SECOND),//how much
should you change
                         GST_SEEK_TYPE_NONE,
                         GST_CLOCK_TIME_NONE)) {
    g_print ("Seek failed!\n");
  }
  gst_element_set_state (GST_ELEMENT (player), GST_STATE_PLAYING);
}

So maybe it is not a problem, what do I know......


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list