#[non_exhaustive]pub struct EncoderConfig {
pub width: u32,
pub height: u32,
pub fps: u32,
pub bitrate_bps: u32,
pub max_bitrate_bps: u32,
pub keyframe_interval: Option<u32>,
pub temporal_layers: TemporalLayers,
}Expand description
Encoder settings.
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: u32Coded width in pixels (1 to 16383).
height: u32Coded height in pixels (1 to 16383).
fps: u32The frame rate the input arrives at (for rate control).
bitrate_bps: u32Target bitrate in bits per second.
max_bitrate_bps: u32Ceiling the encoder skips frames to stay under, in bits per second.
Raised to bitrate_bps if lower.
keyframe_interval: Option<u32>A keyframe every this many frames; None, only on request.
temporal_layers: TemporalLayersTemporal layering.
Implementations§
Source§impl EncoderConfig
impl EncoderConfig
Sourcepub fn new(width: u32, height: u32, fps: u32, bitrate_bps: u32) -> Self
pub fn new(width: u32, height: u32, fps: u32, bitrate_bps: u32) -> Self
Settings for width x height at fps and bitrate_bps, with a
1.5x ceiling, keyframes on request only and no temporal layers.
Sourcepub fn with_temporal_layers(self, layers: TemporalLayers) -> Self
pub fn with_temporal_layers(self, layers: TemporalLayers) -> Self
The same settings with temporal layering.
Sourcepub fn with_keyframe_interval(self, frames: Option<u32>) -> Self
pub fn with_keyframe_interval(self, frames: Option<u32>) -> Self
The same settings with a keyframe interval.
Trait Implementations§
Source§impl Clone for EncoderConfig
impl Clone for EncoderConfig
impl Copy for EncoderConfig
Source§impl Debug for EncoderConfig
impl Debug for EncoderConfig
impl Eq for EncoderConfig
Source§impl PartialEq for EncoderConfig
impl PartialEq for EncoderConfig
impl StructuralPartialEq for EncoderConfig
Auto Trait Implementations§
impl Forget for EncoderConfig
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