1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! TS byte-stream resynchronisation helpers for `dvb-stream`.
//!
//! Thin wrappers over [`mpeg_ts::resync::TsResync`] — the shared stateful
//! resynchroniser lives in `mpeg-ts` (feature `ts`). This module keeps
//! the public surface that `section_stream` and `t2mi_stream` use (the
//! stateless `resync` + `aligned_packets` pair and the size/sync constants).
pub use ;
/// Find the byte offset of the first confirmed 0x47 sync byte in `buf`.
///
/// "Confirmed" means either `buf[offset + 188] == 0x47` (two-packet
/// confirmation), or the buffer is too small for two packets (best-effort
/// single-sync-byte alignment).
///
/// Returns `None` when `buf` contains no `0x47` byte at all.
///
/// This is a stateless best-effort helper. For a full stateful resynchroniser
/// with 204-byte detection and per-call carry-over buffering, use
/// [`mpeg_ts::resync::TsResync`].
/// 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.