diff --git a/gst/rtpmanager/rtpsession.c b/gst/rtpmanager/rtpsession.c index 7db89e01cc..bcbc528391 100644 --- a/gst/rtpmanager/rtpsession.c +++ b/gst/rtpmanager/rtpsession.c @@ -2774,6 +2774,8 @@ rtp_session_process_feedback (RTPSession * sess, GstRTCPPacket * packet, case GST_RTCP_TYPE_RTPFB: switch (fbtype) { case GST_RTCP_RTPFB_TYPE_NACK: + if (src) + src->stats.recv_nack_count++; rtp_session_process_nack (sess, sender_ssrc, media_ssrc, fci_data, fci_length, current_time); break; @@ -3526,6 +3528,7 @@ session_nack (const gchar * key, RTPSource * source, ReportData * data) rtp_source_clear_nacks (source); data->may_suppress = FALSE; + source->stats.sent_nack_count += n_nacks; } /* perform cleanup of sources that timed out */ diff --git a/gst/rtpmanager/rtpsource.c b/gst/rtpmanager/rtpsource.c index b0177d4bdb..3554e0d235 100644 --- a/gst/rtpmanager/rtpsource.c +++ b/gst/rtpmanager/rtpsource.c @@ -271,6 +271,8 @@ rtp_source_reset (RTPSource * src) src->stats.sent_pli_count = 0; src->stats.sent_fir_count = 0; + src->stats.sent_nack_count = 0; + src->stats.recv_nack_count = 0; } static void @@ -400,7 +402,9 @@ rtp_source_create_stats (RTPSource * src) "sent-pli-count", G_TYPE_UINT, src->stats.sent_pli_count, "recv-pli-count", G_TYPE_UINT, src->stats.recv_pli_count, "sent-fir-count", G_TYPE_UINT, src->stats.sent_fir_count, - "recv-fir-count", G_TYPE_UINT, src->stats.recv_fir_count, NULL); + "recv-fir-count", G_TYPE_UINT, src->stats.recv_fir_count, + "sent-nack-count", G_TYPE_UINT, src->stats.sent_nack_count, + "recv-nack-count", G_TYPE_UINT, src->stats.recv_nack_count, NULL); /* get the last SR. */ have_sr = rtp_source_get_last_sr (src, &time, &ntptime, &rtptime, diff --git a/gst/rtpmanager/rtpstats.h b/gst/rtpmanager/rtpstats.h index 14ba9da692..a7803b58b5 100644 --- a/gst/rtpmanager/rtpstats.h +++ b/gst/rtpmanager/rtpstats.h @@ -142,6 +142,8 @@ typedef struct { guint recv_pli_count; guint sent_fir_count; guint recv_fir_count; + guint sent_nack_count; + guint recv_nack_count; /* when we received stuff */ GstClockTime prev_rtptime;