mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 20:51:58 +00:00
FS-7769: [mod_conference] Add new multi-canvas and telepresence features
mod_conference new features: add conference layout "1x1+2x1" and add to layout group grid add conference flag video-bridge-first-two conference flag add conference flag video-required-for-canvas to only use avatars for members with video add conference flag video-muxing-personal-canvas add conf_verto_ prefix for variables to pass on live array subscription notice add api command conference foo vid-canvas <member_id|all|last|non_moderator> [<newval>] add api command conference foo vid-layer <member_id|all|last|non_moderator> [<newval>] add api command conference foo vid-watching-canvas <member_id|all|last|non_moderator> [<newval>] changed api command conference foo vid-layout, args are now "<layout name>|group <group name> [<canvas_id>]" add channel vars you can set before entering conference video_initial_canvas and video_initial_watching_canvas add many new output status vars to conference list api add new conference member flag "second-screen" add config param video-canvas-count add config param video-super-canvas-label-layers add config param video-super-canvas-show-all-layers add config param video-super-canvas-bgcolor verto client: add google login add hipchat js file conf_verto_hipchatURL= to control what hipchat server appears if any global device init and overrides allow passing sessid add confMan.canvasCount add handling of multiple canvases and launching them, and controlling all of their layouts re-layout moderator controls and add support for changing the watching and input canvas and layers when launching another canvas, watch subscriptions for the original call so we can automatically close the additional window maintain camera settings on call recovery
This commit is contained in:
committed by
Michael Jerris
parent
1e40a020fa
commit
f726cb9a53
File diff suppressed because it is too large
Load Diff
@@ -1450,6 +1450,18 @@ SWITCH_STANDARD_APP(sched_cancel_function)
|
||||
static void base_set (switch_core_session_t *session, const char *data, switch_stack_t stack)
|
||||
{
|
||||
char *var, *val = NULL;
|
||||
const char *what = "SET";
|
||||
|
||||
switch (stack) {
|
||||
case SWITCH_STACK_PUSH:
|
||||
what = "PUSH";
|
||||
break;
|
||||
case SWITCH_STACK_UNSHIFT:
|
||||
what = "UNSHIFT";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (zstr(data)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No variable name specified.\n");
|
||||
@@ -1474,8 +1486,9 @@ static void base_set (switch_core_session_t *session, const char *data, switch_s
|
||||
expanded = switch_channel_expand_variables(channel, val);
|
||||
}
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s SET [%s]=[%s]\n", switch_channel_get_name(channel), var,
|
||||
expanded ? expanded : "UNDEF");
|
||||
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "%s %s [%s]=[%s]\n",
|
||||
what, switch_channel_get_name(channel), var, expanded ? expanded : "UNDEF");
|
||||
|
||||
switch_channel_add_variable_var_check(channel, var, expanded, SWITCH_FALSE, stack);
|
||||
|
||||
if (expanded && expanded != val) {
|
||||
|
||||
@@ -3259,7 +3259,7 @@ static switch_bool_t verto__info_func(const char *method, cJSON *params, jsock_t
|
||||
|
||||
static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock_t *jsock, cJSON **response)
|
||||
{
|
||||
cJSON *obj = cJSON_CreateObject(), *screenShare = NULL, *dedEnc = NULL, *mirrorInput;
|
||||
cJSON *obj = cJSON_CreateObject(), *screenShare = NULL, *dedEnc = NULL, *mirrorInput, *json_ptr = NULL;
|
||||
switch_core_session_t *session = NULL;
|
||||
switch_channel_t *channel;
|
||||
switch_event_t *var_event;
|
||||
@@ -3351,6 +3351,22 @@ static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock
|
||||
}
|
||||
}
|
||||
|
||||
if ((json_ptr = cJSON_GetObjectItem(dialog, "userVariables"))) {
|
||||
cJSON * i;
|
||||
|
||||
for(i = json_ptr->child; i; i = i->next) {
|
||||
char *varname = switch_core_session_sprintf(session, "verto_dvar_%s", i->string);
|
||||
|
||||
if (i->type == cJSON_True) {
|
||||
switch_channel_set_variable(channel, varname, "true");
|
||||
} else if (i->type == cJSON_False) {
|
||||
switch_channel_set_variable(channel, varname, "false");
|
||||
} else if (!zstr(i->string) && !zstr(i->valuestring)) {
|
||||
switch_channel_set_variable(channel, varname, i->valuestring);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch_snprintf(name, sizeof(name), "verto.rtc/%s", destination_number);
|
||||
switch_channel_set_name(channel, name);
|
||||
switch_channel_set_variable(channel, "jsock_uuid_str", jsock->uuid_str);
|
||||
|
||||
+26
-27
@@ -4907,7 +4907,6 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
||||
switch_core_session_request_video_refresh(session);
|
||||
|
||||
while (switch_channel_up_nosig(channel)) {
|
||||
int do_sleep = 0;
|
||||
int send_blank = 0;
|
||||
|
||||
if (!switch_channel_test_flag(channel, CF_VIDEO)) {
|
||||
@@ -4916,15 +4915,11 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!smh->video_write_fh && !smh->video_read_fh && switch_core_session_media_flow(session, SWITCH_MEDIA_TYPE_VIDEO) == SWITCH_MEDIA_FLOW_SENDONLY) {
|
||||
do_sleep = 1;
|
||||
}
|
||||
|
||||
if (!switch_channel_test_flag(channel, CF_VIDEO_DECODED_READ) && (++xloops > 20 || switch_channel_test_flag(channel, CF_VIDEO_PASSIVE))) {
|
||||
switch_channel_set_flag(channel, CF_VIDEO_READY);
|
||||
}
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_VIDEO_PASSIVE) || do_sleep) {
|
||||
if (switch_channel_test_flag(channel, CF_VIDEO_PASSIVE)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Video thread paused. Echo is %s\n",
|
||||
switch_channel_get_name(session->channel), switch_channel_test_flag(channel, CF_VIDEO_ECHO) ? "on" : "off");
|
||||
switch_thread_cond_wait(mh->cond, mh->cond_mutex);
|
||||
@@ -4933,7 +4928,7 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
||||
switch_core_session_request_video_refresh(session);
|
||||
}
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_VIDEO_PASSIVE) || do_sleep) {
|
||||
if (switch_channel_test_flag(channel, CF_VIDEO_PASSIVE)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -4964,27 +4959,25 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
||||
|
||||
if (v_engine->smode == SWITCH_MEDIA_FLOW_SENDONLY) {
|
||||
switch_channel_set_flag(channel, CF_VIDEO_READY);
|
||||
} else {
|
||||
|
||||
//if (!smh->video_write_fh || !switch_channel_test_flag(channel, CF_VIDEO_READY)) {
|
||||
status = switch_core_session_read_video_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
|
||||
|
||||
if (!SWITCH_READ_ACCEPTABLE(status)) {
|
||||
switch_cond_next();
|
||||
continue;
|
||||
}
|
||||
|
||||
//if (switch_test_flag(read_frame, SFF_CNG)) {
|
||||
// continue;
|
||||
//}
|
||||
//}
|
||||
|
||||
//if (vloops < 300 && (vloops % 100) == 0) {
|
||||
// switch_core_media_gen_key_frame(session);
|
||||
//switch_core_session_request_video_refresh(session);
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
//if (!smh->video_write_fh || !switch_channel_test_flag(channel, CF_VIDEO_READY)) {
|
||||
status = switch_core_session_read_video_frame(session, &read_frame, SWITCH_IO_FLAG_NONE, 0);
|
||||
|
||||
if (!SWITCH_READ_ACCEPTABLE(status)) {
|
||||
switch_cond_next();
|
||||
continue;
|
||||
}
|
||||
|
||||
//if (switch_test_flag(read_frame, SFF_CNG)) {
|
||||
// continue;
|
||||
//}
|
||||
//}
|
||||
|
||||
//if (vloops < 300 && (vloops % 100) == 0) {
|
||||
// switch_core_media_gen_key_frame(session);
|
||||
//switch_core_session_request_video_refresh(session);
|
||||
//}
|
||||
|
||||
vloops++;
|
||||
|
||||
@@ -4998,6 +4991,10 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
||||
switch_core_media_gen_key_frame(session);
|
||||
}
|
||||
|
||||
if (v_engine->smode == SWITCH_MEDIA_FLOW_SENDONLY) {
|
||||
send_blank = 1;
|
||||
}
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_VIDEO_READY)) {
|
||||
switch_mutex_lock(mh->file_mutex);
|
||||
if (smh->video_write_fh && switch_channel_ready(session->channel) && switch_test_flag(smh->video_write_fh, SWITCH_FILE_OPEN)) {
|
||||
@@ -5008,8 +5005,10 @@ static void *SWITCH_THREAD_FUNC video_helper_thread(switch_thread_t *thread, voi
|
||||
} else if (wstatus != SWITCH_STATUS_BREAK && wstatus != SWITCH_STATUS_IGNORE) {
|
||||
smh->video_write_fh = NULL;
|
||||
}
|
||||
send_blank = 0;
|
||||
} else if (smh->video_read_fh && switch_test_flag(smh->video_read_fh, SWITCH_FILE_OPEN) && read_frame->img) {
|
||||
switch_core_file_write_video(smh->video_read_fh, read_frame);
|
||||
send_blank = 0;
|
||||
}
|
||||
switch_mutex_unlock(mh->file_mutex);
|
||||
} else if (switch_channel_test_flag(channel, CF_VIDEO_DECODED_READ)) {
|
||||
|
||||
Reference in New Issue
Block a user