Skip to main content

InnerTsRecovery

Struct InnerTsRecovery 

Source
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

Source

pub fn new(t2mi_pid: u16) -> Self

Create a recovery driver filtering the outer TS for t2mi_pid. All PLPs are unfiltered.

Source

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.

Source

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.

Source

pub fn stats(&self) -> Stats

Pump statistics (packets seen, CRC failures, …) — passthrough to the underlying T2miPump::stats.

Source

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.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.