pub struct ProgressHandle { /* private fields */ }Expand description
A cheap, cloneable, thread-safe, read-only view of a scheduled FFmpeg
job’s progress, obtained from FfmpegScheduler::progress_handle in the
Running or Paused state.
The handle holds only reference-counted std synchronization state — no
FFmpeg pointers, no callbacks — so it is Send + Sync, can be cloned
freely across threads, and remains safe to use after the scheduler has
been consumed (by wait()/stop()/abort()) or dropped: from
then on snapshot keeps returning the job’s final
frozen values with ProgressState::Ended.
Observing progress is pull-based: call snapshot() whenever a fresh
value is wanted. Each call is a handful of atomic loads; no locks are
taken and no FFmpeg call is made.
Implementations§
Source§impl ProgressHandle
impl ProgressHandle
Sourcepub fn is_ended(&self) -> bool
pub fn is_ended(&self) -> bool
Whether every tracked worker of the job has torn down — the same
edge wait()/stop() unblock on, and the point at which
snapshot values (elapsed included) freeze.
Note this is stricter than FfmpegScheduler::is_ended, which reports
the terminal status signal (a stopping job answers true there
while workers may still be flushing).
Trait Implementations§
Source§impl Clone for ProgressHandle
impl Clone for ProgressHandle
Source§fn clone(&self) -> ProgressHandle
fn clone(&self) -> ProgressHandle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more