]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
[mod_conference] make conference breakable
authorSeven Du <dujinfang@gmail.com>
Sat, 12 Oct 2019 02:39:48 +0000 (10:39 +0800)
committerAndrey Volk <andywolk@gmail.com>
Sat, 23 Oct 2021 18:59:48 +0000 (21:59 +0300)
src/mod/applications/mod_conference/conference_loop.c
src/mod/applications/mod_conference/conference_utils.c
src/mod/applications/mod_conference/mod_conference.h

index 5d284fab97ac8077cbc08a844f6cb8194da2ad24..25b418c55db15a89c422f2ab793f5b3388bf536f 100644 (file)
@@ -839,6 +839,13 @@ void *SWITCH_THREAD_FUNC conference_loop_input(switch_thread_t *thread, void *ob
                        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. */
                status = switch_core_session_read_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
 
index 48716cc269008822bf8d84047a0f125de722e52e..eb482b91658bc47865f69fa5951d9ca67e8046b0 100644 (file)
@@ -216,6 +216,8 @@ void conference_utils_set_cflags(const char *flags, conference_flag_t *f)
                                f[CFLAG_PERSONAL_CANVAS] = 1;
                        } else if (!strcasecmp(argv[i], "ded-vid-layer-audio-floor")) {
                                f[CFLAG_DED_VID_LAYER_AUDIO_FLOOR] = 1;
+                       } else if (!strcasecmp(argv[i], "breakable")) {
+                               f[CFLAG_BREAKABLE] = 1;
                        }
                }
 
index e551a4d0533a3a1fd597817a7e6ca835b05e3517..f63838ecf603086dcd8a74a1501f8d4abf4223b7 100644 (file)
@@ -255,6 +255,7 @@ typedef enum {
        CFLAG_VIDEO_MUTE_EXIT_CANVAS,
        CFLAG_NO_MOH,
        CFLAG_DED_VID_LAYER_AUDIO_FLOOR,
+       CFLAG_BREAKABLE,
        /////////////////////////////////
        CFLAG_MAX
 } conference_flag_t;