42 #ifndef _DESCRIPTORS_H
43 #define _DESCRIPTORS_H
47 #include <arpa/inet.h>
50 #define DVB_MAX_PAYLOAD_PACKET_SIZE 4096
53 #define DVB_CRC_SIZE 4
67 #define bswap16(b) do {\
71 #define bswap32(b) do {\
75 #define DVB_DESC_HEADER() \
97 } __attribute__((packed));
101 #define dvb_desc_foreach( _desc, _tbl ) \
102 for( struct dvb_desc *_desc = _tbl->descriptor; _desc; _desc = _desc->next ) \
104 #define dvb_desc_find(_struct, _desc, _tbl, _type) \
105 for( _struct *_desc = (_struct *) _tbl->descriptor; _desc; _desc = (_struct *) _desc->next ) \
106 if(_desc->type == _type) \
119 uint32_t
dvb_bcd(uint32_t bcd);
130 const unsigned char *buf,
int len);
153 uint16_t buflen,
struct dvb_desc **head_desc);
void dvb_desc_free(struct dvb_desc **list)
frees a dvb_desc linked list
const dvb_table_init_func dvb_table_initializers[256]
Table with all possible descriptors.
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
dvb_desc_print_func print
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.
const struct dvb_descriptor dvb_descriptors[]
Contains the parsers for the several descriptors.
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.
Keeps data needed to handle the DVB frontend.
descriptors
List containing all descriptors used by Digital TV MPEG-TS.
void dvb_desc_print(struct dvb_v5_fe_parms *parms, struct dvb_desc *desc)
prints the contents of a struct dvb_desc linked list
Contains the parser information for the MPEG-TS parser code.
void(* dvb_desc_print_func)(struct dvb_v5_fe_parms *parms, const struct dvb_desc *desc)
Function prototype for the descriptors parsing print code.
Linked list containing the several descriptors found on a MPEG-TS table.
void(* dvb_desc_free_func)(struct dvb_desc *desc)
Function prototype for the descriptors memory free code.
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
uint32_t dvb_bcd(uint32_t bcd)
Converts from BCD to CPU integer internal representation.