rtpsource: update receiver stats for sender
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 7 Nov 2013 15:17:16 +0000 (16:17 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 7 Nov 2013 15:24:30 +0000 (16:24 +0100)
An internal sender in a session is also a receiver of its own packets so update
the receiver stats. Other senders in the session will use this info to generate
correct RB blocks in their SR reports.

gst/rtpmanager/rtpsession.c
gst/rtpmanager/rtpsource.c

index d06ad26..c023012 100644 (file)
@@ -1370,6 +1370,7 @@ obtain_internal_source (RTPSession * sess, guint32 ssrc, gboolean * created)
 
     source->validated = TRUE;
     source->internal = TRUE;
+    source->probation = FALSE;
     rtp_source_set_sdes_struct (source, gst_structure_copy (sess->sdes));
     rtp_source_set_callbacks (source, &callbacks, sess);
 
index 1c8f7f8..2c71fd3 100644 (file)
@@ -1174,6 +1174,8 @@ rtp_source_send_rtp (RTPSource * src, RTPPacketInfo * pinfo)
   src->stats.packets_sent += pinfo->packets;
   src->stats.octets_sent += pinfo->payload_len;
   src->bytes_sent += pinfo->payload_len;
+  /* we are also a receiver of our packets */
+  update_receiver_stats (src, pinfo);
 
   running_time = pinfo->running_time;