diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m
index 0d423dd85..a703e3bb0 100644
--- a/Classes/LinphoneCoreSettingsStore.m
+++ b/Classes/LinphoneCoreSettingsStore.m
@@ -245,6 +245,16 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
[self setBool:(pol->automatically_accept) forKey:@"accept_video_preference"];
[self setBool:linphone_core_self_view_enabled(lc) forKey:@"self_video_preference"];
[self setBool:linphone_core_video_preview_enabled(lc) forKey:@"preview_preference"];
+ MSVideoSize vsize = linphone_core_get_preferred_video_size(lc);
+ int index;
+ if ((vsize.width == MS_VIDEO_SIZE_720P_W) && (vsize.height == MS_VIDEO_SIZE_720P_H)) {
+ index = 0;
+ } else if ((vsize.width == MS_VIDEO_SIZE_VGA_W) && (vsize.height == MS_VIDEO_SIZE_VGA_H)) {
+ index = 1;
+ } else {
+ index = 2;
+ }
+ [self setInteger:index forKey:@"video_preferred_size_preference"];
}
{
[self setBool:linphone_core_get_use_info_for_dtmf(lc) forKey:@"sipinfo_dtmf_preference"];
@@ -548,6 +558,26 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
linphone_core_set_video_policy(lc, &policy);
linphone_core_enable_self_view(lc, [self boolForKey:@"self_video_preference"]);
linphone_core_enable_video_preview(lc, [self boolForKey:@"preview_preference"]);
+ MSVideoSize vsize;
+ int bw;
+ switch ([self integerForKey:@"video_preferred_size_preference"]) {
+ case 0:
+ MS_VIDEO_SIZE_ASSIGN(vsize, 720P);
+ bw = 1024 * 1024;
+ break;
+ case 1:
+ MS_VIDEO_SIZE_ASSIGN(vsize, VGA);
+ bw = 512 * 1024;
+ break;
+ case 2:
+ default:
+ MS_VIDEO_SIZE_ASSIGN(vsize, QVGA);
+ bw = 380 * 1024;
+ break;
+ }
+ linphone_core_set_preferred_video_size(lc, vsize);
+ [self setInteger: bw forKey:@"upload_bandwidth_preference"];
+ [self setInteger: bw forKey:@"download_bandwidth_preference"];
// Primary contact
NSString* displayname = [self stringForKey:@"primary_displayname_preference"];
diff --git a/Resources/linphonerc b/Resources/linphonerc
index 560a9780a..992f3b19c 100644
--- a/Resources/linphonerc
+++ b/Resources/linphonerc
@@ -19,6 +19,8 @@ automatically_accept=0
[net]
firewall_policy=0
+download_bw=380
+upload_bw=380
[app]
rotation_preference=auto
diff --git a/Resources/linphonerc-factory b/Resources/linphonerc-factory
index cc6384010..8cc8260f8 100644
--- a/Resources/linphonerc-factory
+++ b/Resources/linphonerc-factory
@@ -1,6 +1,4 @@
[net]
-download_bw=380
-upload_bw=380
mtu=1300
activate_edge_workarounds=0
edge_ping_time=10
diff --git a/Resources/linphonerc-factory~ipad b/Resources/linphonerc-factory~ipad
index 80aa4e891..aa00ecfe4 100644
--- a/Resources/linphonerc-factory~ipad
+++ b/Resources/linphonerc-factory~ipad
@@ -1,6 +1,4 @@
[net]
-download_bw=512
-upload_bw=512
mtu=1300
activate_edge_workarounds=0
edge_ping_time=200
diff --git a/Resources/linphonerc~ipad b/Resources/linphonerc~ipad
index 4efe5a33e..cf9188553 100644
--- a/Resources/linphonerc~ipad
+++ b/Resources/linphonerc~ipad
@@ -19,6 +19,8 @@ automatically_accept=0
[net]
firewall_policy=0
+download_bw=512
+upload_bw=512
[app]
rotation_preference=auto
diff --git a/Settings/InAppSettings.bundle/Video.plist b/Settings/InAppSettings.bundle/Video.plist
index 77aa2e894..dfcd404b4 100644
--- a/Settings/InAppSettings.bundle/Video.plist
+++ b/Settings/InAppSettings.bundle/Video.plist
@@ -40,6 +40,28 @@
Key
preview_preference
+
+ DefaultValue
+ 1
+ Key
+ video_preferred_size_preference
+ Title
+ Preferred video size
+ Titles
+
+ HD (960x720)
+ VGA (640x480)
+ QVGA (320x240)
+
+ Type
+ PSMultiValueSpecifier
+ Values
+
+ 0
+ 1
+ 2
+
+
Title
Codecs
diff --git a/Settings/InAppSettings.bundle/en.lproj/Video.strings b/Settings/InAppSettings.bundle/en.lproj/Video.strings
index 9ef83a74b..3d8acf107 100644
--- a/Settings/InAppSettings.bundle/en.lproj/Video.strings
+++ b/Settings/InAppSettings.bundle/en.lproj/Video.strings
@@ -10,6 +10,9 @@
/* Show preview */
"Show preview" = "Show preview";
+/* Preferred video size */
+"Preferred video size" = "Preferred video size";
+
/* Codecs */
"Codecs" = "Codecs";
diff --git a/Settings/InAppSettings.bundle/fr.lproj/Video.strings b/Settings/InAppSettings.bundle/fr.lproj/Video.strings
index 1bb62cc49..0109509a5 100644
--- a/Settings/InAppSettings.bundle/fr.lproj/Video.strings
+++ b/Settings/InAppSettings.bundle/fr.lproj/Video.strings
@@ -10,6 +10,9 @@
/* Show preview */
"Show preview" = "Activer la prévisualisation";
+/* Preferred video size */
+"Preferred video size" = "Taille de vidéo préférée";
+
/* Codecs */
"Codecs" = "Codecs";
diff --git a/Settings/InAppSettings.bundle/ru.lproj/Video.strings b/Settings/InAppSettings.bundle/ru.lproj/Video.strings
index 529d88d98..1e5d2b36e 100644
--- a/Settings/InAppSettings.bundle/ru.lproj/Video.strings
+++ b/Settings/InAppSettings.bundle/ru.lproj/Video.strings
@@ -10,6 +10,9 @@
/* Show preview */
"Show preview" = "Предварительный просмотр";
+/* Preferred video size */
+"Preferred video size" = "Preferred video size";
+
/* Codecs */
"Codecs" = "Кодеки";
diff --git a/linphone.ldb/Resources/InAppSettings.bundle/Video/1/Video.strings b/linphone.ldb/Resources/InAppSettings.bundle/Video/1/Video.strings
index 9ef83a74b..3d8acf107 100644
--- a/linphone.ldb/Resources/InAppSettings.bundle/Video/1/Video.strings
+++ b/linphone.ldb/Resources/InAppSettings.bundle/Video/1/Video.strings
@@ -10,6 +10,9 @@
/* Show preview */
"Show preview" = "Show preview";
+/* Preferred video size */
+"Preferred video size" = "Preferred video size";
+
/* Codecs */
"Codecs" = "Codecs";