pub struct TranscodeProgress { /* private fields */ }Expand description
Progress tracker for transcoding operations.
Displays a progress bar with:
- Current frame / total frames
- Processing speed (FPS)
- Estimated time remaining (ETA)
- Current bitrate
- File size
Implementations§
Source§impl TranscodeProgress
impl TranscodeProgress
Sourcepub fn new(total_frames: u64) -> Self
pub fn new(total_frames: u64) -> Self
Create a new transcode progress tracker.
§Arguments
total_frames- Total number of frames to process
Sourcepub fn new_spinner() -> Self
pub fn new_spinner() -> Self
Create a progress tracker with unknown total.
Useful when the total frame count is not known in advance.
Sourcepub fn update(&mut self, frames: u64)
pub fn update(&mut self, frames: u64)
Update progress with the number of frames processed.
§Arguments
frames- Number of frames completed so far
Sourcepub fn set_bytes_written(&mut self, bytes: u64)
pub fn set_bytes_written(&mut self, bytes: u64)
Update the number of bytes written to the output file.
§Arguments
bytes- Total bytes written so far
Sourcepub fn set_status(&self, status: &str)
pub fn set_status(&self, status: &str)
Sourcepub fn finish_with_error(&self, error: &str)
pub fn finish_with_error(&self, error: &str)
Sourcepub fn total_frames(&self) -> u64
pub fn total_frames(&self) -> u64
Get the total number of frames.
Sourcepub fn frames_completed(&self) -> u64
pub fn frames_completed(&self) -> u64
Get the number of frames completed.
Auto Trait Implementations§
impl Freeze for TranscodeProgress
impl RefUnwindSafe for TranscodeProgress
impl Send for TranscodeProgress
impl Sync for TranscodeProgress
impl Unpin for TranscodeProgress
impl UnsafeUnpin for TranscodeProgress
impl UnwindSafe for TranscodeProgress
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