Always get EOS on pad probe

longkas longkas at gmail.com
Fri Mar 22 12:24:47 UTC 2019


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/


More information about the gstreamer-devel mailing list