diff options
author | Marvin W <git@larma.de> | 2021-11-15 22:49:44 +0100 |
---|---|---|
committer | Marvin W <git@larma.de> | 2021-11-15 22:49:44 +0100 |
commit | 0b828a0ae55b3c0eaf1206f0c54cfcee4f60e6af (patch) | |
tree | 6985226eab65f05a8737b448c44b296470f46e6c /plugins/rtp/src/stream.vala | |
parent | 9958cfbe7b4467ec5a5fed4c7e5e06f7f8e9179b (diff) | |
download | dino-0b828a0ae55b3c0eaf1206f0c54cfcee4f60e6af.tar.gz dino-0b828a0ae55b3c0eaf1206f0c54cfcee4f60e6af.zip |
Add maximum bitrate and adjust video resolution based on bitrate
Diffstat (limited to 'plugins/rtp/src/stream.vala')
-rw-r--r-- | plugins/rtp/src/stream.vala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/rtp/src/stream.vala b/plugins/rtp/src/stream.vala index 24adcb9a..5e5a556b 100644 --- a/plugins/rtp/src/stream.vala +++ b/plugins/rtp/src/stream.vala @@ -266,7 +266,7 @@ public class Dino.Plugins.Rtp.Stream : Xmpp.Xep.JingleRtp.Stream { last_remb_time = time_now; uint actual_bitrate = (uint)(((double)new_octets * 8.0) * (double)time_diff / 1000.0 / 1000000.0); new_target_receive_bitrate = uint.max(new_target_receive_bitrate, (uint)(0.9 * (double)actual_bitrate)); - max_target_receive_bitrate = uint.max(actual_bitrate * 2, max_target_receive_bitrate); + max_target_receive_bitrate = uint.max((uint)(1.5 * (double)actual_bitrate), max_target_receive_bitrate); new_target_receive_bitrate = uint.min(new_target_receive_bitrate, max_target_receive_bitrate); } new_target_receive_bitrate = uint.max(16, new_target_receive_bitrate); // Never go below 16 |