Hello All,
I am trying to play an mp3 file using pipeline fdsrc ! decodebin2 ! autoaudiosink by providing the opened file descriptor to the plugin.
When I do forward seek for n sec , it is working properly. but when I do backward seek for n sec, then there is no sound for n sec & then plays from the correct seek'd position.
What am I doing wrong. ?
// code snippet for seeking
void seek_handler (double displacement) // displacement is in second
{
GstFormat fmt = GST_FORMAT_TIME;
gint64 cur_pos;
gst_element_query_position (pipeline, &fmt, &cur_pos);
double new_pos_sec = cur_pos * (1.0 / GST_SECOND) + displacement;
seek (new_pos_sec * GST_SECOND);
}
void seek (gint64 new_pos)
{
if (new_pos < 0)
new_pos = 0;
gst_element_seek (pipeline, 1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH, GST_SEEK_TYPE_SET,
new_pos, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE);
}
--
Thanks & Regards,
Satish Pattar
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel