[gst-devel] Dynamic pipelines

Martin Rubli martin_rubli at logitech.com
Thu Jun 8 00:11:53 CEST 2006


Hi,

Given the number of replies I have received (zero ;-), dynamically  
changing pipelines at play time doesn't seem very popular ...

Has anyone tried this before and got it to work properly? If so, I'd be  
very grateful for sample code to compare it with mine, so that I know  
whether my code is wrong or whether I should file a bug against GStreamer.

Thanks!
Martin


On Thu, 25 May 2006 16:02:42 -0700, Martin Rubli  
<martin_rubli at logitech.com> wrote:

> Hi all,
>
> I've been doing some tests with dynamic insertion and removal of  
> plug-ins.
>
> The program I've been using is based on section 17.3 of the Application
> Development Manual. (BTW: The sample given on that page needs a few
> changes to work with GStreamer 0.10.)
>
> I have tried different scenarios. In each case the pipeline looks
> something like this and is automatically created. (Using an .ogg file  
> here
> but the same thing happens with other audio sources.)
>
> filesrc ! oggdemux ! vorbisdec ! audioresample ! audioconvert ! FilterBin
> ! alsasink
>
> The FilterBin is a bin that contains one of the following (defined at
> compile time):
> a) identity
> b) audioresample ! audio/x-raw-int ! identity
> c) audioresample ! audio/x-raw-int, rate=48000 ! identity
> d) audioresample ! audio/x-raw-int, rate=8000 ! identity
>
> Every 5 seconds the FilterBin is taken out of the pipeline or put back  
> in,
> so that e.g. in case d) the audio should toggle between normal and pretty
> bad quality.
>
> The problem is that the behavior is somewhat random for some of the  
> cases.
> For cases a and b it works consistently well (audioresample should be a
> no-op). In cases c and d, however, I sometimes get interruptions of a
> couple of seconds and the debug log gives lines like:
>
> <AlsaSink> resync after discont with previous sample of diff: 425761
>
> My questions now: Where do these discontinuities come from and what can I
> do about it? Are there any more programs out there that do the same  
> thing?
>
> Different variations of changing the pipeline state during the
> insertion/removal phase didn't help either. The test code is attached.
>
> I'd be grateful for any tips ... Cheers,
> Martin




More information about the gstreamer-devel mailing list