Probing the element UDP source when no data exists on the port.

James Cameron quozl at
Wed Sep 19 01:13:05 UTC 2018

Broken communication for a UDP link is absence of packets arriving;
there's usually no other reliable indicator.  You must be able to
predict how often packets will arrive in order to declare them

You might try the udpsrc element property timeout, which when packets
are missing for long enough will send a message GstUDPSrcTimeout.

Your description of how add_probe of source pad worked for you is
expected; at most network data rates there always will be a time that
the pad is idle.  I don't know about the PUSH though.

On Tue, Sep 18, 2018 at 10:17:06AM -0500, vk_gst wrote:
> Hello,
> I have the following pipeline at the receiver side where I receive live
> video feed from a server over UDP:
> udpsrc port = xxxx  ! rtph264depay ! h264parse ! avdec_h264 ! autovideosink
> I want to be notified, if the communication link between the client-server
> is broken. So I did a 'add_probe' on the 'source' pad of element 'udpsrc' to
> be notified for probetype - GST_PAD_PROBE_TYPE_IDLE. i.e. when there is no
> data at the source, get notified. However, with this probe type, the
> callback is called always. Later I tried probing for
> info regarding the push from udpsrc. But the callback was never called. 
> I am using python-bindings and this is how I am adding the probes:
> self.srcpad.add_probe(Gst.PadProbeType.IDLE |
> Gst.PadProbeType.PUSH,self.probe_cb)
> Could anyone give me some pointers as to what would be the correct way to
> probe, and get notified when there is no data at the source? Also, when the
> data is available next time, normal operation proceeds. 
> Regards
> --
> Sent from:
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at

James Cameron

More information about the gstreamer-devel mailing list