return int(dec/10)*0x10 + dec%10;
}
-time_t parseDVBtime(__u8 t1, __u8 t2, __u8 t3, __u8 t4, __u8 t5);
+time_t parseDVBtime(__u8 t1, __u8 t2, __u8 t3, __u8 t4, __u8 t5, __u16 *hash=0);
class TDT: public eGTable
{
eDVBChannel *chan;
ePtr<iDVBDemux> demux;
- eTimer m_interval_timer;
+ ePtr<eTimer> m_interval_timer;
int createTable(unsigned int nr, const __u8 *data, unsigned int max);
void ready(int);
int update_count;
class eDVBLocalTimeHandler: public Object
{
+ DECLARE_REF(eDVBLocalTimeHandler);
struct channel_data
{
- TDT *tdt;
+ ePtr<TDT> tdt;
ePtr<eDVBChannel> channel;
ePtr<eConnection> m_stateChangedConn;
int m_prevChannelState;
};
+ bool m_use_dvb_time;
+ ePtr<eTimer> m_updateNonTunedTimer;
friend class TDT;
- DECLARE_REF(eDVBLocalTimeHandler)
std::map<iDVBChannel*, channel_data> m_knownChannels;
std::map<eDVBChannelID,int> m_timeOffsetMap;
ePtr<eConnection> m_chanAddedConn;
void readTimeOffsetData(const char*);
void writeTimeOffsetData(const char*);
void updateTime(time_t tp_time, eDVBChannel*, int updateCount);
+ void updateNonTuned();
static eDVBLocalTimeHandler *instance;
#ifdef SWIG
eDVBLocalTimeHandler();
#endif
public:
#ifndef SWIG
- PSignal0<void> m_timeUpdated;
eDVBLocalTimeHandler();
~eDVBLocalTimeHandler();
#endif
- time_t nowTime() const { return m_time_ready ? ::time(0)+m_time_difference : -1; }
+ bool getUseDVBTime() { return m_use_dvb_time; }
+ void setUseDVBTime(bool b);
+ PSignal0<void> m_timeUpdated;
bool ready() const { return m_time_ready; }
- int difference() const { return m_time_difference; }
static eDVBLocalTimeHandler *getInstance() { return instance; }
};