diff --git a/app/src/main/assets/linphonerc_default b/app/src/main/assets/linphonerc_default index d217cc38d..5f8eeffa7 100644 --- a/app/src/main/assets/linphonerc_default +++ b/app/src/main/assets/linphonerc_default @@ -43,4 +43,7 @@ history_max_size=100 conference_layout=1 hide_empty_chat_rooms=0 +[fec] +fec_enabled=1 + ## End of default rc diff --git a/app/src/main/java/org/linphone/core/CoreContext.kt b/app/src/main/java/org/linphone/core/CoreContext.kt index e1eb66227..d209ecc31 100644 --- a/app/src/main/java/org/linphone/core/CoreContext.kt +++ b/app/src/main/java/org/linphone/core/CoreContext.kt @@ -287,6 +287,8 @@ class CoreContext @UiThread constructor(val context: Context) : HandlerThread("C policy.automaticallyAccept = true policy.automaticallyAcceptDirection = MediaDirection.RecvOnly core.videoActivationPolicy = policy + + core.isFecEnabled = true } updateFriendListsSubscriptionDependingOnDefaultAccount() diff --git a/app/src/main/java/org/linphone/ui/main/settings/viewmodel/SettingsViewModel.kt b/app/src/main/java/org/linphone/ui/main/settings/viewmodel/SettingsViewModel.kt index 770b4b296..82c559648 100644 --- a/app/src/main/java/org/linphone/ui/main/settings/viewmodel/SettingsViewModel.kt +++ b/app/src/main/java/org/linphone/ui/main/settings/viewmodel/SettingsViewModel.kt @@ -54,6 +54,7 @@ class SettingsViewModel @UiThread constructor() : ViewModel() { val echoCancellerEnabled = MutableLiveData() val routeAudioToBluetooth = MutableLiveData() val videoEnabled = MutableLiveData() + val videoFecEnabled = MutableLiveData() val isVibrationAvailable = MutableLiveData() val vibrateDuringIncomingCall = MutableLiveData() @@ -171,6 +172,7 @@ class SettingsViewModel @UiThread constructor() : ViewModel() { echoCancellerEnabled.postValue(core.isEchoCancellationEnabled) routeAudioToBluetooth.postValue(corePreferences.routeAudioToBluetoothIfAvailable) videoEnabled.postValue(core.isVideoEnabled) + videoFecEnabled.postValue(core.isFecEnabled) vibrateDuringIncomingCall.postValue(core.isVibrationOnIncomingCallEnabled) autoRecordCalls.postValue(corePreferences.automaticallyStartCallRecording) @@ -242,6 +244,15 @@ class SettingsViewModel @UiThread constructor() : ViewModel() { } } + @UiThread + fun toggleEnableVideoFec() { + val newValue = videoFecEnabled.value == false + coreContext.postOnCoreThread { core -> + core.isFecEnabled = newValue + videoFecEnabled.postValue(core.isFecEnabled) + } + } + @UiThread fun toggleVibrateOnIncomingCalls() { val newValue = vibrateDuringIncomingCall.value == false diff --git a/app/src/main/res/layout/settings_calls.xml b/app/src/main/res/layout/settings_calls.xml index 3fde91761..84bfdde95 100644 --- a/app/src/main/res/layout/settings_calls.xml +++ b/app/src/main/res/layout/settings_calls.xml @@ -114,6 +114,35 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/route_audio_to_bluetooth_switch" /> + + + + + app:layout_constraintTop_toBottomOf="@id/enable_fec_switch" /> Évite que de l\'écho soit entendu par votre correspondant Utiliser le périphérique Bluetooth si possible Activer la vidéo + Activer la FEC vidéo Choisissez votre sonnerie : Utiliser la sonnerie du système Lire diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ab96806b4..995d3f32a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -255,6 +255,7 @@ Prevents echo from being heard by remote end Route audio to bluetooth device, if any Enable video + Enable video FEC Choose your ringtone: Use this device\'s ringtone Play