configure bitrate on client only

This commit is contained in:
Patrick Nicolas
2025-12-10 14:32:01 +01:00
parent e0cbd202a8
commit 0b526cef9d
25 changed files with 107 additions and 217 deletions
-21
View File
@@ -23,24 +23,6 @@ Kirigami.ScrollablePage {
Kirigami.FormLayout {
Controls.SpinBox {
id: bitrate
Kirigami.FormData.label: i18n("Bitrate:")
from: 1
to: 200
textFromValue: (value, locale) => i18nc("bitrate", "%1 Mbit/s", value)
valueFromText: function (text, locale) {
var prefix_suffix = i18nc("bitrate", "%1 Mbit/s", "%1").split('%1');
for (var i of prefix_suffix) {
text = text.replace(i, "");
}
return Number.fromLocaleString(text);
}
onValueModified: Settings.bitrate = value
}
Kirigami.InlineMessage {
Layout.fillWidth: true
text: i18n("The current encoder configuration is not supported")
@@ -314,9 +296,6 @@ Kirigami.ScrollablePage {
Component.onCompleted: {
openvr_libs.init()
Settings.load(WivrnServer);
// If bitrate was manually set higher, keep the limit
bitrate.to = Math.max(bitrate.to, Settings.bitrate)
bitrate.value = Settings.bitrate
settings.allowUpdates = true;
settings.load();
}