Expand description
The transcode job engine.
run_job takes an input buffer and an OutputSpec and drives the
whole pipeline: demux → shared decode pump (decode once) → fan out to per-
rung work → assemble the requested output mode. Progress is streamed
through a ProgressSink as a uniform RungProgress per rung.
- SingleFile mode: the decode pump fans frames to one per-rung worker that scales + encodes + muxes a self-contained MP4.
- Hls mode: the
crate::multigpuorchestrator decodes once and schedules every rung’s CMAF segments across all GPUs (fair lease pool + mid-flight helper dispatch + cross-vendor codec invariant), then this module assembles the HLS package (audio rendition + playlists).
Structs§
- Clip
- One clip of a splice: an input plus an optional
[start, end)trim window in seconds (either boundNone= open). - JobOutput
- The full job result.
- Rung
Output - Result for one completed rung.
Enums§
- Rung
Artifact - The artifact one rung produced.
Functions§
- run_job
- Run a transcode job. Async — call from within a Tokio runtime.
- run_
job_ blocking - Synchronous wrapper that builds a multi-threaded Tokio runtime.
- run_
splice_ job - Splice: concatenate (and per-clip trim) one or more inputs into a single
continuous, re-encoded MP4 per rung. Each clip is decoded with its own
decoder, trimmed to its
[start, end), and the kept frames are fed to the shared encoder back-to-back. Because the muxer numbers output frames by count, the join is gap-free and the timeline is zero-based — no PTS rewriting. Audio is trimmed per clip and concatenated to match. - run_
splice_ job_ blocking - Blocking wrapper for
run_splice_job.