hmt/hmt.h

67 lines
1.8 KiB
C

#include <sys/param.h>
struct hmt {
char fname[MAXPATHLEN + 1];
int fd;
uint8_t *bin;
uint8_t *epgstart; /* Start of the correct EPG entry in the HMT file */
uint8_t *epgguidance; /* Start of the guidance text for the relevant EPG entry */
uint32_t binsize;
};
#define HMT_EPG_BLOCK_LENGTH 0x220
#define HMT_EPG_TITLE 0x14
#define HMT_BLOCK_LENGTH 0x1003
#define HMT_HEADER_PROG_EV_ID 0x036b
#define HMT_FOLDER 0x21
#define HMT_FOLDER_LEN 512
#define HMT_FILENAME 0x21
#define HMT_FILENAME_LEN 512
#define HMT_TITLE 0x221
#define HMT_TITLE_LEN 255
#define HMT_SYNOPSIS_LEN 255
#define HMT_CHANNEL_NUM 0x11 /* 2 bytes */
#define HMT_CHANNEL_NAME 0x321
#define HMT_EPG 0x114
#define HMT_FLAGS1 0x367
#define HMT_FLAGS1_LOCKED 0x80
#define HMT_FLAGS1_PROTECTED 0x40
#define HMT_FLAGS1_NEW 0x20
#define HMT_CONVERT_FLAG 0x500
#define HMT_FLAGS2 0x368
#define HMT_FLAGS2_ENCRYPTED 0x10 /* As in "keep encrypted" */
#define HMT_FLAGS2_HD 0x80
#define HMT_FLAGS3 0x369
#define HMT_FLAGS3_LIMITCOPY 0x20
#define HMT_RECORDING_START 0x19 /* 4 bytes */
#define HMT_RECORDING_END 0x1D /* 4 bytes */
#define HMT_SCHEDULED_START 0x04 /* 4 bytes */
#define HMT_SCHEDULED_DURATION 0x08 /* 4 bytes */
#define HMT_PLAYED_TIME 0x05 /* 4 bytes */
#define HMT_GUIDEFLAG 0x3e0
#define HMT_GUIDEFLAG_ON 0x01
#define HMT_GUIDANCE 0x3e2
#define HMT_SID 0x417 /* 2 bytes */
#define HMT_TSID 0x425 /* 2 bytes */
#define HMT_ONID 0x427 /* 2 bytes */
#define HMT_PMTPID 0x419 /* 2 bytes */
#define HMT_VIDEOPID 0x41b /* 2 bytes */
#define HMT_AUDIOPID 0x41d /* 2 bytes */
#define HMT_COPYCOUNT 0x431
#define HMT_EPG_SYNOPSIS 0x114 /* 0x115 */
#define HMT_GUIDE_BLOCK_MIN_SIZE 0x15
#define HMT_WITH_EPG_BLOCK_MIN_SIZE (HMT_BLOCK_LENGTH + HMT_EPG_BLOCK_LENGTH + HMT_GUIDE_BLOCK_MIN_SIZE)