From c8db05d610be2e42ca82e1525348b88f6cf9d7f4 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 7 Nov 2013 16:17:16 +0100 Subject: [PATCH] rtpsource: update receiver stats for sender 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 | 1 + gst/rtpmanager/rtpsource.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index d06ad26..c023012 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -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); diff --git a/gst/rtpmanager/rtpsource.c b/gst/rtpmanager/rtpsource.c index 1c8f7f8..2c71fd3 100644 --- a/gst/rtpmanager/rtpsource.c +++ b/gst/rtpmanager/rtpsource.c @@ -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; -- 2.7.4