Skip to main content

aligned_packets

Function aligned_packets 

Source
pub fn aligned_packets(buf: &[u8]) -> impl Iterator<Item = &[u8]>
Expand description

Return an iterator over aligned 188-byte TS packet slices in buf.

Requires that buf is already aligned (i.e. buf[0] == 0x47). Each yielded slice is exactly TS_PACKET_SIZE bytes. Trailing bytes that do not form a complete packet are ignored.