diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m index c575fbf7f..e392f1b9b 100644 --- a/Classes/LinphoneCoreSettingsStore.m +++ b/Classes/LinphoneCoreSettingsStore.m @@ -612,7 +612,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); BOOL preview_preference = [self boolForKey:@"preview_preference"]; [lm lpConfigSetInt:preview_preference forKey:@"preview_preference"]; - linphone_core_set_video_preset(lc, [[self stringForKey:@"video_preset_preference"] UTF8String]); + 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"]) { @@ -625,7 +626,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); 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 = 512; + bw = 660; break; case 2: default: @@ -634,7 +635,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args); break; } linphone_core_set_preferred_video_size(lc, vsize); - if (![[self stringForKey:@"video_preset_preference"] isEqualToString:@"custom"]) { + if (![videoPreset isEqualToString:@"custom"]) { + [self setInteger:0 forKey:@"video_preferred_fps_preference"]; [self setInteger:bw forKey:@"download_bandwidth_preference"]; } linphone_core_set_preferred_framerate(lc, [self integerForKey:@"video_preferred_fps_preference"]); diff --git a/Classes/SettingsViewController.m b/Classes/SettingsViewController.m index 100685d87..2fd4cf558 100644 --- a/Classes/SettingsViewController.m +++ b/Classes/SettingsViewController.m @@ -491,7 +491,7 @@ static UICompositeViewDescription *compositeDescription = nil; NSString *video_preset = [notif.userInfo objectForKey:@"video_preset_preference"]; removeFromHiddenKeys = [video_preset isEqualToString:@"custom"]; [keys addObject:@"video_preferred_fps_preference"]; - [keys addObject:@"bandwidth_limit_preference"]; + [keys addObject:@"download_bandwidth_preference"]; } for (NSString *key in keys) { @@ -640,7 +640,7 @@ static UICompositeViewDescription *compositeDescription = nil; if (!linphone_core_get_video_preset([LinphoneManager getLc]) || strcmp(linphone_core_get_video_preset([LinphoneManager getLc]), "custom") != 0) { [hiddenKeys addObject:@"video_preferred_fps_preference"]; - [hiddenKeys addObject:@"bandwidth_limit_preference"]; + [hiddenKeys addObject:@"download_bandwidth_preference"]; } [hiddenKeys addObjectsFromArray:[[LinphoneManager unsupportedCodecs] allObjects]]; diff --git a/Settings/InAppSettings.bundle/Video.plist b/Settings/InAppSettings.bundle/Video.plist index db69c6749..4d72625e6 100644 --- a/Settings/InAppSettings.bundle/Video.plist +++ b/Settings/InAppSettings.bundle/Video.plist @@ -116,7 +116,7 @@ Key - bandwidth_limit_preference + download_bandwidth_preference Title Bandwidth limit in kbits/s Type