pub struct RateControlConfig {
pub(crate) emit_pass_data: bool,
pub(crate) summary: Option<RateControlSummary>,
}
Expand description
Rate control configuration
Fields§
§emit_pass_data: bool
§summary: Option<RateControlSummary>
Implementations§
Source§impl RateControlConfig
impl RateControlConfig
Sourcepub fn from_summary_slice(bytes: &[u8]) -> Result<Self, Error>
pub fn from_summary_slice(bytes: &[u8]) -> Result<Self, Error>
Create a rate control configuration from a serialized summary
§Errors
Returns an error if the serialized data is invalid.
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a default rate control configuration
By default the encoder is in single pass mode.
Sourcepub const fn with_summary(self, summary: RateControlSummary) -> Self
pub const fn with_summary(self, summary: RateControlSummary) -> Self
Set a rate control summary
Enable the second pass encoding mode
Sourcepub const fn with_emit_data(self, emit: bool) -> Self
pub const fn with_emit_data(self, emit: bool) -> Self
Emit the current pass data
The pass data will be used in a second pass encoding session
Trait Implementations§
Source§impl Clone for RateControlConfig
impl Clone for RateControlConfig
Source§fn clone(&self) -> RateControlConfig
fn clone(&self) -> RateControlConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RateControlConfig
impl Debug for RateControlConfig
Source§impl Default for RateControlConfig
impl Default for RateControlConfig
Source§fn default() -> RateControlConfig
fn default() -> RateControlConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RateControlConfig
impl RefUnwindSafe for RateControlConfig
impl Send for RateControlConfig
impl Sync for RateControlConfig
impl Unpin for RateControlConfig
impl UnwindSafe for RateControlConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more