#[non_exhaustive]pub enum Preset {
LowLatency,
Balanced,
Quality,
}Expand description
How an encoder trades latency for compression at the configured bitrate.
Bitrate is set separately, via Config::bitrate. Presets differ in the
codec effort spent per frame and the buffering the backend allows. Each
backend maps a preset onto the controls it actually has, so two presets can
apply the same controls on one backend, and some backends cannot rule out
frame reordering or queueing: V4L2 leaves both to the driver, and
MediaCodec’s no-B-frame setting is only a hint. The encoder logs the
controls that took effect at debug level when it opens. A preset describes the encoder alone, not keyframe join time, transport delay,
or viewer playout.
#[non_exhaustive] so a later policy can be added without breaking a
match.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LowLatency
The least per-frame encode time and buffering the backend supports.
Balanced
More codec effort per frame for better compression.
Quality
The most codec effort the backend spends without queueing frames.
Trait Implementations§
impl Copy for Preset
impl Eq for Preset
impl StructuralPartialEq for Preset
Auto Trait Implementations§
impl Freeze for Preset
impl RefUnwindSafe for Preset
impl Send for Preset
impl Sync for Preset
impl Unpin for Preset
impl UnsafeUnpin for Preset
impl UnwindSafe for Preset
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.