pub struct VbvBuffer { /* private fields */ }Expand description
VBV buffer state and management.
Implementations§
Source§impl VbvBuffer
impl VbvBuffer
Sourcepub fn can_send_frame(&self, frame_bits: u64) -> bool
pub fn can_send_frame(&self, frame_bits: u64) -> bool
Check if we can send a frame of given size without overflow.
Sourcepub fn max_frame_size(&self) -> u64
pub fn max_frame_size(&self) -> u64
Get maximum frame size that can be sent without underflow.
Sourcepub fn min_frame_size(&self) -> u64
pub fn min_frame_size(&self) -> u64
Get minimum frame size to avoid overflow after refill.
Sourcepub fn update(&mut self, frame_bits: u64) -> VbvUpdateResult
pub fn update(&mut self, frame_bits: u64) -> VbvUpdateResult
Update buffer state after encoding a frame.
Sourcepub fn target_frame_size(&self, frame_type: FrameType, base_size: f64) -> u64
pub fn target_frame_size(&self, frame_type: FrameType, base_size: f64) -> u64
Calculate target frame size based on buffer state.
Sourcepub fn fullness_ratio(&self) -> f64
pub fn fullness_ratio(&self) -> f64
Get current buffer fullness ratio (0.0-1.0).
Sourcepub fn current_fullness(&self) -> u64
pub fn current_fullness(&self) -> u64
Get current buffer fullness in bits.
Sourcepub fn statistics(&self) -> VbvStatistics
pub fn statistics(&self) -> VbvStatistics
Get VBV statistics.
Auto Trait Implementations§
impl Freeze for VbvBuffer
impl RefUnwindSafe for VbvBuffer
impl Send for VbvBuffer
impl Sync for VbvBuffer
impl Unpin for VbvBuffer
impl UnsafeUnpin for VbvBuffer
impl UnwindSafe for VbvBuffer
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> 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