Skip to main content

Module import

Module import 

Source
Expand description

Import media into a moq broadcast.

The importers split by multiplicity: Track / TrackStream publish a single codec onto one MoQ track, while Demuxer decodes a container that may publish more than one track. A single codec splits again by frame boundaries: Track takes whole frames (the typical case for files and reassembled network input), while TrackStream infers them from a raw byte stream (piped Annex-B H.264, …). A container recovers its own framing, so Demuxer takes chunks split anywhere.

Each importer takes a typed format (parsed from e.g. "h264" or "fmp4") and errors on a format it doesn’t handle; TrackStream accepts only the self-delimiting formats. The concrete importers live with their format under crate::container or crate::codec and own their catalog rendition through their container producer.

A single-codec importer takes a track the caller mints, typically broadcast.unique_track(suffix, catalog.track_info()), so the max age the catalog declares reaches the track.

Re-exports§

pub use container::Demuxer;
pub use track::Track;
pub use track::TrackStream;

Modules§

container
The container importer.
track
Single-codec importers.

Structs§

AudioInit
What an audio importer needs to start: a format, its init bytes, and an optional label.
ContainerInit
What a container importer needs to start: a format, its leading bytes, and an optional shared timebase.
VideoInit
What a video importer needs to start: a format, optional init bytes, a label, and hints.

Enums§

AudioFormat
A single audio codec an importer can parse.
ContainerFormat
A container an importer can demux, which may publish more than one track.
Format
Any format an importer handles, and the kind of import it selects.
Kind
Which importer a Format selects.
VideoFormat
A single video codec an importer can parse.