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/Classes/en.lproj/InCallViewController.xib b/Classes/en.lproj/InCallViewController.xib index a35dfab43..91506d255 100644 --- a/Classes/en.lproj/InCallViewController.xib +++ b/Classes/en.lproj/InCallViewController.xib @@ -2,13 +2,13 @@ 784 - 11E53 - 2840 - 1138.47 - 569.00 + 12D78 + 3084 + 1187.37 + 626.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1926 + 2083 YES @@ -52,6 +52,7 @@ 301 {{-1000, -1000}, {2000, 2000}} + _NS:9 @@ -65,6 +66,7 @@ 274 {320, 460} + _NS:196 @@ -76,11 +78,12 @@ 283 - {{220, 360}, {100, 100}} + {{216, 324}, {96, 128}} + - 1 + 2 IBCocoaTouchFramework @@ -88,6 +91,7 @@ 301 {{141, 212}, {37, 37}} + _NS:1030 NO @@ -99,6 +103,7 @@ {320, 460} + _NS:196 @@ -109,6 +114,7 @@ 274 {{0, -10}, {320, 480}} + _NS:418 @@ -139,6 +145,7 @@ -2147483356 {{20, 40}, {85, 33}} + _NS:9 NO @@ -174,6 +181,7 @@ {320, 460} + NO @@ -440,7 +448,120 @@ 173 - + + + YES + + InCallTableViewController + UITableViewController + + IBProjectSource + ./Classes/InCallTableViewController.h + + + + InCallViewController + UIViewController + + YES + + YES + callTableController + callTableView + testVideoView + videoCameraSwitch + videoGroup + videoPreview + videoView + videoWaitingForFirstImage + + + YES + InCallTableViewController + UITableView + UIView + UICamSwitch + UIView + UIView + UIView + UIActivityIndicatorView + + + + YES + + YES + callTableController + callTableView + testVideoView + videoCameraSwitch + videoGroup + videoPreview + videoView + videoWaitingForFirstImage + + + YES + + callTableController + InCallTableViewController + + + callTableView + UITableView + + + testVideoView + UIView + + + videoCameraSwitch + UICamSwitch + + + videoGroup + UIView + + + videoPreview + UIView + + + videoView + UIView + + + videoWaitingForFirstImage + UIActivityIndicatorView + + + + + IBProjectSource + ./Classes/InCallViewController.h + + + + UICamSwitch + UIButton + + preview + UIView + + + preview + + preview + UIView + + + + IBProjectSource + ./Classes/UICamSwitch.h + + + + 0 IBCocoaTouchFramework @@ -466,6 +587,6 @@ {151, 51} - 1926 + 2083 diff --git a/Classes/fr.lproj/InCallViewController.xib b/Classes/fr.lproj/InCallViewController.xib index e5a97fb30..fc534158d 100644 --- a/Classes/fr.lproj/InCallViewController.xib +++ b/Classes/fr.lproj/InCallViewController.xib @@ -2,22 +2,22 @@ 784 - 11E53 - 1938 - 1138.47 - 569.00 + 12D78 + 3084 + 1187.37 + 626.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 933 + 2083 YES - IBUITableView - IBUIButton - IBUIActivityIndicatorView - IBUIView - IBUITableViewController IBProxyObject + IBUIActivityIndicatorView + IBUIButton + IBUITableView + IBUITableViewController + IBUIView YES @@ -76,11 +76,11 @@ 283 - {{220, 360}, {100, 100}} + {{216, 324}, {96, 128}} - 1 + 2 IBCocoaTouchFramework @@ -405,7 +405,7 @@ 173.IBPluginDependency 9.IBPluginDependency - + YES InCallViewController com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -439,7 +439,120 @@ 173 - + + + YES + + InCallTableViewController + UITableViewController + + IBProjectSource + ./Classes/InCallTableViewController.h + + + + InCallViewController + UIViewController + + YES + + YES + callTableController + callTableView + testVideoView + videoCameraSwitch + videoGroup + videoPreview + videoView + videoWaitingForFirstImage + + + YES + InCallTableViewController + UITableView + UIView + UICamSwitch + UIView + UIView + UIView + UIActivityIndicatorView + + + + YES + + YES + callTableController + callTableView + testVideoView + videoCameraSwitch + videoGroup + videoPreview + videoView + videoWaitingForFirstImage + + + YES + + callTableController + InCallTableViewController + + + callTableView + UITableView + + + testVideoView + UIView + + + videoCameraSwitch + UICamSwitch + + + videoGroup + UIView + + + videoPreview + UIView + + + videoView + UIView + + + videoWaitingForFirstImage + UIActivityIndicatorView + + + + + IBProjectSource + ./Classes/InCallViewController.h + + + + UICamSwitch + UIButton + + preview + UIView + + + preview + + preview + UIView + + + + IBProjectSource + ./Classes/UICamSwitch.h + + + + 0 IBCocoaTouchFramework @@ -459,12 +572,12 @@ switch_camera_default.png switch_camera_over.png - + YES {151, 51} {151, 51} - 933 + 2083 diff --git a/Classes/ru.lproj/InCallViewController.xib b/Classes/ru.lproj/InCallViewController.xib index 8ed22898e..df9b92da6 100644 --- a/Classes/ru.lproj/InCallViewController.xib +++ b/Classes/ru.lproj/InCallViewController.xib @@ -2,13 +2,13 @@ 784 - 12C60 - 2844 - 1187.34 - 625.00 + 12D78 + 3084 + 1187.37 + 626.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1930 + 2083 YES @@ -76,11 +76,11 @@ 283 - {{220, 360}, {100, 100}} + {{216, 324}, {96, 128}} - 1 + 2 IBCocoaTouchFramework @@ -439,7 +439,120 @@ 173 - + + + YES + + InCallTableViewController + UITableViewController + + IBProjectSource + ./Classes/InCallTableViewController.h + + + + InCallViewController + UIViewController + + YES + + YES + callTableController + callTableView + testVideoView + videoCameraSwitch + videoGroup + videoPreview + videoView + videoWaitingForFirstImage + + + YES + InCallTableViewController + UITableView + UIView + UICamSwitch + UIView + UIView + UIView + UIActivityIndicatorView + + + + YES + + YES + callTableController + callTableView + testVideoView + videoCameraSwitch + videoGroup + videoPreview + videoView + videoWaitingForFirstImage + + + YES + + callTableController + InCallTableViewController + + + callTableView + UITableView + + + testVideoView + UIView + + + videoCameraSwitch + UICamSwitch + + + videoGroup + UIView + + + videoPreview + UIView + + + videoView + UIView + + + videoWaitingForFirstImage + UIActivityIndicatorView + + + + + IBProjectSource + ./Classes/InCallViewController.h + + + + UICamSwitch + UIButton + + preview + UIView + + + preview + + preview + UIView + + + + IBProjectSource + ./Classes/UICamSwitch.h + + + + 0 IBCocoaTouchFramework @@ -465,6 +578,6 @@ {151, 51} - 1930 + 2083 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/Contents.plist b/linphone.ldb/Contents.plist index e0d4ea2f7..335cdec55 100644 --- a/linphone.ldb/Contents.plist +++ b/linphone.ldb/Contents.plist @@ -3741,17 +3741,17 @@ backup - 5 + 6 class BLWrapperHandle name - Classes/InCallViewController/5/InCallViewController.xib + Classes/InCallViewController/6/InCallViewController.xib change date - 2012-09-25T09:16:20Z + 2013-07-22T11:10:50Z changed values class @@ -3761,7 +3761,7 @@ flags 0 hash - 7f214a2ef7edff45568215c89af0ece4 + 8c081a9b0433d4932659d8da7064bcbe name InCallViewController.xib @@ -3802,11 +3802,11 @@ versions en - 5 + 6 fr - 5 + 6 ru - 5 + 6 @@ -18611,7 +18611,7 @@ Raison: %2$s change date - 2012-09-17T13:29:57Z + 2013-07-22T11:22:00Z changed values class @@ -18621,7 +18621,7 @@ Raison: %2$s flags 0 hash - b7297749603f255583f59fcea3174690 + 9da839864b9c883ec66e9863c5d94ced name Video.strings @@ -18735,6 +18735,31 @@ Raison: %2$s snapshots + + change date + 2001-01-01T00:00:00Z + changed values + + class + BLStringKeyObject + comment + Preferred video size + errors + + flags + 0 + key + Preferred video size + localizations + + en + Preferred video size + fr + Taille de vidéo préférée + + snapshots + + change date 2001-01-01T00:00:00Z diff --git a/linphone.ldb/Resources/Classes/InCallViewController/5/InCallViewController.xib b/linphone.ldb/Resources/Classes/InCallViewController/6/InCallViewController.xib similarity index 78% rename from linphone.ldb/Resources/Classes/InCallViewController/5/InCallViewController.xib rename to linphone.ldb/Resources/Classes/InCallViewController/6/InCallViewController.xib index a35dfab43..91506d255 100644 --- a/linphone.ldb/Resources/Classes/InCallViewController/5/InCallViewController.xib +++ b/linphone.ldb/Resources/Classes/InCallViewController/6/InCallViewController.xib @@ -2,13 +2,13 @@ 784 - 11E53 - 2840 - 1138.47 - 569.00 + 12D78 + 3084 + 1187.37 + 626.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 1926 + 2083 YES @@ -52,6 +52,7 @@ 301 {{-1000, -1000}, {2000, 2000}} + _NS:9 @@ -65,6 +66,7 @@ 274 {320, 460} + _NS:196 @@ -76,11 +78,12 @@ 283 - {{220, 360}, {100, 100}} + {{216, 324}, {96, 128}} + - 1 + 2 IBCocoaTouchFramework @@ -88,6 +91,7 @@ 301 {{141, 212}, {37, 37}} + _NS:1030 NO @@ -99,6 +103,7 @@ {320, 460} + _NS:196 @@ -109,6 +114,7 @@ 274 {{0, -10}, {320, 480}} + _NS:418 @@ -139,6 +145,7 @@ -2147483356 {{20, 40}, {85, 33}} + _NS:9 NO @@ -174,6 +181,7 @@ {320, 460} + NO @@ -440,7 +448,120 @@ 173 - + + + YES + + InCallTableViewController + UITableViewController + + IBProjectSource + ./Classes/InCallTableViewController.h + + + + InCallViewController + UIViewController + + YES + + YES + callTableController + callTableView + testVideoView + videoCameraSwitch + videoGroup + videoPreview + videoView + videoWaitingForFirstImage + + + YES + InCallTableViewController + UITableView + UIView + UICamSwitch + UIView + UIView + UIView + UIActivityIndicatorView + + + + YES + + YES + callTableController + callTableView + testVideoView + videoCameraSwitch + videoGroup + videoPreview + videoView + videoWaitingForFirstImage + + + YES + + callTableController + InCallTableViewController + + + callTableView + UITableView + + + testVideoView + UIView + + + videoCameraSwitch + UICamSwitch + + + videoGroup + UIView + + + videoPreview + UIView + + + videoView + UIView + + + videoWaitingForFirstImage + UIActivityIndicatorView + + + + + IBProjectSource + ./Classes/InCallViewController.h + + + + UICamSwitch + UIButton + + preview + UIView + + + preview + + preview + UIView + + + + IBProjectSource + ./Classes/UICamSwitch.h + + + + 0 IBCocoaTouchFramework @@ -466,6 +587,6 @@ {151, 51} - 1926 + 2083 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";