Skip to main content

run

Function run 

Source
pub async fn run(
    source: Consumer,
    output: Producer,
    config: Config,
) -> Result<(), Error>
Expand description

Transcode source into output until the source broadcast ends.

Reads the source catalog, publishes the derivative catalog (rungs strictly below the source, plus source renditions referenced via Config::source), and serves each rung just-in-time: a rung track only materializes when a consumer asks for it, and only encodes while consumed. Where output is announced (and how its path relates to the source) is the caller’s business.

The catalog tracks and the on-demand rung handler are registered synchronously, before the first await, so a consumer may race the rest of the setup safely: call run before announcing output.