ZVBI Library
0.2.33
|
Functions to decode and encode VPS packets (EN 300 231, EN 300 468). More...
Functions | |
vbi_bool | vbi_decode_vps_cni (unsigned int *cni, const uint8_t buffer[13]) |
vbi_bool | vbi_encode_vps_cni (uint8_t buffer[13], unsigned int cni) _vbi_nonnull((1)) |
Functions to decode and encode VPS packets (EN 300 231, EN 300 468).
vbi_bool vbi_decode_vps_cni | ( | unsigned int * | cni, |
const uint8_t | buffer[13] | ||
) |
cni | CNI of type VBI_CNI_TYPE_VPS will be stored here. |
buffer | VPS packet as defined for VBI_SLICED_VPS , i.e. 13 bytes without clock run-in and start code. |
Decodes a VPS packet according to EN 300 231, returning the 12 bit Country and Network Identifier in cni.
The code 0xDC3 is translated according to TR 101 231: "As this code is used for a time in two networks a distinction for automatic tuning systems is given in data line 16 [VPS]: bit 3 of byte 5 = 1 for the ARD network / = 0 for the ZDF network."
TRUE
, no error checking possible. It may be prudent to wait until two identical CNIs have been received.vbi_bool vbi_encode_vps_cni | ( | uint8_t | buffer[13], |
unsigned int | cni | ||
) |
buffer | VPS packet as defined for VBI_SLICED_VPS , i.e. 13 bytes without clock run-in and start code. |
cni | CNI of type VBI_CNI_TYPE_VPS. |
Stores the 12 bit Country and Network Identifier cni in a VPS packet according to EN 300 231.
FALSE
if cni is invalid. In this case buffer remains unmodified.