ZVBI Library
0.2.44
|
Functions to decode Teletext packet 8/30 (ETS 300 706). More...
Functions | |
vbi_bool | vbi_decode_teletext_8301_cni (unsigned int *cni, const uint8_t buffer[42]) |
vbi_bool | vbi_decode_teletext_8301_local_time (time_t *utc_time, int *seconds_east, const uint8_t buffer[42]) |
vbi_bool | vbi_decode_teletext_8302_cni (unsigned int *cni, const uint8_t buffer[42]) |
vbi_bool | vbi_decode_teletext_8302_pdc (vbi_program_id *pid, const uint8_t buffer[42]) |
Functions to decode Teletext packet 8/30 (ETS 300 706).
Teletext pages are transmitted in packets numbered 0 to 31. Packet 0 to 25 contain the text of the page, packet 26 to 29 additional information like Fastext links. Packet 30 and 31 are reserved for data transmissions unrelated to any page. Since each packet contains a magazine number 1 to 8 (the first digit of the Teletext page number) 16 logical channels can be distinguished. Packet 30 with magazine number 8 carries a Country and Network Identifier, and either a local time (format 1) or PDC label (format 2).
These are low level functions. See test/decode.c for a usage example.
The vbi_decoder module can decode a full Teletext signal and provide the information transmitted in packet 8/30 as VBI_EVENT_NETWORK
, VBI_EVENT_NETWORK_ID
, VBI_EVENT_LOCAL_TIME
and VBI_EVENT_PROG_ID
. See examples/network.c and examples/pdc1.c.
vbi_bool vbi_decode_teletext_8301_cni | ( | unsigned int * | cni, |
const uint8_t | buffer[42] | ||
) |
cni | CNI of type VBI_CNI_TYPE_8301 will be stored here. |
buffer | Teletext packet as defined for VBI_SLICED_TELETEXT_B , i.e. 42 bytes without clock run-in and framing code. |
Decodes a Teletext packet 8/30 format 1 according to ETS 300 706 section 9.8.1, returning the contained 16 bit Country and Network Identifier in *cni.
TRUE
, no error checking possible. It may be prudent to wait for a second transmission of the received CNI to ensure correct reception.References vbi_rev16p().
vbi_bool vbi_decode_teletext_8301_local_time | ( | time_t * | time, |
int * | seconds_east, | ||
const uint8_t | buffer[42] | ||
) |
time | The current time in seconds since 1970-01-01 00:00 UTC will be stored here. |
seconds_east | The offset of the local time of the intended audience of the program in seconds east of UTC will be stored here, including a daylight-saving time offset if daylight-saving is currently in effect in that time zone. To get the local time of the intended audience add seconds_east to time. |
buffer | Teletext packet as defined for VBI_SLICED_TELETEXT_B , i.e. 42 bytes without clock run-in and framing code. |
Decodes a Teletext packet 8/30 format 1 according to ETS 300 706 section 9.8.1, returning the current time in the UTC time zone and the time zone of the intended audience of the program.
FALSE:
References vbi_is_bcd().
vbi_bool vbi_decode_teletext_8302_cni | ( | unsigned int * | cni, |
const uint8_t | buffer[42] | ||
) |
cni | CNI of type VBI_CNI_TYPE_8302 will be stored here. |
buffer | Teletext packet as defined for VBI_SLICED_TELETEXT_B , i.e. 42 bytes without clock run-in and framing code. |
Decodes a Teletext packet 8/30 format 2 according to ETS 300 706 section 9.8.2, returning the contained 16 bit Country and Network Identifier in *cni.
FALSE
if the buffer contains uncorrectable errors. In this case *cni remains unchanged.References vbi_rev8(), and vbi_unham16p().
vbi_bool vbi_decode_teletext_8302_pdc | ( | vbi_program_id * | pid, |
const uint8_t | buffer[42] | ||
) |
pid | PDC program ID will be stored here. |
buffer | Teletext packet as defined for VBI_SLICED_TELETEXT_B , i.e. 42 bytes without clock run-in and framing code. |
Decodes a Teletext packet 8/30 format 2 according to ETS 300 231, and stores the contained PDC recording-control data in *pid.
FALSE
if the buffer contains uncorrectable errors or invalid data. In this case *pid remains unchanged.References vbi_program_id::channel, vbi_program_id::cni, vbi_program_id::cni_type, vbi_program_id::luf, vbi_program_id::mi, vbi_program_id::pcs_audio, vbi_program_id::pil, vbi_program_id::prf, vbi_program_id::pty, VBI_PID_CHANNEL_LCI_0, vbi_rev8(), vbi_unham16p(), and vbi_unham8().