Allow to explicitly increase the bitrate massively

This has the benefit - over direct connections - to be able to send a lot more data.
In particular fast moving frames may avoid fps drops with a higher target bitrate.
This commit is contained in:
Bob Weinand
2023-07-11 22:33:53 +02:00
committed by 21pages
parent 029e6a015e
commit 4b58f0b4dd
3 changed files with 14 additions and 7 deletions

View File

@@ -1078,7 +1078,7 @@ impl PeerConfig {
D: de::Deserializer<'de>,
{
let v: Vec<i32> = de::Deserialize::deserialize(deserializer)?;
if v.len() == 1 && v[0] >= 10 && v[0] <= 100 {
if v.len() == 1 && v[0] >= 10 && v[0] <= 0xFFF {
Ok(v)
} else {
Ok(Self::default_custom_image_quality())
@@ -1402,7 +1402,7 @@ impl UserDefaultConfig {
"codec-preference" => {
self.get_string(key, "auto", vec!["vp8", "vp9", "av1", "h264", "h265"])
}
"custom_image_quality" => self.get_double_string(key, 50.0, 10.0, 100.0),
"custom_image_quality" => self.get_double_string(key, 50.0, 10.0, 0xFFF as f64),
"custom-fps" => self.get_double_string(key, 30.0, 5.0, 120.0),
_ => self
.options