Skip to main content

Module job

Module job 

Source
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::multigpu orchestrator 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 bound None = open).
JobOutput
The full job result.
RungOutput
Result for one completed rung.

Enums§

RungArtifact
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.