[gstreamer-bugs] [Bug 356369] New: Problems with gst_element_seek
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Sun Sep 17 02:14:22 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
Summary: Problems with gst_element_seek
Product: GStreamer
Version: 0.10.9
Platform: Other
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gstreamer (core)
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: andreas.tunek at gmail.com
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: 2.13/2.14
GNOME milestone: Unspecified
Please describe the problem:
The following code is used for seeking:
bool GstPlayer::seek_relative(gint64 time){
gst_element_set_state (GST_ELEMENT (player), GST_STATE_PAUSED);
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_CUR, // change from the 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);
}
the "player" element was constructed with
player = gst_element_factory_make("playbin", "player"); and
The plan is that the argument ("time") decides how much you should seek,
forwards or backward. If you give "1" as an argument it should seek 1 second
forward, if you give "-1" as the argument it should seek 1 second backwards.
For a .ogg file this works perfectly. For an .flac file the following error is
reported: GStreamer-CRITICAL **: gst_pad_query_convert: assertion `src_val >=
0' failed
This happens when the "time" argument is negative.
For a .mp3 file forward seeking works, but backwards seeking stop the player.
I do not know if this is a but or intended behavior, but I find it strange that
different elements give different result.
Steps to reproduce:
1. Try my program with different files.
2. Try to seek backwards and forward.
3. Watch and hear the output.
Actual results:
Seek backwards only work for .ogg files.
Expected results:
It should work for all files supported by gstreamer.
Does this happen every time?
Yes
Other information:
I will try to add the program I hacked up.
--
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