From 51b38145e4b8559bed008db4702e9c7ea5a31549 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 29 Jul 2015 21:31:56 -0500 Subject: [PATCH] FS-7760 add clear vs allclear to logo and banner api to clear variable too --- src/mod/applications/mod_conference/conference_api.c | 7 ++++++- src/mod/applications/mod_conference/conference_video.c | 10 +++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/mod/applications/mod_conference/conference_api.c b/src/mod/applications/mod_conference/conference_api.c index 242b7b2844..a8247a05b6 100644 --- a/src/mod/applications/mod_conference/conference_api.c +++ b/src/mod/applications/mod_conference/conference_api.c @@ -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); } diff --git a/src/mod/applications/mod_conference/conference_video.c b/src/mod/applications/mod_conference/conference_video.c index 5a3793e4af..38522e64ce 100644 --- a/src/mod/applications/mod_conference/conference_video.c +++ b/src/mod/applications/mod_conference/conference_video.c @@ -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; } @@ -1867,7 +1871,7 @@ void *SWITCH_THREAD_FUNC conference_video_muxing_thread_run(switch_thread_t *thr } } } - + if (count_changed) { need_refresh = 1; need_keyframe = 1;