dvb-vbi
VBI (Vertical Blanking Information) data carriage in DVB — ETSI EN 301 775 §4, the PES data field: VPS, WSS, Closed Captioning, EBU / Inverted Teletext, and generic monochrome 4:2:2 luminance sample data units.
VBI data is carried in the private PES packet mechanism
(stream_id = private_stream_1 0xBD); this crate decodes the data field that
follows the PES header.
Implements:
DataField— the PES data field (§4.4.1, Table 1): adata_identifierbyte (Table 2) followed by a loop of data units.DataUnit/DataUnitId— each data unit'sdata_unit_id(Table 3)- 8-bit
data_unit_length+ typed body.data_unit_lengthis recomputed from the typed body on serialize (no raw passthrough).
- 8-bit
TeletextDataField— EBU (0x02/0x03) and Inverted (0xC0) Teletext (§4.5): a sharedLineHeader+ an 8-bitframing_code+ a 42-byte opaquetxt_data_block. EN 300 706 Teletext coding is out of scope.VpsDataField— VPS (0xC3, §4.6): shared header + 13-byte data block.WssDataField— WSS (0xC4, §4.7): shared header + a 14-bitwss_data_block+ a 2-bitreserved_future_use11tail (3 bytes total).ClosedCaptioningDataField— Closed Captioning (0xC5, §4.8): shared header + a 16-bit data block (line 21, EIA-608 Rev A).MonochromeDataField— monochrome 4:2:2 samples (0xC6, §4.9): its own first-byte packing (first/last segment flags + field_parity + line_offset), afirst_pixel_position,n_pixels, and the luminanceY_valuebytes.- Stuffing (
0xFF, §4.4.1) and anOpaquecatch-all for reserved / user-defined ids round-trip verbatim.
The shared LineHeader is the Teletext/VPS/WSS/CC first byte
(reserved_future_use 11 | field_parity | 5-bit line_offset).
⚠ Table 1's parse branch routes
data_unit_id0xC1totxt_data_field(), but Table 3 marks0xC1as reserved → discard. This crate follows Table 3 (authoritative), so0xC1decodes asDataUnitId::Reserved.
#![no_std] + alloc; depends only on broadcast-common.
Quick start
use ;
let vps = vps;
let wss = wss;
let field = new;
let mut buf = vec!;
field.serialize_into.unwrap;
assert_eq!;
Examples
Features
| Feature | Default | Description |
|---|---|---|
std |
yes | Link the standard library. Without it the crate is #![no_std] + alloc. |
serde |
no | serde::Serialize derives on public types. |
Minimum Supported Rust Version
1.95.0
License
MIT OR Apache-2.0