uint32_t init;
} switch_rtcp_numbers_t;
+typedef struct {
+ uint16_t nack_count;
+ uint16_t fir_count;
+ uint16_t pli_count;
+ uint16_t sr_count;
+ uint16_t rr_count;
+} switch_rtcp_video_counters_t;
+
+typedef struct {
+ /* counters and stats for the incoming video stream and outgoing RTCP*/
+ switch_rtcp_video_counters_t video_in;
+ /* counters and stats for the outgoing video stream and incoming RTCP*/
+ switch_rtcp_video_counters_t video_out;
+} switch_rtcp_video_stats_t;
+
typedef struct {
switch_rtp_numbers_t inbound;
switch_rtp_numbers_t outbound;
uint32_t cng_count;
switch_rtp_bug_flag_t rtp_bugs;
switch_rtp_stats_t stats;
+ switch_rtcp_video_stats_t rtcp_vstats;
uint32_t clean_stream;
uint32_t bad_stream;
uint32_t recovering_stream;
ext_hdr->send_ssrc = htonl(rtp_session->ssrc);
ext_hdr->recv_ssrc = htonl(rtp_session->remote_ssrc);
-
- switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG1, "Sending RTCP PLI %u %u\n",
- rtp_session->ssrc, rtp_session->remote_ssrc);
+ rtp_session->rtcp_vstats.video_in.pli_count++;
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG1, "Sending RTCP PLI %u %u [%u]\n",
+ rtp_session->ssrc, rtp_session->remote_ssrc, rtp_session->rtcp_vstats.video_in.pli_count);
ext_hdr->length = htons((uint8_t)(sizeof(switch_rtcp_ext_hdr_t) / 4) - 1);
rtcp_bytes += sizeof(switch_rtcp_ext_hdr_t);
if (rtp_session->flags[SWITCH_RTP_FLAG_NACK] && nack_ttl > 0) {
int n = 0;
+ rtp_session->rtcp_vstats.video_in.nack_count++;
for (n = 0; n < nack_ttl; n++) {
switch_rtcp_ext_hdr_t *ext_hdr;
uint32_t *nack;
fir->seq = rtp_session->fir_seq;
fir->r1 = fir->r2 = fir->r3 = 0;
- switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG1, "Sending RTCP FIR SEQ %d\n", rtp_session->fir_seq);
+ rtp_session->rtcp_vstats.video_in.fir_count++;
+ switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG1, "Sending RTCP FIR SEQ %d [%u]\n", rtp_session->fir_seq, rtp_session->rtcp_vstats.video_in.fir_count);
rtp_session->fir_seq++;
static switch_status_t process_rtcp_report(switch_rtp_t *rtp_session, rtcp_msg_t *msg, switch_size_t bytes)
{
switch_status_t status = SWITCH_STATUS_FALSE;
- int i;
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG3,
"RTCP packet bytes %" SWITCH_SIZE_T_FMT " type %d pad %d\n",