forked from mirrors/linphone-iphone
InAppSettingsVideo: reset FPS when using non custom preset
This commit is contained in:
parent
9b6ae065b5
commit
f63ca7fc89
3 changed files with 8 additions and 6 deletions
|
|
@ -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"]);
|
||||
|
|
|
|||
|
|
@ -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]];
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@
|
|||
</dict>
|
||||
<dict>
|
||||
<key>Key</key>
|
||||
<string>bandwidth_limit_preference</string>
|
||||
<string>download_bandwidth_preference</string>
|
||||
<key>Title</key>
|
||||
<string>Bandwidth limit in kbits/s</string>
|
||||
<key>Type</key>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue