pub struct SectionReassembler { /* private fields */ }Expand description
Reassembles PSI/SI sections from TS packets on a single PID.
Feed each TS packet’s payload with feed. Complete sections are
appended to an internal queue; drain them with pop_section.
Implementations§
Source§impl SectionReassembler
impl SectionReassembler
Sourcepub fn feed(&mut self, payload: &[u8], pusi: bool)
pub fn feed(&mut self, payload: &[u8], pusi: bool)
Feed a TS payload and whether its packet had PUSI set.
Extracts complete SI sections into the internal queue. A single call can produce zero or one section (the queue is for future-proofing where one feed might yield multiple sections).
Sourcepub fn pop_section(&mut self) -> Option<Bytes>
pub fn pop_section(&mut self) -> Option<Bytes>
Pop one complete section. Returns None when the queue is empty.
Trait Implementations§
Source§impl Default for SectionReassembler
impl Default for SectionReassembler
Source§fn default() -> SectionReassembler
fn default() -> SectionReassembler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SectionReassembler
impl RefUnwindSafe for SectionReassembler
impl Send for SectionReassembler
impl Sync for SectionReassembler
impl Unpin for SectionReassembler
impl UnsafeUnpin for SectionReassembler
impl UnwindSafe for SectionReassembler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more