diff options
author | Dimitar Petrovski <dimeptr@gmail.com> | 2012-11-23 16:24:15 +0100 |
---|---|---|
committer | Dimitar Petrovski <dimeptr@gmail.com> | 2012-11-23 16:24:15 +0100 |
commit | 021190e605d10424986c616793829a7e99b3e720 (patch) | |
tree | 3bd9d25b8462073a134125d10980d6859c166ea0 /eepg.h | |
parent | e806e6ac89fa61fc6683bb14ac73d3173450226a (diff) | |
download | vdr-plugin-eepg-021190e605d10424986c616793829a7e99b3e720.tar.gz vdr-plugin-eepg-021190e605d10424986c616793829a7e99b3e720.tar.bz2 |
change MjdToEpochTime macro to function and use it on more locations
extract SKY qualitiy info from stream. Should be added to the event description
do not send already expired events to VDR so that no cleanup is required after.
changed the logic of summary handling for SKY so that no SummaryAvailable bit is required, since it can not be located from the stream
implement some TODOs
remove commented code
Diffstat (limited to 'eepg.h')
-rw-r--r-- | eepg.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -57,6 +57,7 @@ typedef struct { unsigned char Unknown2;//FIXME unsigned char Unknown3;//FIXME unsigned char Rating; + unsigned char Quality; unsigned short int TableId; } Title_t; @@ -7180,4 +7181,14 @@ typedef struct { //first three bytes form unknown header, then X blocks, where X #define HILO16( x ) ( ( ( x##High << 8 ) | x##Low ) & 0xffff ) #define HILO32( x ) ( ( ( ( ( x##High << 24 ) | ( x##MediumHigh << 16 ) ) | ( x##MediumLow << 8 ) ) | x##Low ) & 0xffffffff ) -#define MjdToEpochTime(x) (((x##_hi << 8 | x##_lo)-40587)*86400) +//#define MjdToEpochTime(x) (((x##_hi << 8 | x##_lo)-40587)*86400) +inline time_t MjdToEpochTime(u_short mjd, u_char Hour = 0, u_char Minute = 0, u_char Sec = 0) { + return ((mjd - 40587) * 86400) + ( ((((Hour & 0xf0) >> 4) * 10) + (Hour & 0x0f)) * 3600 ) + + (((((Minute & 0xf0) >> 4) * 10) + (Minute & 0x0f)) * 60) + + ((((Sec & 0xf0) >> 4) * 10) + (Sec & 0x0f)); +} +inline time_t MjdToEpochTime(u_char dateHigh, u_char dateLow, u_char Hour = 0, u_char Minute = 0,u_char Sec = 0) { + unsigned short mjd = HILO16(date); + return MjdToEpochTime(mjd, Hour, Minute, Sec); +} + |