FS-7760 add clear vs allclear to logo and banner api to clear variable too

This commit is contained in:
Anthony Minessale 2015-07-29 21:31:56 -05:00
parent c6596b1bd0
commit 51b38145e4
2 changed files with 13 additions and 4 deletions

View File

@ -1513,7 +1513,12 @@ switch_status_t conference_api_sub_vid_logo_img(conference_member_t *member, swi
goto end;
}
if (strcasecmp(text, "clear")) {
if (!strcasecmp(text, "allclear")) {
switch_channel_set_variable(member->channel, "video_logo_path", NULL);
member->video_logo = NULL;
} if (!strcasecmp(text, "clear")) {
member->video_logo = NULL;
} else {
member->video_logo = switch_core_strdup(member->pool, text);
}

View File

@ -688,7 +688,7 @@ void conference_video_layer_set_logo(conference_member_t *member, mcu_layer_t *l
if (zstr(path) || !strcasecmp(path, "clear")) {
switch_img_free(&layer->banner_img);
layer->banner_patched = 0;
member->video_logo = NULL;
switch_img_fill(layer->canvas->img, layer->x_pos, layer->y_pos, layer->screen_w, layer->screen_h,
&layer->canvas->letterbox_bgcolor);
@ -772,13 +772,17 @@ void conference_video_layer_set_banner(conference_member_t *member, mcu_layer_t
text = switch_channel_get_variable_dup(member->channel, "video_banner_text", SWITCH_FALSE, -1);
}
if (zstr(text) || !strcasecmp(text, "clear")) {
if (zstr(text) || !strcasecmp(text, "clear") || !strcasecmp(text, "allclear")) {
switch_img_free(&layer->banner_img);
layer->banner_patched = 0;
switch_img_fill(layer->canvas->img, layer->x_pos, layer->y_pos, layer->screen_w, layer->screen_h,
&layer->canvas->letterbox_bgcolor);
if (!strcasecmp(text, "allclear")) {
switch_channel_set_variable(member->channel, "video_banner_text", NULL);
}
goto end;
}