#[non_exhaustive]pub struct Config {
pub width: u32,
pub height: u32,
pub framerate: u32,
pub bitrate: Option<u64>,
pub gop: u32,
pub kind: Kind,
}Expand description
Encoder configuration. width / height / framerate are the encoded
output; input frames are scaled/converted to match.
#[non_exhaustive]: build via Config::new and set the optional fields,
so future knobs don’t break callers.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.width: u32§height: u32§framerate: u32§bitrate: Option<u64>Target bitrate in bits per second. None derives a sane default
from resolution and framerate (~0.07 bits per pixel per second).
gop: u32Keyframe interval in frames. Subscribers joining mid-stream wait at most this many frames before they can start decoding.
kind: KindImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more