提交 f1e304cc authored 作者: Anthony Minessale's avatar Anthony Minessale

wip

上级 aa3368a1
...@@ -4529,8 +4529,8 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess ...@@ -4529,8 +4529,8 @@ SWITCH_DECLARE(void) switch_core_media_gen_local_sdp(switch_core_session_t *sess
switch_true(switch_channel_get_variable(session->channel, "media_webrtc"))) { switch_true(switch_channel_get_variable(session->channel, "media_webrtc"))) {
switch_channel_set_flag(session->channel, CF_WEBRTC); switch_channel_set_flag(session->channel, CF_WEBRTC);
switch_channel_set_flag(session->channel, CF_ICE); switch_channel_set_flag(session->channel, CF_ICE);
smh->mparams->rtcp_audio_interval_msec = "2500"; smh->mparams->rtcp_audio_interval_msec = "5000";
smh->mparams->rtcp_video_interval_msec = "2500"; smh->mparams->rtcp_video_interval_msec = "5000";
} }
} }
......
...@@ -1217,7 +1217,7 @@ static int check_srtp_and_ice(switch_rtp_t *rtp_session) ...@@ -1217,7 +1217,7 @@ static int check_srtp_and_ice(switch_rtp_t *rtp_session)
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_ERROR, "Error: SRTP RTCP protection failed with code %d\n", stat); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_ERROR, "Error: SRTP RTCP protection failed with code %d\n", stat);
} }
rtcp_bytes = sbytes; rtcp_bytes = sbytes;
//printf("XXXXXXXXXXXXXXXXWTF PROTECT %ld bytes\n", rtcp_bytes); //printf("XXXXXXXXXXXXXXXXWTF1 PROTECT RTCP %d bytes %d\n", sbytes, rtp_session->rtcp_interval);
} }
#endif #endif
...@@ -2462,7 +2462,12 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_activate_rtcp(switch_rtp_t *rtp_sessi ...@@ -2462,7 +2462,12 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_activate_rtcp(switch_rtp_t *rtp_sessi
} else { } else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG, "RTCP send rate is: %d and packet rate is: %d Remote Port: %d\n", send_rate, rtp_session->ms_per_packet, rtp_session->remote_rtcp_port); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG, "RTCP send rate is: %d and packet rate is: %d Remote Port: %d\n", send_rate, rtp_session->ms_per_packet, rtp_session->remote_rtcp_port);
rtp_session->rtcp_interval = send_rate/(rtp_session->ms_per_packet/1000);
if (rtp_session->flags[SWITCH_RTP_FLAG_VIDEO]) {
rtp_session->rtcp_interval = send_rate / 20;
} else {
rtp_session->rtcp_interval = send_rate/(rtp_session->ms_per_packet/1000);
}
} }
if (rtp_session->flags[SWITCH_RTP_FLAG_RTCP_MUX]) { if (rtp_session->flags[SWITCH_RTP_FLAG_RTCP_MUX]) {
...@@ -3780,7 +3785,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_ ...@@ -3780,7 +3785,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_ERROR, "Error: SRTP RTCP protection failed with code %d\n", stat); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_ERROR, "Error: SRTP RTCP protection failed with code %d\n", stat);
} }
rtcp_bytes = sbytes; rtcp_bytes = sbytes;
//printf("XXXXXXXXXXXXXXXXWTF2 PROTECT RTCP %d bytes\n", sbytes);
} }
...@@ -4692,7 +4697,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session, ...@@ -4692,7 +4697,7 @@ static int rtp_common_write(switch_rtp_t *rtp_session,
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_ERROR, "Error: SRTP protection failed with code %d\n", stat); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_ERROR, "Error: SRTP protection failed with code %d\n", stat);
} }
//printf("XXXXXXXXXXXXXXXXWTF PROTECT RTP %d bytes\n", sbytes);
bytes = sbytes; bytes = sbytes;
} }
#endif #endif
...@@ -5093,6 +5098,7 @@ SWITCH_DECLARE(int) switch_rtp_write_manual(switch_rtp_t *rtp_session, ...@@ -5093,6 +5098,7 @@ SWITCH_DECLARE(int) switch_rtp_write_manual(switch_rtp_t *rtp_session,
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_ERROR, "Error: SRTP protection failed with code %d\n", stat); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_ERROR, "Error: SRTP protection failed with code %d\n", stat);
} }
bytes = sbytes; bytes = sbytes;
//printf("XXXXXXXXXXXXXXXXWTF PROTECT RTP %d bytes\n", sbytes);
} }
#endif #endif
#ifdef ENABLE_ZRTP #ifdef ENABLE_ZRTP
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论