X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/4e9c6a797807c23c1a5d44d7923524e487a9b027..acab01604673e3fb0d13e47f9ffb5c32e8d9dd07:/lib/dvb/dvbtime.cpp diff --git a/lib/dvb/dvbtime.cpp b/lib/dvb/dvbtime.cpp index 2378fcd1..dc98a6d3 100644 --- a/lib/dvb/dvbtime.cpp +++ b/lib/dvb/dvbtime.cpp @@ -68,7 +68,7 @@ TDT::TDT(eDVBChannel *chan) CONNECT(tableReady, TDT::ready); CONNECT(m_interval_timer.timeout, TDT::start); if (chan) - chan->getDemux(demux); + chan->getDemux(demux, 0); } void TDT::ready(int error) @@ -81,7 +81,7 @@ int TDT::createTable(int nr, const __u8 *data, unsigned int max) if ( data && data[0] == 0x70 || data[0] == 0x73 ) { int length = ((data[1] & 0x0F) << 8) | data[2]; - if ( length >= 8 ) + if ( length >= 5 ) { time_t tptime = parseDVBtime(data[3], data[4], data[5], data[6], data[7]); eDVBLocalTimeHandler::getInstance()->updateTime(tptime, chan); @@ -97,10 +97,10 @@ void TDT::start() if ( chan ) { eDVBTableSpec spec; - spec.pid = TimeAndDateTable::PID; - spec.tid = TimeAndDateTable::TID; + spec.pid = TimeAndDateSection::PID; + spec.tid = TimeAndDateSection::TID; spec.tid_mask = 0xFC; - spec.timeout = TimeAndDateTable::TIMEOUT; + spec.timeout = TimeAndDateSection::TIMEOUT; spec.flags= eDVBTableSpec::tfAnyVersion | eDVBTableSpec::tfHaveTID | eDVBTableSpec::tfHaveTIDMask | @@ -212,7 +212,7 @@ void eDVBLocalTimeHandler::updateTime( time_t tp_time, eDVBChannel *chan ) settimeofday(&tnow,0); for (ePtrList::iterator it(eMainloop::existing_loops) ;it != eMainloop::existing_loops.end(); ++it) - it->setTimerOffset(m_time_difference); + it->addTimeOffset(m_time_difference); m_time_difference=0; } else if ( !m_time_difference ) @@ -333,7 +333,7 @@ void eDVBLocalTimeHandler::updateTime( time_t tp_time, eDVBChannel *chan ) settimeofday(&tnow,0); for (ePtrList::iterator it(eMainloop::existing_loops) ;it != eMainloop::existing_loops.end(); ++it) - it->setTimerOffset(m_time_difference); + it->addTimeOffset(m_time_difference); m_time_difference=0; } @@ -348,7 +348,7 @@ void eDVBLocalTimeHandler::updateTime( time_t tp_time, eDVBChannel *chan ) { delete it->second.tdt; it->second.tdt = new TDT(chan); - it->second.tdt->startTimer(60*1000); // restart TDT for this transponder in 60min + it->second.tdt->startTimer(60*60*1000); // restart TDT for this transponder in 60min } } } @@ -357,7 +357,7 @@ void eDVBLocalTimeHandler::DVBChannelAdded(eDVBChannel *chan) { if ( chan ) { - eDebug("[eDVBLocalTimerHandler] add channel %p", chan); +// eDebug("[eDVBLocalTimerHandler] add channel %p", chan); std::pair::iterator, bool> tmp = m_knownChannels.insert( std::pair(chan, channel_data()) ); tmp.first->second.tdt = new TDT(chan); @@ -376,12 +376,6 @@ void eDVBLocalTimeHandler::DVBChannelStateChanged(iDVBChannel *chan) chan->getState(state); switch (state) { - case iDVBChannel::state_idle: - break; - case iDVBChannel::state_tuning: - break; - case iDVBChannel::state_unavailable: - break; case iDVBChannel::state_ok: eDebug("[eDVBLocalTimerHandler] channel %p running", chan); it->second.tdt->start();