#[non_exhaustive]pub struct EncoderConfig {
pub codec: VideoCodec,
pub width: u32,
pub height: u32,
pub input_format: PixelFormat,
pub frame_rate: f64,
pub bitrate: Bitrate,
pub gop: Option<u32>,
pub repeat_headers: bool,
pub profile: Option<H264Profile>,
pub level: Option<H264Level>,
}Expand description
Configuration of a VideoEncoder.
Start from EncoderConfig::h264 and set the fields to change.
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.codec: VideoCodecOutput codec.
width: u32Width of the encoded picture in pixels.
height: u32Height of the encoded picture in pixels.
input_format: PixelFormatPixel format of the source tensors.
frame_rate: f64Nominal frame rate, for rate control.
bitrate: BitrateTarget bitrate.
gop: Option<u32>Frames from one key frame to the next. None keeps the device
default.
repeat_headers: boolEmit the SPS and PPS with every key frame, so a receiver can start decoding at any key frame.
profile: Option<H264Profile>Profile. None keeps the device default.
level: Option<H264Level>Level. None keeps the device default.
Implementations§
Source§impl EncoderConfig
impl EncoderConfig
Trait Implementations§
Source§impl Clone for EncoderConfig
impl Clone for EncoderConfig
Source§impl Debug for EncoderConfig
impl Debug for EncoderConfig
Source§impl PartialEq for EncoderConfig
impl PartialEq for EncoderConfig
impl StructuralPartialEq for EncoderConfig
Auto Trait Implementations§
impl Freeze for EncoderConfig
impl RefUnwindSafe for EncoderConfig
impl Send for EncoderConfig
impl Sync for EncoderConfig
impl Unpin for EncoderConfig
impl UnsafeUnpin for EncoderConfig
impl UnwindSafe for EncoderConfig
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