[mod_conference] make conference breakable

This commit is contained in:
Seven Du 2019-10-12 10:39:48 +08:00 committed by Andrey Volk
parent ce87856c91
commit 8e2bba1d9d
3 changed files with 10 additions and 0 deletions

View File

@ -839,6 +839,13 @@ void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, void *ob
continue; continue;
} }
if (conference_utils_test_flag(member->conference, CFLAG_BREAKABLE) &&
switch_channel_test_flag(channel, CF_BREAK)) {
switch_channel_clear_flag(channel, CF_BREAK);
status = SWITCH_STATUS_BREAK;
break;
}
/* Read a frame. */ /* Read a frame. */
status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0); status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);

View File

@ -216,6 +216,8 @@ void conference_utils_set_cflags(const char *flags, conference_flag_t *f)
f[CFLAG_PERSONAL_CANVAS] = 1; f[CFLAG_PERSONAL_CANVAS] = 1;
} else if (!strcasecmp(argv[i], "ded-vid-layer-audio-floor")) { } else if (!strcasecmp(argv[i], "ded-vid-layer-audio-floor")) {
f[CFLAG_DED_VID_LAYER_AUDIO_FLOOR] = 1; f[CFLAG_DED_VID_LAYER_AUDIO_FLOOR] = 1;
} else if (!strcasecmp(argv[i], "breakable")) {
f[CFLAG_BREAKABLE] = 1;
} }
} }

View File

@ -255,6 +255,7 @@ typedef enum {
CFLAG_VIDEO_MUTE_EXIT_CANVAS, CFLAG_VIDEO_MUTE_EXIT_CANVAS,
CFLAG_NO_MOH, CFLAG_NO_MOH,
CFLAG_DED_VID_LAYER_AUDIO_FLOOR, CFLAG_DED_VID_LAYER_AUDIO_FLOOR,
CFLAG_BREAKABLE,
///////////////////////////////// /////////////////////////////////
CFLAG_MAX CFLAG_MAX
} conference_flag_t; } conference_flag_t;