diff --git a/.gitignore b/.gitignore
index bd46f41ac..eec9aece4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,3 +28,4 @@ submodules/externals/build/libvpx/x86
submodules/externals/build/libvpx/arm
submodules/externals/build/openh264/arm
submodules/externals/build/openh264/x86
+submodules/externals/build/cunit/CUnit/
diff --git a/res/values/non_localizable_strings.xml b/res/values/non_localizable_strings.xml
index 2bf8cc33a..6679fd4ac 100644
--- a/res/values/non_localizable_strings.xml
+++ b/res/values/non_localizable_strings.xml
@@ -17,7 +17,7 @@
- @string/tunnel_mode_entry_value_3G_only
- @string/tunnel_mode_entry_value_always
- @string/tunnel_mode_entry_value_auto
-
+
pref_tunnel_host_key
pref_tunnel_port_key
auto
@@ -27,9 +27,9 @@
pref_audio_hacks_use_routing_api_key
pref_audio_soft_volume_key
pref_audio_ringtone
-
+
pref_ipv6_key
-
+
menu_about_key
pref_sipaccounts_key
setup_key
@@ -57,7 +57,7 @@
first_launch_suceeded_once_key
pref_wifi_only_key
-
+
pref_video_use_front_camera_key
pref_video_codec_h263_key
pref_video_codec_mpeg4_key
@@ -98,33 +98,35 @@
zrtp
pref_background_mode_key
pref_codec_bitrate_limit_key
- pref_adaptative_rate_control_key
-
-
+ pref_adaptive_rate_control_key
+ pref_adaptive_rate_algorithm
+ pref_adaptive_rate_algorithm_simple_key
+ pref_adaptive_rate_algorithm_stateful_key
+
push_reg_id_key
push_sender_id_key
pref_push_notification_key
-
+
pref_auto_accept_friends_key
pref_image_sharing_server_key
pref_remote_provisioning_key
-
+
pref_video_port_key
pref_audio_port_key
pref_incoming_expire_key
-
+
pref_display_name_key
pref_user_name_key
pref_expire_key
pref_avpf_key
pref_avpf_rr_interval_key
-
+
pref_rfc2833_dtmf_key
pref_sipinfo_dtmf_key
pref_upnp_enable_key
-
+
pref_first_time_linphone_chat_storage
-
+
pref_sipaccount_key
pref_advanced_key
pref_manage_key
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c67a8abfb..5a4528477 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1,30 +1,30 @@
Disable
-
+
Tunnel
Hostname
Port
Mode
-
+
- disabled
- 3G only
- always
- auto
-
+
Audio call ongoing
Paused call ongoing
Video capturing call ongoing
-
+
Not ready for a new call
Bad contact : %s
Reset verified %s
Verify %s
Encrypted
-
+
Starting up…
An error occurred while accepting call
@@ -39,7 +39,7 @@
Warning: service is not ready
Close
-
+
conf
active
paused
@@ -48,7 +48,7 @@
incoming
ringing
calling
-
+
Mute
Speaker
Bluetooth
@@ -89,7 +89,7 @@
Accept
Decline
Unknown
-
+
Network
Transport
UDP
@@ -166,9 +166,15 @@
Audio port or port range (minport-maxport)
Incoming call timeout (in seconds)
Place a call
- Adaptative rate control
+ Adaptive rate control
+ Adaptive rate algorithm
+
+ - Simple
+ - Stateful
+
+
Codec bitrate limit
-
+
- 10 kbits/s
- 15 kbits/s
@@ -184,8 +190,8 @@
- 36
- 64
- 128
-
-
+
+
Debug
Report issue
Describe problem here
@@ -225,7 +231,7 @@
Cannot get call parameters
Cannot create default call parameters
Cannot invite destination address [%s]
-
+
started
Removes the echo heard by other end
Stun server
@@ -240,21 +246,21 @@
Connect
Please enter your login and password
Couldn\'t connect; check your login and password and start again
-
+
AMR codec might not be present on your phone
VP8
Media encryption
None
SRTP
ZRTP
-
+
Codec disabled, build the app from source code to enable it
Codec disabled, build the app from source code to enable it
-
+
SIP Accounts
Use wifi only
Enable push notifications
-
+
An error occurred, try again later.
Server unreachable, verify your internet connection.
This username is already in use.
@@ -262,13 +268,13 @@
Your email is not valid.
Your password is not valid (6 characters min).
Passwords entered are different.
-
+
SIP proxy hostname or ip address (optional)
Route all calls through SIP proxy
Example: john if your account is john@sip.example.org
sip.example.org if your account is john@sip.example.org
You have to re-enter your password if you edit your username and/or the domain
-
+
Delete
Chat
Call
@@ -277,7 +283,7 @@
Not Registered
Registration in progress
Registration failed
-
+
Number or address
Conference
Incoming call
@@ -288,7 +294,7 @@
No contact in your address book.
No SIP contact in your address book.
No chat history.
-
+
Audio
Video
Codec:
@@ -296,7 +302,7 @@
Download bandwidth:
ICE connectivity:
Video size:
-
+
Add to contacts button
@@ -337,7 +343,7 @@
-
+
Account Setup Assistant
Apply
password
@@ -349,17 +355,17 @@
Check
Your account has not been validated yet.
Your account has been validated.
-
+
History
Contacts
Settings
Chat
About
-
+
Cancel
Back
Let\'s go
-
+
New conversation
Edit
Cancel
@@ -370,7 +376,7 @@
All
Missed
Delete
-
+
Transfer
Add call
Video
@@ -380,11 +386,11 @@
Receiver
Bluetooth
Options
-
+
Send
Pic
Uploading…
-
+
Call update requested
Your correspondent would like to add video to the current call.
Accept
@@ -400,7 +406,7 @@
Select source
Image saved
Error, image not saved
-
+
Friends
New friends
utomatically accept new friend requests
@@ -409,69 +415,69 @@
Echo canceller calibration in progress
Sharing server
Remote provisioning
-
+
Delete contact
SIP address
Phone number
First name
Last name
-
+
Primary account
Display name
Username
Expire
AVPF
AVPF regular RTCP interval in seconds (between 1 and 5)
-
+
Send RFC2833 DTMFs
Send SIP INFO DTMFs
-
+
Call declined
User not found
Incompatible media parameters
Your correspondent has low bandwidth, video can\'t be started
Network is unreachable
-
+
Today
Yesterday
-
+
Missed
Outgoing
Incoming
-
+
Background mode
-
+
Show
Download
Download failed. Please check your internet access or try again later.
-
+
Auth userid
Enter authentication userid (optionnal)
Display name
Enter display name (optionnal)
-
+
Enable UPNP
Manage
-
+
Please wait...
Updating messages database
Default account
-
+
Download provisioning
This assistant will download an existing configuration.
provisioning url
The configuration you downloaded doesn\'t include your account. Please fill it in.
Your username will be %s (uppercase characters are not allowed). Do you accept ?
-
+
Accept
Deny
You should only accept if you have the same code (see above) as your correspondent
-
+
Remote is writing...
%i unread messages
-
+
Retry
-
+
Failed to download or apply remote provisioning profile...
Remote provisioning
Do you want to change the provisioning URI ?
diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml
index 9df1cc106..3255705d7 100644
--- a/res/xml/preferences.xml
+++ b/res/xml/preferences.xml
@@ -4,96 +4,102 @@
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
+
-
+
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
+
-
+
-
-
-
-
-
-
-
+
-
+
-
+
-
-
-
+
diff --git a/src/org/linphone/LinphonePreferences.java b/src/org/linphone/LinphonePreferences.java
index 105718d82..ae738396e 100644
--- a/src/org/linphone/LinphonePreferences.java
+++ b/src/org/linphone/LinphonePreferences.java
@@ -23,6 +23,7 @@ import org.linphone.core.LinphoneAddress;
import org.linphone.core.LinphoneAuthInfo;
import org.linphone.core.LinphoneCore;
import org.linphone.core.LinphoneAddress.TransportType;
+import org.linphone.core.LinphoneCore.AdaptiveRateAlgorithm;
import org.linphone.core.LinphoneCore.FirewallPolicy;
import org.linphone.core.LinphoneCore.MediaEncryption;
import org.linphone.core.LinphoneCore.RegistrationState;
@@ -246,7 +247,7 @@ public class LinphonePreferences {
tempAvpfRRInterval = interval;
return this;
}
-
+
public AccountBuilder setRealm(String realm) {
tempRealm = realm;
return this;
@@ -322,7 +323,7 @@ public class LinphonePreferences {
prxCfg.enableQualityReporting(tempQualityReportingEnabled);
prxCfg.setQualityReportingCollector(tempQualityReportingCollector);
prxCfg.setQualityReportingInterval(tempQualityReportingInterval);
-
+
if(tempRealm != null)
prxCfg.setRealm(tempRealm);
@@ -680,7 +681,7 @@ public class LinphonePreferences {
public void deleteAccount(int n) {
final LinphoneProxyConfig proxyCfg = getProxyConfig(n);
-
+
if (proxyCfg != null)
getLc().removeProxyConfig(proxyCfg);
if (getLc().getProxyConfigList().length == 0) {
@@ -1016,7 +1017,7 @@ public class LinphonePreferences {
// Tunnel settings
private TunnelConfig tunnelConfig = null;
-
+
public TunnelConfig getTunnelConfig() {
if(getLc().isTunnelAvailable()) {
if(tunnelConfig == null) {
@@ -1033,7 +1034,7 @@ public class LinphonePreferences {
return null;
}
}
-
+
public String getTunnelHost() {
TunnelConfig config = getTunnelConfig();
if(config != null) {
@@ -1042,7 +1043,7 @@ public class LinphonePreferences {
return null;
}
}
-
+
public void setTunnelHost(String host) {
TunnelConfig config = getTunnelConfig();
if(config != null) {
@@ -1050,7 +1051,7 @@ public class LinphonePreferences {
LinphoneManager.getInstance().initTunnelFromConf();
}
}
-
+
public int getTunnelPort() {
TunnelConfig config = getTunnelConfig();
if(config != null) {
@@ -1059,7 +1060,7 @@ public class LinphonePreferences {
return -1;
}
}
-
+
public void setTunnelPort(int port) {
TunnelConfig config = getTunnelConfig();
if(config != null) {
@@ -1067,7 +1068,7 @@ public class LinphonePreferences {
LinphoneManager.getInstance().initTunnelFromConf();
}
}
-
+
public String getTunnelMode() {
return getConfig().getString("app", "tunnel", null);
}
@@ -1098,18 +1099,26 @@ public class LinphonePreferences {
return getConfig().getBool("app", "first_remote_provisioning", true);
}
- public boolean isAdaptativeRateControlEnabled() {
+ public boolean isAdaptiveRateControlEnabled() {
return getLc().isAdaptiveRateControlEnabled();
}
-
- public void enableAdaptativeRateControl(boolean enabled) {
+
+ public void enableAdaptiveRateControl(boolean enabled) {
getLc().enableAdaptiveRateControl(enabled);
}
-
+
+ public AdaptiveRateAlgorithm getAdaptiveRateAlgorithm() {
+ return getLc().getAdaptiveRateAlgorithm();
+ }
+
+ public void setAdaptiveRateAlgorithm(AdaptiveRateAlgorithm alg) {
+ getLc().setAdaptiveRateAlgorithm(alg);
+ }
+
public int getCodecBitrateLimit() {
return getConfig().getInt("audio", "codec_bitrate_limit", 36);
}
-
+
public void setCodecBitrateLimit(int bitrate) {
getConfig().setInt("audio", "codec_bitrate_limit", bitrate);
}
diff --git a/src/org/linphone/SettingsFragment.java b/src/org/linphone/SettingsFragment.java
index ddd283810..627de70f5 100644
--- a/src/org/linphone/SettingsFragment.java
+++ b/src/org/linphone/SettingsFragment.java
@@ -25,6 +25,7 @@ import java.util.List;
import org.linphone.LinphoneManager.EcCalibrationListener;
import org.linphone.core.LinphoneAddress;
import org.linphone.core.LinphoneCore;
+import org.linphone.core.LinphoneCore.AdaptiveRateAlgorithm;
import org.linphone.core.LinphoneCore.EcCalibratorStatus;
import org.linphone.core.LinphoneCore.MediaEncryption;
import org.linphone.core.LinphoneCoreException;
@@ -440,11 +441,14 @@ public class SettingsFragment extends PreferencesListFragment implements EcCalib
Preference echoCalibration = findPreference(getString(R.string.pref_echo_canceller_calibration_key));
echoCalibration.setSummary(String.format(getString(R.string.ec_calibrated), mPrefs.getEchoCalibration()));
}
-
- CheckBoxPreference adaptativeRateControl = (CheckBoxPreference) findPreference(getString(R.string.pref_adaptative_rate_control_key));
- adaptativeRateControl.setChecked(mPrefs.isAdaptativeRateControlEnabled());
-
-
+
+ CheckBoxPreference adaptiveRateControl = (CheckBoxPreference) findPreference(getString(R.string.pref_adaptive_rate_control_key));
+ adaptiveRateControl.setChecked(mPrefs.isAdaptiveRateControlEnabled());
+
+ ListPreference adaptiveRateAlgorithm = (ListPreference) findPreference(getString(R.string.pref_adaptive_rate_algorithm_key));
+ adaptiveRateAlgorithm.setSummary(String.valueOf(mPrefs.getAdaptiveRateAlgorithm()));
+ adaptiveRateAlgorithm.setValue(String.valueOf(mPrefs.getAdaptiveRateAlgorithm()));
+
ListPreference bitrateLimit = (ListPreference) findPreference(getString(R.string.pref_codec_bitrate_limit_key));
bitrateLimit.setSummary(String.valueOf(mPrefs.getCodecBitrateLimit()));
bitrateLimit.setValue(String.valueOf(mPrefs.getCodecBitrateLimit()));
@@ -459,16 +463,29 @@ public class SettingsFragment extends PreferencesListFragment implements EcCalib
return true;
}
});
-
- findPreference(getString(R.string.pref_adaptative_rate_control_key)).setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
+
+ findPreference(getString(R.string.pref_adaptive_rate_control_key)).setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
boolean enabled = (Boolean) newValue;
- mPrefs.enableAdaptativeRateControl(enabled);
+ mPrefs.enableAdaptiveRateControl(enabled);
return true;
}
});
-
+
+ findPreference(getString(R.string.pref_adaptive_rate_algorithm_key)).setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
+ @Override
+ public boolean onPreferenceChange(Preference preference, Object newValue) {
+ ListPreference listPreference = (ListPreference) preference;
+ int index = listPreference.findIndexOfValue((String)newValue);
+
+ mPrefs.setAdaptiveRateAlgorithm(AdaptiveRateAlgorithm.fromInt(index));
+ preference.setSummary(String.valueOf(mPrefs.getAdaptiveRateAlgorithm()));
+ return true;
+ }
+ });
+
+
findPreference(getString(R.string.pref_codec_bitrate_limit_key)).setOnPreferenceChangeListener(new OnPreferenceChangeListener() {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
@@ -481,12 +498,12 @@ public class SettingsFragment extends PreferencesListFragment implements EcCalib
lc.setPayloadTypeBitrate(pt, bitrate);
}
}
-
+
preference.setSummary(String.valueOf(mPrefs.getCodecBitrateLimit()));
return true;
}
});
-
+
findPreference(getString(R.string.pref_echo_canceller_calibration_key)).setOnPreferenceClickListener(new OnPreferenceClickListener() {
@Override
public boolean onPreferenceClick(Preference preference) {
diff --git a/submodules/belle-sip b/submodules/belle-sip
index 3b4ef4e2f..fa1c112cb 160000
--- a/submodules/belle-sip
+++ b/submodules/belle-sip
@@ -1 +1 @@
-Subproject commit 3b4ef4e2faa9b382df35579c0d9444ba8feac828
+Subproject commit fa1c112cb33d2c0a42b351652a4779a8aea77c56
diff --git a/submodules/linphone b/submodules/linphone
index 7563ab148..0abc9efad 160000
--- a/submodules/linphone
+++ b/submodules/linphone
@@ -1 +1 @@
-Subproject commit 7563ab148ae6c16ca7d0cfb00f5bde3dfe9cbb19
+Subproject commit 0abc9efadc86737345690e63886f31880286a5ee