Trouble removing a sink from a playing pipeline

Stefan Sauer ensonic at hora-obscura.de
Tue Oct 4 13:06:21 PDT 2011


On 10/02/2011 02:15 AM, Tal Liron wrote:
> (Resending this because the mailing list seems to hate HTML)
>
>
> I'm still very stuck with this problem!
>
>
> I have an audio pipeline with a tee (and each branch has its own
> queue). I am trying to remove one branch (a bin) while keeping the
> pipeline playing.
>
>
> In order to entirely remove the branch, I have to set its state to
> NULL. But, when the sink specifically changes to NULL, the pipeline
> stops playing! It is still in PLAYING state, but it just stops at the
> timeline.

When you do dynamic pipieline changes all you need to keep in mind is
that gstreamer does not like dataflow on unconnected pads. Thus if your
pipeline pushes data towards the sink, you want to do a pad_block on the
src-pad of the tee (for the branch you want to remove). When the block
callback got triggered remove the elements and release the pad.

Stefan

>
>
> I'm in a weird chicken-and-egg problem. On the one hand, I want to
> remove the sink, but on the other hand, until I remove it, it's still
> part of the pipeline.
>
>
> Things that I've tried and haven't helped:
>
>
> 1) Using a valve before the sink.
>
> 2) Blocking the pad before the sink.
>
> 3) Calling unparent() on the sink. (Causes all kinds of failures.)
>
>
> I have two questions that might help direct an answer:
>
>
> 1) Is it possible to remove an element without setting its state to NULL?
>
> 2) Is it possible to change the default behavior of Bin so that it
> doesn't respond to state changes of its children?
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list