use moq_net::PathRelativeOwned;
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[non_exhaustive]
pub struct Rung {
pub height: u32,
pub bitrate: u64,
}
impl Rung {
pub fn new(height: u32, bitrate: u64) -> Self {
Self { height, bitrate }
}
}
#[derive(Clone, Debug)]
#[non_exhaustive]
pub struct Config {
pub rungs: Vec<Rung>,
pub source: Option<PathRelativeOwned>,
pub encoder: moq_video::encode::Kind,
pub decoder: moq_video::decode::Kind,
}
impl Default for Config {
fn default() -> Self {
Self {
rungs: vec![
Rung::new(1080, 5_000_000),
Rung::new(720, 2_500_000),
Rung::new(480, 1_200_000),
Rung::new(360, 600_000),
Rung::new(240, 350_000),
],
source: None,
encoder: moq_video::encode::Kind::default(),
decoder: moq_video::decode::Kind::default(),
}
}
}