rtpsource: expose field bytes_received in RTPSourceStats
authorAntonio Ospite <antonio.ospite@collabora.com>
Thu, 4 Apr 2019 11:16:36 +0000 (13:16 +0200)
committerAntonio Ospite <antonio.ospite@collabora.com>
Fri, 2 Aug 2019 15:22:51 +0000 (17:22 +0200)
Since commit c971d1a9a (rtpsource: refactor bitrate estimation,
2010-03-02) bytes_received filed in RTPSourceStats is set but then never
used again, expose it so that it can be used  by user code to verify how
many bytes have been received.

gst/rtpmanager/rtpsource.c

index 78e6746..da357ee 100644 (file)
@@ -169,6 +169,7 @@ rtp_source_class_init (RTPSourceClass * klass)
    *
    *  "octets-received"  G_TYPE_UINT64  total number of bytes received
    *  "packets-received" G_TYPE_UINT64  total number of packets received
+   *  "bytes-received"   G_TYPE_UINT64  total number of bytes received including lower level headers overhead
    *
    * Following fields are updated when "is-sender" is TRUE.
    *
@@ -415,6 +416,7 @@ rtp_source_create_stats (RTPSource * src)
       "packets-sent", G_TYPE_UINT64, src->stats.packets_sent,
       "octets-received", G_TYPE_UINT64, src->stats.octets_received,
       "packets-received", G_TYPE_UINT64, src->stats.packets_received,
+      "bytes-received", G_TYPE_UINT64, src->stats.bytes_received,
       "bitrate", G_TYPE_UINT64, src->bitrate,
       "packets-lost", G_TYPE_INT,
       (gint) rtp_stats_get_packets_lost (&src->stats), "jitter", G_TYPE_UINT,