Hi,
I am trying to remove a bin. I just wanted to know how can I remove the ghost pads in a bin. And also If I want to link to the same bin, what are the things necessary conditions to be taken care of. Thank You in Advance, |
Hi,
Can you send a rough diagram of your bin/pad layout (which bins contain which other bins, etc)? Please explain, based on that diagram, what exactly you are trying to do, so we can help you better. Also, we need to know about the pads relevant to the bin you are removing and relinking: whether they are always/sometimes/request pads, whether they are ghost pads corresponding to an inside pad, both inside the bin itself and in whatever is linking to the bin. 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. Best regards, Vivia On 4 September 2016 at 17:37, DeepakRohan <[hidden email]> wrote: > Hi, > > I am trying to remove a bin. I just wanted to know how can I remove the > ghost pads in a bin. And also If I want to link to the same bin, what are > the things necessary conditions to be taken care of. > > Thank You in Advance, > > > > -- > 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-tp4679405.html > Sent from the GStreamer-devel mailing list archive at Nabble.com. > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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". |
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 <[hidden email]> 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 > [hidden email] > https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Hey thanks for the info Vivia.
It was quiet confusing about removing the ghost pads. But then I always wanted to re-use the bin. Thanks a lot for your response, it surely helped me a lot in understanding bin and ghost pad concepts. |
Free forum by Nabble | Edit this page |