FS-9150 #resolve ["video-mute-exit-canvas" param combined with "video-bridge-first-two" causes video feed to flip back and forth between feeds when users video-mute]

This commit is contained in:
Anthony Minessale 2016-05-31 20:35:00 -05:00
parent e4b141c5f8
commit c0d9901b8b
4 changed files with 13 additions and 4 deletions

View File

@ -166,7 +166,7 @@ void conference_utils_set_cflags(const char *flags, conference_flag_t *f)
if (flags) {
char *dup = strdup(flags);
char *p;
char *argv[10] = { 0 };
char *argv[25] = { 0 };
int i, argc = 0;
for (p = dup; p && *p; p++) {

View File

@ -2314,7 +2314,7 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr
members_with_avatar = conference->members_with_avatar;
if (conference_utils_test_flag(conference, CFLAG_VIDEO_BRIDGE_FIRST_TWO)) {
if (conference->members_with_video < 3) {
if (conference->members_seeing_video < 3) {
switch_yield(20000);
continue;
}
@ -3729,7 +3729,7 @@ switch_status_t conference_video_thread_callback(switch_core_session_t *session,
if (conference_utils_test_flag(member->conference, CFLAG_VIDEO_BRIDGE_FIRST_TWO)) {
if (member->conference->members_with_video < 3) {
if (member->conference->members_seeing_video < 3) {
conference_video_write_frame(member->conference, member, frame);
conference_video_check_recording(member->conference, NULL, frame);
switch_thread_rwlock_unlock(member->conference->rwlock);

View File

@ -233,7 +233,7 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
while (conference_globals.running && !conference_utils_test_flag(conference, CFLAG_DESTRUCT)) {
switch_size_t file_sample_len = samples;
switch_size_t file_data_len = samples * 2 * conference->channels;
int has_file_data = 0, members_with_video = 0, members_with_avatar = 0;
int has_file_data = 0, members_with_video = 0, members_with_avatar = 0, members_seeing_video = 0;
uint32_t conference_energy = 0;
int nomoh = 0;
conference_member_t *floor_holder;
@ -288,6 +288,13 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
members_with_video++;
}
if (switch_channel_ready(channel) &&
switch_channel_test_flag(channel, CF_VIDEO_READY) &&
imember->video_media_flow != SWITCH_MEDIA_FLOW_SENDONLY &&
!conference_utils_member_test_flag(imember, MFLAG_SECOND_SCREEN)) {
members_seeing_video++;
}
if (imember->avatar_png_img && !switch_channel_test_flag(channel, CF_VIDEO)) {
members_with_avatar++;
}
@ -310,6 +317,7 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob
}
conference->members_with_video = members_with_video;
conference->members_seeing_video = members_seeing_video;
conference->members_with_avatar = members_with_avatar;
if (floor_holder != conference->floor_holder) {

View File

@ -568,6 +568,7 @@ typedef struct conference_obj {
conference_video_mode_t conference_video_mode;
int video_quality;
int members_with_video;
int members_seeing_video;
int members_with_avatar;
uint32_t auto_kps_debounce;
switch_codec_settings_t video_codec_settings;