Hello,
My pipeline is dynamically adding and removing sink pads for a video compositor during the pipeline is running, the program crashed after running for hours, gdb info listed here. I want to know if compositor element allows to change sink pads at any time, and if not what's the right way to do it, thank you Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f4b485894af in gst_compositor_pad_prepare_frame (pad=0x7f4ae46977d0, vagg=0x7f4ae4223c20, buffer=0x7f4ad013e240, prepared_frame=0x7f4ae4697328) at compositor.c:359 359 l = g_list_find (GST_ELEMENT (vagg)->sinkpads, pad)->next; [Current thread is 1 (Thread 0x7f4aceffd700 (LWP 64126))] BR -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
How are you removing your sink pads ? I am not an expert here but I think you are not removing your sink pads for compositor correctly. Could you share your pipeline on how you are removing your sink pads?
/Shishir > On May 11, 2019, at 01:48, longkas <[hidden email]> wrote: > > Hello, > > My pipeline is dynamically adding and removing sink pads for a video > compositor during the pipeline is running, the program crashed after running > for hours, gdb info listed here. I want to know if compositor element allows > to change sink pads at any time, and if not what's the right way to do it, > thank you > > Program terminated with signal SIGSEGV, Segmentation fault. > #0 0x00007f4b485894af in gst_compositor_pad_prepare_frame > (pad=0x7f4ae46977d0, vagg=0x7f4ae4223c20, buffer=0x7f4ad013e240, > prepared_frame=0x7f4ae4697328) at compositor.c:359 > 359 l = g_list_find (GST_ELEMENT (vagg)->sinkpads, pad)->next; > [Current thread is 1 (Thread 0x7f4aceffd700 (LWP 64126))] > > BR > > > > -- > Sent from: http://gstreamer-devel.966125.n4.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 |
int padIdx = 0; //remove GstPad* pad = gst_element_get_static_pad(compositor, "sink_" + padIdx ); gst_element_remove_pad(compositor, pad); //create a new pad padIdx ++; GstPad* pad = gst_element_get_request_pad(compositor, "sink_" + padIdx); //link gst_pad_link(srcPad, pad); -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Perhaps I am mistaken but I dont think you can concatenate a string literal with an integer using the + operator. Other methods are shown here: https://stackoverflow.com/questions/191757/how-to-concatenate-a-stdstring-and-an-int Also I wonder if it is necessary to pause the pipeline before you start removing pads and linking new ones. On Sat, May 11, 2019, 12:30 AM longkas <[hidden email]> wrote:
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Thank you for your advice, pause the pipeline is a good point, I will try it
-- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
In reply to this post by longkas
Hi,
I think padIdx needs to be limited. At some stage I seem to remember to 32. Better would be to let get_static_pad return the next available index. -----Ursprüngliche Nachricht----- Von: gstreamer-devel <[hidden email]> Im Auftrag von longkas Gesendet: Samstag, 11. Mai 2019 09:30 An: [hidden email] Betreff: Re: Running dynamic pipeline of compositor gets segmentation fault int padIdx = 0; //remove GstPad* pad = gst_element_get_static_pad(compositor, "sink_" + padIdx ); gst_element_remove_pad(compositor, pad); //create a new pad padIdx ++; GstPad* pad = gst_element_get_request_pad(compositor, "sink_" + padIdx); //link gst_pad_link(srcPad, pad); -- Sent from: http://gstreamer-devel.966125.n4.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 |
In reply to this post by longkas
On Sat, 2019-05-11 at 02:30 -0500, longkas wrote:
> int padIdx = 0; > > //remove > GstPad* pad = gst_element_get_static_pad(compositor, "sink_" + padIdx ); > gst_element_remove_pad(compositor, pad); That's your mistake, you shouldn't be calling gst_element_remove_pad() outside of the implementation of an element. You want to instead use gst_element_release_request_pad() -- Olivier Crête [hidden email] _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |