pub struct Config {
pub codec: Codec,
pub width: u32,
pub height: u32,
pub framerate: u32,
pub bitrate: u32,
pub gop: NonZeroU32,
pub device: Option<PathBuf>,
pub color: Color,
}Expand description
Encoder configuration. Dimensions must be even (4:2:0 chroma).
Fields§
§codec: CodecThe format to encode, H.264 unless set. Main profile either way.
width: u32§height: u32§framerate: u32§bitrate: u32The bitrate in bits per second the stream is held to. A calm scene
spends less; see RateControl.
gop: NonZeroU32Keyframe 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
codec at this frame size, 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.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Config
impl Freeze for Config
impl Move 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