How to remove ghost pad from a bin and relink to the same bin

Vivia Nikolaidou n.vivia at gmail.com
Thu Sep 8 13:47:47 UTC 2016


Hi,

When you say decodebin, is it a real decodebin, or your own bin where
you manually add the correct parser and decoder?

If it's a real decodebin, I think you don't need to remove it. Just
keep it there and let the new stream flow through it. When the
decodebin sees the new caps, it will automatically restructure itself
to contain the correct elements.

In any case, if you remove a bin from a pipeline and you're fairly
sure you won't need it anymore, you should unref it. However, after
unlinking it, the ghost pad which acts as the sink of the bigger bin
will remain there and you can reuse it with gst_ghost_pad_set_target.

Best regards,

Vivia

On 8 September 2016 at 07:36, DeepakRohan <deepak027rohan077 at gmail.com> wrote:
> <http://gstreamer-devel.966125.n4.nabble.com/file/n4679477/new.png>
> If image is not accessible, then the outer picture of my bin implementation
> is defined below:
>
> My Bin includes : Decodebin and Audio Convert Elements.
> Decodebin consists of Audio Parser and Audio Decoder elements.
>
> Now I remove decodebin while switching to a different audio stream, as I
> have to reconfigure the pipeline with new audio parser and audio decoder.
>
> And If I am not wrong, then the statement
> "Generally speaking, when you remove a bin, it is automatically
> unlinked. Any pads you added have to be removed, and any request pads
> you requested have to be released. "
>
> So if I remove bin from pipeline without unreffing the bin then the pads of
> the bin added to it to generate sink and src pad still remain along with the
> bin. And hence it can be reused by setting the target of the bin
> "gst_ghost_pad_set_target".
>
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/How-to-remove-ghost-pad-from-a-bin-and-relink-to-the-same-bin-tp4679405p4679477.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list