Skip to main content

Crate mpeg_ts_core

Crate mpeg_ts_core 

Source
Expand description

Sans-IO MPEG-2 Transport Stream mux and demux (ISO/IEC 13818-1) — no OS I/O, no Mediaway types.

Single-program v1 scope (crate-local ADR-0001): one PAT entry, one PMT, a handful of elementary streams. Muxer writes PAT/PMT + per-PID PES packetization over 188-byte TS packets; Demuxer is a true incremental push_bytes/poll_access_unit reader that tracks PAT/PMT and reassembles PES packets per PID.

Like adts-core/mpeg-audio/ogg/flv-core, this crate frames already-encoded elementary-stream access units — it does not encode/decode H.264, HEVC, AAC, or MP3 payloads.

Structs§

AccessUnit
One demuxed, fully reassembled elementary-stream access unit (one PES packet’s payload).
Demuxer
Reads TS packets from pushed byte chunks, tracks PAT/PMT, and reassembles per-PID PES packets into AccessUnits.
ElementaryStream
One elementary stream registered in the PMT.
Muxer
Writes a single-program MPEG-TS stream: write_pat_pmt (call at the start, and periodically — real players expect PAT/PMT to repeat) plus write_access_unit per elementary-stream access unit.

Enums§

Error
Errors from MPEG-TS mux/demux.
StreamType
PMT stream_type byte (ISO/IEC 13818-1 Table 2-34 subset — the codecs this workspace already supports elsewhere).