FS-7500: reverse default for CF_VIDEO_ECHO to false and now it must be enabled when desired instead of disabled when not needed

This commit is contained in:
Anthony Minessale 2014-11-20 11:33:25 -06:00 committed by Michael Jerris
parent 4dc155f164
commit c584bf5511
6 changed files with 3 additions and 16 deletions

View File

@ -2252,10 +2252,7 @@ static switch_status_t conference_add_member(conference_obj_t *conference, confe
if (switch_channel_test_flag(channel, CF_VIDEO)) {
if (switch_test_flag(conference, CFLAG_VIDEO_BRIDGE)) {
switch_channel_set_flag(channel, CF_VIDEO_ECHO);
switch_channel_clear_flag(channel, CF_VIDEO_PASSIVE);
} else {
switch_channel_clear_flag(channel, CF_VIDEO_ECHO);
}
/* Tell the channel to request a fresh vid frame */
switch_core_session_refresh_video(member->session);
@ -2503,7 +2500,6 @@ static void conference_set_video_floor_holder(conference_obj_t *conference, conf
if (!imember->channel || !switch_channel_test_flag(imember->channel, CF_VIDEO)) {
continue;
}
switch_channel_clear_flag(imember->channel, CF_VIDEO_ECHO);
if (imember == conference->video_floor_holder) {
switch_channel_set_flag(imember->channel, CF_VIDEO_PASSIVE);
@ -4334,7 +4330,6 @@ static void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, v
if (switch_channel_test_flag(channel, CF_VIDEO) && !switch_test_flag(member, MFLAG_ACK_VIDEO)) {
switch_set_flag_locked(member, MFLAG_ACK_VIDEO);
switch_channel_clear_flag(channel, CF_VIDEO_ECHO);
switch_core_session_refresh_video(member->session);
conference_set_video_floor_holder(member->conference, member, SWITCH_FALSE);
}

View File

@ -616,7 +616,6 @@ SWITCH_STANDARD_APP(play_yuv_function)
yuv = img->planes[SWITCH_PLANE_PACKED];
// switch_channel_set_flag(channel, CF_VIDEO_PASSIVE);
switch_channel_clear_flag(channel, CF_VIDEO_ECHO);
vid_buffer = switch_core_session_alloc(session, SWITCH_RECOMMENDED_BUFFER_SIZE);
@ -699,9 +698,7 @@ SWITCH_STANDARD_APP(play_yuv_function)
done:
switch_core_session_reset(session, SWITCH_TRUE, SWITCH_TRUE);
// switch_channel_clear_flag(channel, CF_VIDEO_PASSIVE);
switch_channel_set_flag(channel, CF_VIDEO_ECHO);
}

View File

@ -613,9 +613,6 @@ SWITCH_STANDARD_APP(play_video_function)
switch_size_t audio_datalen;
switch_channel_clear_flag(channel, CF_VIDEO_ECHO);
context = switch_core_session_alloc(session, sizeof(vlc_video_context_t));
switch_assert(context);
memset(context, 0, sizeof(vlc_file_context_t));

View File

@ -2677,7 +2677,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_execute_application_async(sw
SWITCH_DECLARE(void) switch_core_session_video_reset(switch_core_session_t *session)
{
switch_channel_set_flag(session->channel, CF_VIDEO_ECHO);
switch_channel_clear_flag(session->channel, CF_VIDEO_ECHO);
switch_channel_clear_flag(session->channel, CF_VIDEO_PASSIVE);
switch_channel_clear_flag(session->channel, CF_VIDEO_DECODED_READ);
switch_core_session_refresh_video(session);

View File

@ -652,6 +652,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_echo(switch_core_session_t *s
switch_core_session_raw_read(session);
}
switch_channel_set_flag(channel, CF_VIDEO_ECHO);
while (switch_channel_ready(channel)) {
status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
if (!SWITCH_READ_ACCEPTABLE(status)) {

View File

@ -244,10 +244,6 @@ static void *audio_bridge_thread(switch_thread_t *thread, void *obj)
chan_a = switch_core_session_get_channel(session_a);
chan_b = switch_core_session_get_channel(session_b);
switch_channel_clear_flag(chan_a, CF_VIDEO_ECHO);
switch_channel_clear_flag(chan_b, CF_VIDEO_ECHO);
if ((exec_app = switch_channel_get_variable(chan_a, "bridge_pre_execute_app"))) {
exec_data = switch_channel_get_variable(chan_a, "bridge_pre_execute_data");
}