pub struct TsFix { /* private fields */ }Expand description
A repair / remux engine for MPEG-2 TS byte streams.
Constructed via TsFix::builder → TsFixBuilder::build.
Feed 188-byte TS packets one at a time with push; call
finish at end-of-stream to flush any buffered state.
Implementations§
Source§impl TsFix
impl TsFix
Sourcepub fn builder() -> TsFixBuilder
pub fn builder() -> TsFixBuilder
Create a new builder for configuring a TsFix engine.
Sourcepub fn push(
&mut self,
packet: &[u8],
out: impl FnMut(&[u8]),
) -> Result<(), Error>
pub fn push( &mut self, packet: &[u8], out: impl FnMut(&[u8]), ) -> Result<(), Error>
Feed one 188-byte TS packet into the engine.
out is called once per emitted packet (may be called zero or more times
if an op suppresses or multiplies packets).
Returns Err if packet is not exactly 188 bytes or lacks the 0x47
sync byte (ISO/IEC 13818-1 §2.4.3.2).
Auto Trait Implementations§
impl !RefUnwindSafe for TsFix
impl !Sync for TsFix
impl !UnwindSafe for TsFix
impl Freeze for TsFix
impl Send for TsFix
impl Unpin for TsFix
impl UnsafeUnpin for TsFix
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