Skip to main content

Module ts

Module ts 

Source
Expand description

MPEG-TS (transport stream).

An interchange format only, not a wire format: Import demuxes a TS byte stream into a broadcast and Export muxes a broadcast back into TS. The codec layer (H.264/H.265/AAC, plus the legacy MP2/AC-3/E-AC-3 parsers) does the elementary-stream parsing; this module only handles PAT/PMT/PES framing, PTS, and ADTS framing for AAC.

Elementary streams we don’t decode (SCTE-35, teletext, DVB subtitles, private data, …) are carried verbatim, one MoQ track per PID, described in the Mpegts catalog section. SCTE-35 is just one such stream (stream_type 0x86). The service layer rides alongside: the transport/service identity as a Program record, and the standalone SI tables (SDT, NIT, EIT, …) as opaque sections on per-(PID, table_id) snapshot tracks mapped by SiEntry and re-emitted on their original PIDs, so the service name, provider, network, and EPG survive the round-trip without anything parsing them. Each SI track group is a complete snapshot (one frame per sub-table, sections concatenated verbatim); frames apply in order with later-wins by sub-table identity, and a joiner reads only the newest group.

Passthrough is the other shape: it publishes the multiplex whole, every packet verbatim on one track named by Mpegts::passthrough, for what demultiplexing cannot carry (TS-level scrambling, PSI and SI as authored), and Release writes that track back out on a fixed delay. A Follower carries either across its broadcast’s returns and replacements.

Re-exports§

pub use passthrough::Passthrough;
pub use programs::Programs;
pub use republish::Republish;
pub use republish::Republished;

Modules§

passthrough
Carrying a transport stream whole, without demultiplexing it.
programs
Every program of a multiplex, each imported as its own broadcast.
republish
One program of a multiplex, republished on its path whenever the source changes.
stats
The counters Import::stats and Export::stats return, and reporting on them.

Structs§

Descriptor
One PMT descriptor, carried verbatim so language/registration/etc. survive the round-trip without a per-descriptor parser.
Export
Subscribe to a broadcast and produce an MPEG-TS byte stream.
Ext
The application catalog extension carrying the mpegts section. Empty by default, so the section is omitted until an MPEG-TS detail is recorded.
Finished
A TS import that finished: every track has ended, and they can still be read or aborted, but it takes no more input.
Follower
Carries an Export, or a Release of a passthrough track, across its broadcast’s returns, following the publisher identities serving its path through Following.
Import
Demuxes an MPEG-TS byte stream into a MoQ broadcast.
Mpegts
The mpegts catalog section.
PassthroughTrack
A transport stream carried whole, as one track of verbatim packets.
PesPacket
Carriage record for an undecoded elementary stream whose frames are whole PES packets.
Program
Program identity, from the PAT.
Release
Writes the multiplex a broadcast’s passthrough track carries back out byte-identical, each packet a fixed delay after its time on the source’s PCR, like an SRT receiver.
SiEntry
One standalone SI table’s carriage: which track holds its sections, and how often export must re-emit them.
Track
One track’s MPEG-TS identity and signaling.
Verbatim
Carriage record for an undecoded elementary stream carried as complete sections.

Enums§

Error
Why a TS import or export stopped.
Framing
How a verbatim stream’s payload is framed on the wire, so export can repacketize it.
Step
How the source changed, ending an import’s identity.

Traits§

Catalog
An extension that can carry an mpegts catalog section.
Followed
What a Follower carries across its path’s identities: an Export, or a Release of a passthrough track.