pub struct TwoPassBitrateAllocator { /* private fields */ }Expand description
Two-pass VBR bitrate allocator.
Use TwoPassBitrateAllocator::allocate to produce per-frame allocation
plans from first-pass statistics.
Implementations§
Source§impl TwoPassBitrateAllocator
impl TwoPassBitrateAllocator
Sourcepub fn new(cfg: TwoPassAllocatorConfig) -> Self
pub fn new(cfg: TwoPassAllocatorConfig) -> Self
Create a new allocator with the given configuration.
Sourcepub fn default_allocator() -> Self
pub fn default_allocator() -> Self
Create an allocator with default configuration.
Sourcepub fn allocate(
&self,
stats: &TwoPassFirstPassStats,
) -> Vec<FrameAllocationResult>
pub fn allocate( &self, stats: &TwoPassFirstPassStats, ) -> Vec<FrameAllocationResult>
Allocate bits for all frames in a session.
Returns one FrameAllocationResult per frame in the first-pass stats,
in the same order.
Trait Implementations§
Source§impl Clone for TwoPassBitrateAllocator
impl Clone for TwoPassBitrateAllocator
Source§fn clone(&self) -> TwoPassBitrateAllocator
fn clone(&self) -> TwoPassBitrateAllocator
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 moreAuto Trait Implementations§
impl Freeze for TwoPassBitrateAllocator
impl RefUnwindSafe for TwoPassBitrateAllocator
impl Send for TwoPassBitrateAllocator
impl Sync for TwoPassBitrateAllocator
impl Unpin for TwoPassBitrateAllocator
impl UnsafeUnpin for TwoPassBitrateAllocator
impl UnwindSafe for TwoPassBitrateAllocator
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