ZVBI Library  0.2.33
Functions
Video Program System Decoder
Low Level Decoding

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))

Detailed Description

Functions to decode and encode VPS packets (EN 300 231, EN 300 468).


Function Documentation

vbi_bool vbi_decode_vps_cni ( unsigned int *  cni,
const uint8_t  buffer[13] 
)
Parameters:
cniCNI of type VBI_CNI_TYPE_VPS will be stored here.
bufferVPS 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."

Returns:
Always TRUE, no error checking possible. It may be prudent to wait until two identical CNIs have been received.
Since:
0.2.20
vbi_bool vbi_encode_vps_cni ( uint8_t  buffer[13],
unsigned int  cni 
)
Parameters:
bufferVPS packet as defined for VBI_SLICED_VPS, i.e. 13 bytes without clock run-in and start code.
cniCNI of type VBI_CNI_TYPE_VPS.

Stores the 12 bit Country and Network Identifier cni in a VPS packet according to EN 300 231.

Returns:
FALSE if cni is invalid. In this case buffer remains unmodified.
Since:
0.2.20