git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix typo
[enigma2.git]
/
lib
/
dvb
/
dvbtime.h
diff --git
a/lib/dvb/dvbtime.h
b/lib/dvb/dvbtime.h
index 59a26c2148698cc4a1e3ac986121b354f743f49d..ffcfaa4168969fdd13c457fd5aee54f349eecfba 100644
(file)
--- a/
lib/dvb/dvbtime.h
+++ b/
lib/dvb/dvbtime.h
@@
-1,9
+1,11
@@
#ifndef __LIB_DVB_DVBTIME_H_
#define __LIB_DVB_DVBTIME_H_
#ifndef __LIB_DVB_DVBTIME_H_
#define __LIB_DVB_DVBTIME_H_
+#ifndef SWIG
+
#include <lib/base/eerror.h>
#include <lib/dvb/esection.h>
#include <lib/base/eerror.h>
#include <lib/dvb/esection.h>
-#include <
lib/dvb_si/tdt
.h>
+#include <
dvbsi++/time_date_section
.h>
class eDVBChannel;
class eDVBChannel;
@@
-16,6
+18,13
@@
inline int fromBCD(int bcd)
return ((bcd&0xF0)>>4)*10+(bcd&0xF);
}
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
time_t parseDVBtime(__u8 t1, __u8 t2, __u8 t3, __u8 t4, __u8 t5);
class TDT: public eGTable
@@
-23,39
+32,52
@@
class TDT: public eGTable
eDVBChannel *chan;
ePtr<iDVBDemux> demux;
eTimer m_interval_timer;
eDVBChannel *chan;
ePtr<iDVBDemux> 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);
void ready(int);
+ int update_count;
public:
public:
- TDT(eDVBChannel *chan);
+ TDT(eDVBChannel *chan
, int update_count=0
);
void start();
void startTimer(int interval);
void start();
void startTimer(int interval);
+ int getUpdateCount() { return update_count; }
};
};
+#endif // SWIG
+
class eDVBLocalTimeHandler: public Object
{
class eDVBLocalTimeHandler: public Object
{
+ DECLARE_REF(eDVBLocalTimeHandler);
+ struct channel_data
+ {
+ TDT *tdt;
+ ePtr<eDVBChannel> channel;
+ ePtr<eConnection> m_stateChangedConn;
+ int m_prevChannelState;
+ };
friend class TDT;
friend class TDT;
- DECLARE_REF(eDVBLocalTimeHandler)
- std::map<iDVBChannel*, TDT*> m_active_tables;
+ std::map<iDVBChannel*, channel_data> m_knownChannels;
std::map<eDVBChannelID,int> m_timeOffsetMap;
ePtr<eConnection> m_chanAddedConn;
std::map<eDVBChannelID,int> m_timeOffsetMap;
ePtr<eConnection> m_chanAddedConn;
- ePtr<eConnection> m_chanRemovedConn;
- ePtr<eConnection> m_chanRunningConn;
bool m_time_ready;
int m_time_difference;
int m_last_tp_time_difference;
void DVBChannelAdded(eDVBChannel*);
bool m_time_ready;
int m_time_difference;
int m_last_tp_time_difference;
void DVBChannelAdded(eDVBChannel*);
- void DVBChannelRemoved(eDVBChannel*);
- void DVBChannelRunning(iDVBChannel*);
+ void DVBChannelStateChanged(iDVBChannel*);
void readTimeOffsetData(const char*);
void writeTimeOffsetData(const char*);
void readTimeOffsetData(const char*);
void writeTimeOffsetData(const char*);
- void updateTime(time_t tp_time, eDVBChannel*);
+ void updateTime(time_t tp_time, eDVBChannel*
, int updateCount
);
static eDVBLocalTimeHandler *instance;
static eDVBLocalTimeHandler *instance;
+#ifdef SWIG
+ eDVBLocalTimeHandler();
+ ~eDVBLocalTimeHandler();
+#endif
public:
public:
- PSignal0<void> m_timeUpdated;
+#ifndef SWIG
eDVBLocalTimeHandler();
~eDVBLocalTimeHandler();
eDVBLocalTimeHandler();
~eDVBLocalTimeHandler();
+#endif
+ PSignal0<void> m_timeUpdated;
bool ready() const { return m_time_ready; }
bool ready() const { return m_time_ready; }
- int difference() const { return m_time_difference; }
static eDVBLocalTimeHandler *getInstance() { return instance; }
};
static eDVBLocalTimeHandler *getInstance() { return instance; }
};