epg/descriptor.h

139 lines
2.8 KiB
C

/*
* Humax EPG Tool
* by af123, 2011
*/
#define DS_LINKAGE 74
#define DS_SHORT_EVENT 77
#define DS_COMPONENT 80
#define DS_CONTENT 84
#define DS_PRIVATE_DATA_SPECIFIER 95
#define DS_CONTENT_IDENTIFIER 118
#define DS_FTA_CONTENT_MGMT 126
#ifdef FOXSATPLATFORM
#define DS_USER_DEFINED 218
#else
#define DS_USER_DEFINED 137
#endif
#define PARSER_SHORT_EVENT 0
#define PARSER_USER_DEFINED 1
#define PARSER_CONTENT 2
#define PARSER_CRID_EVENT 3
#define PARSER_CRID_SERIES 4
#define PARSER_CRID_REC 5
#define PARSER_MAX 6
#define CRIDT_EVENT '1'
#define CRIDT_SERIES '2'
#define CRIDT_REC '3'
#pragma pack(1)
struct crid {
#ifdef FOXSATPLATFORM
unsigned int type:6;
unsigned int location:2;
#else
unsigned int location:2;
unsigned int type:6;
#endif
unsigned int cridlen;
char *crid;
unsigned int ref:16;
};
struct descriptor {
unsigned int tag:8;
unsigned int len:8;
union {
struct {
char lang[3];
unsigned int namelen;
unsigned int textlen;
char *name;
char *text;
} d77; /* SHORT_EVENT */
struct {
#ifdef FOXSATPLATFORM
unsigned int reserved:4;
unsigned int stream_content:4;
#else
unsigned int stream_content:4;
unsigned int reserved:4;
#endif
unsigned int type:8;
unsigned int tag:8;
char lang[3];
char *text;
unsigned int textlen;
} d80; /* COMPONENT */
struct {
#ifdef FOXSATPLATFORM
unsigned int level1:4;
unsigned int level2:4;
#else
unsigned int level2:4;
unsigned int level1:4;
#endif
unsigned int user:8;
} d84; /* CONTENT */
struct {
unsigned int textlen;
char *text;
char lang[3];
char *warning;
unsigned int warninglen;
} d137; /* USER_DEFINED - content warnings? */
struct {
unsigned int no_revocation:1;
unsigned int control_remote_access:2;
unsigned int no_scramble:1;
unsigned int reserved:4;
} d126; /* DS_FTA_CONTENT_MGMT */
struct {
unsigned int tsid:16;
unsigned int orig_netid:16;
unsigned int service_id:16;
unsigned int linkage_type:8;
union {
struct {
#ifdef FOXSATPLATFORM
unsigned int handover_type:4;
unsigned int reserved:3;
unsigned int origin_type:1;
unsigned int id:16;
#else
unsigned int origin_type:1;
unsigned int reserved:3;
unsigned int handover_type:4;
unsigned int id:16;
#endif
} l8;
struct {
unsigned int event_id:16;
#ifdef FOXSATPLATFORM
unsigned int listed:1;
unsigned int simulcast:1;
unsigned int reserved:6;
#else
unsigned int reserved:6;
unsigned int simulcast:1;
unsigned int listed:1;
#endif
} ld;
} l;
} d74; /* DS_LINKAGE */
struct {
struct crid crids[3];
int i;
} d118; /* CONTENT_IDENTIFIER */
struct {
char *text;
unsigned int textlen;
} unknown; /* 74, 84, 95, 126, ... */
} content;
int loaded;
};