Commit 3ad8dc29 authored by Ronan's avatar Ronan

feat(Settings): add developer options to display audio or video codecs

parent 93b0de6f
......@@ -1148,6 +1148,10 @@ Server URL ist nicht konfiguriert.</translation>
<source>audioCodecsTitle</source>
<translation>Audiocodecs</translation>
</message>
<message>
<source>showAudioCodecsLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
......@@ -1618,6 +1622,10 @@ Server URL ist nicht konfiguriert.</translation>
<source>showCameraPreview</source>
<translation>VIDEOVORSCHAU</translation>
</message>
<message>
<source>showVideoCodecsLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsVideoPreview</name>
......
......@@ -1153,6 +1153,10 @@ your friend&apos;s SIP address or username.</translation>
<source>audioCodecsTitle</source>
<translation>Audio codecs</translation>
</message>
<message>
<source>showAudioCodecsLabel</source>
<translation>Show audio codecs</translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
......@@ -1623,6 +1627,10 @@ your friend&apos;s SIP address or username.</translation>
<source>showCameraPreview</source>
<translation>VIDEO PREVIEW</translation>
</message>
<message>
<source>showVideoCodecsLabel</source>
<translation>Show video codecs</translation>
</message>
</context>
<context>
<name>SettingsVideoPreview</name>
......
......@@ -1151,6 +1151,10 @@ Cliquez ici : &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>audioCodecsTitle</source>
<translation>Codecs audio</translation>
</message>
<message>
<source>showAudioCodecsLabel</source>
<translation>Afficher les codecs audio</translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
......@@ -1621,6 +1625,10 @@ Cliquez ici : &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>showCameraPreview</source>
<translation>APERÇU DE LA VIDÉO</translation>
</message>
<message>
<source>showVideoCodecsLabel</source>
<translation>Afficher les codecs vidéo</translation>
</message>
</context>
<context>
<name>SettingsVideoPreview</name>
......
......@@ -1148,6 +1148,10 @@
<source>audioCodecsTitle</source>
<translation>オーディオコーデック</translation>
</message>
<message>
<source>showAudioCodecsLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
......@@ -1618,6 +1622,10 @@
<source>showCameraPreview</source>
<translation>ビデオプレビュー</translation>
</message>
<message>
<source>showVideoCodecsLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsVideoPreview</name>
......
......@@ -1150,6 +1150,10 @@ Tiesiog, įveskite savo draugo SIP adresą ar naudotojo vardą.</translation>
<source>audioCodecsTitle</source>
<translation>Garso kodekai</translation>
</message>
<message>
<source>showAudioCodecsLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
......@@ -1620,6 +1624,10 @@ Tiesiog, įveskite savo draugo SIP adresą ar naudotojo vardą.</translation>
<source>showCameraPreview</source>
<translation>VAIZDO PERŽIŪRA</translation>
</message>
<message>
<source>showVideoCodecsLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsVideoPreview</name>
......
......@@ -1153,6 +1153,10 @@ o endereço SIP ou nome de usuário do seu amigo.</translation>
<source>audioCodecsTitle</source>
<translation>Codecs de áudio</translation>
</message>
<message>
<source>showAudioCodecsLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
......@@ -1623,6 +1627,10 @@ o endereço SIP ou nome de usuário do seu amigo.</translation>
<source>showCameraPreview</source>
<translation>PREVIEW DO VÍDEO</translation>
</message>
<message>
<source>showVideoCodecsLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsVideoPreview</name>
......
......@@ -1151,6 +1151,10 @@
<source>audioCodecsTitle</source>
<translation>Аудио кодеки</translation>
</message>
<message>
<source>showAudioCodecsLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
......@@ -1621,6 +1625,10 @@
<source>showCameraPreview</source>
<translation>ПРЕДПРОСМОТР ВИДЕО</translation>
</message>
<message>
<source>showVideoCodecsLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsVideoPreview</name>
......
......@@ -1150,6 +1150,10 @@ Klicka här: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>audioCodecsTitle</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>showAudioCodecsLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
......@@ -1620,6 +1624,10 @@ Klicka här: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>showCameraPreview</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>showVideoCodecsLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsVideoPreview</name>
......
......@@ -1150,6 +1150,10 @@ arkadaşınızın SIP adresini veya kullanıcı adını girin.</translation>
<source>audioCodecsTitle</source>
<translation>Ses çözücüler</translation>
</message>
<message>
<source>showAudioCodecsLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsCallsChat</name>
......@@ -1620,6 +1624,10 @@ arkadaşınızın SIP adresini veya kullanıcı adını girin.</translation>
<source>showCameraPreview</source>
<translation>GÖRÜNTÜ ÖNİZLEMESİ</translation>
</message>
<message>
<source>showVideoCodecsLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsVideoPreview</name>
......
......@@ -195,6 +195,17 @@ void SettingsModel::setEchoCancellationEnabled (bool status) {
emit echoCancellationEnabledChanged(status);
}
// -----------------------------------------------------------------------------
bool SettingsModel::getShowAudioCodecs () const {
return !!mConfig->getInt(UiSection, "show_audio_codecs", 1);
}
void SettingsModel::setShowAudioCodecs (bool status) {
mConfig->setInt(UiSection, "show_audio_codecs", status);
emit showAudioCodecsChanged(status);
}
// =============================================================================
// Video.
// =============================================================================
......@@ -295,6 +306,17 @@ bool SettingsModel::getVideoSupported () const {
return CoreManager::getInstance()->getCore()->videoSupported();
}
// -----------------------------------------------------------------------------
bool SettingsModel::getShowVideoCodecs () const {
return !!mConfig->getInt(UiSection, "show_video_codecs", 1);
}
void SettingsModel::setShowVideoCodecs (bool status) {
mConfig->setInt(UiSection, "show_video_codecs", status);
emit showVideoCodecsChanged(status);
}
// =============================================================================
// Chat & calls.
// =============================================================================
......
......@@ -57,6 +57,8 @@ class SettingsModel : public QObject {
Q_PROPERTY(bool echoCancellationEnabled READ getEchoCancellationEnabled WRITE setEchoCancellationEnabled NOTIFY echoCancellationEnabledChanged);
Q_PROPERTY(bool showAudioCodecs READ getShowAudioCodecs WRITE setShowAudioCodecs NOTIFY showAudioCodecsChanged);
// Video. --------------------------------------------------------------------
Q_PROPERTY(QStringList videoDevices READ getVideoDevices CONSTANT);
......@@ -72,6 +74,8 @@ class SettingsModel : public QObject {
Q_PROPERTY(bool videoSupported READ getVideoSupported CONSTANT);
Q_PROPERTY(bool showVideoCodecs READ getShowVideoCodecs WRITE setShowVideoCodecs NOTIFY showVideoCodecsChanged);
// Chat & calls. -------------------------------------------------------------
Q_PROPERTY(bool autoAnswerStatus READ getAutoAnswerStatus WRITE setAutoAnswerStatus NOTIFY autoAnswerStatusChanged);
......@@ -217,6 +221,9 @@ public:
bool getEchoCancellationEnabled () const;
void setEchoCancellationEnabled (bool status);
bool getShowAudioCodecs () const;
void setShowAudioCodecs (bool status);
// Video. --------------------------------------------------------------------
QStringList getVideoDevices () const;
......@@ -237,6 +244,9 @@ public:
bool getVideoSupported () const;
bool getShowVideoCodecs () const;
void setShowVideoCodecs (bool status);
// Chat & calls. -------------------------------------------------------------
bool getAutoAnswerStatus () const;
......@@ -416,6 +426,8 @@ signals:
void echoCancellationEnabledChanged (bool status);
void showAudioCodecsChanged (bool status);
// Video. --------------------------------------------------------------------
void videoDeviceChanged (const QString &device);
......@@ -425,6 +437,8 @@ signals:
void videoDefinitionChanged (const QVariantMap &definition);
void showVideoCodecsChanged (bool status);
// Chat & calls. -------------------------------------------------------------
void autoAnswerStatusChanged (bool status);
......
......@@ -140,8 +140,23 @@ TabContainer {
Form {
title: qsTr('audioCodecsTitle')
visible: SettingsModel.showAudioCodecs || SettingsModel.developerSettingsEnabled
width: parent.width
FormLine {
visible: SettingsModel.developerSettingsEnabled
FormGroup {
label: qsTr('showAudioCodecsLabel')
Switch {
checked: SettingsModel.showAudioCodecs
onClicked: SettingsModel.showAudioCodecs = !checked
}
}
}
CodecsViewer {
model: AudioCodecsModel
width: parent.width
......
......@@ -137,8 +137,23 @@ TabContainer {
Form {
title: qsTr('videoCodecsTitle')
visible: SettingsModel.showVideoCodecs || SettingsModel.developerSettingsEnabled
width: parent.width
FormLine {
visible: SettingsModel.developerSettingsEnabled
FormGroup {
label: qsTr('showVideoCodecsLabel')
Switch {
checked: SettingsModel.showVideoCodecs
onClicked: SettingsModel.showVideoCodecs = !checked
}
}
}
CodecsViewer {
model: VideoCodecsModel
width: parent.width
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment