pub struct BitrateAllocator { /* private fields */ }Expand description
Bitrate allocator for video encoding.
Implementations§
Source§impl BitrateAllocator
impl BitrateAllocator
Sourcepub fn new(config: AllocationConfig) -> Self
pub fn new(config: AllocationConfig) -> Self
Create a new bitrate allocator.
Sourcepub fn set_first_pass_stats(&mut self, stats: PassStatistics)
pub fn set_first_pass_stats(&mut self, stats: PassStatistics)
Set first-pass statistics for two-pass encoding.
Sourcepub fn allocate(
&mut self,
frame_index: u64,
frame_type: FrameType,
complexity: f64,
) -> FrameAllocation
pub fn allocate( &mut self, frame_index: u64, frame_type: FrameType, complexity: f64, ) -> FrameAllocation
Allocate bits for a frame.
Sourcepub fn total_allocated(&self) -> u64
pub fn total_allocated(&self) -> u64
Get total bits allocated.
Sourcepub fn frames_allocated(&self) -> u64
pub fn frames_allocated(&self) -> u64
Get number of frames allocated.
Auto Trait Implementations§
impl Freeze for BitrateAllocator
impl RefUnwindSafe for BitrateAllocator
impl Send for BitrateAllocator
impl Sync for BitrateAllocator
impl Unpin for BitrateAllocator
impl UnsafeUnpin for BitrateAllocator
impl UnwindSafe for BitrateAllocator
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