RTPBIN Stream Statistic

I am using the RTPBIN component to send and receive an audio/video stream over RTP with RTCP. I’d like to generate statistics for my stream. I found that inside the rtpbin there’s an rtpsession element with a "stats" property, but the values inside this structure are a bit unclear. Specifically, I’m interested in fields like jitter, packets‑lost, and so on.

The documentation states:

When "is-sender" is TRUE, the following fields are updated:

  • “bitrate” (G_TYPE_UINT64) – bitrate in bits per second
  • “jitter” (G_TYPE_UINT) – estimated jitter (in clock-rate units)
  • “packets-lost” (G_TYPE_INT) – estimated number of packets lost

What do these integer values for jitter and packets-lost actually mean? How can I convert them into something more user-friendly? Often I get packets-lost = -1 or another negative value.

Is there a better way to generate reliable statistics?

Stats documentation: RTPSource