mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-30 07:04:17 +00:00
update new pass
This commit is contained in:
1 parent
f3afab2f72
commit
f1b2733c14
10 files changed
+46
-46
No files matched your search
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user