|
libdvbv5
1.4.0
Library to work with Digital TV streams
|
Provides a way to handle MPEG-TS descriptors found on Digital TV streams. More...
#include <unistd.h>#include <stdint.h>#include <arpa/inet.h>

Go to the source code of this file.
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... | |
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... | |
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. 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... | |
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... | |
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... | |
Provides a way to handle MPEG-TS descriptors found on Digital TV streams.
The descriptors are defined on:
Please submit bug report and patches to linux-media@vger.kernel.org
Definition in file descriptors.h.
| #define DVB_CRC_SIZE |
number of bytes for the descriptor's CRC check
Definition at line 53 of file descriptors.h.
| #define DVB_MAX_PAYLOAD_PACKET_SIZE |
Maximum size of a table session to be parsed.
Definition at line 50 of file descriptors.h.
| typedef void(* dvb_desc_free_func)(struct dvb_desc *desc) |
Function prototype for the descriptors memory free code.
Definition at line 181 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.
Definition at line 175 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.
Definition at line 178 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.
Definition at line 61 of file descriptors.h.
| enum descriptors |
List containing all descriptors used by Digital TV MPEG-TS.
Definition at line 211 of file descriptors.h.
| 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 |
| const struct dvb_descriptor dvb_descriptors[] |
Contains the parsers for the several descriptors.
| const dvb_table_init_func dvb_table_initializers[256] |
Table with all possible descriptors.
1.8.8