pub struct VbvConfig {
pub buffer_size: u64,
pub max_bitrate: u64,
pub initial_fullness: f64,
pub framerate_num: u32,
pub framerate_den: u32,
}Expand description
VBV buffer configuration.
Fields§
§buffer_size: u64Buffer size in bits.
max_bitrate: u64Maximum bitrate in bits per second.
initial_fullness: f64Initial buffer fullness (0.0-1.0).
framerate_num: u32Frame rate numerator.
framerate_den: u32Frame rate denominator.
Implementations§
Source§impl VbvConfig
impl VbvConfig
Sourcepub fn new(
buffer_size: u64,
max_bitrate: u64,
framerate_num: u32,
framerate_den: u32,
) -> Self
pub fn new( buffer_size: u64, max_bitrate: u64, framerate_num: u32, framerate_den: u32, ) -> Self
Create a new VBV configuration.
Sourcepub fn with_initial_fullness(self, fullness: f64) -> Self
pub fn with_initial_fullness(self, fullness: f64) -> Self
Set initial buffer fullness.
Sourcepub fn frame_period(&self) -> f64
pub fn frame_period(&self) -> f64
Calculate frame period in seconds.
Sourcepub fn bits_per_frame(&self) -> f64
pub fn bits_per_frame(&self) -> f64
Calculate bits added per frame period.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VbvConfig
impl RefUnwindSafe for VbvConfig
impl Send for VbvConfig
impl Sync for VbvConfig
impl Unpin for VbvConfig
impl UnsafeUnpin for VbvConfig
impl UnwindSafe for VbvConfig
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