#[non_exhaustive]pub struct Mpegts {
pub tracks: BTreeMap<String, Track>,
pub program_descriptors: Vec<Descriptor>,
pub program: Option<Program>,
pub si: BTreeMap<u16, BTreeMap<u8, SiEntry>>,
pub mux_rate: Option<u64>,
pub passthrough: Option<PassthroughTrack>,
}Expand description
The mpegts catalog section.
Omitted from the catalog when empty, so a broadcast that needs none of it stays
byte-identical to one without the extension. Reading refuses a section that names its
passthrough track in tracks or si too.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.tracks: BTreeMap<String, Track>Per-track MPEG-TS info, keyed by MoQ track name. Media tracks record their
PID and PMT descriptors; undecoded tracks add a Verbatim or PesPacket
carriage record.
program_descriptors: Vec<Descriptor>PMT program-level descriptors (program_info), carried verbatim. Export
re-emits these; the SCTE-35 ‘CUEI’ registration is derived when absent.
program: Option<Program>Program identity from the PAT. Present only for a source that carries one (a TS input); omitted for media-only broadcasts, so export then synthesizes a minimal identity.
si: BTreeMap<u16, BTreeMap<u8, SiEntry>>Standalone SI tables, keyed by the PID they ride on (0x0011 SDT, 0x0010 NIT,
0x0012 EIT, …) and then by table_id. The section bytes themselves live on
each entry’s snapshot track; the catalog only maps where they
are and how often export must re-emit them. Export re-emits each entry’s
sections byte-for-byte on its PID, so the service name, provider, network, and
EPG survive without anyone parsing them.
table_id is byte 0 of generic section syntax (ISO 13818-1), so the key is no
less generic than the PID: which ranges mean what is a DVB convention, and
none appears here.
JSON object keys are strings, so both keys are written in decimal ("17")
rather than as numbers. The catalog is parsed via serde_json::Value, which
will not coerce a string key back to an integer on its own.
Reading also accepts the form every published moq-cli through 0.11 wrote,
{"17": {"interval": 2000, "sections": ["<base64>"]}}: the sections inline
under the PID with no table_id level. Those decode into one entry per
table_id (byte 0 of each section) carrying its sections in
SiEntry::sections and naming no track. Nothing writes that form:
serializing such an entry fails rather than emit a dangling track reference.
mux_rate: Option<u64>The rate the PCR clock paces the whole multiplex at, in bits per second:
every PID plus PSI plus null stuffing, measured between PCRs on import. Not a
sum of elementary streams; each rendition’s bitrate keeps its codec meaning.
Present only while the source is constant-rate, so a VBR or file-paced input
leaves it absent. Export pads its output with null packets to this rate.
passthrough: Option<PassthroughTrack>The track carrying the multiplex whole, when a Passthrough
publishes it rather than demultiplexing it.