summaryrefslogtreecommitdiffstats
path: root/pica-client/callsettings.cpp
diff options
context:
space:
mode:
authorAnton <anton@picapica.im>2026-11-29 23:38:25 +0400
committerAnton <anton@picapica.im>2026-11-29 23:38:25 +0400
commit56863d74399c8d7354a00bc8ddc87b924ef870ab (patch)
treebd9e44c438f974f80aa6cfef59fe842d3e128ee7 /pica-client/callsettings.cpp
parentd6ce3a2226bda81cce96c61f0a73fb1516adbd0b (diff)
downloadpica-pica-call_quality_presets.tar.gz
pica-pica-call_quality_presets.zip
pica-client: new presets tab, call quality presetscall_quality_presets
Diffstat (limited to 'pica-client/callsettings.cpp')
-rw-r--r--pica-client/callsettings.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/pica-client/callsettings.cpp b/pica-client/callsettings.cpp
index 10529c1..630f8e3 100644
--- a/pica-client/callsettings.cpp
+++ b/pica-client/callsettings.cpp
@@ -164,7 +164,19 @@ CallSettings CallSettings::load()
Settings st(config_dbname);
CallSettings cs;
- cs.videoCodec = st.loadValue("call.video_codec", QLatin1String(kCallVideoCodecs[0].name)).toString();
+ // Adaptive when never set, or set to something this build does not know.
+ const QString preset = st.loadValue("call.quality_preset", "adaptive").toString();
+
+ if (preset == QLatin1String("max"))
+ cs.qualityPreset = CallQualityMax;
+ else if (preset == QLatin1String("economy"))
+ cs.qualityPreset = CallQualityEconomy;
+ else if (preset == QLatin1String("custom"))
+ cs.qualityPreset = CallQualityCustom;
+ else
+ cs.qualityPreset = CallQualityAdaptive;
+
+ cs.videoCodec =st.loadValue("call.video_codec", QLatin1String(kCallVideoCodecs[0].name)).toString();
cs.audioCodec = st.loadValue("call.audio_codec", QLatin1String(kCallAudioCodecs[0].name)).toString();
cs.videoBitrateKbps = st.loadValue("call.video_bitrate_kbps", kDefaultVideoBitrateKbps).toInt();