pub struct TranscodeMetrics {
pub frames_encoded: AtomicU64,
pub frames_dropped: AtomicU64,
pub bytes_output: AtomicU64,
pub encoding_errors: AtomicU64,
}Expand description
Thread-safe atomic counters for a transcoding session.
Fields§
§frames_encoded: AtomicU64Total frames successfully encoded.
frames_dropped: AtomicU64Frames that were dropped (not encoded).
bytes_output: AtomicU64Total compressed bytes written to output.
encoding_errors: AtomicU64Number of encoding errors encountered.
Implementations§
Source§impl TranscodeMetrics
impl TranscodeMetrics
Sourcepub fn inc_frames_encoded(&self, delta: u64)
pub fn inc_frames_encoded(&self, delta: u64)
Atomically increments the encoded frame counter.
Sourcepub fn inc_frames_dropped(&self, delta: u64)
pub fn inc_frames_dropped(&self, delta: u64)
Atomically increments the dropped frame counter.
Sourcepub fn add_bytes_output(&self, bytes: u64)
pub fn add_bytes_output(&self, bytes: u64)
Atomically adds to the bytes output counter.
Sourcepub fn inc_errors(&self, delta: u64)
pub fn inc_errors(&self, delta: u64)
Atomically increments the error counter.
Sourcepub fn snapshot(&self) -> MetricsSnapshot
pub fn snapshot(&self) -> MetricsSnapshot
Snapshot of current values (non-atomic-consistent, for reporting).
Trait Implementations§
Source§impl Debug for TranscodeMetrics
impl Debug for TranscodeMetrics
Auto Trait Implementations§
impl !Freeze for TranscodeMetrics
impl RefUnwindSafe for TranscodeMetrics
impl Send for TranscodeMetrics
impl Sync for TranscodeMetrics
impl Unpin for TranscodeMetrics
impl UnsafeUnpin for TranscodeMetrics
impl UnwindSafe for TranscodeMetrics
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> 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