pub struct InnerTsRecovery { /* private fields */ }Expand description
Recovers the inner MPEG-TS carried inside a T2-MI stream.
Feed outer 188-byte TS packets from the T2-MI PID with feed;
each call returns the inner TS packets recovered from that input packet
(often empty — a BBFrame spans several T2-MI packets). The driver owns the
pump, the carry-over extractor, and the NM/HEM mode handling.
Normal Mode and High-Efficiency Mode (without Null-Packet-Deletion) frames
are recovered; HEM frames with MATYPE.NPD set are skipped (DNP-byte
reinsertion is not modelled by the extractor) rather than mis-decoded.
Implementations§
Source§impl InnerTsRecovery
impl InnerTsRecovery
Sourcepub fn new(t2mi_pid: u16) -> Self
pub fn new(t2mi_pid: u16) -> Self
Create a recovery driver filtering the outer TS for t2mi_pid.
All PLPs are unfiltered.
Sourcepub fn new_for_plp(t2mi_pid: u16, plp_id: u8) -> Self
pub fn new_for_plp(t2mi_pid: u16, plp_id: u8) -> Self
Create a recovery driver that only recovers inner TS from the given
baseband frame PLP (plp_id). BBFrames from other PLPs are counted
by filtered_bbframes.
Sourcepub fn feed(&mut self, ts_packet: &[u8]) -> &[[u8; 188]]
pub fn feed(&mut self, ts_packet: &[u8]) -> &[[u8; 188]]
Feed one outer 188-byte TS packet; returns the inner TS packets recovered from it. The returned slice borrows an internal buffer that is cleared on every call, so copy out anything you need to keep.
Sourcepub fn stats(&self) -> Stats
pub fn stats(&self) -> Stats
Pump statistics (packets seen, CRC failures, …) — passthrough to the
underlying T2miPump::stats.
Sourcepub fn filtered_bbframes(&self) -> u64
pub fn filtered_bbframes(&self) -> u64
Number of BBFrames filtered out because their PLP did not match the
target set via new_for_plp. Always zero when
constructed with new.