BlueGit

ict rusty-teams

fix(calls): start simulcast layers at scale 4/2/1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-10-14 · 6 weeks ago

Hash
070d92b0ad5e0e7353a26262d3d37310cfed8aee
Parent
1776f32f
1 file changed +4 −2
crates/calling/src/video_layout.rs +4 −2
@@ -30,6 +30,7 @@ const SMALL_REQUEST: ReceiveLimits = ReceiveLimits { max_fs: 920, max_fps: 3000,
30 30 const SCREEN_REQUEST: ReceiveLimits = ReceiveLimits { max_fs: 8160, max_fps: 1500, max_mbps: 135_000 };
31 31 const SUBSCRIBE_PROFILE: &str = "64001f";
32 32 const SIMULCAST_RIDS: [&str; 3] = ["1", "2", "3"];
33 const SIMULCAST_START_SCALES: [f64; 3] = [4.0, 2.0, 1.0];
33 34 const SIMULCAST_SCALABILITY: &str = "L1T1";
34 35 const THREE_LAYER_MIN_FS: u32 = 2040;
35 36 const SEND_CAPABILITY_FPS: u32 = 30;
@@ -118,9 +119,10 @@ fn add_line(
118 119 fn simulcast_encodings() -> Vec<RtpEncodingParameters> {
119 120 SIMULCAST_RIDS
120 121 .iter()
121 .map(|rid| RtpEncodingParameters {
122 .zip(SIMULCAST_START_SCALES)
123 .map(|(rid, scale)| RtpEncodingParameters {
122 124 rid: (*rid).to_owned(),
123 scale_resolution_down_by: Some(1.0),
125 scale_resolution_down_by: Some(scale),
124 126 scalability_mode: Some(SIMULCAST_SCALABILITY.to_owned()),
125 127 ..RtpEncodingParameters::default()
126 128 })
@@ -30,6 +30,7 @@ const SMALL_REQUEST: ReceiveLimits = ReceiveLimits { max_fs: 920, max_fps: 3000,
30const SCREEN_REQUEST: ReceiveLimits = ReceiveLimits { max_fs: 8160, max_fps: 1500, max_mbps: 135_000 };
30const SCREEN_REQUEST: ReceiveLimits = ReceiveLimits { max_fs: 8160, max_fps: 1500, max_mbps: 135_000 };
31const SUBSCRIBE_PROFILE: &str = "64001f";
31const SUBSCRIBE_PROFILE: &str = "64001f";
32const SIMULCAST_RIDS: [&str; 3] = ["1", "2", "3"];
32const SIMULCAST_RIDS: [&str; 3] = ["1", "2", "3"];
33const SIMULCAST_START_SCALES: [f64; 3] = [4.0, 2.0, 1.0];
33const SIMULCAST_SCALABILITY: &str = "L1T1";
34const SIMULCAST_SCALABILITY: &str = "L1T1";
34const THREE_LAYER_MIN_FS: u32 = 2040;
35const THREE_LAYER_MIN_FS: u32 = 2040;
35const SEND_CAPABILITY_FPS: u32 = 30;
36const SEND_CAPABILITY_FPS: u32 = 30;
@@ -118,9 +119,10 @@ fn add_line(
118fn simulcast_encodings() -> Vec<RtpEncodingParameters> {
119fn simulcast_encodings() -> Vec<RtpEncodingParameters> {
119 SIMULCAST_RIDS
120 SIMULCAST_RIDS
120 .iter()
121 .iter()
121 .map(|rid| RtpEncodingParameters {
122 .zip(SIMULCAST_START_SCALES)
123 .map(|(rid, scale)| RtpEncodingParameters {
122 rid: (*rid).to_owned(),
124 rid: (*rid).to_owned(),
123 scale_resolution_down_by: Some(1.0),
125 scale_resolution_down_by: Some(scale),
124 scalability_mode: Some(SIMULCAST_SCALABILITY.to_owned()),
126 scalability_mode: Some(SIMULCAST_SCALABILITY.to_owned()),
125 ..RtpEncodingParameters::default()
127 ..RtpEncodingParameters::default()
126 })
128 })