pub struct Config {
pub width: u32,
pub height: u32,
pub framerate: u32,
pub bitrate: u32,
pub gop: u32,
pub device: Option<PathBuf>,
pub color: Color,
}Expand description
H.264 encoder configuration. Dimensions must be even (4:2:0 chroma).
Fields§
§width: u32§height: u32§framerate: u32§bitrate: u32Target bitrate in bits per second (CBR).
gop: u32Keyframe interval in frames.
device: Option<PathBuf>DRM render node to open (e.g. /dev/dri/renderD128).
None, the default, opens the first node whose driver can encode H.264,
and Encoder::config then names the node it picked.
color: ColorColor space written into the SPS, and the target of a conversion from RGB.
Defaults to Color::infer for the height, which is what a decoder
assumes for an unlabelled stream.
Implementations§
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