How to best obtain packet loss statistics from rtspsrc

John Weber rjohnweber at
Sun Oct 25 21:48:17 PDT 2015


I need to monitor packet loss statistics for a pipeline containing an
rtspsrc.  I'm using it to receive a single H.264 video stream for decode
and display on an IOS device.  I want to know packet loss for the RTP
connection within the RTSP source.

Based on some investigation into the Gstreamer source code and viewing a
pipeline graph, the GstRtspSrc creates a GstRtpBin.  The GstRtpBin creates
a GstRtpSession.  Within the session is an RtpSession object containing one
or more RtpSource elements (in my case it should be only one).

My original thought was to start search the pipeline for the GstRtpBin
element using gst_bin_get_by_interface(), looking specifically for a
GST_TYPE_RTP_BIN.  This doesn't seem to be easy or ideal because the header
defining GST_TYPE_RTP_BIN (gstrtpbin.h within plugins-good) is specifically
not exported for the development SDK.  This implies that the stuff I'm
trying to get to is private data, not to be messed with at the application

Ultimately, I want to be able to monitor packet loss and perhaps jitter
statistics in real time, primarily for diagnostic reasons (like
understanding the effect of various levels of packet loss on the decoder).
Since what I'm trying to do now seems unnatural (or at least against the
design intent), is there a better way to do this?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gstreamer-devel mailing list