diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts
index 019319cb2..990d7c06c 100644
--- a/linphone-app/assets/languages/da.ts
+++ b/linphone-app/assets/languages/da.ts
@@ -1,4 +1,6 @@
-
+
+
+
About
@@ -1213,6 +1215,26 @@ Klik her: <a href="%1">%1</a>
audioSettingsInCallWarning
Lydopkald i gang: Nogle indstillinger er ikke tilgængelige.
+
+ echoCancellationCalibrationLabel
+
+
+
+ calibratingEchoCancellationInProgress
+
+
+
+ calibratingEchoCancellationDone
+
+
+
+ calibratingEchoCancellationFailed
+
+
+
+ calibratingEchoCancellationNone
+
+
SettingsCallsChat
@@ -2781,4 +2803,4 @@ Klik her: <a href="%1">%1</a>
Vil du downloade %1 (%2)?
-
\ No newline at end of file
+
diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts
index beb3802ee..d461088be 100644
--- a/linphone-app/assets/languages/de.ts
+++ b/linphone-app/assets/languages/de.ts
@@ -1,4 +1,6 @@
-
+
+
+
About
@@ -1213,6 +1215,26 @@ Klicken Sie hier: <a href="%1">%1</a>
audioSettingsInCallWarning
Audioanruf wird ausgeführt: Einige Einstellungen sind nicht verfügbar.
+
+ echoCancellationCalibrationLabel
+
+
+
+ calibratingEchoCancellationInProgress
+
+
+
+ calibratingEchoCancellationDone
+
+
+
+ calibratingEchoCancellationFailed
+
+
+
+ calibratingEchoCancellationNone
+
+
SettingsCallsChat
@@ -2781,4 +2803,4 @@ Klicken Sie hier: <a href="%1">%1</a>
Möchten Sie %1 (%2) herunterladen?
-
\ No newline at end of file
+
diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts
index 3585a0814..6efbe3e8d 100644
--- a/linphone-app/assets/languages/en.ts
+++ b/linphone-app/assets/languages/en.ts
@@ -1215,6 +1215,31 @@ Click here: <a href="%1">%1</a>
audioSettingsInCallWarning
Audio call in progress: some settings are not available.
+
+ echoCancellationCalibrationLabel
+ Button title for the calibration of echo canceller
+ Calibration
+
+
+ calibratingEchoCancellationInProgress
+ Message while calibrating
+ ...calibrating...
+
+
+ calibratingEchoCancellationDone
+ %1 is a placeholder for the number of ms obtained by the calibration. ms = milliseconds
+ Calibrated to -%1ms
+
+
+ calibratingEchoCancellationFailed
+ Message when the calibration cannot be done
+ Calibration failed
+
+
+ calibratingEchoCancellationNone
+ Message when the calibration did not find any echo
+ No echo detected
+
SettingsCallsChat
diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts
index 49d65902c..a24ddbdad 100644
--- a/linphone-app/assets/languages/es.ts
+++ b/linphone-app/assets/languages/es.ts
@@ -1,4 +1,6 @@
-
+
+
+
About
@@ -1213,6 +1215,26 @@ Haga clic aquí: <a href="%1">%1 </a>
audioSettingsInCallWarning
Llamada de audio en curso: algunos ajustes no están disponibles.
+
+ echoCancellationCalibrationLabel
+
+
+
+ calibratingEchoCancellationInProgress
+
+
+
+ calibratingEchoCancellationDone
+
+
+
+ calibratingEchoCancellationFailed
+
+
+
+ calibratingEchoCancellationNone
+
+
SettingsCallsChat
@@ -2781,4 +2803,4 @@ Haga clic aquí: <a href="%1">%1 </a>
¿Deseas descargar %1 (%1)?
-
\ No newline at end of file
+
diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts
index dc90cfbb1..f1f44939a 100644
--- a/linphone-app/assets/languages/fr_FR.ts
+++ b/linphone-app/assets/languages/fr_FR.ts
@@ -1,4 +1,6 @@
-
+
+
+
About
@@ -1213,6 +1215,26 @@ Cliquez ici : <a href="%1">%1</a>
audioSettingsInCallWarning
Appel en cours: certains paramètres sont inaccessibles
+
+ echoCancellationCalibrationLabel
+
+
+
+ calibratingEchoCancellationInProgress
+
+
+
+ calibratingEchoCancellationDone
+
+
+
+ calibratingEchoCancellationFailed
+
+
+
+ calibratingEchoCancellationNone
+
+
SettingsCallsChat
@@ -2781,4 +2803,4 @@ Cliquez ici : <a href="%1">%1</a>
Voulez-vous installer %1 (%2) ?
-
\ No newline at end of file
+
diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts
index 66a03428d..bfd689b36 100644
--- a/linphone-app/assets/languages/hu.ts
+++ b/linphone-app/assets/languages/hu.ts
@@ -1,4 +1,6 @@
-
+
+
+
About
@@ -1212,6 +1214,26 @@ Kattintson ide: <a href="%1">%1</a>
audioSettingsInCallWarning
Hanghívás folyamatban: egyes beállítások nem érhetők el.
+
+ echoCancellationCalibrationLabel
+
+
+
+ calibratingEchoCancellationInProgress
+
+
+
+ calibratingEchoCancellationDone
+
+
+
+ calibratingEchoCancellationFailed
+
+
+
+ calibratingEchoCancellationNone
+
+
SettingsCallsChat
@@ -2780,4 +2802,4 @@ Kattintson ide: <a href="%1">%1</a>
Szeretné letölteni a(z) %1 (%2)?
-
\ No newline at end of file
+
diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts
index 90e911d82..72a58a37c 100644
--- a/linphone-app/assets/languages/it.ts
+++ b/linphone-app/assets/languages/it.ts
@@ -1,4 +1,6 @@
-
+
+
+
About
@@ -1213,6 +1215,26 @@ Clicca: <a href="%1">%1</a>
audioSettingsInCallWarning
Chiamata audio in corso: alcune impostazioni non sono disponibili.
+
+ echoCancellationCalibrationLabel
+
+
+
+ calibratingEchoCancellationInProgress
+
+
+
+ calibratingEchoCancellationDone
+
+
+
+ calibratingEchoCancellationFailed
+
+
+
+ calibratingEchoCancellationNone
+
+
SettingsCallsChat
@@ -2781,4 +2803,4 @@ Clicca: <a href="%1">%1</a>
Vuoi scaricare %1 (%2)?
-
\ No newline at end of file
+
diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts
index fcc4c6643..4f510b6a9 100644
--- a/linphone-app/assets/languages/ja.ts
+++ b/linphone-app/assets/languages/ja.ts
@@ -1,4 +1,6 @@
-
+
+
+
About
@@ -1213,6 +1215,26 @@
audioSettingsInCallWarning
音声通話中:一部の設定が使用できません。
+
+ echoCancellationCalibrationLabel
+
+
+
+ calibratingEchoCancellationInProgress
+
+
+
+ calibratingEchoCancellationDone
+
+
+
+ calibratingEchoCancellationFailed
+
+
+
+ calibratingEchoCancellationNone
+
+
SettingsCallsChat
@@ -2781,4 +2803,4 @@
%1 (%2) をダウンロードしますか?
-
\ No newline at end of file
+
diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts
index a1bbb04f7..426697d75 100644
--- a/linphone-app/assets/languages/lt.ts
+++ b/linphone-app/assets/languages/lt.ts
@@ -1,4 +1,6 @@
-
+
+
+
About
@@ -1213,6 +1215,26 @@ Spustelėkite čia: <a href="%1">%1</a>
audioSettingsInCallWarning
Vyksta garso skambutis: kai kurie nustatymai negalimi.
+
+ echoCancellationCalibrationLabel
+
+
+
+ calibratingEchoCancellationInProgress
+
+
+
+ calibratingEchoCancellationDone
+
+
+
+ calibratingEchoCancellationFailed
+
+
+
+ calibratingEchoCancellationNone
+
+
SettingsCallsChat
@@ -1883,895 +1905,895 @@ Spustelėkite čia: <a href="%1">%1</a>
country
Afghanistan
-
+
Albania
-
+
Algeria
-
+
AmericanSamoa
-
+
Andorra
-
+
Angola
-
+
Anguilla
-
+
AntiguaAndBarbuda
-
+
Argentina
-
+
Armenia
-
+
Aruba
-
+
Australia
-
+
Austria
-
+
Azerbaijan
-
+
Bahamas
-
+
Bahrain
-
+
Bangladesh
-
+
Barbados
-
+
Belarus
-
+
Belgium
-
+
Belize
-
+
Benin
-
+
Bermuda
-
+
Bhutan
-
+
Bolivia
-
+
BosniaAndHerzegowina
-
+
Botswana
-
+
Brazil
-
+
Brunei
-
+
Bulgaria
-
+
BurkinaFaso
-
+
Burundi
-
+
Cambodia
-
+
Cameroon
-
+
Canada
-
+
CapeVerde
-
+
CaymanIslands
-
+
CentralAfricanRepublic
-
+
Chad
-
+
Chile
-
+
China
-
+
Colombia
-
+
Comoros
-
+
PeoplesRepublicOfCongo
-
+
DemocraticRepublicOfCongo
-
+
CookIslands
-
+
CostaRica
-
+
IvoryCoast
-
+
Croatia
-
+
Cuba
-
+
Cyprus
-
+
CzechRepublic
-
+
Denmark
-
+
Djibouti
-
+
Dominica
-
+
DominicanRepublic
-
+
Ecuador
-
+
Egypt
-
+
ElSalvador
-
+
EquatorialGuinea
-
+
Eritrea
-
+
Estonia
-
+
Ethiopia
-
+
FalklandIslands
-
+
FaroeIslands
-
+
Fiji
-
+
Finland
-
+
France
-
+
FrenchGuiana
-
+
FrenchPolynesia
-
+
Gabon
-
+
Gambia
-
+
Georgia
-
+
Germany
-
+
Ghana
-
+
Gibraltar
-
+
Greece
-
+
Greenland
-
+
Grenada
-
+
Guadeloupe
-
+
Guam
-
+
Guatemala
-
+
Guinea
-
+
GuineaBissau
-
+
Guyana
-
+
Haiti
-
+
Honduras
-
+
HongKong
-
+
Hungary
-
+
Iceland
-
+
India
-
+
Indonesia
-
+
Iran
-
+
Iraq
-
+
Ireland
-
+
Israel
-
+
Italy
-
+
Jamaica
-
+
Japan
-
+
Jordan
-
+
Kazakhstan
-
+
Kenya
-
+
Kiribati
-
+
DemocraticRepublicOfKorea
-
+
RepublicOfKorea
-
+
Kuwait
-
+
Kyrgyzstan
-
+
Laos
-
+
Latvia
-
+
Lebanon
-
+
Lesotho
-
+
Liberia
-
+
Libya
-
+
Liechtenstein
-
+
Lithuania
-
+
Luxembourg
-
+
Macau
-
+
Macedonia
-
+
Madagascar
-
+
Malawi
-
+
Malaysia
-
+
Maldives
-
+
Mali
-
+
Malta
-
+
MarshallIslands
-
+
Martinique
-
+
Mauritania
-
+
Mauritius
-
+
Mayotte
-
+
Mexico
-
+
Micronesia
-
+
Moldova
-
+
Monaco
-
+
Mongolia
-
+
Montenegro
-
+
Montserrat
-
+
Morocco
-
+
Mozambique
-
+
Myanmar
-
+
Namibia
-
+
NauruCountry
-
+
Nepal
-
+
Netherlands
-
+
NewCaledonia
-
+
NewZealand
-
+
Nicaragua
-
+
Niger
-
+
Nigeria
-
+
Niue
-
+
NorfolkIsland
-
+
NorthernMarianaIslands
-
+
Norway
-
+
Oman
-
+
Pakistan
-
+
Palau
-
+
PalestinianTerritories
-
+
Panama
-
+
PapuaNewGuinea
-
+
Paraguay
-
+
Peru
-
+
Philippines
-
+
Poland
-
+
Portugal
-
+
PuertoRico
-
+
Qatar
-
+
Reunion
-
+
Romania
-
+
RussianFederation
-
+
Rwanda
-
+
SaintHelena
-
+
SaintKittsAndNevis
-
+
SaintLucia
-
+
SaintPierreAndMiquelon
-
+
SaintVincentAndTheGrenadines
-
+
Samoa
-
+
SanMarino
-
+
SaoTomeAndPrincipe
-
+
SaudiArabia
-
+
Senegal
-
+
Serbia
-
+
Seychelles
-
+
SierraLeone
-
+
Singapore
-
+
Slovakia
-
+
Slovenia
-
+
SolomonIslands
-
+
Somalia
-
+
SouthAfrica
-
+
Spain
-
+
SriLanka
-
+
Sudan
-
+
Suriname
-
+
Swaziland
-
+
Sweden
-
+
Switzerland
-
+
Syria
-
+
Taiwan
-
+
Tajikistan
-
+
Tanzania
-
+
Thailand
-
+
Togo
-
+
Tokelau
-
+
Tonga
-
+
TrinidadAndTobago
-
+
Tunisia
-
+
Turkey
-
+
Turkmenistan
-
+
TurksAndCaicosIslands
-
+
Tuvalu
-
+
Uganda
-
+
Ukraine
-
+
UnitedArabEmirates
-
+
UnitedKingdom
-
+
UnitedStates
-
+
Uruguay
-
+
Uzbekistan
-
+
Vanuatu
-
+
Venezuela
-
+
Vietnam
-
+
WallisAndFutunaIslands
-
+
Yemen
-
+
Zambia
-
+
Zimbabwe
-
+
@@ -2781,4 +2803,4 @@ Spustelėkite čia: <a href="%1">%1</a>
Ar norite atsisiųsti %1 (%2)?
-
\ No newline at end of file
+
diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts
index 6d207fb46..d705193d0 100644
--- a/linphone-app/assets/languages/pt_BR.ts
+++ b/linphone-app/assets/languages/pt_BR.ts
@@ -1,4 +1,6 @@
-
+
+
+
About
@@ -1212,6 +1214,26 @@ Clique aqui: <a href="%1">%1 </a>
audioSettingsInCallWarning
Chamada de áudio em andamento: algumas configurações não estão disponíveis.
+
+ echoCancellationCalibrationLabel
+
+
+
+ calibratingEchoCancellationInProgress
+
+
+
+ calibratingEchoCancellationDone
+
+
+
+ calibratingEchoCancellationFailed
+
+
+
+ calibratingEchoCancellationNone
+
+
SettingsCallsChat
@@ -2780,4 +2802,4 @@ Clique aqui: <a href="%1">%1 </a>
Deseja transferir %1 (%2)?
-
\ No newline at end of file
+
diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts
index 3be35b04b..848d25461 100644
--- a/linphone-app/assets/languages/ru.ts
+++ b/linphone-app/assets/languages/ru.ts
@@ -1,4 +1,6 @@
-
+
+
+
About
@@ -1213,6 +1215,26 @@
audioSettingsInCallWarning
Звуковой вызов в процессе: некоторые настройки недоступны.
+
+ echoCancellationCalibrationLabel
+
+
+
+ calibratingEchoCancellationInProgress
+
+
+
+ calibratingEchoCancellationDone
+
+
+
+ calibratingEchoCancellationFailed
+
+
+
+ calibratingEchoCancellationNone
+
+
SettingsCallsChat
@@ -2781,4 +2803,4 @@
Хотите загрузить %1 (%2)?
-
\ No newline at end of file
+
diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts
index ec1e511c4..54ee0cc8a 100644
--- a/linphone-app/assets/languages/sv.ts
+++ b/linphone-app/assets/languages/sv.ts
@@ -1,4 +1,6 @@
-
+
+
+
About
@@ -1213,6 +1215,26 @@ Klicka här: <a href="%1">%1</a>
audioSettingsInCallWarning
Ljudsamtal pågår: vissa inställningar är inte tillgängliga.
+
+ echoCancellationCalibrationLabel
+
+
+
+ calibratingEchoCancellationInProgress
+
+
+
+ calibratingEchoCancellationDone
+
+
+
+ calibratingEchoCancellationFailed
+
+
+
+ calibratingEchoCancellationNone
+
+
SettingsCallsChat
@@ -2781,4 +2803,4 @@ Klicka här: <a href="%1">%1</a>
Vill du hämta %1 (%2)?
-
\ No newline at end of file
+
diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts
index c232441ad..9855b82b8 100644
--- a/linphone-app/assets/languages/tr.ts
+++ b/linphone-app/assets/languages/tr.ts
@@ -1,4 +1,6 @@
-
+
+
+
About
@@ -1213,6 +1215,26 @@ Buraya tıklayın: <a href="%1">%1</a>
audioSettingsInCallWarning
Sesli çağrı devam ediyor: bazı ayarlar kullanılamıyor.
+
+ echoCancellationCalibrationLabel
+
+
+
+ calibratingEchoCancellationInProgress
+
+
+
+ calibratingEchoCancellationDone
+
+
+
+ calibratingEchoCancellationFailed
+
+
+
+ calibratingEchoCancellationNone
+
+
SettingsCallsChat
@@ -2781,4 +2803,4 @@ Buraya tıklayın: <a href="%1">%1</a>
%1 (%2) indirilmesini istiyor musunuz?
-
\ No newline at end of file
+
diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts
index 55f7a701f..90ab0c3c4 100644
--- a/linphone-app/assets/languages/uk.ts
+++ b/linphone-app/assets/languages/uk.ts
@@ -1,4 +1,6 @@
-
+
+
+
About
@@ -1213,6 +1215,26 @@
audioSettingsInCallWarning
Прогрес аудіодзвінку: деякі настройки недоступні.
+
+ echoCancellationCalibrationLabel
+
+
+
+ calibratingEchoCancellationInProgress
+
+
+
+ calibratingEchoCancellationDone
+
+
+
+ calibratingEchoCancellationFailed
+
+
+
+ calibratingEchoCancellationNone
+
+
SettingsCallsChat
@@ -2781,4 +2803,4 @@
Бажаєте завантажити %1 (%2)?
-
\ No newline at end of file
+
diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts
index 22de801dc..e56f54e03 100644
--- a/linphone-app/assets/languages/zh_CN.ts
+++ b/linphone-app/assets/languages/zh_CN.ts
@@ -1,4 +1,6 @@
-
+
+
+
About
@@ -1213,6 +1215,26 @@
audioSettingsInCallWarning
音频通话正在进行中:某些设置不可用。
+
+ echoCancellationCalibrationLabel
+
+
+
+ calibratingEchoCancellationInProgress
+
+
+
+ calibratingEchoCancellationDone
+
+
+
+ calibratingEchoCancellationFailed
+
+
+
+ calibratingEchoCancellationNone
+
+
SettingsCallsChat
@@ -2781,4 +2803,4 @@
是否要下载 %1 (%2)?
-
\ No newline at end of file
+
diff --git a/linphone-app/src/components/core/CoreHandlers.cpp b/linphone-app/src/components/core/CoreHandlers.cpp
index 309fa074e..cf9c20369 100644
--- a/linphone-app/src/components/core/CoreHandlers.cpp
+++ b/linphone-app/src/components/core/CoreHandlers.cpp
@@ -295,3 +295,10 @@ void CoreHandlers::onVersionUpdateCheckResultReceived (
Utils::coreStringToAppString(url)
);
}
+void CoreHandlers::onEcCalibrationResult(
+ const std::shared_ptr &,
+ linphone::EcCalibratorStatus status,
+ int delayMs
+ ) {
+ emit ecCalibrationResult(status, delayMs);
+}
diff --git a/linphone-app/src/components/core/CoreHandlers.hpp b/linphone-app/src/components/core/CoreHandlers.hpp
index f47e69c7d..61537f4e2 100644
--- a/linphone-app/src/components/core/CoreHandlers.hpp
+++ b/linphone-app/src/components/core/CoreHandlers.hpp
@@ -51,6 +51,7 @@ signals:
void messageReceived (const std::shared_ptr &message);
void presenceReceived (const QString &sipAddress, const std::shared_ptr &presenceModel);
void registrationStateChanged (const std::shared_ptr &proxyConfig, linphone::RegistrationState state);
+ void ecCalibrationResult(linphone::EcCalibratorStatus status, int delayMs);
private:
void handleCoreCreated ();
@@ -146,12 +147,18 @@ private:
) override;
void onVersionUpdateCheckResultReceived (
- const std::shared_ptr &,
+ const std::shared_ptr & core,
linphone::VersionUpdateCheckResult result,
const std::string &version,
const std::string &url
) override;
+ void onEcCalibrationResult(
+ const std::shared_ptr & core,
+ linphone::EcCalibratorStatus status,
+ int delayMs
+ ) override;
+
// ---------------------------------------------------------------------------
bool mCoreCreated = false;
diff --git a/linphone-app/src/components/settings/SettingsModel.cpp b/linphone-app/src/components/settings/SettingsModel.cpp
index e6f727fcb..1fc951a20 100644
--- a/linphone-app/src/components/settings/SettingsModel.cpp
+++ b/linphone-app/src/components/settings/SettingsModel.cpp
@@ -50,6 +50,9 @@ SettingsModel::SettingsModel (QObject *parent) : QObject(parent) {
this, &SettingsModel::handleCallCreated);
QObject::connect(coreManager->getHandlers().get(), &CoreHandlers::callStateChanged,
this, &SettingsModel::handleCallStateChanged);
+ QObject::connect(coreManager->getHandlers().get(), &CoreHandlers::ecCalibrationResult,
+ this, &SettingsModel::handleEcCalibrationResult);
+
configureRlsUri();
}
SettingsModel::~SettingsModel()
@@ -335,6 +338,10 @@ void SettingsModel::setEchoCancellationEnabled (bool status) {
emit echoCancellationEnabledChanged(status);
}
+void SettingsModel::startEchoCancellerCalibration(){
+ CoreManager::getInstance()->getCore()->startEchoCancellerCalibration();
+
+}
// -----------------------------------------------------------------------------
bool SettingsModel::getShowAudioCodecs () const {
@@ -1268,7 +1275,9 @@ void SettingsModel::handleCallCreated(const shared_ptr &) {
void SettingsModel::handleCallStateChanged(const shared_ptr &, linphone::Call::State) {
emit isInCallChanged(getIsInCall());
}
-
+void SettingsModel::handleEcCalibrationResult(linphone::EcCalibratorStatus status, int delayMs){
+ emit echoCancellationStatus((int)status, delayMs);
+}
bool SettingsModel::getIsInCall() const {
return CoreManager::getInstance()->getCore()->getCallsNb() != 0;
}
diff --git a/linphone-app/src/components/settings/SettingsModel.hpp b/linphone-app/src/components/settings/SettingsModel.hpp
index 760b90795..2e71a0976 100644
--- a/linphone-app/src/components/settings/SettingsModel.hpp
+++ b/linphone-app/src/components/settings/SettingsModel.hpp
@@ -250,6 +250,8 @@ public:
bool getEchoCancellationEnabled () const;
void setEchoCancellationEnabled (bool status);
+ Q_INVOKABLE void startEchoCancellerCalibration();
+
bool getShowAudioCodecs () const;
void setShowAudioCodecs (bool status);
@@ -335,8 +337,8 @@ public:
bool mandatoryMediaEncryptionEnabled () const;
void enableMandatoryMediaEncryption(bool mandatory);
- bool getLimeState () const;
- void setLimeState (const bool& state);
+ bool getLimeState () const;
+ void setLimeState (const bool& state);
bool getContactsEnabled () const;
void setContactsEnabled (bool status);
@@ -449,6 +451,7 @@ public:
void handleCallCreated(const std::shared_ptr &call);
void handleCallStateChanged(const std::shared_ptr &call, linphone::Call::State state);
+ void handleEcCalibrationResult(linphone::EcCalibratorStatus status, int delayMs);
bool getIsInCall() const;
@@ -485,6 +488,7 @@ signals:
void ringPathChanged (const QString &path);
void echoCancellationEnabledChanged (bool status);
+ void echoCancellationStatus(int status, int msDelay);
void showAudioCodecsChanged (bool status);
diff --git a/linphone-app/ui/views/App/Settings/SettingsAudio.qml b/linphone-app/ui/views/App/Settings/SettingsAudio.qml
index 1112309c5..dec7dfc14 100644
--- a/linphone-app/ui/views/App/Settings/SettingsAudio.qml
+++ b/linphone-app/ui/views/App/Settings/SettingsAudio.qml
@@ -1,6 +1,6 @@
-import QtQuick 2.7 as Core
-import QtQuick.Controls 2.7 as Core
-import QtQuick.Layouts 1.10 as Core
+import QtQuick 2.7
+import QtQuick.Controls 2.7
+import QtQuick.Layouts 1.10
import Common 1.0
import Linphone 1.0
@@ -11,7 +11,7 @@ import App.Styles 1.0
// =============================================================================
TabContainer {
- Core.Column {
+ Column {
spacing: SettingsWindowStyle.forms.spacing
width: parent.width
@@ -28,7 +28,7 @@ TabContainer {
visible: SettingsModel.isInCall
FormGroup {
- Core.RowLayout {
+ RowLayout {
spacing: SettingsAudioStyle.warningMessage.iconSize
Icon {
icon: 'warning'
@@ -38,7 +38,7 @@ TabContainer {
leftMargin: SettingsAudioStyle.warningMessage.iconSize
}
}
- Core.Text {
+ Text {
text: qsTr('audioSettingsInCallWarning')
}
}
@@ -70,10 +70,10 @@ TabContainer {
width: parent.width
enabled: !SettingsModel.isInCall
- Core.Component.onCompleted: value = SettingsModel.playbackGain
+ Component.onCompleted: value = SettingsModel.playbackGain
onPositionChanged: SettingsModel.playbackGain = position
- Core.ToolTip {
+ ToolTip {
parent: playbackSlider.handle
visible: playbackSlider.pressed
text: (playbackSlider.value * 100).toFixed(0) + " %"
@@ -106,10 +106,10 @@ TabContainer {
width: parent.width
enabled: !SettingsModel.isInCall
- Core.Component.onCompleted: value = SettingsModel.captureGain
+ Component.onCompleted: value = SettingsModel.captureGain
onPositionChanged: SettingsModel.captureGain = position
- Core.ToolTip {
+ ToolTip {
parent: captureSlider.handle
visible: captureSlider.pressed
text: (captureSlider.value * 100).toFixed(0) + " %"
@@ -124,7 +124,7 @@ TabContainer {
label: qsTr('audioTestLabel')
visible: !SettingsModel.isInCall
- Core.Slider {
+ Slider {
id: audioTestSlider
enabled: false
@@ -133,7 +133,7 @@ TabContainer {
leftMargin: SettingsAudioStyle.ringPlayer.leftMargin
}
- background: Core.Rectangle {
+ background: Rectangle {
x: audioTestSlider.leftPadding
y: audioTestSlider.topPadding + audioTestSlider.availableHeight / 2 - height / 2
implicitWidth: 200
@@ -143,7 +143,7 @@ TabContainer {
radius: 2
color: "#bdbebf"
- Core.Rectangle {
+ Rectangle {
width: audioTestSlider.visualPosition * parent.width
height: parent.height
color: audioTestSlider.value > 0.8 ? "#ff0000" : "#21be2b"
@@ -152,12 +152,12 @@ TabContainer {
}
//Empty slider handle
- handle: Core.Text {
+ handle: Text {
text: ''
visible: false
}
- Core.Timer {
+ Timer {
interval: 50
repeat: true
running: SettingsModel.captureGraphRunning
@@ -226,7 +226,7 @@ TabContainer {
}
}
- Core.Loader {
+ Loader {
id: ringPlayer
active: window.visible
@@ -243,10 +243,50 @@ TabContainer {
FormGroup {
label: qsTr('echoCancellationLabel')
- Switch {
- checked: SettingsModel.echoCancellationEnabled
+ Row{
+ spacing: SettingsAudioStyle.warningMessage.iconSize
+ Switch {
+ checked: SettingsModel.echoCancellationEnabled
- onClicked: SettingsModel.echoCancellationEnabled = !checked
+ onClicked: {
+ SettingsModel.echoCancellationEnabled = !checked
+ echoCalibrationStatus.text = ''
+ }
+ }
+ Text{
+ id:echoCalibrationStatus
+ text: ''
+ Layout.fillWidth:true
+ height:parent.height
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ }
+ TextButtonB {
+ id: echoCalibration
+ enabled: SettingsModel.echoCancellationEnabled
+
+ text: qsTr('echoCancellationCalibrationLabel')
+
+ onClicked: { echoCalibrationStatus.text = qsTr("calibratingEchoCancellationInProgress");//"...calibrating echo cancellation..."
+ SettingsModel.startEchoCancellerCalibration();
+ }
+
+ Connections {
+ target: SettingsModel
+
+ onEchoCancellationStatus:{
+ switch(status){
+ case 0 : echoCalibrationStatus.text = qsTr("calibratingEchoCancellationInProgress"); break;
+ case 1 : echoCalibrationStatus.text = qsTr("calibratingEchoCancellationDone").replace('%1', msDelay); break;//"Calibrated in -"+msDelay+"ms"
+ case 2 : echoCalibrationStatus.text = qsTr("calibratingEchoCancellationFailed"); break;//"Calibration failed"
+ case 3 : echoCalibrationStatus.text = qsTr("calibratingEchoCancellationNone");//"No echo detected"
+ SettingsModel.echoCancellationEnabled = false;// Calibration turn off the echo cancellation
+ break;
+ default:{}
+ }
+ }
+ }
+ }
}
}
}