提交 ff8bf014 authored 作者: Anthony Minessale's avatar Anthony Minessale 提交者: Michael Jerris

FS-7500: change variable names to reflect audio vs video %NEEDS_DOC

remote_media_ip_reported => remote_audio_ip_reported and remote_video_ip_reported
new vars remote_audio_ip and remote_video_ip like remote_media_ip but specific to audio and video
remote_media_port_reported => remote_audio_port_reported and remote_audio_port_reported
remote_media_port => remote_audio_port and remote_video_port
rtp_auto_adjust => rtp_auto_adjust_audio and rtp_auto_adjust_video
上级 d253f74e
......@@ -6318,12 +6318,23 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
switch_sockaddr_get_port(rtp_session->rtp_from_addr));
if (channel) {
switch_channel_set_variable(channel, "remote_media_ip_reported", switch_channel_get_variable(channel, "remote_media_ip"));
switch_channel_set_variable(channel, "remote_media_ip", tx_host);
char varname[80] = "";
switch_snprintf(varname, sizeof(varname), "remote_%s_ip_reported", rtp_type(rtp_session));
switch_channel_set_variable(channel, varname, switch_channel_get_variable(channel, "remote_media_ip"));
switch_snprintf(varname, sizeof(varname), "remote_%s_ip", rtp_type(rtp_session));
switch_channel_set_variable(channel, varname, tx_host);
switch_snprintf(varname, sizeof(varname), "remote_%s_port_reported", rtp_type(rtp_session));
switch_snprintf(adj_port, sizeof(adj_port), "%u", switch_sockaddr_get_port(rtp_session->rtp_from_addr));
switch_channel_set_variable(channel, "remote_media_port_reported", switch_channel_get_variable(channel, "remote_media_port"));
switch_channel_set_variable(channel, "remote_media_port", adj_port);
switch_channel_set_variable(channel, "rtp_auto_adjust", "true");
switch_channel_set_variable(channel, varname, switch_channel_get_variable(channel, "remote_media_port"));
switch_snprintf(varname, sizeof(varname), "remote_%s_port", rtp_type(rtp_session));
switch_channel_set_variable(channel, varname, adj_port);
switch_snprintf(varname, sizeof(varname), "rtp_auto_adjust_%s", rtp_type(rtp_session));
switch_channel_set_variable(channel, varname, "true");
}
rtp_session->auto_adj_used = 1;
switch_rtp_set_remote_address(rtp_session, tx_host, switch_sockaddr_get_port(rtp_session->rtp_from_addr), 0, SWITCH_FALSE, &err);
......@@ -6340,7 +6351,7 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
if ((rtp_session->rtp_bugs & RTP_BUG_ALWAYS_AUTO_ADJUST)) {
switch_rtp_set_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
} else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG, "Correct ip/port confirmed.\n");
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_DEBUG, "Correct %s ip/port confirmed.\n", rtp_type(rtp_session));
switch_rtp_clear_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ);
}
rtp_session->auto_adj_used = 0;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论