From bcd44b8a861159b638eadfd06954d1fcd7119d90 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 21 Dec 2009 16:04:41 +0100 Subject: lib/dvb/tstools.cpp: add more debug output to timestamp parser --- lib/dvb/tstools.cpp | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) (limited to 'lib') diff --git a/lib/dvb/tstools.cpp b/lib/dvb/tstools.cpp index a9eef406..00a1da72 100644 --- a/lib/dvb/tstools.cpp +++ b/lib/dvb/tstools.cpp @@ -134,7 +134,7 @@ int eDVBTSTools::getPTS(off_t &offset, pts_t &pts, int fixed) pts |= ((unsigned long long)(packet[ 9]&0xFF)) << 1; pts |= ((unsigned long long)(packet[10]&0x80)) >> 7; offset -= 188; - eDebug("PCR found at %llx: %16llx", offset, pts); + eDebug("PCR %16llx found at %lld pid %02x (%02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x)", pts, offset, pid, packet[0], packet[1], packet[2], packet[3], packet[4], packet[5], packet[6], packet[7], packet[8], packet[9], packet[10]); if (fixed && fixupPTS(offset, pts)) return -1; return 0; @@ -171,11 +171,11 @@ int eDVBTSTools::getPTS(off_t &offset, pts_t &pts, int fixed) pts |= ((unsigned long long)(payload[13]&0xFE)) >> 1; offset -= 188; -// eDebug("found pts %08llx at %08llx pid %02x stream: %02x", pts, offset, pid, payload[3]); - + eDebug("PTS %16llx found at %lld pid %02x stream: %02x", pts, offset, pid, payload[3]); + /* convert to zero-based */ if (fixed && fixupPTS(offset, pts)) - return -1; + return -1; return 0; } } @@ -212,10 +212,13 @@ int eDVBTSTools::fixupPTS(const off_t &offset, pts_t &now) now -= pos; return 0; } + eDebug("eDVBTSTools::fixupPTS failed!"); + return -1; } int eDVBTSTools::getOffset(off_t &offset, pts_t &pts, int marg) { + eDebug("getOffset for pts 0x%llx", pts); if (m_use_streaminfo) { if (pts >= m_pts_end && marg > 0 && m_end_valid) @@ -440,6 +443,8 @@ void eDVBTSTools::takeSamples() m_samples_taken = 1; m_samples.clear(); pts_t dummy; + int retries=2; + if (calcLen(dummy) == -1) return; @@ -449,21 +454,27 @@ void eDVBTSTools::takeSamples() bytes_per_sample = 40*1024*1024; bytes_per_sample -= bytes_per_sample % 188; - - for (off_t offset = m_offset_begin; offset < m_offset_end; offset += bytes_per_sample) + + eDebug("samples step %lld, pts begin %llx, pts end %llx, offs begin %lld, offs end %lld:", + bytes_per_sample, m_pts_begin, m_pts_end, m_offset_begin, m_offset_end); + + for (off_t offset = m_offset_begin; offset < m_offset_end;) { pts_t p; - takeSample(offset, p); + if (takeSample(offset, p) && retries--) + continue; + retries = 2; + offset += bytes_per_sample; } m_samples[0] = m_offset_begin; m_samples[m_pts_end - m_pts_begin] = m_offset_end; - -// eDebug("begin, end: %llx %llx", m_offset_begin, m_offset_end); } /* returns 0 when a sample was taken. */ int eDVBTSTools::takeSample(off_t off, pts_t &p) { + off_t offset_org = off; + if (!eDVBTSTools::getPTS(off, p, 1)) { /* as we are happily mixing PTS and PCR values (no comment, please), we might @@ -481,18 +492,18 @@ int eDVBTSTools::takeSample(off_t off, pts_t &p) { if ((l->second > off) || (u->second < off)) { - eDebug("ignoring sample %llx %llx %llx (%lld %lld %lld)", + eDebug("ignoring sample %lld %lld %lld (%llx %llx %llx)", l->second, off, u->second, l->first, p, u->first); return 1; } } } - + eDebug("adding sample %lld: pts 0x%llx -> pos %lld (diff %lld bytes)", offset_org, p, off, off-offset_org); m_samples[p] = off; return 0; } - return 1; + return -1; } int eDVBTSTools::findPMT(int &pmt_pid, int &service_id) -- cgit v1.2.3 From f13490a1a66421b08cef893cb89e8f78c5873d05 Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 22 Dec 2009 14:18:00 +0100 Subject: NimManager.py: increased delay after enable voltage before send motor diseqc command... this fixes bug #261 --- lib/python/Components/NimManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 05204a74..7d148f3c 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -899,7 +899,7 @@ def InitSecParams(): x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_VOLTAGE_CHANGE_BEFORE_MEASURE_IDLE_INPUTPOWER, configElement.value)) config.sec.delay_after_voltage_change_before_measure_idle_inputpower = x - x = ConfigInteger(default=750, limits = (0, 9999)) + x = ConfigInteger(default=900, limits = (0, 9999)) x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_ENABLE_VOLTAGE_BEFORE_MOTOR_CMD, configElement.value)) config.sec.delay_after_enable_voltage_before_motor_command = x -- cgit v1.2.3 From e8eb8e9694379204f4b9143ca6b33db48809df7f Mon Sep 17 00:00:00 2001 From: ghost Date: Tue, 22 Dec 2009 15:33:20 +0100 Subject: lib/driver/rc*: open remote control input devices in exclussive mode... so the keycodes are not supplied to the linux console --- lib/driver/rc.cpp | 10 ++++++++++ lib/driver/rc.h | 1 + lib/driver/rcinput.cpp | 1 + 3 files changed, 12 insertions(+) (limited to 'lib') diff --git a/lib/driver/rc.cpp b/lib/driver/rc.cpp index c7acd113..8dab0201 100644 --- a/lib/driver/rc.cpp +++ b/lib/driver/rc.cpp @@ -127,6 +127,16 @@ std::string eRCInputEventDriver::getDeviceName() return name; } +void eRCInputEventDriver::setExclusive(bool b) +{ + if (handle >= 0) + { + int grab = b; + if (::ioctl(handle, EVIOCGRAB, &grab) < 0) + perror("EVIOCGRAB"); + } +} + eRCInputEventDriver::~eRCInputEventDriver() { if (handle>=0) diff --git a/lib/driver/rc.h b/lib/driver/rc.h index 9708ea7b..ef0588c4 100644 --- a/lib/driver/rc.h +++ b/lib/driver/rc.h @@ -112,6 +112,7 @@ public: std::string getDeviceName(); eRCInputEventDriver(const char *filename); ~eRCInputEventDriver(); + void setExclusive(bool b); // in exclusive mode data is not carried to console device }; class eRCKey diff --git a/lib/driver/rcinput.cpp b/lib/driver/rcinput.cpp index d10d94f3..0aada8df 100644 --- a/lib/driver/rcinput.cpp +++ b/lib/driver/rcinput.cpp @@ -83,6 +83,7 @@ eRCDeviceInputDev::eRCDeviceInputDev(eRCInputEventDriver *driver) break; } } + driver->setExclusive(!iskeyboard); eDebug("Input device \"%s\" is %sa keyboard.", id.c_str(), iskeyboard ? "" : "not "); } -- cgit v1.2.3