Removed video bandwidth limit unless we are in custom mode

This commit is contained in:
Mickaël Turnel 2017-10-04 15:16:26 +02:00
parent 6efb431364
commit 14f14e0113
4 changed files with 8 additions and 15 deletions

View file

@ -722,34 +722,27 @@
NSString *videoPreset = [self stringForKey:@"video_preset_preference"];
linphone_core_set_video_preset(LC, [videoPreset UTF8String]);
int bw;
MSVideoSize vsize;
switch ([self integerForKey:@"video_preferred_size_preference"]) {
case 0:
MS_VIDEO_SIZE_ASSIGN(vsize, 720P);
// 128 = margin for audio, the BW includes both video and audio
bw = 1024 + 128;
break;
case 1:
MS_VIDEO_SIZE_ASSIGN(vsize, VGA);
// no margin for VGA or QVGA, because video encoders can encode the
// target resulution in less than the asked bandwidth
bw = 660;
break;
case 2:
default:
MS_VIDEO_SIZE_ASSIGN(vsize, QVGA);
bw = 380;
break;
}
linphone_core_set_preferred_video_size(LC, vsize);
if (![videoPreset isEqualToString:@"custom"]) {
[self setInteger:0 forKey:@"video_preferred_fps_preference"];
[self setInteger:bw forKey:@"download_bandwidth_preference"];
[self setInteger:0 forKey:@"download_bandwidth_preference"];
}
linphone_core_set_preferred_framerate(LC, [self integerForKey:@"video_preferred_fps_preference"]);
linphone_core_set_download_bandwidth(LC, [self integerForKey:@"download_bandwidth_preference"]);
linphone_core_set_upload_bandwidth(LC, [self integerForKey:@"download_bandwidth_preference"]);
linphone_core_set_download_bandwidth(LC, [self integerForKey:@"download_bandwidth_preference"]);
linphone_core_set_upload_bandwidth(LC, [self integerForKey:@"download_bandwidth_preference"]);
}
// call section

View file

@ -48,13 +48,11 @@ max_calls=3
real_early_media=1
[net]
download_bw=380
edge_bw=10
edge_ping_time=10
firewall_policy=ice
mtu=1300
stun_server=stun.linphone.org
upload_bw=380
[rtp]
audio_jitt_comp=60
@ -93,5 +91,5 @@ capture=1
display=1
enabled=1
show_local=0
size=qvga
size=vga

View file

@ -21,6 +21,10 @@ publish_presence=0
password_length=-1
username_length=-1
[net]
download_bw=0
upload_bw=0
[sip]
sip_random_port=0
#whether SIP passwords must be encrypted in configuration storage file

View file

@ -22,13 +22,11 @@ file_transfer_server_url=https://www.linphone.org:444/lft.php
max_calls=3
[net]
download_bw=512
edge_bw=10
edge_ping_time=10
firewall_policy=ice
mtu=1300
stun_server=stun.linphone.org
upload_bw=512
[rtp]
audio_jitt_comp=60