pub struct PassRecorder { /* private fields */ }Expand description
Records per-frame metrics for one encoding pass.
Implementations§
Source§impl PassRecorder
impl PassRecorder
Sourcepub fn record(&mut self, metric: FrameMetric)
pub fn record(&mut self, metric: FrameMetric)
Record a single frame’s metrics.
Sourcepub fn frame_count(&self) -> usize
pub fn frame_count(&self) -> usize
Get the number of recorded frames.
Sourcepub fn average_qp(&self) -> f64
pub fn average_qp(&self) -> f64
Compute the average QP across all frames.
Sourcepub fn qp_std_dev(&self) -> f64
pub fn qp_std_dev(&self) -> f64
Compute the QP standard deviation.
Sourcepub fn total_bytes(&self) -> u64
pub fn total_bytes(&self) -> u64
Compute the total size in bytes.
Sourcepub fn average_frame_size(&self) -> f64
pub fn average_frame_size(&self) -> f64
Compute the average frame size in bytes.
Sourcepub fn size_std_dev(&self) -> f64
pub fn size_std_dev(&self) -> f64
Compute the frame size standard deviation.
Sourcepub fn size_min_max_ratio(&self) -> f64
pub fn size_min_max_ratio(&self) -> f64
Compute min/max frame size ratio.
Sourcepub fn frames(&self) -> &[FrameMetric]
pub fn frames(&self) -> &[FrameMetric]
Return a reference to all recorded frames.
Trait Implementations§
Source§impl Clone for PassRecorder
impl Clone for PassRecorder
Source§fn clone(&self) -> PassRecorder
fn clone(&self) -> PassRecorder
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 PassRecorder
impl RefUnwindSafe for PassRecorder
impl Send for PassRecorder
impl Sync for PassRecorder
impl Unpin for PassRecorder
impl UnsafeUnpin for PassRecorder
impl UnwindSafe for PassRecorder
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