Page 1 of 1

epgcache.dat

Posted: Sat Oct 31, 2015 5:50 am
by alexi
Hi,

What is the structure of epgcache.dat file?

Alexi

Re: epgcache.dat

Posted: Sun Nov 01, 2015 6:02 am
by rel
PEPGCacheHdr = ^TEPGCacheHdr;
TEPGCacheHdr = packed record
dwSignature: DWORD;
wVersion: WORD;
end;


PEPGCacheItemInfo = ^TEPGCacheItemInfo;
TEPGCacheItemInfo = packed record
wNID: WORD; // NID - Network
wTID: WORD; // TID - Transponder
wSID: WORD; // SID - Channel
wEventID: WORD; // Event ID
dwStartTime: DWORD; // Start-time in UNIX format
dwDuration: DWORD; // Duration in UNIX format
dwRating: DWORD; // MPAA & Parental Rating - Bit mask
wContent: WORD; // Content - Theme - Bit mask
OrgAirDate: packed array[0..7] of byte; // Unknown date format particular to Dish Net (?)
end;

PEPGCacheItemHdr = ^TEPGCacheItemHdr;
TEPGCacheItemHdr = packed record
dwItemSize: Integer; // including this , info and data parts
wSat: WORD; {Satellite, position code, e.g. 0130}
info: TEPGCacheItemInfo;
end;


Structure is simple : a header and then cache items.(items have variable length)

Each cache item also has an header (TEPGCacheItemHdr) and text data (in order of event title, short description and extended description)

Each text data item constists of a length byte and text. (for extended description length is 2 bytes, for others only 1 byte)

Texts are unicode (each char is 2 byte)