X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/85f2616ef78700cf2639992abaf1011ecaa897bd..90e70d5d028b1bac369c2f4742b84e11f66435b7:/lib/dvb/dvbtime.h diff --git a/lib/dvb/dvbtime.h b/lib/dvb/dvbtime.h index ec47de46..a5114f82 100644 --- a/lib/dvb/dvbtime.h +++ b/lib/dvb/dvbtime.h @@ -18,6 +18,13 @@ inline int fromBCD(int bcd) return ((bcd&0xF0)>>4)*10+(bcd&0xF); } +inline int toBCD(int dec) +{ + if (dec >= 100) + return -1; + return int(dec/10)*0x10 + dec%10; +} + time_t parseDVBtime(__u8 t1, __u8 t2, __u8 t3, __u8 t4, __u8 t5); class TDT: public eGTable @@ -25,7 +32,7 @@ class TDT: public eGTable eDVBChannel *chan; ePtr demux; eTimer m_interval_timer; - int createTable(int nr, const __u8 *data, unsigned int max); + int createTable(unsigned int nr, const __u8 *data, unsigned int max); void ready(int); int update_count; public: @@ -66,10 +73,10 @@ class eDVBLocalTimeHandler: public Object #endif public: #ifndef SWIG - PSignal0 m_timeUpdated; eDVBLocalTimeHandler(); ~eDVBLocalTimeHandler(); #endif + PSignal0 m_timeUpdated; time_t nowTime() const { return m_time_ready ? ::time(0)+m_time_difference : -1; } bool ready() const { return m_time_ready; } int difference() const { return m_time_difference; }