1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! # oxideav-mpegts
//!
//! Pure-Rust, clean-room **MPEG-TS** (Transport Stream) demuxer per
//! ISO/IEC 13818-1, scoped at the bytes Blu-ray Disc ships inside a
//! `.m2ts` file once the BDAV TP_extra_header has been stripped (see
//! `oxideav_bluray::iter_source_packets`).
//!
//! ## Surface (Phase 1)
//!
//! - 188-byte TS packet parser ([`packet::TsPacket`]) — sync byte,
//! `transport_error_indicator`, `payload_unit_start_indicator`,
//! `transport_priority`, 13-bit PID, scrambling / adaptation /
//! payload flags, continuity counter, optional adaptation field,
//! payload slice.
//! - PAT (Program Association Table) parser
//! ([`psi::ProgramAssociationTable`]) — discovers the PMT PID for
//! each program.
//! - PMT (Program Map Table) parser ([`psi::ProgramMapTable`]) —
//! discovers each elementary stream's PID + `stream_type` +
//! per-stream `descriptor` payloads.
//! - PES packet reassembler ([`pes::PesReassembler`]) — joins TS
//! payloads across packets per-PID, yields complete PES packets
//! once the next start-indicator arrives or the stream ends.
//! - Stream-type → ESID helpers in [`stream_type`] mapping the BD-
//! relevant constants (`0x1B AVC`, `0x24 HEVC`, `0x81 AC-3`,
//! `0x82 DTS`, `0x90 PGS`, etc.) to a richer enum.
//!
//! The crate ships **no decoders** — every payload byte stays as a
//! `&[u8]` slice. A downstream pipeline (e.g. `oxideav-cli`'s
//! `remux bluray:// …` path) iterates packets, drives a reassembler
//! per PID, and hands the resulting PES payloads to a muxer.
//!
//! ## What's NOT in scope
//!
//! - PSIP / DVB SI tables beyond PAT + PMT (no SDT, NIT, EIT).
//! - Conditional Access (CA) descriptors / scrambling.
//! - Live-stream PCR-anchored clock recovery — callers that need
//! wall-clock timing use PES PTS/DTS directly.
//! - Re-multiplexing — this is a demux-only crate. The MKV writer
//! in `oxideav-mkv` owns the output side.
pub use TsError;
pub use ;
pub use ;
pub use ;
pub use StreamType;