pub struct FrameStat {
pub index: u64,
pub frame_type: FrameType,
pub size_bytes: u64,
pub width: u32,
pub height: u32,
pub qp: u8,
}Expand description
Statistics for a single encoded frame.
Fields§
§index: u64Sequential frame index (0-based).
frame_type: FrameTypeFrame type.
size_bytes: u64Encoded size in bytes.
width: u32Frame width in pixels.
height: u32Frame height in pixels.
qp: u8Quantisation parameter used by the encoder.
Implementations§
Source§impl FrameStat
impl FrameStat
Sourcepub fn new(
index: u64,
frame_type: FrameType,
size_bytes: u64,
width: u32,
height: u32,
qp: u8,
) -> Self
pub fn new( index: u64, frame_type: FrameType, size_bytes: u64, width: u32, height: u32, qp: u8, ) -> Self
Create a new frame stat entry.
Sourcepub fn bits_per_pixel(&self) -> f64
pub fn bits_per_pixel(&self) -> f64
Bits per pixel for this frame.
Sourcepub fn is_keyframe(&self) -> bool
pub fn is_keyframe(&self) -> bool
Returns true when the frame is an I-frame (IDR or SI).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FrameStat
impl RefUnwindSafe for FrameStat
impl Send for FrameStat
impl Sync for FrameStat
impl Unpin for FrameStat
impl UnsafeUnpin for FrameStat
impl UnwindSafe for FrameStat
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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