Always get EOS on pad probe

Nicolas Dufresne nicolas at ndufresne.ca
Fri Mar 22 12:46:39 UTC 2019


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
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list