[gst-devel] gapless playback

Marco Ballesio gibrovacco at gmail.com
Sun Dec 19 09:53:33 CET 2010


Hi,

On Thu, Dec 16, 2010 at 3:58 AM, Stuart Gray <stuart68 at gmail.com> wrote:
> Hi,
>
> I am seeking some guidance with respect to getting gapless playback using
> decodebin2 and queue2.
>
> Our system comprises the following:
>
> arm9 processor
> gst-plugins-bad - 0.10.20-r11.0.6
> gst-plugins-base - 0.10.31-r11.0.6
> gst-plugins-good - 0.10.25-r11.0.6
> gst-plugins-ugly - 0.10.16-r11.1.6
> running on openembedded linux with kernel version 2.6.33
>
> We are decoding audio only streams. This is a concern as reference was made
> to gapless playback for the latest releases:
>
> "Release notes for GStreamer Base Plug-ins?0.10.31 "Dance Like It's 1982"
>
> Bugs fixed in this release
>
>      * 628028 : [uridecodebin] Don't enable progressive downloading for live
> streams
>      * 623846 : typefinding: add support for " enhanced ac3 " (eac3)
>      * 602437 : [playbin2] [gapless] Completely broken when switching
> between files with audio/video only
> "
>
> The above refers directly to playbin2, but is there anything related when
> using decodebin2 and queue2 as I would assume playbin2 would use these also.
>
> At present we have definite breaks with clicks between tracks.
>
> Any help is greatly appreciated....

afaiu the gapless playback concept in playbin2 is based on the
"about-to-finish" signal:

http://www.gstreamer.net/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-playbin2.html#GstPlayBin2-about-to-finish

which appears to be playbin2 specific, but let's not give up with hopes now.

As the signal is emitted from the handler of the "drained" signal, in
turn emitted from uridecodebin/decodebin2, you can use it to prepare
the next track in your app. Still you'll have to implement by yourself
the handling logic as in the following functions (I'm sorry not to put
a link to the gitweb source but freedesktop is awfully unstable
today):

- drained_cb: the handler of the "drained" signal.
- activate_group: (the most noteworthy) re-sets the pipeline and puts
in it in the appropriate state.

Essentially, you'll need to set all the pipeline properties in the
signal handler, as implemented in activate_group.

These (intermediate) functions may be interesting to understand how
playbin2 internally handles the transition:

- gst_play_bin_set_suburi: to store the next URI to be played.
- setup_next_source: called by the drained_cb callback after the new
URI has been set with gst_play_bin_set_uri. It essentially prepares
the playbin2 internals for the next uri.

all the functions are in [gst-plugins-good]/gst/playback/gstplaybin2.c

This is not much, but hopefully it's at least a good starting point..

Regards

>
> ------------------------------------------------------------------------------
> Lotusphere 2011
> Register now for Lotusphere 2011 and learn how
> to connect the dots, take your collaborative environment
> to the next level, and enter the era of Social Business.
> http://p.sf.net/sfu/lotusphere-d2d
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>




More information about the gstreamer-devel mailing list