mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-20 18:36:46 +00:00
FS-9522 more regression
This commit is contained in:
parent
cbb97d408a
commit
9edcbfe036
@ -3729,7 +3729,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
|
|||||||
int codec_ms = 0;
|
int codec_ms = 0;
|
||||||
uint32_t remote_codec_rate = 0, fmtp_remote_codec_rate = 0;
|
uint32_t remote_codec_rate = 0, fmtp_remote_codec_rate = 0;
|
||||||
const char *tmp;
|
const char *tmp;
|
||||||
int m_idx = 0;
|
int m_idx = 0, skip_rtcp = 0, skip_video_rtcp = 0;
|
||||||
int nm_idx = 0;
|
int nm_idx = 0;
|
||||||
int vmatch_pt = 0;
|
int vmatch_pt = 0;
|
||||||
int rtcp_auto_audio = 0, rtcp_auto_video = 0;
|
int rtcp_auto_audio = 0, rtcp_auto_video = 0;
|
||||||
@ -4139,11 +4139,18 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
skip_rtcp = 0;
|
||||||
for (attr = m->m_attributes; attr; attr = attr->a_next) {
|
for (attr = m->m_attributes; attr; attr = attr->a_next) {
|
||||||
|
if (!strcasecmp(attr->a_name, "rtcp-mux") || !strcasecmp(attr->a_name, "ice-ufrag")) {
|
||||||
|
skip_rtcp = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!strcasecmp(attr->a_name, "rtcp") && attr->a_value) {
|
for (attr = m->m_attributes; attr; attr = attr->a_next) {
|
||||||
switch_channel_set_variable(session->channel, "rtp_remote_audio_rtcp_port", attr->a_value);
|
if (!strcasecmp(attr->a_name, "rtcp") && attr->a_value && !skip_rtcp) {
|
||||||
a_engine->remote_rtcp_port = (switch_port_t)atoi(attr->a_value);
|
a_engine->remote_rtcp_port = (switch_port_t)atoi(attr->a_value);
|
||||||
|
switch_channel_set_variable_printf(session->channel, "rtp_remote_audio_rtcp_port", "%d", a_engine->remote_rtcp_port);
|
||||||
|
|
||||||
if (!smh->mparams->rtcp_audio_interval_msec) {
|
if (!smh->mparams->rtcp_audio_interval_msec) {
|
||||||
smh->mparams->rtcp_audio_interval_msec = SWITCH_RTCP_AUDIO_INTERVAL_MSEC;
|
smh->mparams->rtcp_audio_interval_msec = SWITCH_RTCP_AUDIO_INTERVAL_MSEC;
|
||||||
}
|
}
|
||||||
@ -4691,19 +4698,10 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_true(switch_channel_get_variable_dup(session->channel, "inherit_codec", SWITCH_FALSE, -1))) {
|
skip_video_rtcp = 0;
|
||||||
vmatch_pt = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
compare:
|
|
||||||
|
|
||||||
for (map = m->m_rtpmaps; map; map = map->rm_next) {
|
|
||||||
|
|
||||||
if (switch_rtp_has_dtls() && dtls_ok(session)) {
|
|
||||||
for (attr = m->m_attributes; attr; attr = attr->a_next) {
|
for (attr = m->m_attributes; attr; attr = attr->a_next) {
|
||||||
if (!strcasecmp(attr->a_name, "fingerprint") && !zstr(attr->a_value)) {
|
if (!strcasecmp(attr->a_name, "rtcp-mux") || !strcasecmp(attr->a_name, "ice-ufrag")) {
|
||||||
got_video_crypto = 1;
|
skip_video_rtcp = 1;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4729,10 +4727,11 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
|
|||||||
}
|
}
|
||||||
|
|
||||||
rtcp_auto_video = 1;
|
rtcp_auto_video = 1;
|
||||||
|
smh->mparams->rtcp_video_interval_msec = SWITCH_RTCP_VIDEO_INTERVAL_MSEC;
|
||||||
}
|
}
|
||||||
} else if (!strcasecmp(attr->a_name, "rtcp") && attr->a_value) {
|
} else if (!strcasecmp(attr->a_name, "rtcp") && attr->a_value && !skip_video_rtcp) {
|
||||||
switch_channel_set_variable(session->channel, "rtp_remote_video_rtcp_port", attr->a_value);
|
|
||||||
v_engine->remote_rtcp_port = (switch_port_t)atoi(attr->a_value);
|
v_engine->remote_rtcp_port = (switch_port_t)atoi(attr->a_value);
|
||||||
|
switch_channel_set_variable_printf(session->channel, "rtp_remote_video_rtcp_port", "%d", v_engine->remote_rtcp_port);
|
||||||
if (!smh->mparams->rtcp_video_interval_msec) {
|
if (!smh->mparams->rtcp_video_interval_msec) {
|
||||||
smh->mparams->rtcp_video_interval_msec = SWITCH_RTCP_VIDEO_INTERVAL_MSEC;
|
smh->mparams->rtcp_video_interval_msec = SWITCH_RTCP_VIDEO_INTERVAL_MSEC;
|
||||||
}
|
}
|
||||||
@ -4759,6 +4758,23 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (switch_true(switch_channel_get_variable_dup(session->channel, "inherit_codec", SWITCH_FALSE, -1))) {
|
||||||
|
vmatch_pt = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
compare:
|
||||||
|
|
||||||
|
for (map = m->m_rtpmaps; map; map = map->rm_next) {
|
||||||
|
|
||||||
|
if (switch_rtp_has_dtls() && dtls_ok(session)) {
|
||||||
|
for (attr = m->m_attributes; attr; attr = attr->a_next) {
|
||||||
|
if (!strcasecmp(attr->a_name, "fingerprint") && !zstr(attr->a_value)) {
|
||||||
|
got_video_crypto = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!(rm_encoding = map->rm_encoding)) {
|
if (!(rm_encoding = map->rm_encoding)) {
|
||||||
rm_encoding = "";
|
rm_encoding = "";
|
||||||
}
|
}
|
||||||
@ -4904,7 +4920,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rtcp_auto_audio || rtcp_auto_video) {
|
if (rtcp_auto_audio || rtcp_auto_video) {
|
||||||
if (rtcp_auto_audio && !got_audio_rtcp && audio_port) {
|
if (rtcp_auto_audio && !skip_rtcp && !got_audio_rtcp && audio_port) {
|
||||||
switch_channel_set_variable_printf(session->channel, "rtp_remote_audio_rtcp_port", "%d", audio_port + 1);
|
switch_channel_set_variable_printf(session->channel, "rtp_remote_audio_rtcp_port", "%d", audio_port + 1);
|
||||||
a_engine->remote_rtcp_port = audio_port + 1;
|
a_engine->remote_rtcp_port = audio_port + 1;
|
||||||
|
|
||||||
@ -4912,7 +4928,7 @@ SWITCH_DECLARE(uint8_t) switch_core_media_negotiate_sdp(switch_core_session_t *s
|
|||||||
smh->mparams->rtcp_audio_interval_msec = SWITCH_RTCP_AUDIO_INTERVAL_MSEC;
|
smh->mparams->rtcp_audio_interval_msec = SWITCH_RTCP_AUDIO_INTERVAL_MSEC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (rtcp_auto_video && !got_video_rtcp && video_port) {
|
if (rtcp_auto_video && !skip_video_rtcp && !got_video_rtcp && video_port) {
|
||||||
switch_channel_set_variable_printf(session->channel, "rtp_remote_video_rtcp_port", "%d", video_port + 1);
|
switch_channel_set_variable_printf(session->channel, "rtp_remote_video_rtcp_port", "%d", video_port + 1);
|
||||||
v_engine->remote_rtcp_port = video_port + 1;
|
v_engine->remote_rtcp_port = video_port + 1;
|
||||||
if (!smh->mparams->rtcp_video_interval_msec) {
|
if (!smh->mparams->rtcp_video_interval_msec) {
|
||||||
|
@ -2785,6 +2785,7 @@ SWITCH_DECLARE(void) switch_rtp_reset_jb(switch_rtp_t *rtp_session)
|
|||||||
|
|
||||||
SWITCH_DECLARE(void) switch_rtp_reset_vb(switch_rtp_t *rtp_session)
|
SWITCH_DECLARE(void) switch_rtp_reset_vb(switch_rtp_t *rtp_session)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (rtp_session->vb) {
|
if (rtp_session->vb) {
|
||||||
switch_jb_reset(rtp_session->vb);
|
switch_jb_reset(rtp_session->vb);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user