FS-4684 please test

This commit is contained in:
Anthony Minessale 2012-10-16 09:27:03 -04:00
parent faefb06606
commit 1f5f9408a0
1 changed files with 8 additions and 3 deletions

View File

@ -1831,6 +1831,8 @@ void sofia_glue_tech_patch_sdp(private_object_t *tech_pvt)
tech_pvt->video_codec_ms = 0; tech_pvt->video_codec_ms = 0;
switch_snprintf(vport_buf, sizeof(vport_buf), "%u", tech_pvt->adv_sdp_video_port); switch_snprintf(vport_buf, sizeof(vport_buf), "%u", tech_pvt->adv_sdp_video_port);
if (switch_channel_media_ready(tech_pvt->channel) && !switch_rtp_ready(tech_pvt->video_rtp_session)) { if (switch_channel_media_ready(tech_pvt->channel) && !switch_rtp_ready(tech_pvt->video_rtp_session)) {
sofia_set_flag(tech_pvt, TFLAG_VIDEO);
sofia_set_flag(tech_pvt, TFLAG_REINVITE);
sofia_glue_activate_rtp(tech_pvt, 0); sofia_glue_activate_rtp(tech_pvt, 0);
} }
} }
@ -3240,7 +3242,8 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
goto end; goto end;
} }
if (switch_rtp_ready(tech_pvt->rtp_session) && !sofia_test_flag(tech_pvt, TFLAG_REINVITE)) { if (switch_rtp_ready(tech_pvt->rtp_session) &&
(!sofia_test_flag(tech_pvt, TFLAG_VIDEO) || switch_rtp_ready(tech_pvt->video_rtp_session)) && !sofia_test_flag(tech_pvt, TFLAG_REINVITE)) {
status = SWITCH_STATUS_SUCCESS; status = SWITCH_STATUS_SUCCESS;
goto end; goto end;
} }
@ -3249,6 +3252,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
goto end; goto end;
} }
if (myflags) { if (myflags) {
flags = myflags; flags = myflags;
} else if (!sofia_test_pflag(tech_pvt->profile, PFLAG_DISABLE_RTP_AUTOADJ) && } else if (!sofia_test_pflag(tech_pvt->profile, PFLAG_DISABLE_RTP_AUTOADJ) &&
@ -3659,10 +3663,10 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
video: video:
sofia_glue_check_video_codecs(tech_pvt); sofia_glue_check_video_codecs(tech_pvt);
if (sofia_test_flag(tech_pvt, TFLAG_VIDEO) && tech_pvt->video_rm_encoding && tech_pvt->remote_sdp_video_port) { if (sofia_test_flag(tech_pvt, TFLAG_VIDEO) && tech_pvt->video_rm_encoding && tech_pvt->remote_sdp_video_port) {
/******************************************************************************************/ /******************************************************************************************/
if (tech_pvt->video_rtp_session && sofia_test_flag(tech_pvt, TFLAG_REINVITE)) { if (tech_pvt->video_rtp_session && sofia_test_flag(tech_pvt, TFLAG_REINVITE)) {
//const char *ip = switch_channel_get_variable(tech_pvt->channel, SWITCH_LOCAL_MEDIA_IP_VARIABLE); //const char *ip = switch_channel_get_variable(tech_pvt->channel, SWITCH_LOCAL_MEDIA_IP_VARIABLE);
@ -3671,6 +3675,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
switch_port_t remote_port = switch_rtp_get_remote_port(tech_pvt->video_rtp_session); switch_port_t remote_port = switch_rtp_get_remote_port(tech_pvt->video_rtp_session);
if (remote_host && remote_port && !strcmp(remote_host, tech_pvt->remote_sdp_video_ip) && remote_port == tech_pvt->remote_sdp_video_port) { if (remote_host && remote_port && !strcmp(remote_host, tech_pvt->remote_sdp_video_ip) && remote_port == tech_pvt->remote_sdp_video_port) {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Video params are unchanged for %s.\n", switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(tech_pvt->session), SWITCH_LOG_DEBUG, "Video params are unchanged for %s.\n",
switch_channel_get_name(tech_pvt->channel)); switch_channel_get_name(tech_pvt->channel));