44 lines
1.0 KiB
C
44 lines
1.0 KiB
C
|
|
||
|
#include <sys/param.h>
|
||
|
|
||
|
struct epg {
|
||
|
char fname[MAXPATHLEN + 1];
|
||
|
int fd;
|
||
|
uint8_t *bin;
|
||
|
uint32_t offset;
|
||
|
uint32_t binsize;
|
||
|
};
|
||
|
|
||
|
#define SECTION_HEADER_MAGIC "(Gq\x87\x00\x00\x00\x00\x02\x00\x00\x00\x00\x01"
|
||
|
|
||
|
#pragma pack(1)
|
||
|
struct section_header {
|
||
|
char magic[14];
|
||
|
unsigned int total_length:16;
|
||
|
unsigned int magic2:32;
|
||
|
unsigned int table_id:8;
|
||
|
unsigned int section_syntax_indicator:1;
|
||
|
unsigned int reserved:3;
|
||
|
unsigned int section_length:12;
|
||
|
unsigned int service_id:16;
|
||
|
unsigned int reserved2:2;
|
||
|
unsigned int version_number:5;
|
||
|
unsigned int current_next_indicator:1;
|
||
|
unsigned int section_number:8;
|
||
|
unsigned int last_section_number:8;
|
||
|
unsigned int transport_stream_id:16;
|
||
|
unsigned int original_network_id:16;
|
||
|
unsigned int segment_last_section_number:8;
|
||
|
unsigned int last_table_id:8;
|
||
|
};
|
||
|
|
||
|
struct data {
|
||
|
unsigned int event_id:16;
|
||
|
unsigned int start_date:16;
|
||
|
unsigned int start_time:24;
|
||
|
char duration[3];
|
||
|
unsigned int free_CA_mode:1;
|
||
|
unsigned int descriptors_loop_length:12;
|
||
|
};
|
||
|
|