Hello,
I created a pipeline withe a videomixer, and two source as the mixer input, I want to dynamically change one of the input when its stream gets to end, see pipeline below or the image attached. So I add an event probe on videoconvert "conv2" when I add that source, I will get EOS as expected the first time , but after that every time the EOS event will push immediately to the probe, please help me figure it, thanks videomixer name=mix ! autovideosink \ videotestsrc ! videoconvert ! mix. \ videotestsrc name=src2 num-buffers=200 ! videoconvert name=conv2 ! mix. \ <http://gstreamer-devel.966125.n4.nabble.com/file/t378770/ggs122.jpg> 1) remove src2 and conv2 from pipeline 2) new src2 (with num-buffers set) and conv2, link src2-conv2-mixer 3) add probe pad = gst_element_get_static_pad(conv2, "sink"); gst_pad_add_probe(pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, padProbeCallback, data, NULL); 4) padProbeCallback(GstPad *pad, GstPadProbeInfo *info, gpointer user_data) { GstEvent *event = gst_pad_probe_info_get_event(info); if (GST_EVENT_TYPE(event) == GST_EVENT_EOS) { #goto 1) } } -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le vendredi 22 mars 2019 à 07:24 -0500, longkas a écrit :
> Hello, > I created a pipeline withe a videomixer, and two source as the mixer input, > I want to dynamically change one of the input when its stream gets to end, > see pipeline below or the image attached. So I add an event probe on > videoconvert "conv2" when I add that source, I will get EOS as expected the > first time , but after that every time the EOS event will push immediately > to the probe, please help me figure it, thanks EOS is a sticky event, you need to send flush-start/flush-stop sequence on all the produced for this sub-graph to clear the EOS. > > > videomixer name=mix ! autovideosink \ > videotestsrc ! videoconvert ! mix. \ > videotestsrc name=src2 num-buffers=200 ! videoconvert name=conv2 ! mix. \ > > <http://gstreamer-devel.966125.n4.nabble.com/file/t378770/ggs122.jpg> > > 1) remove src2 and conv2 from pipeline > 2) new src2 (with num-buffers set) and conv2, link src2-conv2-mixer > 3) add probe > pad = gst_element_get_static_pad(conv2, "sink"); > gst_pad_add_probe(pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, > padProbeCallback, data, NULL); > > 4) padProbeCallback(GstPad *pad, GstPadProbeInfo *info, gpointer user_data) > { > GstEvent *event = gst_pad_probe_info_get_event(info); > if (GST_EVENT_TYPE(event) == GST_EVENT_EOS) { > #goto 1) > } > } > > > > -- > 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 |
After experiment I guess the problem is when a new sub graph is added to the
pipeline, the pipeline tries to seek data using the clock time, I tried to gst_pad_set_offset(mixer, offsettime) but it seems not work, could you give me suggestions -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
I find a similar question here:
http://gstreamer-devel.966125.n4.nabble.com/gst-1-2-2-remove-a-request-pad-from-videomixer-cause-SEGFAULT-td4664827.html , only set offset on the pad is not enough, the QOS request sent to the pipeline will be a mess and causing problems. I have dropped the QOS request for now, but the right approach is to modify the QOS response instead maybe? -- Sent from: http://gstreamer-devel.966125.n4.nabble.com/ _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Le sam. 23 mars 2019 07 h 11, longkas <[hidden email]> a écrit : I find a similar question here: That would match what we do in streamsynchronizer element. We found though the it can be racy in some circumstances, just be aware. Usually if you combine with a blocking probe it's ok.
_______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |