[Rhythmbox-devel] Re: Seamless playing

On Thu, Feb 12, 2004 at 11:08:40PM -0500, Colin Walters wrote:
> On Thu, 2004-02-12 at 21:09, Andreas Bombe wrote:
> > If those backends don't support seamless playback of multiple audio
> > files (do gstreamer or xine have provisions for this?) 
> I don't know about Xine, but GStreamer doesn't have a nice library for
> this, but it should be possible to implement using GStreamer.

Seems so.  I don't know much about the GStreamer internals yet, but I'm
reading up on it.  I'll integrate it into the pipelines somehow rather
than channel the audio samples through rb.

> As for implementation, one approach would be a pipeline like this:
>  { gnomevfssrc ! queue } ! spider ! volume ! sink
>  { gnomevfssrc ! queue } ! fakesink
> The top pipeline would be the current, and the bottom would be the next
> queued song.  Once you start playing a song, you start the whole top
> pipeline, and also set the bottom first thread to PLAYING, and let the
> queue fill up.  Then when the first song ends, you destroy the top
> pipeline, make the bottom pipeline the top pipeline, recreate the
> spider, volume, and sink, and create a new instance of the pipeline for
> the bottom.

I want to avoid destroying and recreating the output part.  Even if it
wouldn't cause gaps, it seems like an unaesthetic kludge.

I would use a sequencing plugin (and write one, if necessary) that
handles appending multiple sinks and keep the output part running,
feeding it the streams concatenated.  There seems to be a new switch
plugin in gst-plugins that may be used for this with the help some

There's one thing to consider here, it's whether the output sinks could
handle flying switches between different sample formats/rates.  I
suspect not, but that's no problem since we could do the full
shutdown/reinit pipeline in that case and tracks that are meant to be
played gapless are usually encoded in the same format.

In any case, I'll have to read more GStreamer docs before I can proceed.

Andreas Bombe <bombe@informatik.tu-muenchen.de>    DSA key 0x04880A44

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]