add rtp_manual_video_rtp_bugs

This commit is contained in:
Anthony Minessale 2012-10-16 18:42:54 -04:00
parent 90c3b07ee0
commit a20aec182a
5 changed files with 16 additions and 3 deletions

View File

@ -1885,6 +1885,7 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
sofia_glue_check_video_codecs(tech_pvt);
sofia_glue_set_local_sdp(tech_pvt, NULL, 0, NULL, 1);
sofia_set_pflag(tech_pvt->profile, PFLAG_RENEG_ON_REINVITE);
sofia_clear_flag(tech_pvt, TFLAG_ENABLE_SOA);
}
sofia_glue_do_invite(session);

View File

@ -653,6 +653,7 @@ struct sofia_profile {
uint32_t max_registrations_perext;
switch_rtp_bug_flag_t auto_rtp_bugs;
switch_rtp_bug_flag_t manual_rtp_bugs;
switch_rtp_bug_flag_t manual_video_rtp_bugs;
uint32_t ib_calls;
uint32_t ob_calls;
uint32_t ib_failed_calls;
@ -821,6 +822,7 @@ struct private_object {
uint8_t codec_reinvites;
nua_event_t want_event;
switch_rtp_bug_flag_t rtp_bugs;
switch_rtp_bug_flag_t video_rtp_bugs;
switch_codec_implementation_t read_impl;
switch_codec_implementation_t write_impl;
char *user_via;

View File

@ -4621,6 +4621,8 @@ switch_status_t config_sofia(int reload, char *profile_name)
sofia_glue_parse_rtp_bugs(&profile->auto_rtp_bugs, val);
} else if (!strcasecmp(var, "manual-rtp-bugs")) {
sofia_glue_parse_rtp_bugs(&profile->manual_rtp_bugs, val);
} else if (!strcasecmp(var, "manual-video-rtp-bugs")) {
sofia_glue_parse_rtp_bugs(&profile->manual_video_rtp_bugs, val);
} else if (!strcasecmp(var, "dbname")) {
profile->dbname = switch_core_strdup(profile->pool, val);
} else if (!strcasecmp(var, "presence-hosts")) {

View File

@ -2967,6 +2967,7 @@ switch_status_t sofia_glue_tech_set_video_codec(private_object_t *tech_pvt, int
switch_core_session_receive_message(tech_pvt->session, &msg);
}
switch_channel_set_variable(tech_pvt->channel, "sip_use_video_codec_name", tech_pvt->video_rm_encoding);
@ -3702,6 +3703,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
switch_channel_set_variable(tech_pvt->channel, SWITCH_LOCAL_VIDEO_IP_VARIABLE, tech_pvt->adv_sdp_audio_ip);
switch_channel_set_variable(tech_pvt->channel, SWITCH_LOCAL_VIDEO_PORT_VARIABLE, tmp);
if (tech_pvt->video_rtp_session && sofia_test_flag(tech_pvt, TFLAG_REINVITE)) {
const char *rport = NULL;
switch_port_t remote_rtcp_port = 0;
@ -3815,6 +3817,13 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
}
if ((val = switch_channel_get_variable(tech_pvt->channel, "rtp_manual_video_rtp_bugs"))) {
sofia_glue_parse_rtp_bugs(&tech_pvt->video_rtp_bugs, val);
}
switch_rtp_intentional_bugs(tech_pvt->video_rtp_session, tech_pvt->video_rtp_bugs | tech_pvt->profile->manual_video_rtp_bugs);
if (tech_pvt->video_recv_pt != tech_pvt->video_agreed_pt) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG,
"%s Set video receive payload to %u\n", switch_channel_get_name(tech_pvt->channel), tech_pvt->video_recv_pt);
@ -5314,7 +5323,6 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, const char *r_s
}
}
if (mimp) {
if ((tech_pvt->video_rm_encoding = switch_core_session_strdup(session, (char *) rm_encoding))) {
char tmp[50];

View File

@ -3456,9 +3456,9 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
rtp_session->recv_msg.header.pt != 13 &&
rtp_session->recv_msg.header.pt != rtp_session->recv_te &&
(!rtp_session->cng_pt || rtp_session->recv_msg.header.pt != rtp_session->cng_pt) &&
rtp_session->recv_msg.header.pt != rtp_session->rpayload) {
rtp_session->recv_msg.header.pt != rtp_session->rpayload && !(rtp_session->rtp_bugs & RTP_BUG_ACCEPT_ANY_PACKETS)) {
/* drop frames of incorrect payload number and return CNG frame instead */
return_cng_frame();
return_cng_frame();
}
if (!bytes && (io_flags & SWITCH_IO_FLAG_NOBLOCK)) {