From: ghost Date: Thu, 25 Nov 2010 22:31:54 +0000 (+0100) Subject: Merge branch 'bug_623_fix_advanced_diseqc_1.0' into experimental X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=4ebfa152f7e0e144bd25154263e62d55fa24d21b;hp=5b92b9a16fd70ffebb2822bdc3971d40e572901f Merge branch 'bug_623_fix_advanced_diseqc_1.0' into experimental --- diff --git a/configure.ac b/configure.ac index 48fea64..605431b 100644 --- a/configure.ac +++ b/configure.ac @@ -86,8 +86,8 @@ if test "$with_memcheck" = "yes"; then fi AC_ARG_WITH(po, - AS_HELP_STRING([--without-po],[disable updating of po files]), - [with_po="$withval"],[with_po="yes"]) + AS_HELP_STRING([--with-po],[enable updating of po files]), + [with_po="$withval"],[with_po="no"]) AM_CONDITIONAL(UPDATE_PO, test "$with_po" = "yes") CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" diff --git a/data/setup.xml b/data/setup.xml index f5dea73..c5eb07f 100755 --- a/data/setup.xml +++ b/data/setup.xml @@ -47,27 +47,10 @@ config.seek.speeds_forward config.seek.speeds_backward config.seek.speeds_slowmotion - - config.seek.enter_forward - config.seek.enter_backward - - config.seek.stepwise_minspeed - config.seek.stepwise_repeat + + config.seek.enter_forward + config.seek.enter_backward config.seek.on_pause config.usage.pip_zero_button config.usage.alternatives_priority diff --git a/lib/dvb/pmt.cpp b/lib/dvb/pmt.cpp index 46fa12e..0de78b4 100644 --- a/lib/dvb/pmt.cpp +++ b/lib/dvb/pmt.cpp @@ -149,7 +149,7 @@ void eDVBServicePMTHandler::PATready(int) serviceEvent(eventNoPAT); } -PyObject *eDVBServicePMTHandler::getCaIds() +PyObject *eDVBServicePMTHandler::getCaIds(bool pair) { ePyObject ret; @@ -161,16 +161,29 @@ PyObject *eDVBServicePMTHandler::getCaIds() if (cnt) { ret=PyList_New(cnt); - std::set::iterator it(prog.caids.begin()); - while(cnt--) - PyList_SET_ITEM(ret, cnt, PyInt_FromLong(*it++)); + std::set::iterator it(prog.caids.begin()); + if (pair) + { + while(cnt--) + { + ePyObject tuple = PyTuple_New(2); + PyTuple_SET_ITEM(tuple, 0, PyInt_FromLong(it->caid)); + PyTuple_SET_ITEM(tuple, 1, PyInt_FromLong((it++)->capid)); + PyList_SET_ITEM(ret, cnt, tuple); + } + } + else + { + while(cnt--) + PyList_SET_ITEM(ret, cnt, PyInt_FromLong((it++)->caid)); + } } } return ret ? (PyObject*)ret : (PyObject*)PyList_New(0); } -int eDVBServicePMTHandler::getProgramInfo(struct program &program) +int eDVBServicePMTHandler::getProgramInfo(program &program) { ePtr > ptr; int cached_apid_ac3 = -1; @@ -460,7 +473,10 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program) case CA_DESCRIPTOR: { CaDescriptor *descr = (CaDescriptor*)(*desc); - program.caids.insert(descr->getCaSystemId()); + program::capid_pair pair; + pair.caid = descr->getCaSystemId(); + pair.capid = descr->getCaPid(); + program.caids.insert(pair); break; } default: @@ -523,7 +539,10 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program) if ((*desc)->getTag() == CA_DESCRIPTOR) { CaDescriptor *descr = (CaDescriptor*)(*desc); - program.caids.insert(descr->getCaSystemId()); + program::capid_pair pair; + pair.caid = descr->getCaSystemId(); + pair.capid = descr->getCaPid(); + program.caids.insert(pair); } } } @@ -589,8 +608,12 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program) program.textPid = cached_tpid; } CAID_LIST &caids = m_service->m_ca; - for (CAID_LIST::iterator it(caids.begin()); it != caids.end(); ++it) - program.caids.insert(*it); + for (CAID_LIST::iterator it(caids.begin()); it != caids.end(); ++it) { + program::capid_pair pair; + pair.caid = *it; + pair.capid = -1; // not known yet + program.caids.insert(pair); + } if ( cnt ) ret = 0; } diff --git a/lib/dvb/pmt.h b/lib/dvb/pmt.h index de0de05..d03267b 100644 --- a/lib/dvb/pmt.h +++ b/lib/dvb/pmt.h @@ -181,11 +181,17 @@ public: struct program { + struct capid_pair + { + uint16_t caid; + int capid; + bool operator< (const struct capid_pair &t) { return t.caid < caid; } + }; std::vector videoStreams; std::vector audioStreams; int defaultAudioStream; std::vector subtitleStreams; - std::set caids; + std::set caids; int pcrPid; int pmtPid; int textPid; @@ -193,10 +199,10 @@ public: PyObject *createPythonObject(); }; - int getProgramInfo(struct program &program); + int getProgramInfo(program &program); int getDataDemux(ePtr &demux); int getDecodeDemux(ePtr &demux); - PyObject *getCaIds(); + PyObject *getCaIds(bool pair=false); // caid / ecmpid pair int getPVRChannel(ePtr &pvr_channel); int getServiceReference(eServiceReferenceDVB &service) { service = m_reference; return 0; } diff --git a/lib/dvb/pvrparse.cpp b/lib/dvb/pvrparse.cpp index 5cdecbd..e19dd1e 100644 --- a/lib/dvb/pvrparse.cpp +++ b/lib/dvb/pvrparse.cpp @@ -123,7 +123,7 @@ void eMPEGStreamInformation::fixupDiscontinuties() pts_t current = i->second - currentDelta; pts_t diff = current - lastpts_t; - if (llabs(diff) > (90000*5)) // 5sec diff + if (llabs(diff) > (90000*10)) // 10sec diff { // eDebug("%llx < %llx, have discont. new timestamp is %llx (diff is %llx)!", current, lastpts_t, i->second, diff); currentDelta = i->second - lastpts_t; /* FIXME: should be the extrapolated new timestamp, based on the current rate */ diff --git a/lib/dvb/tstools.cpp b/lib/dvb/tstools.cpp index cfea3fd..ad55509 100644 --- a/lib/dvb/tstools.cpp +++ b/lib/dvb/tstools.cpp @@ -700,9 +700,23 @@ int eDVBTSTools::findFrame(off_t &_offset, size_t &len, int &direction, int fram else if (direction == +1) direction = 0; } - /* let's find the next frame after the given offset */ off_t start = offset; + /* backtrack to find the previous sequence start, in case of MPEG2 */ + if ((data & 0xFF) == 0x00) { + do { + --start; + if (m_streaminfo.getStructureEntry(start, data, 0)) + { + eDebug("get previous failed"); + return -1; + } + } while (((data & 0xFF) != 9) && ((data & 0xFF) != 0x00) && ((data & 0xFF) != 0xB3)); /* sequence start or previous frame */ + if ((data & 0xFF) != 0xB3) + start = offset; /* Failed to find corresponding sequence start, so never mind */ + } + + /* let's find the next frame after the given offset */ do { if (m_streaminfo.getStructureEntry(offset, data, 1)) { @@ -718,8 +732,8 @@ int eDVBTSTools::findFrame(off_t &_offset, size_t &len, int &direction, int fram } while (((data & 0xFF) != 9) && ((data & 0xFF) != 0x00)); /* next frame */ /* align to TS pkt start */ -// start = start - (start % 188); -// offset = offset - (offset % 188); + start = start - (start % 188); + offset = offset - (offset % 188); len = offset - start; _offset = start; diff --git a/lib/dvb_ci/dvbci.cpp b/lib/dvb_ci/dvbci.cpp index 883fb5a..342f06a 100644 --- a/lib/dvb_ci/dvbci.cpp +++ b/lib/dvb_ci/dvbci.cpp @@ -297,8 +297,8 @@ void eDVBCIInterfaces::recheckPMTHandlers() if (!pmthandler->getProgramInfo(p)) { int cnt=0; - for (caidSet::reverse_iterator x(p.caids.rbegin()); x != p.caids.rend(); ++x, ++cnt) - caids.push_front(*x); + for (std::set::reverse_iterator x(p.caids.rbegin()); x != p.caids.rend(); ++x, ++cnt) + caids.push_front(x->caid); if (service && cnt) service->m_ca = caids; } diff --git a/lib/gui/epositiongauge.cpp b/lib/gui/epositiongauge.cpp index ff98c08..e45d4a6 100644 --- a/lib/gui/epositiongauge.cpp +++ b/lib/gui/epositiongauge.cpp @@ -112,6 +112,7 @@ int ePositionGauge::event(int event, void *data, void *data2) // painter.fill(eRect(0, 10, s.width(), s.height()-20)); pts_t in = 0, out = 0; + int xm, xm_last = -1; std::multiset::iterator i(m_cue_entries.begin()); @@ -126,17 +127,22 @@ int ePositionGauge::event(int event, void *data, void *data2) continue; } else if (i->what == 1) /* out */ out = i++->where; - else if (i->what == 2) /* mark */ + else /* mark or last */ { - int xm = scale(i->where); - painter.setForegroundColor(gRGB(0xFF8080)); - painter.fill(eRect(xm - 2, 0, 4, s.height())); + xm = scale(i->where); + if (i->what == 2) { + painter.setForegroundColor(gRGB(0xFF8080)); + if (xm - 2 < xm_last) /* Make sure last is not overdrawn */ + painter.fill(eRect(xm_last, 0, 2 + xm - xm_last, s.height())); + else + painter.fill(eRect(xm - 2, 0, 4, s.height())); + } else if (i->what == 3) { + painter.setForegroundColor(gRGB(0x80FF80)); + painter.fill(eRect(xm - 1, 0, 3, s.height())); + xm_last = xm + 2; + } i++; continue; - } else /* other marker, like last position */ - { - ++i; - continue; } } diff --git a/lib/python/Components/UsageConfig.py b/lib/python/Components/UsageConfig.py index 8ea9aa6..a265a16 100644 --- a/lib/python/Components/UsageConfig.py +++ b/lib/python/Components/UsageConfig.py @@ -102,13 +102,11 @@ def InitUsageConfig(): config.seek.selfdefined_79 = ConfigNumber(default=300) config.seek.speeds_forward = ConfigSet(default=[2, 4, 8, 16, 32, 64, 128], choices=[2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128]) - config.seek.speeds_backward = ConfigSet(default=[8, 16, 32, 64, 128], choices=[1, 2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128]) + config.seek.speeds_backward = ConfigSet(default=[2, 4, 8, 16, 32, 64, 128], choices=[1, 2, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128]) config.seek.speeds_slowmotion = ConfigSet(default=[2, 4, 8], choices=[2, 4, 6, 8, 12, 16, 25]) config.seek.enter_forward = ConfigSelection(default = "2", choices = ["2", "4", "6", "8", "12", "16", "24", "32", "48", "64", "96", "128"]) config.seek.enter_backward = ConfigSelection(default = "1", choices = ["1", "2", "4", "6", "8", "12", "16", "24", "32", "48", "64", "96", "128"]) - config.seek.stepwise_minspeed = ConfigSelection(default = "16", choices = ["Never", "2", "4", "6", "8", "12", "16", "24", "32", "48", "64", "96", "128"]) - config.seek.stepwise_repeat = ConfigSelection(default = "3", choices = ["2", "3", "4", "5", "6"]) config.seek.on_pause = ConfigSelection(default = "play", choices = [ ("play", _("Play")), diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py index 7f755db..6dbcd49 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py +++ b/lib/python/Plugins/Extensions/DVDBurn/DVDProject.py @@ -2,6 +2,7 @@ from Tools.Directories import fileExists from Components.config import config, ConfigSubsection, ConfigInteger, ConfigText, ConfigSelection, getConfigListEntry, ConfigSequence, ConfigSubList import DVDTitle import xml.dom.minidom +from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_FONTS class ConfigColor(ConfigSequence): def __init__(self, default = [128,128,128]): @@ -125,6 +126,14 @@ class DVDProject: for key in self.filekeys: val = self.settings.dict()[key].getValue() if not fileExists(val): + if val[0] != "/": + if key.find("font") == 0: + val = resolveFilename(SCOPE_FONTS)+val + else: + val = resolveFilename(SCOPE_PLUGINS)+"Extensions/DVDBurn/"+val + if fileExists(val): + self.settings.dict()[key].setValue(val) + continue self.error += "\n%s '%s' not found" % (key, val) #except AttributeError: #print "loadProject AttributeError", self.error diff --git a/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml b/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml index 451e8a8..4645260 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml +++ b/lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml @@ -3,11 +3,11 @@ diff --git a/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml b/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml index 0de7f4b..bf6356a 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml +++ b/lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml @@ -3,17 +3,17 @@ = int(minspeed) and repeat > 1: -# return (0, n * repeat, repeat, ">> %dx" % n) -# else: - return (0, n, 0, ">> %dx" % n) + return (0, n, 0, ">> %dx" % n) def makeStateBackward(self, n): -# minspeed = config.seek.stepwise_minspeed.value -# repeat = int(config.seek.stepwise_repeat.value) -# if minspeed != "Never" and n >= int(minspeed) and repeat > 1: -# return (0, -n * repeat, repeat, "<< %dx" % n) -# else: - return (0, -n, 0, "<< %dx" % n) + return (0, -n, 0, "<< %dx" % n) def makeStateSlowMotion(self, n): return (0, 0, n, "/%d" % n) @@ -1970,20 +1960,21 @@ class InfoBarCueSheetSupport: return True def jumpPreviousMark(self): - # we add 2 seconds, so if the play position is <2s after + # we add 5 seconds, so if the play position is <5s after # the mark, the mark before will be used self.jumpPreviousNextMark(lambda x: -x-5*90000, start=True) def jumpNextMark(self): - if not self.jumpPreviousNextMark(lambda x: x): + if not self.jumpPreviousNextMark(lambda x: x-90000): self.doSeek(-1) def getNearestCutPoint(self, pts, cmp=abs, start=False): # can be optimized - beforecut = False + beforecut = True nearest = None + bestdiff = -1 + instate = True if start: - beforecut = True bestdiff = cmp(0 - pts) if bestdiff >= 0: nearest = [0, False] @@ -1992,14 +1983,19 @@ class InfoBarCueSheetSupport: beforecut = False if cp[1] == self.CUT_TYPE_IN: # Start is here, disregard previous marks diff = cmp(cp[0] - pts) - if diff >= 0: + if start and diff >= 0: nearest = cp bestdiff = diff else: nearest = None - if cp[1] in (self.CUT_TYPE_MARK, self.CUT_TYPE_LAST): + bestdiff = -1 + if cp[1] == self.CUT_TYPE_IN: + instate = True + elif cp[1] == self.CUT_TYPE_OUT: + instate = False + elif cp[1] in (self.CUT_TYPE_MARK, self.CUT_TYPE_LAST): diff = cmp(cp[0] - pts) - if diff >= 0 and (nearest is None or bestdiff > diff): + if instate and diff >= 0 and (nearest is None or bestdiff > diff): nearest = cp bestdiff = diff return nearest diff --git a/lib/service/iservice.h b/lib/service/iservice.h index 2ba7cb4..7f58249 100644 --- a/lib/service/iservice.h +++ b/lib/service/iservice.h @@ -289,6 +289,7 @@ public: sFileSize, sCAIDs, + sCAIDPIDs, sVideoType, /* MPEG2 MPEG4 */ sTags, /* space seperated list of tags */ diff --git a/lib/service/servicedvb.cpp b/lib/service/servicedvb.cpp index f1858c9..6a464af 100644 --- a/lib/service/servicedvb.cpp +++ b/lib/service/servicedvb.cpp @@ -1591,7 +1591,7 @@ int eDVBServicePlay::getInfo(int w) { eDVBServicePMTHandler::program program; - if (w == sCAIDs) + if (w == sCAIDs || w == sCAIDPIDs) return resIsPyObject; eDVBServicePMTHandler &h = m_timeshift_active ? m_service_handler_timeshift : m_service_handler; @@ -1732,6 +1732,8 @@ PyObject *eDVBServicePlay::getInfoObject(int w) { case sCAIDs: return m_service_handler.getCaIds(); + case sCAIDPIDs: + return m_service_handler.getCaIds(true); case sTransponderData: return eStaticServiceDVBInformation().getInfoObject(m_reference, w); default: diff --git a/main/bsod.cpp b/main/bsod.cpp index f76283e..5b01c7c 100644 --- a/main/bsod.cpp +++ b/main/bsod.cpp @@ -183,6 +183,7 @@ void bsodFatal(const char *component) xml.open("image"); xml.stringFromFile("dreamboxmodel", "/proc/stb/info/model"); xml.stringFromFile("kernelcmdline", "/proc/cmdline"); + xml.stringFromFile("nimsockets", "/proc/bus/nim_sockets"); if (!getConfigBool("config.plugins.crashlogautosubmit.sendAnonCrashlog", true)) { xml.cDataFromFile("dreamboxca", "/proc/stb/info/ca"); xml.cDataFromFile("enigma2settings", eEnv::resolve("${sysconfdir}/enigma2/settings"), ".password=");