[gst-devel] Seeking for mp4/3gp files
dbikash at gmail.com
Thu Oct 19 12:06:44 CEST 2006
After using your idea, the result has become even more unpredictable than
before for even the MPEG-2 movie.
My code now is:
gst_element_query_position(pipeline, &fmt, &cur);
cur = cur + GST_SECOND; /*****Note this line****/
event = gst_event_new_seek(1.0, GST_FORMAT_TIME,
GstSeekFlags(GST_SEEK_FLAG_FLUSH | GST_SEK_FLAG_ACCURATE),
cur, GST_SEEK_TYPE_NONE, 0);
I want to seek forward by 1 second, but irrespective of what I add to cur,
(I tried GST_SECOND, GST_MSECOND, 1, 1000, 1000000, 1000000000), I cannot
get the desired behaviour. The advancement is about 10 mins for the first
time I try, and the next time I reach the end of the movie (which is over 2
Am I doing anything wrong?
On 10/19/06, Michael Smith <msmith at fluendo.com> wrote:
> GST_SEEK_TYPE_CUR does not seek from the current position. You want to
> use GST_SEEK_TYPE_SET, and you almost certainly want to use
> GST_SEEK_TYPE_NONE for the second (end) time.
> I wouldn't be at all suprised if many plugins implement
> GST_SEEK_TYPE_CUR incorrectly; there aren't many things that use it.
> You probably want to issue a position query (to get the current
> position), then seek to a specific location by adding/subtracting from
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gstreamer-devel