pub struct AbrController { /* private fields */ }Expand description
ABR (Average Bitrate) rate controller.
Implementations§
Source§impl AbrController
impl AbrController
Sourcepub fn set_target_file_size(&mut self, size_bytes: u64, duration_seconds: f64)
pub fn set_target_file_size(&mut self, size_bytes: u64, duration_seconds: f64)
Set target file size in bytes.
Sourcepub fn set_total_frames(&mut self, count: u64)
pub fn set_total_frames(&mut self, count: u64)
Set total frames for the encode.
Sourcepub fn set_first_pass_stats(&mut self, stats: FirstPassStats)
pub fn set_first_pass_stats(&mut self, stats: FirstPassStats)
Import first pass statistics for second pass.
Sourcepub fn push_lookahead(&mut self, complexity: f32)
pub fn push_lookahead(&mut self, complexity: f32)
Add frame to lookahead (for real-time first pass).
Sourcepub fn get_rc(&mut self, frame_type: FrameType, complexity: f32) -> RcOutput
pub fn get_rc(&mut self, frame_type: FrameType, complexity: f32) -> RcOutput
Get rate control output for current frame.
Sourcepub fn update(&mut self, stats: &FrameStats)
pub fn update(&mut self, stats: &FrameStats)
Update controller with frame encoding results.
Sourcepub fn finalize_first_pass(&mut self) -> Option<FirstPassStats>
pub fn finalize_first_pass(&mut self) -> Option<FirstPassStats>
Finalize first pass and return statistics.
Sourcepub fn current_bitrate(&self) -> f64
pub fn current_bitrate(&self) -> f64
Get current average bitrate.
Sourcepub fn target_bitrate(&self) -> u64
pub fn target_bitrate(&self) -> u64
Get target bitrate.
Sourcepub fn frame_count(&self) -> u64
pub fn frame_count(&self) -> u64
Get frame count.
Sourcepub fn total_bits(&self) -> u64
pub fn total_bits(&self) -> u64
Get total bits encoded.
Sourcepub fn current_qp(&self) -> f32
pub fn current_qp(&self) -> f32
Get current QP.
Sourcepub fn projected_file_size(&self) -> Option<u64>
pub fn projected_file_size(&self) -> Option<u64>
Calculate projected file size based on current progress.
Sourcepub fn bitrate_deviation(&self) -> f64
pub fn bitrate_deviation(&self) -> f64
Get bitrate deviation from target.
Trait Implementations§
Source§impl Clone for AbrController
impl Clone for AbrController
Source§fn clone(&self) -> AbrController
fn clone(&self) -> AbrController
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AbrController
impl Debug for AbrController
Auto Trait Implementations§
impl Freeze for AbrController
impl RefUnwindSafe for AbrController
impl Send for AbrController
impl Sync for AbrController
impl Unpin for AbrController
impl UnsafeUnpin for AbrController
impl UnwindSafe for AbrController
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