Merge branch 'master' into experimental
authorghost <andreas.monzner@multimedia-labs.de>
Thu, 25 Nov 2010 15:15:47 +0000 (16:15 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Thu, 25 Nov 2010 15:15:47 +0000 (16:15 +0100)
21 files changed:
configure.ac
data/setup.xml
lib/dvb/pmt.cpp
lib/dvb/pmt.h
lib/dvb/pvrparse.cpp
lib/dvb/tstools.cpp
lib/dvb_ci/dvbci.cpp
lib/gui/epositiongauge.cpp
lib/python/Components/UsageConfig.py
lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml
lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml
lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml
lib/python/Plugins/Extensions/DVDPlayer/plugin.py
lib/python/Plugins/Extensions/DVDPlayer/src/Makefile.am
lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py
lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
lib/python/Screens/InfoBarGenerics.py
lib/service/iservice.h
lib/service/servicedvb.cpp
main/bsod.cpp

index 48fea64..605431b 100644 (file)
@@ -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"
index f5dea73..c5eb07f 100755 (executable)
                        <item level="2" text="Fast Forward speeds">config.seek.speeds_forward</item>
                        <item level="2" text="Rewind speeds">config.seek.speeds_backward</item>
                        <item level="2" text="Slow Motion speeds">config.seek.speeds_slowmotion</item>
-<!-- TRANSLATORS: Note that "Enter" in the two strings below should *not*
-     be interpreted as "Give speed as input". The intended meaning is
-     instead "Initial speed when starting winding", i.e. the speed at
-     which "winding mode" is entered when first pressing "rewind" or
-     "fast forward". -->  
-                       <item level="2" text="Enter Fast Forward at speed">config.seek.enter_forward</item>
-                       <item level="2" text="Enter Rewind at speed">config.seek.enter_backward</item>
-<!-- TRANSLATORS: The effect of "Non-smooth winding" is that rather
-     than using ordinary "continuous" or "smooth" winding, a fast
-     sequence of stills is shown when winding at high speeds. This
-     makes it much easier too follow when almost each frame comes from
-     a new scene. The effect is achieved by repeating each shown frame
-     a couple of times. The settings control both at which speed this
-     winding mode sets in, and how many times each frame should be
-     repeated. This was previously called "Discontinuous playback"
-     which was incomprehensible. "Non-smooth winding" may be a better
-     term, but note that there is nothing irregular about it. Synonyms
-     better suited for translation to other languages may be "stepwise
-     winding/playback", or "winding/playback using stills". -->
-                       <item level="2" text="Use non-smooth winding at speeds above">config.seek.stepwise_minspeed</item>
-                       <item level="2" text="Frame repeat count during non-smooth winding">config.seek.stepwise_repeat</item>
+<!-- TRANSLATORS: The following is the speed you get on the first press on fast-forward.
+     It was previously called "enter fast forward at speed" which was easily misunderstood. -->  
+                       <item level="2" text="Initial Fast Forward speed">config.seek.enter_forward</item>
+                       <item level="2" text="Initial Rewind speed">config.seek.enter_backward</item>
                        <item level="2" text="Behavior of 'pause' when paused">config.seek.on_pause</item>
                        <item level="2" text="Behavior of 0 key in PiP-mode">config.usage.pip_zero_button</item>
                        <item level="2" text="Alternative services tuner priority">config.usage.alternatives_priority</item>
index 46fa12e..0de78b4 100644 (file)
@@ -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<uint16_t>::iterator it(prog.caids.begin());
-                       while(cnt--)
-                               PyList_SET_ITEM(ret, cnt, PyInt_FromLong(*it++));
+                       std::set<program::capid_pair>::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<eTable<ProgramMapSection> > 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;
        }
index de0de05..d03267b 100644 (file)
@@ -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<videoStream> videoStreams;
                std::vector<audioStream> audioStreams;
                int defaultAudioStream;
                std::vector<subtitleStream> subtitleStreams;
-               std::set<uint16_t> caids;
+               std::set<capid_pair> 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<iDVBDemux> &demux);
        int getDecodeDemux(ePtr<iDVBDemux> &demux);
-       PyObject *getCaIds();
+       PyObject *getCaIds(bool pair=false); // caid / ecmpid pair
        
        int getPVRChannel(ePtr<iDVBPVRChannel> &pvr_channel);
        int getServiceReference(eServiceReferenceDVB &service) { service = m_reference; return 0; }
index 5cdecbd..e19dd1e 100644 (file)
@@ -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 */
index cfea3fd..ad55509 100644 (file)
@@ -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;
index 883fb5a..342f06a 100644 (file)
@@ -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<eDVBServicePMTHandler::program::capid_pair>::reverse_iterator x(p.caids.rbegin()); x != p.caids.rend(); ++x, ++cnt)
+                               caids.push_front(x->caid);
                        if (service && cnt)
                                service->m_ca = caids;
                }
index ff98c08..e45d4a6 100644 (file)
@@ -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<cueEntry>::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;
                                }
                        }
                        
index 8ea9aa6..a265a16 100644 (file)
@@ -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")),
index 7f755db..6dbcd49 100644 (file)
@@ -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
index 451e8a8..4645260 100644 (file)
@@ -3,11 +3,11 @@
        <settings
                name="Dreambox DVD record"
                authormode="menu_linked"
-               menutemplate="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml"
+               menutemplate="Thumbs_menu_clouds.ddvdm.xml"
                titlesetmode="multi"
-               vmgm="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/vmgmdream.mpg"
+               vmgm="vmgmdream.mpg"
                output="dvd"
-               isopath="/media/hdd/movie/"
+               isopath="/hdd/movie/"
                dataformat="iso9660_4"
        />
        <titles> </titles>
index 0de7f4b..bf6356a 100644 (file)
@@ -3,17 +3,17 @@
        <settings
                titleformat="$i. $t"
                subtitleformat="$D.$M.$Y, $T $C, $d"
-               menubg="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/dreamdvd_boat.jpg"
-               menuaudio="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/silence.mp2"
+               menubg="dreamdvd_boat.jpg"
+               menuaudio="silence.mp2"
                dimensions="(720, 576)"
                rows="5"
                cols="1"
                color_button="[8, 0, 0]"
                color_highlight="[0, 192, 192]"
                color_headline="[0, 0, 128]"
-               fontface_headline="/usr/share/fonts/nmsbd.ttf"
-               fontface_title="/usr/share/fonts/nmsbd.ttf"
-               fontface_subtitle="/usr/share/fonts/nmsbd.ttf"
+               fontface_headline="nmsbd.ttf"
+               fontface_title="nmsbd.ttf"
+               fontface_subtitle="nmsbd.ttf"
                fontsize_headline="46"
                fontsize_title="24"
                fontsize_subtitle="14"
index c00c3fe..074f203 100644 (file)
@@ -3,17 +3,17 @@
        <settings
                titleformat="$t"
                subtitleformat="$d"
-               menubg="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/dreamdvd_clouds.jpg"
-               menuaudio="/usr/lib/enigma2/python/Plugins/Extensions/DVDBurn/silence.mp2"
+               menubg="dreamdvd_clouds.jpg"
+               menuaudio="silence.mp2"
                dimensions="(720, 576)"
                rows="2"
                cols="2"
                color_button="[8, 0, 0]"
                color_highlight="[128, 0, 0]"
                color_headline="[128, 0, 0]"
-               fontface_headline="/usr/share/fonts/nmsbd.ttf"
-               fontface_title="/usr/share/fonts/nmsbd.ttf"
-               fontface_subtitle="/usr/share/fonts/nmsbd.ttf"
+               fontface_headline="nmsbd.ttf"
+               fontface_title="nmsbd.ttf"
+               fontface_subtitle="nmsbd.ttf"
                fontsize_headline="46"
                fontsize_title="18"
                fontsize_subtitle="12"
index 64b4ae5..67b8352 100755 (executable)
@@ -235,8 +235,6 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP
                self.saved_config_speeds_backward = config.seek.speeds_backward.value
                self.saved_config_enter_forward = config.seek.enter_forward.value
                self.saved_config_enter_backward = config.seek.enter_backward.value
-               self.saved_config_seek_stepwise_minspeed = config.seek.stepwise_minspeed.value
-               self.saved_config_seek_stepwise_repeat = config.seek.stepwise_repeat.value
                self.saved_config_seek_on_pause = config.seek.on_pause.value
                self.saved_config_seek_speeds_slowmotion = config.seek.speeds_slowmotion.value
 
@@ -246,8 +244,6 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP
                config.seek.speeds_slowmotion.value = [ ]
                config.seek.enter_forward.value = "2"
                config.seek.enter_backward.value = "2"
-               config.seek.stepwise_minspeed.value = "Never"
-               config.seek.stepwise_repeat.value = "3"
                config.seek.on_pause.value = "play"
 
        def restore_infobar_seek_config(self):
@@ -256,8 +252,6 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP
                config.seek.speeds_slowmotion.value = self.saved_config_seek_speeds_slowmotion
                config.seek.enter_forward.value = self.saved_config_enter_forward
                config.seek.enter_backward.value = self.saved_config_enter_backward
-               config.seek.stepwise_minspeed.value = self.saved_config_seek_stepwise_minspeed
-               config.seek.stepwise_repeat.value = self.saved_config_seek_stepwise_repeat
                config.seek.on_pause.value = self.saved_config_seek_on_pause
 
        def __init__(self, session, dvd_device = None, dvd_filelist = [ ], args = None):
@@ -269,7 +263,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP
                HelpableScreen.__init__(self)
                self.save_infobar_seek_config()
                self.change_infobar_seek_config()
-               InfoBarSeek.__init__(self, useSeekBackHack=False)
+               InfoBarSeek.__init__(self)
                InfoBarPVRState.__init__(self)
                self.dvdScreen = self.session.instantiateDialog(DVDOverlay)
 
index 7aaec9b..3e2ee67 100644 (file)
@@ -4,6 +4,8 @@ AM_CPPFLAGS = \
        -include Python.h \
        -include $(top_builddir)/enigma2_config.h
 
+AM_CXXFLAGS = @LIBDDVD_CFLAGS@
+
 plugindir = $(pkglibdir)/python/Plugins/Extensions/DVDPlayer
 
 plugin_LTLIBRARIES = servicedvd.la
@@ -13,3 +15,4 @@ servicedvd_la_SOURCES = \
        servicedvd.h
 
 servicedvd_la_LDFLAGS = -avoid-version -module
+servicedvd_la_LIBADD = @LIBDDVD_LIBS@
index 296d3bc..85ecc92 100644 (file)
@@ -16,7 +16,7 @@ from Components.MultiContent import MultiContentEntryText
 from Components.ScrollLabel import ScrollLabel
 from Components.Harddisk import harddiskmanager
 from Components.Task import Task, Job, job_manager, Condition
-from Tools.Directories import fileExists, isMount
+from Tools.Directories import fileExists, isMount, resolveFilename, SCOPE_HDD, SCOPE_MEDIA
 from Tools.HardwareInfo import HardwareInfo
 from Tools.Downloader import downloadWithProgress
 from enigma import eConsoleAppContainer, gFont, RT_HALIGN_LEFT, RT_HALIGN_CENTER, RT_VALIGN_CENTER, RT_WRAP, eTimer
@@ -391,7 +391,7 @@ class NFIDownload(Screen):
                
                self.box = HardwareInfo().get_device_name()
                self.feed_base = "http://www.dreamboxupdate.com/opendreambox" #/1.5/%s/images/" % self.box      
-               self.usbmountpoint = "/mnt/usb/"
+               self.usbmountpoint = resolveFilename(SCOPE_MEDIA)+"usb/"
 
                self.menulist = []
 
@@ -570,7 +570,7 @@ class NFIDownload(Screen):
 
        def ackedDestination(self):
                print "[ackedDestination]", self.branch, self.target_dir
-               self.container.setCWD("/mnt")
+               self.container.setCWD(resolveFilename(SCOPE_MEDIA)+"usb/")
                if self.target_dir[:8] == "/autofs/":
                        self.target_dir = "/dev/" + self.target_dir[8:-1]
 
@@ -792,13 +792,14 @@ If you already have a prepared bootable USB stick, please insert it now. Otherwi
                self.umountCallback()
 
 def main(session, **kwargs):
-       session.open(NFIDownload,"/home/root")
+       session.open(NFIDownload,resolveFilename(SCOPE_HDD))
 
 def filescan_open(list, session, **kwargs):
        dev = "/dev/" + (list[0].path).rsplit('/',1)[0][7:]
-       print "mounting device " + dev + " to /mnt/usb..."
-       system("mount "+dev+" /mnt/usb/ -o rw,sync")
-       session.open(NFIDownload,"/mnt/usb/")
+       print "mounting device " + dev + " to /media/usb..."
+       usbmountpoint = resolveFilename(SCOPE_MEDIA)+"usb/"
+       system("mount %s %s -o rw,sync" % (dev, usbmountpoint))
+       session.open(NFIDownload,usbmountpoint)
 
 def filescan(**kwargs):
        from Components.Scanner import Scanner, ScanPath
index e1f3e1d..a6a611d 100755 (executable)
@@ -1335,9 +1335,9 @@ class UpdatePlugin(Screen):
                self["slider"] = self.slider
                self.activityslider = Slider(0, 100)
                self["activityslider"] = self.activityslider
-               self.status = StaticText(_("Upgrading Dreambox... Please wait"))
+               self.status = StaticText(_("Please wait..."))
                self["status"] = self.status
-               self.package = StaticText()
+               self.package = StaticText(_("Verifying your internet connection..."))
                self["package"] = self.package
                self.oktext = _("Press OK on your remote control to continue.")
 
@@ -1348,20 +1348,35 @@ class UpdatePlugin(Screen):
                self.activity = 0
                self.activityTimer = eTimer()
                self.activityTimer.callback.append(self.doActivityTimer)
-               self.activityTimer.start(100, False)
 
                self.ipkg = IpkgComponent()
                self.ipkg.addCallback(self.ipkgCallback)
 
-               self.updating = True
-               self.package.setText(_("Package list update"))
-               self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
+               self.updating = False
 
                self["actions"] = ActionMap(["WizardActions"], 
                {
                        "ok": self.exit,
                        "back": self.exit
                }, -1)
+               
+               iNetwork.checkNetworkState(self.checkNetworkCB)
+               self.onClose.append(self.cleanup)
+               
+       def cleanup(self):
+               iNetwork.stopPingConsole()
+
+       def checkNetworkCB(self,data):
+               if data is not None:
+                       if data <= 2:
+                               self.updating = True
+                               self.activityTimer.start(100, False)
+                               self.package.setText(_("Package list update"))
+                               self.status.setText(_("Upgrading Dreambox... Please wait"))
+                               self.ipkg.startCmd(IpkgComponent.CMD_UPDATE)
+                       else:
+                               self.package.setText(_("Your network is not working. Please try again."))
+                               self.status.setText(self.oktext)
 
        def doActivityTimer(self):
                self.activity += 1
@@ -1440,6 +1455,9 @@ class UpdatePlugin(Screen):
                                self.session.openWithCallback(self.exitAnswer, MessageBox, _("Upgrade finished.") +" "+_("Do you want to reboot your Dreambox?"))
                        else:
                                self.close()
+               else:
+                       if not self.updating:
+                               self.close()
 
        def exitAnswer(self, result):
                if result is not None and result:
index 6fa8911..4f6eafc 100644 (file)
@@ -717,7 +717,7 @@ class InfoBarSeek:
        SEEK_STATE_PAUSE = (1, 0, 0, "||")
        SEEK_STATE_EOF = (1, 0, 0, "END")
 
-       def __init__(self, actionmap = "InfobarSeekActions", useSeekBackHack=True):
+       def __init__(self, actionmap = "InfobarSeekActions"):
                self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
                        {
                                iPlayableService.evSeekableStatusChanged: self.__seekableStatusChanged,
@@ -774,20 +774,10 @@ class InfoBarSeek:
                self.__seekableStatusChanged()
 
        def makeStateForward(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 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
index 2ba7cb4..7f58249 100644 (file)
@@ -289,6 +289,7 @@ public:
                sFileSize,
 
                sCAIDs,
+               sCAIDPIDs,
                sVideoType,             /* MPEG2 MPEG4 */
 
                sTags,                          /* space seperated list of tags */
index f1858c9..6a464af 100644 (file)
@@ -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:
index f76283e..5b01c7c 100644 (file)
@@ -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=");