use crate::api::{
transport::BandwidthUsage,
units::{DataRate, TimeDelta},
};
pub const CONGESTION_CONTROLLER_MIN_BITRATE: DataRate = DataRate::from_bits_per_sec(5_000);
pub const BITRATE_WINDOW: TimeDelta = TimeDelta::from_seconds(1);
pub struct RateControlInput {
pub bw_state: BandwidthUsage,
pub estimated_throughput: Option<DataRate>,
}
impl RateControlInput {
pub fn new(bw_state: BandwidthUsage, estimated_throughput: Option<DataRate>) -> Self {
RateControlInput {
bw_state,
estimated_throughput,
}
}
}