libdvbv5 1.22.1
Library to work with Digital TV devices on Linux
|
Files | |
file | descriptors.h |
Provides a way to handle MPEG-TS descriptors found on Digital TV streams. | |
file | header.h |
Provides the MPEG TS table headers. | |
file | atsc_header.h |
Provides some common ATSC stuff. | |
file | atsc_eit.h |
Provides the table parser for the ATSC EIT (Event Information Table) | |
file | cat.h |
Provides the table parser for the CAT (Conditional Access Table) | |
file | eit.h |
Provides the table parser for the DVB EIT (Event Information Table) | |
file | mgt.h |
Provides the table parser for the ATSC MGT (Master Guide Table) | |
file | nit.h |
Provides the descriptors for NIT MPEG-TS table. | |
file | pat.h |
Provides the descriptors for PAT MPEG-TS table. | |
file | pmt.h |
Provides the descriptors for PMT MPEG-TS table. | |
file | sdt.h |
Provides the descriptors for SDT MPEG-TS table. | |
file | vct.h |
Provides the descriptors for TVCT and CVCT tables. | |
file | mpeg_es.h |
Provides the table parser for the MPEG-TS Elementary Stream. | |
file | mpeg_pes.h |
Provides the table parser for the MPEG-PES Elementary Stream. | |
file | mpeg_ts.h |
Provides the table parser for the MPEG-PES Elementary Stream. | |
Data Structures | |
struct | dvb_desc |
Linked list containing the several descriptors found on a MPEG-TS table. More... | |
struct | dvb_descriptor |
Contains the parser information for the MPEG-TS parser code. More... | |
struct | dvb_ts_packet_header |
Header of a MPEG-TS transport packet. More... | |
struct | dvb_table_header |
Header of a MPEG-TS table. More... | |
struct | atsc_table_eit_event |
ATSC EIT event table. More... | |
union | atsc_table_eit_desc_length |
ATSC EIT descriptor length. More... | |
struct | atsc_table_eit |
ATSC EIT table. More... | |
struct | dvb_table_eit_event |
DVB EIT event table. More... | |
struct | dvb_table_eit |
DVB EIT table. More... | |
struct | atsc_table_mgt_table |
ATSC tables descrition at MGT table. More... | |
struct | atsc_table_mgt |
ATSC MGT table. More... | |
union | dvb_table_nit_transport_header |
MPEG-TS NIT transport header. More... | |
struct | dvb_table_nit_transport |
MPEG-TS NIT transport table. More... | |
struct | dvb_table_nit |
MPEG-TS NIT table. More... | |
struct | dvb_table_pat_program |
MPEG-TS PAT program table. More... | |
struct | dvb_table_pat |
MPEG-TS PAT table. More... | |
struct | dvb_table_pmt_stream |
MPEG-TS PMT stream table. More... | |
struct | dvb_table_pmt |
MPEG-TS PMT table. More... | |
struct | dvb_table_sdt_service |
MPEG-TS SDT service table. More... | |
struct | dvb_table_sdt |
MPEG-TS SDT table. More... | |
struct | atsc_table_vct_channel |
ATSC VCT channel table (covers both CVCT and TVCT) More... | |
struct | atsc_table_vct |
ATSC VCT table (covers both CVCT and TVCT) More... | |
union | atsc_table_vct_descriptor_length |
ATSC VCT descriptor length. More... | |
struct | dvb_mpeg_es_seq_start |
MPEG ES Sequence header. More... | |
struct | dvb_mpeg_es_pic_start |
MPEG ES Picture start header. More... | |
struct | ts_t |
MPEG PES timestamp structure, used for dts and pts. More... | |
struct | dvb_mpeg_pes_optional |
MPEG PES optional header. More... | |
struct | dvb_mpeg_pes |
MPEG PES data structure. More... | |
struct | dvb_mpeg_ts_adaption |
MPEG TS header adaption field. More... | |
struct | dvb_mpeg_ts |
MPEG TS header. More... | |
Macros | |
#define | DVB_MAX_PAYLOAD_PACKET_SIZE |
Maximum size of a table session to be parsed. More... | |
#define | DVB_CRC_SIZE |
number of bytes for the descriptor's CRC check More... | |
#define | ATSC_BASE_PID |
ATSC PID for the Program and System Information Protocol. More... | |
#define | ATSC_TABLE_EIT |
ATSC EIT table ID. More... | |
#define | atsc_eit_event_foreach(_event, _eit) |
Macro used to find event on an ATSC EIT table. More... | |
#define | DVB_TABLE_CAT |
ATSC CAT table ID. More... | |
#define | DVB_TABLE_CAT_PID |
ATSC PID table ID. More... | |
#define | DVB_TABLE_EIT |
DVB EIT table ID for the actual TS. More... | |
#define | DVB_TABLE_EIT_OTHER |
DVB EIT table ID for other TS. More... | |
#define | DVB_TABLE_EIT_PID |
DVB EIT Program ID. More... | |
#define | DVB_TABLE_EIT_SCHEDULE |
Start table ID for the DVB EIT schedule data on the actual TS The range has 0x0f elements (0x50 to 0x5F). More... | |
#define | DVB_TABLE_EIT_SCHEDULE_OTHER |
Start table ID for the DVB EIT schedule data on other TS The range has 0x0f elements (0x60 to 0x6F). More... | |
#define | dvb_eit_event_foreach(_event, _eit) |
Macro used to find event on a DVB EIT table. More... | |
#define | ATSC_TABLE_MGT |
ATSC MGT table ID. More... | |
#define | DVB_TABLE_NIT |
NIT table ID. More... | |
#define | DVB_TABLE_NIT2 |
NIT table ID (alternative table ID) More... | |
#define | DVB_TABLE_NIT_PID |
NIT Program ID. More... | |
#define | dvb_nit_transport_foreach(_tran, _nit) |
Macro used to find a transport inside a NIT table. More... | |
#define | DVB_TABLE_PAT |
PAT table ID. More... | |
#define | DVB_TABLE_PAT_PID |
PAT Program ID. More... | |
#define | dvb_pat_program_foreach(_pgm, _pat) |
Macro used to find programs on a PAT table. More... | |
#define | DVB_TABLE_PMT |
PMT table ID. More... | |
#define | dvb_pmt_stream_foreach(_stream, _pmt) |
Macro used to find streams on a PMT table. More... | |
#define | DVB_TABLE_SDT |
SDT table ID. More... | |
#define | DVB_TABLE_SDT2 |
SDT table ID (alternative table ID) More... | |
#define | DVB_TABLE_SDT_PID |
SDT Program ID. More... | |
#define | dvb_sdt_service_foreach(_service, _sdt) |
Macro used to find services on a SDT table. More... | |
#define | ATSC_TABLE_TVCT |
TVCT table ID. More... | |
#define | ATSC_TABLE_CVCT |
CVCT table ID. More... | |
#define | ATSC_TABLE_VCT_PID |
Program ID with the VCT tables on it. More... | |
#define | atsc_vct_channel_foreach(_channel, _vct) |
Macro used to find channels on a VCT table. More... | |
#define | DVB_MPEG_ES_PIC_START |
Picture Start. More... | |
#define | DVB_MPEG_ES_USER_DATA |
User Data. More... | |
#define | DVB_MPEG_ES_SEQ_START |
Sequence Start. More... | |
#define | DVB_MPEG_ES_SEQ_EXT |
Extension. More... | |
#define | DVB_MPEG_ES_GOP |
Group Of Pictures. More... | |
#define | DVB_MPEG_ES_SLICES |
Slices. More... | |
#define | DVB_MPEG_PES |
MPEG Packetized Elementary Stream magic. More... | |
#define | DVB_MPEG_PES_AUDIO |
PES Audio. More... | |
#define | DVB_MPEG_PES_VIDEO |
PES Video. More... | |
#define | DVB_MPEG_STREAM_MAP |
PES Stream map. More... | |
#define | DVB_MPEG_STREAM_PADDING |
PES padding. More... | |
#define | DVB_MPEG_STREAM_PRIVATE_2 |
PES private. More... | |
#define | DVB_MPEG_STREAM_ECM |
PES ECM Stream. More... | |
#define | DVB_MPEG_STREAM_EMM |
PES EMM Stream. More... | |
#define | DVB_MPEG_STREAM_DIRECTORY |
PES Stream directory. More... | |
#define | DVB_MPEG_STREAM_DSMCC |
PES DSMCC. More... | |
#define | DVB_MPEG_STREAM_H222E |
PES H.222.1 type E. More... | |
#define | DVB_MPEG_TS |
MPEG Transport Stream magic. More... | |
#define | DVB_MPEG_TS_PACKET_SIZE |
Size of an MPEG packet. More... | |
Typedefs | |
typedef void(* | dvb_table_init_func) (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, void **table) |
Function prototype for a function that initializes the descriptors parsing on a table. More... | |
typedef int(* | dvb_desc_init_func) (struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_desc *desc) |
Function prototype for the descriptors parsing init code. More... | |
typedef void(* | dvb_desc_print_func) (struct dvb_v5_fe_parms *parms, const struct dvb_desc *desc) |
Function prototype for the descriptors parsing print code. More... | |
typedef void(* | dvb_desc_free_func) (struct dvb_desc *desc) |
Function prototype for the descriptors memory free code. More... | |
typedef void | nit_handler_callback_t(struct dvb_table_nit *nit, struct dvb_desc *desc, void *priv) |
typedef for a callback used when a NIT table entry is found More... | |
typedef void | nit_tran_handler_callback_t(struct dvb_table_nit *nit, struct dvb_table_nit_transport *tran, struct dvb_desc *desc, void *priv) |
typedef for a callback used when a NIT transport table entry is found More... | |
typedef int(* | dvb_desc_ext_init_func) (struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_extension_descriptor *ext, void *desc) |
Function prototype for the extended descriptors parsing init code. More... | |
typedef void(* | dvb_desc_ext_print_func) (struct dvb_v5_fe_parms *parms, const struct dvb_extension_descriptor *ext, const void *desc) |
Function prototype for the extended descriptors parsing print code. More... | |
typedef void(* | dvb_desc_ext_free_func) (const void *desc) |
Function prototype for the extended descriptors parsing free code. More... | |
Functions | |
uint32_t | dvb_bcd (uint32_t bcd) |
Converts from BCD to CPU integer internal representation. More... | |
void | dvb_hexdump (struct dvb_v5_fe_parms *parms, const char *prefix, const unsigned char *buf, int len) |
dumps data into the logs in hexadecimal format More... | |
int | dvb_desc_parse (struct dvb_v5_fe_parms *parms, const uint8_t *buf, uint16_t buflen, struct dvb_desc **head_desc) |
parse MPEG-TS descriptors More... | |
void | dvb_desc_free (struct dvb_desc **list) |
frees a dvb_desc linked list More... | |
void | dvb_desc_print (struct dvb_v5_fe_parms *parms, struct dvb_desc *desc) |
prints the contents of a struct dvb_desc linked list More... | |
void | dvb_table_header_init (struct dvb_table_header *header) |
Initializes and parses MPEG-TS table header. More... | |
void | dvb_table_header_print (struct dvb_v5_fe_parms *parms, const struct dvb_table_header *header) |
Prints the content of the MPEG-TS table header. More... | |
ssize_t | atsc_table_eit_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct atsc_table_eit **table) |
Initializes and parses ATSC EIT table. More... | |
void | atsc_table_eit_free (struct atsc_table_eit *table) |
Frees all data allocated by the ATSC EIT table parser. More... | |
void | atsc_table_eit_print (struct dvb_v5_fe_parms *parms, struct atsc_table_eit *table) |
Prints the content of the ATSC EIT table. More... | |
ssize_t | dvb_table_eit_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct dvb_table_eit **table) |
Initializes and parses EIT table. More... | |
void | dvb_table_eit_free (struct dvb_table_eit *table) |
Frees all data allocated by the DVB EIT table parser. More... | |
void | dvb_table_eit_print (struct dvb_v5_fe_parms *parms, struct dvb_table_eit *table) |
Prints the content of the DVB EIT table. More... | |
void | dvb_time (const uint8_t data[5], struct tm *tm) |
Converts a DVB EIT formatted timestamp into struct tm. More... | |
ssize_t | atsc_table_mgt_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct atsc_table_mgt **table) |
Initializes and parses MGT table. More... | |
void | atsc_table_mgt_free (struct atsc_table_mgt *table) |
Frees all data allocated by the MGT table parser. More... | |
void | atsc_table_mgt_print (struct dvb_v5_fe_parms *parms, struct atsc_table_mgt *table) |
Prints the content of the MGT table. More... | |
ssize_t | dvb_table_nit_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct dvb_table_nit **table) |
Initializes and parses NIT table. More... | |
void | dvb_table_nit_free (struct dvb_table_nit *table) |
Frees all data allocated by the NIT table parser. More... | |
void | dvb_table_nit_print (struct dvb_v5_fe_parms *parms, struct dvb_table_nit *table) |
Prints the content of the NIT table. More... | |
void | dvb_table_nit_descriptor_handler (struct dvb_v5_fe_parms *parms, struct dvb_table_nit *table, enum descriptors descriptor, nit_handler_callback_t *call_nit, nit_tran_handler_callback_t *call_tran, void *priv) |
For each entry at NIT and NIT transport tables, call a callback. More... | |
ssize_t | dvb_table_pat_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct dvb_table_pat **table) |
Initializes and parses PAT table. More... | |
void | dvb_table_pat_free (struct dvb_table_pat *table) |
Frees all data allocated by the PAT table parser. More... | |
void | dvb_table_pat_print (struct dvb_v5_fe_parms *parms, struct dvb_table_pat *table) |
Prints the content of the PAT table. More... | |
ssize_t | dvb_table_pmt_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct dvb_table_pmt **table) |
Initializes and parses PMT table. More... | |
void | dvb_table_pmt_free (struct dvb_table_pmt *table) |
Frees all data allocated by the PMT table parser. More... | |
void | dvb_table_pmt_print (struct dvb_v5_fe_parms *parms, const struct dvb_table_pmt *table) |
Prints the content of the PAT table. More... | |
ssize_t | dvb_table_sdt_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct dvb_table_sdt **table) |
Initializes and parses SDT table. More... | |
void | dvb_table_sdt_free (struct dvb_table_sdt *table) |
Frees all data allocated by the SDT table parser. More... | |
void | dvb_table_sdt_print (struct dvb_v5_fe_parms *parms, struct dvb_table_sdt *table) |
Prints the content of the SDT table. More... | |
ssize_t | atsc_table_vct_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, struct atsc_table_vct **table) |
Initializes and parses VCT table. More... | |
void | atsc_table_vct_free (struct atsc_table_vct *table) |
Frees all data allocated by the VCT table parser. More... | |
void | atsc_table_vct_print (struct dvb_v5_fe_parms *parms, struct atsc_table_vct *table) |
Prints the content of the VCT table. More... | |
int | dvb_mpeg_es_seq_start_init (const uint8_t *buf, ssize_t buflen, struct dvb_mpeg_es_seq_start *seq_start) |
Initialize a struct dvb_mpeg_es_seq_start from buffer. More... | |
void | dvb_mpeg_es_seq_start_print (struct dvb_v5_fe_parms *parms, struct dvb_mpeg_es_seq_start *seq_start) |
Print details of struct dvb_mpeg_es_seq_start. More... | |
int | dvb_mpeg_es_pic_start_init (const uint8_t *buf, ssize_t buflen, struct dvb_mpeg_es_pic_start *pic_start) |
Initialize a struct dvb_mpeg_es_pic_start from buffer. More... | |
void | dvb_mpeg_es_pic_start_print (struct dvb_v5_fe_parms *parms, struct dvb_mpeg_es_pic_start *pic_start) |
Print details of struct dvb_mpeg_es_pic_start. More... | |
ssize_t | dvb_mpeg_pes_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, uint8_t *table) |
Initialize a struct dvb_mpeg_pes from buffer. More... | |
void | dvb_mpeg_pes_free (struct dvb_mpeg_pes *pes) |
Deallocate memory associated with a struct dvb_mpeg_pes. More... | |
void | dvb_mpeg_pes_print (struct dvb_v5_fe_parms *parms, struct dvb_mpeg_pes *pes) |
Print details of struct dvb_mpeg_pes. More... | |
ssize_t | dvb_mpeg_ts_init (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, uint8_t *table, ssize_t *table_length) |
Initialize a struct dvb_mpeg_ts from buffer. More... | |
void | dvb_mpeg_ts_free (struct dvb_mpeg_ts *ts) |
Deallocate memory associated with a struct dvb_mpeg_ts. More... | |
void | dvb_mpeg_ts_print (struct dvb_v5_fe_parms *parms, struct dvb_mpeg_ts *ts) |
Print details of struct dvb_mpeg_ts. More... | |
Variables | |
const dvb_table_init_func | dvb_table_initializers [256] |
Table with all possible descriptors. More... | |
const struct dvb_descriptor | dvb_descriptors [] |
Contains the parsers for the several descriptors. More... | |
const char * | pmt_stream_name [] |
Converts from enum dvb_streams into a string. More... | |
const char * | dvb_mpeg_es_frame_names [5] |
Vector that translates from enum dvb_mpeg_es_frame_t to string. More... | |
#define ATSC_BASE_PID |
ATSC PID for the Program and System Information Protocol.
Definition at line 44 of file atsc_header.h.
#define atsc_eit_event_foreach | ( | _event, | |
_eit | |||
) |
Macro used to find event on an ATSC EIT table.
_event | event to seek |
_eit | pointer to struct atsc_table_eit_event |
Definition at line 160 of file atsc_eit.h.
#define ATSC_TABLE_EIT |
ATSC EIT table ID.
Definition at line 53 of file atsc_eit.h.
#define ATSC_TABLE_VCT_PID |
#define atsc_vct_channel_foreach | ( | _channel, | |
_vct | |||
) |
Macro used to find channels on a VCT table.
_channel | channel to seek |
_vct | pointer to struct atsc_table_vct_channel |
#define DVB_CRC_SIZE |
number of bytes for the descriptor's CRC check
Definition at line 61 of file descriptors.h.
#define dvb_eit_event_foreach | ( | _event, | |
_eit | |||
) |
Macro used to find event on a DVB EIT table.
_event | event to seek |
_eit | pointer to struct dvb_table_eit_event |
#define DVB_MAX_PAYLOAD_PACKET_SIZE |
Maximum size of a table session to be parsed.
Definition at line 55 of file descriptors.h.
#define DVB_MPEG_PES |
MPEG Packetized Elementary Stream magic.
Definition at line 80 of file mpeg_pes.h.
#define DVB_MPEG_PES_AUDIO |
PES Audio.
Definition at line 82 of file mpeg_pes.h.
#define DVB_MPEG_PES_VIDEO |
PES Video.
Definition at line 83 of file mpeg_pes.h.
#define DVB_MPEG_STREAM_DIRECTORY |
PES Stream directory.
Definition at line 90 of file mpeg_pes.h.
#define DVB_MPEG_STREAM_DSMCC |
PES DSMCC.
Definition at line 91 of file mpeg_pes.h.
#define DVB_MPEG_STREAM_ECM |
PES ECM Stream.
Definition at line 88 of file mpeg_pes.h.
#define DVB_MPEG_STREAM_EMM |
PES EMM Stream.
Definition at line 89 of file mpeg_pes.h.
#define DVB_MPEG_STREAM_H222E |
PES H.222.1 type E.
Definition at line 92 of file mpeg_pes.h.
#define DVB_MPEG_STREAM_MAP |
PES Stream map.
Definition at line 85 of file mpeg_pes.h.
#define DVB_MPEG_STREAM_PADDING |
PES padding.
Definition at line 86 of file mpeg_pes.h.
#define DVB_MPEG_STREAM_PRIVATE_2 |
PES private.
Definition at line 87 of file mpeg_pes.h.
#define dvb_nit_transport_foreach | ( | _tran, | |
_nit | |||
) |
Macro used to find a transport inside a NIT table.
_tran | transport to seek |
_nit | pointer to struct dvb_table_nit_transport |
#define dvb_pat_program_foreach | ( | _pgm, | |
_pat | |||
) |
Macro used to find programs on a PAT table.
_pgm | program to seek |
_pat | pointer to struct dvb_table_pat_program |
#define dvb_pmt_stream_foreach | ( | _stream, | |
_pmt | |||
) |
Macro used to find streams on a PMT table.
_stream | stream to seek |
_pmt | pointer to struct dvb_table_pmt_stream |
#define dvb_sdt_service_foreach | ( | _service, | |
_sdt | |||
) |
Macro used to find services on a SDT table.
_service | service to seek |
_sdt | pointer to struct dvb_table_sdt_service |
#define DVB_TABLE_EIT_SCHEDULE |
#define DVB_TABLE_EIT_SCHEDULE_OTHER |
typedef void(* dvb_desc_ext_free_func) (const void *desc) |
Function prototype for the extended descriptors parsing free code.
desc | struct dvb_desc pointer |
Definition at line 157 of file desc_extension.h.
typedef int(* dvb_desc_ext_init_func) (struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_extension_descriptor *ext, void *desc) |
Function prototype for the extended descriptors parsing init code.
parms | Struct dvb_v5_fe_parms pointer |
buf | buffer with the content of the descriptor |
ext | struct dvb_extension_descriptor pointer |
desc | struct dvb_desc pointer |
Definition at line 135 of file desc_extension.h.
typedef void(* dvb_desc_ext_print_func) (struct dvb_v5_fe_parms *parms, const struct dvb_extension_descriptor *ext, const void *desc) |
Function prototype for the extended descriptors parsing print code.
parms | Struct dvb_v5_fe_parms pointer |
buf | buffer with the content of the descriptor |
ext | struct dvb_extension_descriptor pointer |
desc | struct dvb_desc pointer |
Definition at line 148 of file desc_extension.h.
typedef void(* dvb_desc_free_func) (struct dvb_desc *desc) |
Function prototype for the descriptors memory free code.
desc | pointer to struct dvb_desc pointer to be freed |
Definition at line 234 of file descriptors.h.
typedef int(* dvb_desc_init_func) (struct dvb_v5_fe_parms *parms, const uint8_t *buf, struct dvb_desc *desc) |
Function prototype for the descriptors parsing init code.
parms | Struct dvb_v5_fe_parms pointer |
buf | buffer with the content of the descriptor |
desc | struct dvb_desc pointer |
Definition at line 215 of file descriptors.h.
typedef void(* dvb_desc_print_func) (struct dvb_v5_fe_parms *parms, const struct dvb_desc *desc) |
Function prototype for the descriptors parsing print code.
parms | Struct dvb_v5_fe_parms pointer |
desc | struct dvb_desc pointer |
Definition at line 225 of file descriptors.h.
typedef void(* dvb_table_init_func) (struct dvb_v5_fe_parms *parms, const uint8_t *buf, ssize_t buflen, void **table) |
Function prototype for a function that initializes the descriptors parsing on a table.
parms | Struct dvb_v5_fe_parms pointer |
buf | Buffer with data to be parsed |
buflen | Size of the buffer to be parsed |
table | pointer to a place where the allocated memory with the table structure will be stored. |
Definition at line 79 of file descriptors.h.
typedef void nit_handler_callback_t(struct dvb_table_nit *nit, struct dvb_desc *desc, void *priv) |
typedef for a callback used when a NIT table entry is found
nit | a struct dvb_table_nit pointer |
desc | a struct dvb_desc pointer |
priv | an opaque optional pointer |
typedef void nit_tran_handler_callback_t(struct dvb_table_nit *nit, struct dvb_table_nit_transport *tran, struct dvb_desc *desc, void *priv) |
typedef for a callback used when a NIT transport table entry is found
nit | a struct dvb_table_nit pointer |
tran | a struct dvb_table_nit_transport pointer |
desc | a struct dvb_desc pointer |
priv | an opaque optional pointer |
enum descriptors |
List containing all descriptors used by Digital TV MPEG-TS.
Definition at line 592 of file descriptors.h.
enum dvb_mpeg_es_frame_t |
enum dvb_streams |
Add support for MPEG-TS Stream types.
void atsc_table_eit_free | ( | struct atsc_table_eit * | table | ) |
Frees all data allocated by the ATSC EIT table parser.
table | pointer to struct atsc_table_eit to be freed |
ssize_t atsc_table_eit_init | ( | struct dvb_v5_fe_parms * | parms, |
const uint8_t * | buf, | ||
ssize_t | buflen, | ||
struct atsc_table_eit ** | table | ||
) |
Initializes and parses ATSC EIT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
buf | buffer containing the EIT raw data |
buflen | length of the buffer |
table | pointer to struct atsc_table_eit to be allocated and filled |
This function allocates an ATSC EIT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change.
void atsc_table_eit_print | ( | struct dvb_v5_fe_parms * | parms, |
struct atsc_table_eit * | table | ||
) |
Prints the content of the ATSC EIT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
table | pointer to struct atsc_table_eit |
void atsc_table_mgt_free | ( | struct atsc_table_mgt * | table | ) |
Frees all data allocated by the MGT table parser.
table | pointer to struct atsc_table_mgt to be freed |
ssize_t atsc_table_mgt_init | ( | struct dvb_v5_fe_parms * | parms, |
const uint8_t * | buf, | ||
ssize_t | buflen, | ||
struct atsc_table_mgt ** | table | ||
) |
Initializes and parses MGT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
buf | buffer containing the MGT raw data |
buflen | length of the buffer |
table | pointer to struct atsc_table_mgt to be allocated and filled |
This function allocates an ATSC MGT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change.
void atsc_table_mgt_print | ( | struct dvb_v5_fe_parms * | parms, |
struct atsc_table_mgt * | table | ||
) |
Prints the content of the MGT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
table | pointer to struct atsc_table_mgt |
void atsc_table_vct_free | ( | struct atsc_table_vct * | table | ) |
Frees all data allocated by the VCT table parser.
table | pointer to struct atsc_table_vct to be freed |
ssize_t atsc_table_vct_init | ( | struct dvb_v5_fe_parms * | parms, |
const uint8_t * | buf, | ||
ssize_t | buflen, | ||
struct atsc_table_vct ** | table | ||
) |
Initializes and parses VCT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
buf | buffer containing the VCT raw data |
buflen | length of the buffer |
table | pointer to struct atsc_table_vct to be allocated and filled |
This function allocates an ATSC VCT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change.
void atsc_table_vct_print | ( | struct dvb_v5_fe_parms * | parms, |
struct atsc_table_vct * | table | ||
) |
Prints the content of the VCT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
table | pointer to struct atsc_table_vct |
uint32_t dvb_bcd | ( | uint32_t | bcd | ) |
Converts from BCD to CPU integer internal representation.
bcd | value in BCD encoding |
void dvb_desc_free | ( | struct dvb_desc ** | list | ) |
int dvb_desc_parse | ( | struct dvb_v5_fe_parms * | parms, |
const uint8_t * | buf, | ||
uint16_t | buflen, | ||
struct dvb_desc ** | head_desc | ||
) |
parse MPEG-TS descriptors
parms | Struct dvb_v5_fe_parms pointer |
buf | Buffer with data to be parsed |
buflen | Size of the buffer to be parsed |
head_desc | pointer to the place to store the parsed data |
This function takes a buf as argument and parses it to find the MPEG-TS descriptors inside it, creating a linked list.
On success, head_desc will be allocated and filled with a linked list with the descriptors found inside the buffer.
This function is used by the several MPEG-TS table handlers to parse the entire table that got read by dvb_read_sessions and other similar functions.
void dvb_desc_print | ( | struct dvb_v5_fe_parms * | parms, |
struct dvb_desc * | desc | ||
) |
prints the contents of a struct dvb_desc linked list
parms | Struct dvb_v5_fe_parms pointer |
desc | struct dvb_desc pointer. |
void dvb_hexdump | ( | struct dvb_v5_fe_parms * | parms, |
const char * | prefix, | ||
const unsigned char * | buf, | ||
int | len | ||
) |
dumps data into the logs in hexadecimal format
parms | Struct dvb_v5_fe_parms pointer |
prefix | String to be printed before the dvb_hexdump |
buf | Buffer to hex dump |
len | Number of bytes to show |
int dvb_mpeg_es_pic_start_init | ( | const uint8_t * | buf, |
ssize_t | buflen, | ||
struct dvb_mpeg_es_pic_start * | pic_start | ||
) |
Initialize a struct dvb_mpeg_es_pic_start from buffer.
buf | Buffer |
buflen | Length of buffer |
pic_start | Pointer to allocated structdvb_mpeg_es_pic_start |
This function copies the length of struct dvb_mpeg_es_pic_start to pic_start and fixes endianness. seq_start has to be allocated with malloc.
void dvb_mpeg_es_pic_start_print | ( | struct dvb_v5_fe_parms * | parms, |
struct dvb_mpeg_es_pic_start * | pic_start | ||
) |
Print details of struct dvb_mpeg_es_pic_start.
parms | struct dvb_v5_fe_parms for log functions |
pic_start | Pointer to struct dvb_mpeg_es_pic_start to print |
This function prints the fields of struct dvb_mpeg_es_pic_start
int dvb_mpeg_es_seq_start_init | ( | const uint8_t * | buf, |
ssize_t | buflen, | ||
struct dvb_mpeg_es_seq_start * | seq_start | ||
) |
Initialize a struct dvb_mpeg_es_seq_start from buffer.
buf | Buffer |
buflen | Length of buffer |
seq_start | Pointer to allocated struct dvb_mpeg_es_seq_start |
This function copies the length of struct dvb_mpeg_es_seq_start to seq_start and fixes endianness. seq_start has to be allocated with malloc.
void dvb_mpeg_es_seq_start_print | ( | struct dvb_v5_fe_parms * | parms, |
struct dvb_mpeg_es_seq_start * | seq_start | ||
) |
Print details of struct dvb_mpeg_es_seq_start.
parms | struct dvb_v5_fe_parms for log functions |
seq_start | Pointer to struct dvb_mpeg_es_seq_start to print |
This function prints the fields of struct dvb_mpeg_es_seq_start
void dvb_mpeg_pes_free | ( | struct dvb_mpeg_pes * | pes | ) |
Deallocate memory associated with a struct dvb_mpeg_pes.
pes | struct dvb_mpeg_pes to be deallocated |
If the pointer pes was allocated dynamically, this function can be used to free the memory.
ssize_t dvb_mpeg_pes_init | ( | struct dvb_v5_fe_parms * | parms, |
const uint8_t * | buf, | ||
ssize_t | buflen, | ||
uint8_t * | table | ||
) |
Initialize a struct dvb_mpeg_pes from buffer.
parms | struct dvb_v5_fe_parms for log functions |
buf | Buffer |
buflen | Length of buffer |
table | Pointer to allocated struct dvb_mpeg_pes |
This function copies the length of struct dvb_mpeg_pes to table and fixes endianness. The pointer table has to be allocated on stack or dynamically.
void dvb_mpeg_pes_print | ( | struct dvb_v5_fe_parms * | parms, |
struct dvb_mpeg_pes * | pes | ||
) |
Print details of struct dvb_mpeg_pes.
parms | struct dvb_v5_fe_parms for log functions |
pes | Pointer to struct dvb_mpeg_pes to print |
This function prints the fields of struct dvb_mpeg_pes
void dvb_mpeg_ts_free | ( | struct dvb_mpeg_ts * | ts | ) |
Deallocate memory associated with a struct dvb_mpeg_ts.
ts | struct dvb_mpeg_ts to be deallocated |
If ts was allocated dynamically, this function can be used to free the memory.
ssize_t dvb_mpeg_ts_init | ( | struct dvb_v5_fe_parms * | parms, |
const uint8_t * | buf, | ||
ssize_t | buflen, | ||
uint8_t * | table, | ||
ssize_t * | table_length | ||
) |
Initialize a struct dvb_mpeg_ts from buffer.
parms | struct dvb_v5_fe_parms for log functions |
buf | Buffer |
buflen | Length of buffer |
table | Pointer to allocated struct dvb_mpeg_ts |
table_length | Pointer to size_t where length will be written to |
This function copies the length of struct dvb_mpeg_ts to table and fixes endianness. The pointer table has to be allocated on stack or dynamically.
void dvb_mpeg_ts_print | ( | struct dvb_v5_fe_parms * | parms, |
struct dvb_mpeg_ts * | ts | ||
) |
Print details of struct dvb_mpeg_ts.
parms | struct dvb_v5_fe_parms for log functions |
ts | Pointer to struct dvb_mpeg_ts to print |
This function prints the fields of struct dvb_mpeg_ts
void dvb_table_eit_free | ( | struct dvb_table_eit * | table | ) |
Frees all data allocated by the DVB EIT table parser.
table | pointer to struct dvb_table_eit to be freed |
ssize_t dvb_table_eit_init | ( | struct dvb_v5_fe_parms * | parms, |
const uint8_t * | buf, | ||
ssize_t | buflen, | ||
struct dvb_table_eit ** | table | ||
) |
Initializes and parses EIT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
buf | buffer containing the EIT raw data |
buflen | length of the buffer |
table | pointer to struct dvb_table_eit to be allocated and filled |
This function allocates an EIT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change.
void dvb_table_eit_print | ( | struct dvb_v5_fe_parms * | parms, |
struct dvb_table_eit * | table | ||
) |
Prints the content of the DVB EIT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
table | pointer to struct dvb_table_eit |
void dvb_table_header_init | ( | struct dvb_table_header * | header | ) |
Initializes and parses MPEG-TS table header.
header | pointer to struct dvb_table_header to be parsed |
void dvb_table_header_print | ( | struct dvb_v5_fe_parms * | parms, |
const struct dvb_table_header * | header | ||
) |
Prints the content of the MPEG-TS table header.
parms | struct dvb_v5_fe_parms pointer to the opened device |
header | pointer to struct dvb_table_header to be printed |
void dvb_table_nit_descriptor_handler | ( | struct dvb_v5_fe_parms * | parms, |
struct dvb_table_nit * | table, | ||
enum descriptors | descriptor, | ||
nit_handler_callback_t * | call_nit, | ||
nit_tran_handler_callback_t * | call_tran, | ||
void * | priv | ||
) |
For each entry at NIT and NIT transport tables, call a callback.
parms | struct dvb_v5_fe_parms pointer to the opened device |
table | pointer to struct dvb_table_nit |
descriptor | indicates the NIT table descriptor to seek |
call_nit | a nit_handler_callback_t function to be called when a new entry at the NIT table is found (or NULL). |
call_tran | a nit_tran_handler_callback_t function to be called when a new entry at the NIT transport table is found (or NULL). |
priv | an opaque pointer to be optionally used by the callbacks. The function won't touch on it, just use as an argument for the callback functions. |
When parsing a NIT entry, we need to call some code to properly handle when a given descriptor in the table is found. This is used, for example, to create newer transponders to seek during scan.
For example, to seek for the CATV delivery system descriptor and call a function that would add a new transponder to a scan procedure:
void dvb_table_nit_free | ( | struct dvb_table_nit * | table | ) |
Frees all data allocated by the NIT table parser.
table | pointer to struct dvb_table_nit to be freed |
ssize_t dvb_table_nit_init | ( | struct dvb_v5_fe_parms * | parms, |
const uint8_t * | buf, | ||
ssize_t | buflen, | ||
struct dvb_table_nit ** | table | ||
) |
Initializes and parses NIT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
buf | buffer containing the NIT raw data |
buflen | length of the buffer |
table | pointer to struct dvb_table_nit to be allocated and filled |
This function allocates a NIT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change.
void dvb_table_nit_print | ( | struct dvb_v5_fe_parms * | parms, |
struct dvb_table_nit * | table | ||
) |
Prints the content of the NIT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
table | pointer to struct dvb_table_nit |
void dvb_table_pat_free | ( | struct dvb_table_pat * | table | ) |
Frees all data allocated by the PAT table parser.
table | pointer to struct dvb_table_pat to be freed |
ssize_t dvb_table_pat_init | ( | struct dvb_v5_fe_parms * | parms, |
const uint8_t * | buf, | ||
ssize_t | buflen, | ||
struct dvb_table_pat ** | table | ||
) |
Initializes and parses PAT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
buf | buffer containing the PAT raw data |
buflen | length of the buffer |
table | pointer to struct dvb_table_pat to be allocated and filled |
This function allocates a PAT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change.
void dvb_table_pat_print | ( | struct dvb_v5_fe_parms * | parms, |
struct dvb_table_pat * | table | ||
) |
Prints the content of the PAT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
table | pointer to struct dvb_table_pat |
void dvb_table_pmt_free | ( | struct dvb_table_pmt * | table | ) |
Frees all data allocated by the PMT table parser.
table | pointer to struct dvb_table_pmt to be freed |
ssize_t dvb_table_pmt_init | ( | struct dvb_v5_fe_parms * | parms, |
const uint8_t * | buf, | ||
ssize_t | buflen, | ||
struct dvb_table_pmt ** | table | ||
) |
Initializes and parses PMT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
buf | buffer containing the PMT raw data |
buflen | length of the buffer |
table | pointer to struct dvb_table_pmt to be allocated and filled |
This function allocates a PMT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change.
void dvb_table_pmt_print | ( | struct dvb_v5_fe_parms * | parms, |
const struct dvb_table_pmt * | table | ||
) |
Prints the content of the PAT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
table | pointer to struct dvb_table_pmt |
void dvb_table_sdt_free | ( | struct dvb_table_sdt * | table | ) |
Frees all data allocated by the SDT table parser.
table | pointer to struct dvb_table_sdt to be freed |
ssize_t dvb_table_sdt_init | ( | struct dvb_v5_fe_parms * | parms, |
const uint8_t * | buf, | ||
ssize_t | buflen, | ||
struct dvb_table_sdt ** | table | ||
) |
Initializes and parses SDT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
buf | buffer containing the SDT raw data |
buflen | length of the buffer |
table | pointer to struct dvb_table_sdt to be allocated and filled |
This function allocates a SDT table and fills the fields inside the struct. It also makes sure that all fields will follow the CPU endianness. Due to that, the content of the buffer may change.
void dvb_table_sdt_print | ( | struct dvb_v5_fe_parms * | parms, |
struct dvb_table_sdt * | table | ||
) |
Prints the content of the SDT table.
parms | struct dvb_v5_fe_parms pointer to the opened device |
table | pointer to struct dvb_table_sdt |
void dvb_time | ( | const uint8_t | data[5], |
struct tm * | tm | ||
) |
Converts a DVB EIT formatted timestamp into struct tm.
data | event on DVB EIT time format |
tm | pointer to struct tm where the converted timestamp will be stored. |
|
extern |
Contains the parsers for the several descriptors.
|
extern |
Vector that translates from enum dvb_mpeg_es_frame_t to string.
|
extern |
Table with all possible descriptors.
|
extern |
Converts from enum dvb_streams into a string.