From f1b2733c1497434ed52695e2764a34101dd9c496 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 12 Nov 2015 18:33:32 -0600 Subject: [PATCH] update new pass --- html5/verto/verto_communicator/package.json | 2 +- .../verto/verto_communicator/src/config.json | 3 +-- .../verto_communicator/src/config.json.sample | 3 +-- .../src/partials/modal_settings.html | 4 ++-- .../storageService/services/splash_screen.js | 2 +- .../controllers/MenuController.js | 21 +++++++++++------ .../vertoService/services/configService.js | 6 ----- .../src/vertoService/services/vertoService.js | 8 ++++++- .../mod_conference/conference_member.c | 23 ++++++------------- src/mod/endpoints/mod_verto/mod_verto.c | 20 +++++++++------- 10 files changed, 46 insertions(+), 46 deletions(-) diff --git a/html5/verto/verto_communicator/package.json b/html5/verto/verto_communicator/package.json index b2b0502a55..de23baa785 100644 --- a/html5/verto/verto_communicator/package.json +++ b/html5/verto/verto_communicator/package.json @@ -15,7 +15,7 @@ "grunt-contrib-copy": "^0.7.0", "grunt-contrib-cssmin": "^0.12.0", "grunt-contrib-htmlmin": "^0.4.0", - "grunt-contrib-imagemin": "^0.9.2", + "grunt-contrib-imagemin": "^1.0.0", "grunt-contrib-jshint": "^0.11.0", "grunt-contrib-uglify": "^0.7.0", "grunt-contrib-watch": "latest", diff --git a/html5/verto/verto_communicator/src/config.json b/html5/verto/verto_communicator/src/config.json index c07687453c..e7b09aae95 100644 --- a/html5/verto/verto_communicator/src/config.json +++ b/html5/verto/verto_communicator/src/config.json @@ -1,5 +1,4 @@ { "login": "1008", - "password": "1234", - "dedEncWatermark": 3072 + "password": "1234" } diff --git a/html5/verto/verto_communicator/src/config.json.sample b/html5/verto/verto_communicator/src/config.json.sample index 96b82a8986..a905c6161d 100644 --- a/html5/verto/verto_communicator/src/config.json.sample +++ b/html5/verto/verto_communicator/src/config.json.sample @@ -9,6 +9,5 @@ "autologin": "true", "autocall": "3500", "googlelogin": "true", - "wsURL": "wss://gamma.tollfreegateway.com/wss2", - "dedEncWatermark": 3072 + "wsURL": "wss://gamma.tollfreegateway.com/wss2" } diff --git a/html5/verto/verto_communicator/src/partials/modal_settings.html b/html5/verto/verto_communicator/src/partials/modal_settings.html index 5ca463dbb7..bf32521d57 100644 --- a/html5/verto/verto_communicator/src/partials/modal_settings.html +++ b/html5/verto/verto_communicator/src/partials/modal_settings.html @@ -84,8 +84,8 @@
- - +

+ Check Speed diff --git a/html5/verto/verto_communicator/src/storageService/services/splash_screen.js b/html5/verto/verto_communicator/src/storageService/services/splash_screen.js index 13c238bdd0..40c2b6951b 100644 --- a/html5/verto/verto_communicator/src/storageService/services/splash_screen.js +++ b/html5/verto/verto_communicator/src/storageService/services/splash_screen.js @@ -82,7 +82,7 @@ 'message': 'Check Connection Speed.' }; - if (storage.data.autoBand && verto.instance) { + if (storage.data.autoBand && verto.data.instance) { verto.testSpeed(cb); } else { resolve(result); diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/MenuController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/MenuController.js index f2111ad20e..adb5f6953c 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/MenuController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/MenuController.js @@ -10,19 +10,26 @@ $scope.storage = storage; $rootScope.$on('testSpeed', function(e, data) { - var dedEncWatermark = storage.data.dedEncWatermark; var vidQual = storage.data.vidQual; + var bwp = 4; $scope.bandDown = data.downKPS; $scope.bandUp = data.upKPS; - $scope.dedEnc = storage.data.useDedenc; - $scope.iconClass = 'mdi-device-signal-wifi-3-bar'; + if (data.downKPS < 2000) { + bwp--; + } - if ($scope.bandDown < dedEncWatermark) { - $scope.iconClass = 'mdi-device-signal-wifi-1-bar dedenc'; - } else if ($scope.bandDown >= 2*dedEncWatermark) { - $scope.iconClass = 'mdi-device-signal-wifi-4-bar'; + if (data.upKPS < 2000) { + bwp--; + } + + $scope.iconClass = 'mdi-device-signal-wifi-4-bar'; + + if (bwp < 4) { + $scope.iconClass = 'mdi-device-signal-wifi-3-bar'; + } else if (bwp < 2) { + $scope.iconClass = 'mdi-device-signal-wifi-1-bar dedenc'; } verto.videoQuality.forEach(function(vid) { diff --git a/html5/verto/verto_communicator/src/vertoService/services/configService.js b/html5/verto/verto_communicator/src/vertoService/services/configService.js index e5f5cf30f5..9fd789e81f 100644 --- a/html5/verto/verto_communicator/src/vertoService/services/configService.js +++ b/html5/verto/verto_communicator/src/vertoService/services/configService.js @@ -41,12 +41,6 @@ vertoService.service('config', ['$rootScope', '$http', '$location', 'storage', ' verto.data.googleclientid = data.googleclientid; } - if (data.dedEncWatermark) { - storage.data.dedEncWatermark = data.dedEncWatermark; - } else { - storage.data.dedEncWatermark = 3072; - } - angular.extend(verto.data, data); /** diff --git a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js index 36b191d44c..7128f1239a 100644 --- a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js +++ b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js @@ -76,6 +76,12 @@ var bandwidth = [{ }, { id: '2048', label: '2mb' +}, { + id: '3196', + label: '3mb' +}, { + id: '4192', + label: '4mb' }, { id: '5120', label: '5mb' @@ -812,7 +818,7 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora if (storage.data.autoBand) { storage.data.incomingBandwidth = downBand; storage.data.outgoingBandwidth = upBand; - storage.data.useDedenc = downBand <= storage.data.dedEncWatermark; + storage.data.useDedenc = false; storage.data.vidQual = 'hd'; if (upBand < 512) { diff --git a/src/mod/applications/mod_conference/conference_member.c b/src/mod/applications/mod_conference/conference_member.c index a0adb17795..8c66082022 100644 --- a/src/mod/applications/mod_conference/conference_member.c +++ b/src/mod/applications/mod_conference/conference_member.c @@ -768,27 +768,18 @@ switch_status_t conference_member_add(conference_obj_t *conference, conference_m } if ((var = switch_channel_get_variable(member->channel, "rtp_video_max_bandwidth_in"))) { - int tmp = atoi(var); - if (tmp > 0) { - member->max_bw_in = tmp; - } - printf("FORCE MAX %d\n", member->max_bw_in); + member->max_bw_in = switch_parse_bandwidth_string(var); } if ((var = switch_channel_get_variable(member->channel, "rtp_video_max_bandwidth_out"))) { - int tmp = atoi(var); - if (tmp > 0) { - member->max_bw_out = tmp; - - if (member->max_bw_out < conference->video_codec_settings.video.bandwidth) { - printf("DED ENCODER for %d\n", member->max_bw_out); - conference_utils_member_set_flag_locked(member, MFLAG_NO_MINIMIZE_ENCODING); - switch_core_media_set_outgoing_bitrate(member->session, SWITCH_MEDIA_TYPE_VIDEO, member->max_bw_out); - } + member->max_bw_out = switch_parse_bandwidth_string(var);; + + if (member->max_bw_out < conference->video_codec_settings.video.bandwidth) { + conference_utils_member_set_flag_locked(member, MFLAG_NO_MINIMIZE_ENCODING); + switch_core_media_set_outgoing_bitrate(member->session, SWITCH_MEDIA_TYPE_VIDEO, member->max_bw_out); } } - - + switch_channel_set_variable_printf(channel, "conference_member_id", "%d", member->id); switch_channel_set_variable_printf(channel, "conference_moderator", "%s", conference_utils_member_test_flag(member, MFLAG_MOD) ? "true" : "false"); switch_channel_set_variable_printf(channel, "conference_ghost", "%s", conference_utils_member_test_flag(member, MFLAG_GHOST) ? "true" : "false"); diff --git a/src/mod/endpoints/mod_verto/mod_verto.c b/src/mod/endpoints/mod_verto/mod_verto.c index d159013ec6..54b073b492 100644 --- a/src/mod/endpoints/mod_verto/mod_verto.c +++ b/src/mod/endpoints/mod_verto/mod_verto.c @@ -3335,7 +3335,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; + cJSON *obj = cJSON_CreateObject(), *screenShare = NULL, *dedEnc = NULL, *mirrorInput, *json_ptr = NULL, *bandwidth = NULL; switch_core_session_t *session = NULL; switch_channel_t *channel; switch_event_t *var_event; @@ -3345,7 +3345,7 @@ static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock cJSON *dialog; verto_pvt_t *tech_pvt; char name[512]; - const char *var, *destination_number, *call_id = NULL, *sdp = NULL, *bandwidth = NULL, + const char *var, *destination_number, *call_id = NULL, *sdp = NULL, *caller_id_name = NULL, *caller_id_number = NULL, *remote_caller_id_name = NULL, *remote_caller_id_number = NULL,*context = NULL; switch_event_header_t *hp; @@ -3417,15 +3417,19 @@ static switch_bool_t verto__invite_func(const char *method, cJSON *params, jsock switch_channel_set_flag(channel, CF_VIDEO_MIRROR_INPUT); } - if ((bandwidth = cJSON_GetObjectCstr(dialog, "outgoingBandwidth"))) { - if (strcasecmp(bandwidth, "default")) { - switch_channel_set_variable(channel, "rtp_video_max_bandwidth_in", bandwidth); + if ((bandwidth = cJSON_GetObjectItem(dialog, "outgoingBandwidth"))) { + if (!zstr(bandwidth->valuestring) && strcasecmp(bandwidth->valuestring, "default")) { + switch_channel_set_variable(channel, "rtp_video_max_bandwidth_in", bandwidth->valuestring); + } else if (bandwidth->valueint) { + switch_channel_set_variable_printf(channel, "rtp_video_max_bandwidth_in", "%d", bandwidth->valueint); } } - if ((bandwidth = cJSON_GetObjectCstr(dialog, "incomingBandwidth"))) { - if (strcasecmp(bandwidth, "default")) { - switch_channel_set_variable(channel, "rtp_video_max_bandwidth_out", bandwidth); + if ((bandwidth = cJSON_GetObjectItem(dialog, "incomingBandwidth"))) { + if (!zstr(bandwidth->valuestring) && strcasecmp(bandwidth->valuestring, "default")) { + switch_channel_set_variable(channel, "rtp_video_max_bandwidth_out", bandwidth->valuestring); + } else if (bandwidth->valueint) { + switch_channel_set_variable_printf(channel, "rtp_video_max_bandwidth_out", "%d", bandwidth->valueint); } }