Gapless seeking

Александр Крылков alexander.krylkov at gmail.com
Wed Feb 18 23:19:39 PST 2015


Hello!
I am developing an audio player, and faced one issue:

I have cue sheet file with single audio file (an album).
So I want to play a regions of this media file which are separated tracks.
I am parsing cue sheet and getting start and end position of each track,
then when user starts playing I am seeking to the start and end position of
each track, like this:

gst_element_seek (_pipeline, 1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,

					GST_SEEK_TYPE_SET, gint64(_currentStartPosition) * MillisecondsConvertion,

					GST_SEEK_TYPE_SET, gint64(_currentEndPosition) * MillisecondsConvertion);


I am getting notification about new track (stream) starts by
GST_MESSAGE_STREAM_START to update current selected/playing track in
playlist or switch to a new track.

And it is playing ok, but I want to do gapless transition between tracks
which are localted in sequence in same file.

When each track is separated track I am doing gapless playing between them
via "about-to-finish" pipeline signal and updating an uri of playbin, but
how to do the same thing if each track is a part of one single file?

Mainly I need somehow just to set the stream end position to get
GST_MESSAGE_STREAM_START without actual reseeking. Or maybe you know
another way to get notified when track ends without using gst_element_seek?
Maybe just to do a timer and query current position each 1ms to check what
(end position - current position) is < 1ms?

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150219/5f6c7b61/attachment.html>


More information about the gstreamer-devel mailing list