提交 3eff2d55 authored 作者: Anthony Minessale's avatar Anthony Minessale

FS-7800 should be able to call extra screens with same extension as the original…

FS-7800 should be able to call extra screens with same extension as the original and place the param conferenceCanvasID with the desired canvas id into the call params in the same place bandwidth prefs are added
上级 4c099865
......@@ -738,6 +738,10 @@ switch_status_t conference_member_add(conference_obj_t *conference, conference_m
conference_video_check_avatar(member, SWITCH_FALSE);
if (switch_true(switch_channel_get_variable_dup(member->channel, "video_second_screen", SWITCH_FALSE, -1))) {
conference_utils_member_set_flag(member, MFLAG_SECOND_SCREEN);
}
if ((var = switch_channel_get_variable_dup(member->channel, "video_initial_canvas", SWITCH_FALSE, -1))) {
uint32_t id = atoi(var) - 1;
if (id < conference->canvas_count) {
......@@ -748,16 +752,16 @@ switch_status_t conference_member_add(conference_obj_t *conference, conference_m
if ((var = switch_channel_get_variable_dup(member->channel, "video_initial_watching_canvas", SWITCH_FALSE, -1))) {
uint32_t id = atoi(var) - 1;
if (id == 0) {
id = conference->canvas_count;
}
if (id <= conference->canvas_count && conference->canvases[id]) {
member->watching_canvas_id = id;
}
}
conference_video_reset_member_codec_index(member);
if (has_video) {
......
......@@ -3350,7 +3350,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, *json_ptr = NULL, *bandwidth = NULL;
cJSON *obj = cJSON_CreateObject(), *screenShare = NULL, *dedEnc = NULL, *mirrorInput, *json_ptr = NULL, *bandwidth = NULL, *canvas = NULL;
switch_core_session_t *session = NULL;
switch_channel_t *channel;
switch_event_t *var_event;
......@@ -3433,6 +3433,21 @@ static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock
switch_channel_set_flag(channel, CF_VIDEO_MIRROR_INPUT);
}
if ((canvas = cJSON_GetObjectItem(dialog, "conferenceCanvasID"))) {
int canvas_id = 0;
if (!zstr(canvas->valuestring)) {
canvas_id = atoi(canvas->valuestring);
} else if (canvas->valueint) {
canvas_id = canvas->valueint;
}
if (canvas_id >= 0) {
switch_channel_set_variable_printf(channel, "video_initial_watching_canvas", "%d", canvas_id);
switch_channel_set_variable(channel, "video_second_screen", "true");
}
}
if ((bandwidth = cJSON_GetObjectItem(dialog, "outgoingBandwidth"))) {
int core_bw = 0, bwval = 0;
const char *val;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论