whitespace fixes
authorradxnl <radxnl@users.sourceforge.net>
Sat, 7 Jun 2014 14:31:17 +0000 (16:31 +0200)
committerradxnl <radxnl@users.sourceforge.net>
Sat, 7 Jun 2014 14:35:46 +0000 (16:35 +0200)
361 files changed:
RecordTimer.py
data/keymap.xml
data/menu.xml
data/skin.xml
data/skin_default.xml
data/skin_display96.xml
data/skin_display_default.xml
data/skin_display_vuduo2.xml
data/skin_text.xml
data/startwizard.xml
data/unicable.xml
e2reactor.py
keyids.py
lib/actions/action.cpp
lib/actions/action.h
lib/actions/parseactions.py
lib/base/benchmark.h
lib/base/buffer.cpp
lib/base/console.cpp
lib/base/ebase.cpp
lib/base/eerror.h
lib/base/elock.h
lib/base/eptrlist.h
lib/base/estring.cpp
lib/base/filepush.cpp
lib/base/filepush.h
lib/base/freesatv2.cpp
lib/base/freesatv2.h
lib/base/httpstream.cpp
lib/base/init.cpp
lib/base/itssource.h
lib/base/message.cpp
lib/base/nconfig.cpp
lib/base/rawfile.cpp
lib/base/thread.cpp
lib/base/thread.h
lib/base/wrappers.cpp
lib/components/scan.cpp
lib/components/scan.h
lib/driver/avswitch.cpp
lib/driver/input_fake.h
lib/driver/rc.cpp
lib/driver/rc.h
lib/driver/rcconsole.cpp
lib/driver/rcinput.cpp
lib/driver/rfmod.cpp
lib/driver/rfmod.h
lib/dvb/cahandler.cpp
lib/dvb/crc32.h
lib/dvb/db.cpp
lib/dvb/decoder.cpp
lib/dvb/decoder.h
lib/dvb/demux.cpp
lib/dvb/demux.h
lib/dvb/dvb.h
lib/dvb/eit.h
lib/dvb/epgcache.cpp
lib/dvb/epgcache.h
lib/dvb/fastscan.cpp
lib/dvb/frontend.cpp
lib/dvb/frontendparms.h
lib/dvb/idemux.h
lib/dvb/idvb.h
lib/dvb/lowlevel/eit.h
lib/dvb/metaparser.cpp
lib/dvb/pesparse.cpp
lib/dvb/pmt.cpp
lib/dvb/pmt.h
lib/dvb/pmtparse.h
lib/dvb/pvrparse.cpp
lib/dvb/pvrparse.h
lib/dvb/radiotext.cpp
lib/dvb/scan.cpp
lib/dvb/scan.h
lib/dvb/sec.cpp
lib/dvb/sec.h
lib/dvb/specs.h
lib/dvb/subtitle.cpp
lib/dvb/teletext.cpp
lib/dvb/teletext.h
lib/dvb/tstools.cpp
lib/dvb/tstools.h
lib/dvb/volume.cpp
lib/dvb/volume.h
lib/dvb_ci/dvbci.cpp
lib/dvb_ci/dvbci.h
lib/dvb_ci/dvbci_appmgr.h
lib/dvb_ci/dvbci_mmi.cpp
lib/dvb_ci/dvbci_mmi.h
lib/dvb_ci/dvbci_resmgr.cpp
lib/dvb_ci/dvbci_session.cpp
lib/dvb_ci/dvbci_session.h
lib/gdi/accel.cpp
lib/gdi/accel.h
lib/gdi/bcm.cpp
lib/gdi/compositing.h
lib/gdi/epng.cpp
lib/gdi/erect.cpp
lib/gdi/erect.h
lib/gdi/fb.cpp
lib/gdi/fb.h
lib/gdi/font.cpp
lib/gdi/font.h
lib/gdi/font_arabic.cpp
lib/gdi/gfont.h
lib/gdi/glcddc.cpp
lib/gdi/gpixmap.cpp
lib/gdi/gpixmap.h
lib/gdi/grc.cpp
lib/gdi/grc.h
lib/gdi/picload.cpp
lib/gdi/picload.h
lib/gdi/region.cpp
lib/gdi/region.h
lib/gui/ebutton.cpp
lib/gui/einput.cpp
lib/gui/einput.h
lib/gui/einputnumber.cpp
lib/gui/einputnumber.h
lib/gui/einputstring.cpp
lib/gui/einputstring.h
lib/gui/elabel.cpp
lib/gui/elabel.h
lib/gui/elistbox.cpp
lib/gui/elistbox.h
lib/gui/elistboxcontent.cpp
lib/gui/elistboxcontent.h
lib/gui/epixmap.cpp
lib/gui/epositiongauge.cpp
lib/gui/epositiongauge.h
lib/gui/eslider.cpp
lib/gui/eslider.h
lib/gui/esubtitle.cpp
lib/gui/esubtitle.h
lib/gui/ewidget.cpp
lib/gui/ewidget.h
lib/gui/ewidgetanimation.cpp
lib/gui/ewidgetanimation.h
lib/gui/ewidgetdesktop.cpp
lib/gui/ewidgetdesktop.h
lib/gui/ewindow.cpp
lib/gui/ewindow.h
lib/gui/ewindowstyle.cpp
lib/gui/ewindowstyle.h
lib/gui/ewindowstyleskinned.cpp
lib/gui/ewindowstyleskinned.h
lib/nav/core.cpp
lib/nav/core.h
lib/nav/pcore.cpp
lib/network/serversocket.cpp
lib/network/socket.cpp
lib/network/socket.h
lib/network/xmlrpc.cpp
lib/network/xmlrpc.h
lib/python/Components/AVSwitch.py
lib/python/Components/ActionMap.py
lib/python/Components/BlinkingPixmap.py
lib/python/Components/Button.py
lib/python/Components/ChoiceList.py
lib/python/Components/Clock.py
lib/python/Components/ConditionalWidget.py
lib/python/Components/ConfigList.py
lib/python/Components/Converter/ClockToText.py
lib/python/Components/Converter/CryptoInfo.py
lib/python/Components/Converter/EventName.py
lib/python/Components/Converter/EventTime.py
lib/python/Components/Converter/PliExtraInfo.py
lib/python/Components/Converter/Poll.py
lib/python/Components/Converter/RemainingToText.py
lib/python/Components/Converter/ServiceInfo.py
lib/python/Components/Converter/ServiceOrbitalPosition.py
lib/python/Components/Converter/ServiceTime.py
lib/python/Components/Converter/StaticMultiList.py
lib/python/Components/Converter/StringList.py
lib/python/Components/Converter/ValueToPixmap.py
lib/python/Components/DiskInfo.py
lib/python/Components/Element.py
lib/python/Components/EpgList.py
lib/python/Components/FanControl.py
lib/python/Components/FileList.py
lib/python/Components/GUIComponent.py
lib/python/Components/HTMLComponent.py
lib/python/Components/HelpMenuList.py
lib/python/Components/Input.py
lib/python/Components/Label.py
lib/python/Components/MediaPlayer.py
lib/python/Components/MovieList.py
lib/python/Components/Network.py
lib/python/Components/PackageInfo.py
lib/python/Components/ParentalControl.py
lib/python/Components/PerServiceDisplay.py
lib/python/Components/Pixmap.py
lib/python/Components/Playlist.py
lib/python/Components/PluginComponent.py
lib/python/Components/PluginList.py
lib/python/Components/Renderer/FrontpanelLed.py
lib/python/Components/Renderer/Listbox.py
lib/python/Components/Renderer/NextEpgInfo.py
lib/python/Components/Renderer/PositionGauge.py
lib/python/Components/ResourceManager.py
lib/python/Components/Scanner.py
lib/python/Components/Sensors.py
lib/python/Components/ServiceList.py
lib/python/Components/ServicePosition.py
lib/python/Components/SetupDevices.py
lib/python/Components/Slider.py
lib/python/Components/Sources/Config.py
lib/python/Components/Sources/CurrentService.py
lib/python/Components/Sources/EventInfo.py
lib/python/Components/Sources/List.py
lib/python/Components/Sources/Progress.py
lib/python/Components/Sources/Sensor.py
lib/python/Components/Sources/ServiceEvent.py
lib/python/Components/Sources/ServiceList.py
lib/python/Components/Sources/Source.py
lib/python/Components/Task.py
lib/python/Components/TimerList.py
lib/python/Components/TimerSanityCheck.py
lib/python/Components/Timezones.py
lib/python/Components/TuneTest.py
lib/python/Components/UsageConfig.py
lib/python/Components/VariableText.py
lib/python/Components/VariableValue.py
lib/python/Components/config.py
lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
lib/python/Plugins/Extensions/DVDBurn/DVDTitle.py
lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py
lib/python/Plugins/Extensions/DVDBurn/Process.py
lib/python/Plugins/Extensions/DVDBurn/ProjectSettings.py
lib/python/Plugins/Extensions/DVDBurn/TitleList.py
lib/python/Plugins/Extensions/DVDBurn/TitleProperties.py
lib/python/Plugins/Extensions/DVDBurn/plugin.py
lib/python/Plugins/Extensions/DVDPlayer/__init__.py
lib/python/Plugins/Extensions/DVDPlayer/plugin.py
lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpg.py
lib/python/Plugins/Extensions/GraphMultiEPG/GraphMultiEpgSetup.py
lib/python/Plugins/Extensions/GraphMultiEPG/Makefile.am
lib/python/Plugins/Extensions/MediaPlayer/__init__.py
lib/python/Plugins/Extensions/MediaPlayer/plugin.py
lib/python/Plugins/Extensions/MediaScanner/plugin.py
lib/python/Plugins/Extensions/PicturePlayer/Makefile.am
lib/python/Plugins/Extensions/PicturePlayer/plugin.py
lib/python/Plugins/Extensions/SocketMMI/__init__.py
lib/python/Plugins/Extensions/TuxboxPlugins/Makefile.am
lib/python/Plugins/Extensions/TuxboxPlugins/plugin.py
lib/python/Plugins/Extensions/TuxboxPlugins/pluginrunner.py
lib/python/Plugins/Makefile.am
lib/python/Plugins/Plugin.py
lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/Makefile.am
lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py
lib/python/Plugins/SystemPlugins/DefaultServicesScanner/Makefile.am
lib/python/Plugins/SystemPlugins/DefaultServicesScanner/plugin.py
lib/python/Plugins/SystemPlugins/DiseqcTester/plugin.py
lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/Makefile.am
lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py
lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py
lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py
lib/python/Plugins/SystemPlugins/NetworkWizard/networkwizard.xml
lib/python/Plugins/SystemPlugins/NetworkWizard/plugin.py
lib/python/Plugins/SystemPlugins/PositionerSetup/Makefile.am
lib/python/Plugins/SystemPlugins/PositionerSetup/log.py
lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py
lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py
lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py
lib/python/Plugins/SystemPlugins/SoftwareManager/ImageWizard.py
lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py
lib/python/Plugins/SystemPlugins/VideoTune/VideoFinetune.py
lib/python/Plugins/SystemPlugins/VideoTune/plugin.py
lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
lib/python/Plugins/SystemPlugins/Videomode/plugin.py
lib/python/Plugins/SystemPlugins/Videomode/videowizard.xml
lib/python/Plugins/SystemPlugins/WirelessLan/Wlan.py
lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py
lib/python/Plugins/newplugin.py
lib/python/Screens/AudioSelection.py
lib/python/Screens/ChannelSelection.py
lib/python/Screens/ChoiceBox.py
lib/python/Screens/ClockDisplay.py
lib/python/Screens/ConfigMenu.py
lib/python/Screens/Console.py
lib/python/Screens/DVD.py
lib/python/Screens/EpgSelection.py
lib/python/Screens/EventView.py
lib/python/Screens/FixedMenu.py
lib/python/Screens/HarddiskSetup.py
lib/python/Screens/HelpMenu.py
lib/python/Screens/InfoBar.py
lib/python/Screens/InfoBarGenerics.py
lib/python/Screens/InputBox.py
lib/python/Screens/InstallWizard.py
lib/python/Screens/LocationBox.py
lib/python/Screens/Menu.py
lib/python/Screens/MessageBox.py
lib/python/Screens/MinuteInput.py
lib/python/Screens/NetworkSetup.py
lib/python/Screens/ParentalControlSetup.py
lib/python/Screens/PluginBrowser.py
lib/python/Screens/Rc.py
lib/python/Screens/RdsDisplay.py
lib/python/Screens/RecordPaths.py
lib/python/Screens/Scart.py
lib/python/Screens/Screen.py
lib/python/Screens/ScreenSaver.py
lib/python/Screens/SessionGlobals.py
lib/python/Screens/Setup.py
lib/python/Screens/SleepTimerEdit.py
lib/python/Screens/SoftwareUpdate.py
lib/python/Screens/SubservicesQuickzap.py
lib/python/Screens/TaskView.py
lib/python/Screens/TextBox.py
lib/python/Screens/TimerEdit.py
lib/python/Screens/TimerEntry.py
lib/python/Screens/TimerSelection.py
lib/python/Screens/VirtualKeyBoard.py
lib/python/Screens/Volume.py
lib/python/Screens/Wizard.py
lib/python/Screens/WizardLanguage.py
lib/python/Tools/Alternatives.py
lib/python/Tools/Directories.py
lib/python/Tools/Event.py
lib/python/Tools/FuzzyDate.py
lib/python/Tools/LXMLTools.py
lib/python/Tools/Trashcan.py
lib/python/Tools/XMLTools.py
lib/python/python.cpp
lib/service/listboxservice.cpp
lib/service/listboxservice.h
lib/service/service.cpp
lib/service/service.h
lib/service/servicedvb.cpp
lib/service/servicedvb.h
lib/service/servicedvbrecord.cpp
lib/service/servicedvbrecord.h
lib/service/servicedvbstream.cpp
lib/service/servicedvd.cpp
lib/service/servicedvd.h
lib/service/servicefs.cpp
lib/service/servicefs.h
lib/service/servicem2ts.cpp
lib/service/servicemp3.cpp
lib/service/servicemp3.h
lib/service/servicexine.cpp
lib/service/servicexine.h
main/bsod.cpp
main/enigma-dvbtest.cpp
main/enigma-gdi.cpp
main/enigma-gui.cpp
main/enigma-playlist.cpp
main/enigma-scan.cpp
main/enigma.cpp
skin.py
tests/enigma.py
tests/events.py
tests/test_timer.py
tools/genmetaindex.py
tools/host_tools/FormatConverter/datasource.py
tools/host_tools/FormatConverter/input.py
tools/host_tools/FormatConverter/lamedb.py
tools/host_tools/FormatConverter/main.py
tools/host_tools/FormatConverter/satxml.py
tools/svg2skin.py

index dc8c0a6..4b89947 100644 (file)
@@ -138,12 +138,12 @@ class RecordTimerEntry(timer.TimerEntry, object):
                if checkOldTimers == True:
                        if self.begin < time() - 1209600:
                                self.begin = int(time())
-               
+
                if self.end < self.begin:
                        self.end = self.begin
-               
+
                assert isinstance(serviceref, ServiceReference)
-               
+
                if serviceref and serviceref.isRecordable():
                        self.service_ref = serviceref
                else:
@@ -459,11 +459,11 @@ class RecordTimerEntry(timer.TimerEntry, object):
        def getNextActivation(self):
                if self.state == self.StateEnded:
                        return self.end
-               
+
                next_state = self.state + 1
-               
-               return {self.StatePrepared: self.start_prepare, 
-                               self.StateRunning: self.begin, 
+
+               return {self.StatePrepared: self.start_prepare,
+                               self.StateRunning: self.begin,
                                self.StateEnded: self.end }[next_state]
 
        def failureCB(self, answer):
@@ -478,7 +478,7 @@ class RecordTimerEntry(timer.TimerEntry, object):
                old_prepare = self.start_prepare
                self.start_prepare = self.begin - self.prepare_time
                self.backoff = 0
-               
+
                if int(old_prepare) != int(self.start_prepare):
                        self.log(15, "record time changed, start prepare is now: %s" % ctime(self.start_prepare))
 
@@ -493,7 +493,7 @@ class RecordTimerEntry(timer.TimerEntry, object):
                        # displayed only once, even if more timers are failing at the
                        # same time. (which is very likely in case of disk fullness)
                        Notifications.AddPopup(text = _("Write error while recording. Disk full?\n"), type = MessageBox.TYPE_ERROR, timeout = 0, id = "DiskFullMessage")
-                       # ok, the recording has been stopped. we need to properly note 
+                       # ok, the recording has been stopped. we need to properly note
                        # that in our state, with also keeping the possibility to re-try.
                        # TODO: this has to be done.
                elif event == iRecordableService.evStart:
@@ -560,21 +560,21 @@ def createTimer(xml):
        #filename = xml.get("filename").encode("utf-8")
        entry = RecordTimerEntry(serviceref, begin, end, name, description, eit, disabled, justplay, afterevent, dirname = location, tags = tags, descramble = descramble, record_ecm = record_ecm, always_zap = always_zap, zap_wakeup = zap_wakeup)
        entry.repeated = int(repeated)
-       
+
        for l in xml.findall("log"):
                time = int(l.get("time"))
                code = int(l.get("code"))
                msg = l.text.strip().encode("utf-8")
                entry.log_entries.append((time, code, msg))
-       
+
        return entry
 
 class RecordTimer(timer.Timer):
        def __init__(self):
                timer.Timer.__init__(self)
-               
+
                self.Filename = Directories.resolveFilename(Directories.SCOPE_CONFIG, "timers.xml")
-               
+
                try:
                        self.loadTimer()
                except IOError:
@@ -616,7 +616,7 @@ class RecordTimer(timer.Timer):
                        if timer.isRunning() and not timer.justplay:
                                return True
                return False
-       
+
        def loadTimer(self):
                # TODO: PATH!
                if not Directories.fileExists(self.Filename):
@@ -665,7 +665,7 @@ class RecordTimer(timer.Timer):
                        #t.set("begin", str(int(timer.begin)))
                        #t.set("end", str(int(timer.end)))
                        #t.set("serviceref", str(timer.service_ref))
-                       #t.set("repeated", str(timer.repeated))                 
+                       #t.set("repeated", str(timer.repeated))
                        #t.set("name", timer.name)
                        #t.set("description", timer.description)
                        #t.set("afterevent", str({
@@ -696,7 +696,7 @@ class RecordTimer(timer.Timer):
 
                list.append('<?xml version="1.0" ?>\n')
                list.append('<timers>\n')
-               
+
                for timer in self.timer_list + self.processed_timers:
                        if timer.dontSave:
                                continue
@@ -727,7 +727,7 @@ class RecordTimer(timer.Timer):
                        list.append(' descramble="' + str(int(timer.descramble)) + '"')
                        list.append(' record_ecm="' + str(int(timer.record_ecm)) + '"')
                        list.append('>\n')
-                       
+
                        if config.recording.debug.value:
                                for time, code, msg in timer.log_entries:
                                        list.append('<log')
@@ -736,7 +736,7 @@ class RecordTimer(timer.Timer):
                                        list.append('>')
                                        list.append(str(stringToXML(msg)))
                                        list.append('</log>\n')
-                       
+
                        list.append('</timer>\n')
 
                list.append('</timers>\n')
@@ -975,7 +975,7 @@ class RecordTimer(timer.Timer):
 
        def removeEntry(self, entry):
                print "[Timer] Remove " + str(entry)
-               
+
                # avoid re-enqueuing
                entry.repeated = False
 
@@ -983,10 +983,10 @@ class RecordTimer(timer.Timer):
                # this sets the end time to current time, so timer will be stopped.
                entry.autoincrease = False
                entry.abort()
-               
+
                if entry.state != entry.StateEnded:
                        self.timeChanged(entry)
-               
+
                print "state: ", entry.state
                print "in processed: ", entry in self.processed_timers
                print "in running: ", entry in self.timer_list
index 68b1394..6306c94 100644 (file)
                <key id="KEY_PAGEDOWN" mapto="pageDown" flags="mr" />
                <key id="KEY_LEFT" mapto="pageUp" flags="mr" />
                <key id="KEY_RIGHT" mapto="pageDown" flags="mr" />
-               
+
                <key id="1" mapto="moveUp" flags="mr" />
                <key id="2" mapto="moveDown" flags="mr" />
        </map>
-       
+
        <map context="KeyboardInputActions">
                <key id="KEY_LEFT" mapto="left" flags="mr" />
                <key id="KEY_RIGHT" mapto="right" flags="mr" />
@@ -66,7 +66,7 @@
                <key id="KEY_FILE" mapto="file" flags="m" />
                <key id="KEY_VIDEO" mapto="file" flags="m" />
        </map>
-       
+
        <map context="InputActions">
                <key id="KEY_LEFT" mapto="left" flags="mr" />
                <key id="KEY_RIGHT" mapto="right" flags="mr" />
                <key id="BTN_0" mapto="zapUp" flags="mr" />
                <key id="BTN_1" mapto="zapDown" flags="mr" />
        </map>
-       
+
        <map context="MinuteInputActions">
                <key id="KEY_UP" mapto="up" flags="mr" />
                <key id="KEY_DOWN" mapto="down" flags="mr" />
                <key id="KEY_9" mapto="9" flags="m" />
                <key id="KEY_0" mapto="0" flags="m" />
        </map>
-       
+
        <map context="WizardActions">
                <key id="KEY_LEFT" mapto="left" flags="mr" />
                <key id="KEY_RIGHT" mapto="right" flags="mr" />
                <key id="KEY_EXIT" mapto="back" flags="m" />
                <key id="KEY_ESC" mapto="back" flags="m" />
        </map>
-       
+
        <map context="InfobarMenuActions">
                <key id="KEY_MENU" mapto="mainMenu" flags="mr" />
                <key id="KEY_SPACE" mapto="mainMenu" flags="mr" />
        </map>
-       
+
        <map context="MenuActions">
                <key id="KEY_MENU" mapto="menu" flags="mr" />
                <key id="KEY_SPACE" mapto="menu" flags="mr" />
        </map>
-       
+
        <map context="InfobarShowHideActions">
                <key id="KEY_OK" mapto="toggleShow" flags="m" />
                <key id="KEY_ENTER" mapto="toggleShow" flags="m" />
                        <key id="KEY_POWER" mapto="deepstandby" flags="l" />
                </device>
        </map>
-       
+
        <map context="PowerKeyActions">
                <key id="KEY_POWER" mapto="powerdown" flags="m" />
                <key id="KEY_POWER" mapto="powerup" flags="b" />
        </map>
-       
+
        <map context="NumberActions">
                <key id="KEY_1" mapto="1" flags="m" />
                <key id="KEY_2" mapto="2" flags="m" />
                </device>
 
                <key id="KEY_OK" mapto="unPauseService" flags="m" />
-               
+
                <key id="KEY_1" mapto="seekdef:1" flags="m" />
                <key id="KEY_3" mapto="seekdef:3" flags="m" />
                <key id="KEY_4" mapto="seekdef:4" flags="m" />
                <key id="KEY_FASTFORWARD" mapto="seekFwd" flags="b" />
                <key id="KEY_REWIND" mapto="seekBackManual" flags="l" />
                <key id="KEY_FASTFORWARD" mapto="seekFwdManual" flags="l" />
-               
+
                <key id="KEY_1" mapto="seekdef:1" flags="m" />
                <key id="KEY_3" mapto="seekdef:3" flags="m" />
                <key id="KEY_4" mapto="seekdef:4" flags="m" />
                <key id="KEY_INFO" mapto="InfoButtonPressedLong" flags="l" />
                <key id="KEY_EPG" mapto="EPGButtonPressedLong" flags="l" />
        </map>
-       
+
        <map context="InfobarCueSheetActions">
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_PREVIOUS" mapto="jumpPreviousMark" flags="m" />
                        <key id="KEY_NEXTSONG" mapto="jumpNextMark" flags="m" />
                </device>
        </map>
-       
+
        <map context="MediaPlayerCueSheetActions">
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_0" mapto="toggleMark" flags="m" />
        <map context="VirtualKeyboardActions">
                <key id="KEY_TEXT" mapto="showVirtualKeyboard" flags="m" />
        </map>
-       
+
        <map context="InfobarTeletextActions">
                <key id="KEY_TEXT" mapto="startTeletext" flags="m" />
        </map>
        <map context="TimerEditActions">
                <key id="KEY_INFO" mapto="log" flags="m" />
        </map>
-       
+
        <map context="EPGSelectActions">
                <key id="KEY_GREEN" mapto="timerAdd" flags="m" />
                <key id="KEY_YELLOW" mapto="yellow" flags="mr" />
                <key id="KEY_MENU" mapto="contextMenu" flags="m" />
                <key id="KEY_PROGRAM" mapto="timerAdd" flags="m" />
        </map>
-       
+
        <map context="EventViewEPGActions">
                <key id="KEY_YELLOW" mapto="openSingleServiceEPG" flags="m" />
                <key id="KEY_BLUE" mapto="openMultiServiceEPG" flags="m" />
                <key id="KEY_ENTER" mapto="ok" flags="m" />
                <key id="KEY_ESC" mapto="cancel" flags="m" />
        </map>
-       
+
        <map context="DirectionActions">
                <key id="KEY_UP" mapto="up" flags="m" />
                <key id="KEY_DOWN" mapto="down" flags="m" />
                <key id="KEY_DOWN" mapto="downRepeated" flags="r" />
                <key id="KEY_LEFT" mapto="leftRepeated" flags="r" />
                <key id="KEY_RIGHT" mapto="rightRepeated" flags="r" />
-               
+
                <key id="KEY_LEFT" mapto="leftUp" flags="b" />
                <key id="KEY_RIGHT" mapto="rightUp" flags="b" />
                <key id="KEY_UP" mapto="upUp" flags="b" />
                <key id="KEY_DOWN" mapto="downUp" flags="b" />
        </map>
-       
+
        <map context="AudioSelectionActions">
                <key id="KEY_RED" mapto="red" flags="m" />
                <key id="KEY_GREEN" mapto="green" flags="m" />
        </map>
 
        <map context="WindowActions">
-               
+
        </map>
-       
+
        <map context="HelpActions">
                <key id="KEY_HELP" mapto="displayHelp" flags="m" />
        </map>
                <key id="KEY_POWER" mapto="power" flags="m" />
                <key id="KEY_KP1" mapto="discrete_on" flags="m" />
        </map>
-       
+
        <map context="SleepTimerEditorActions">
                <key id="KEY_OK" mapto="select" flags="m" />
                <key id="KEY_ENTER" mapto="select" flags="m" />
                <key id="KEY_YELLOW" mapto="toggleAsk" flags="mr" />
                <key id="KEY_GREEN" mapto="toggleAction" flags="mr" />
                <key id="KEY_BLUE" mapto="useServiceTime" flags="mr" />
-       </map>  
-       
+       </map>
+
        <map context="CiSelectionActions">
                <key id="KEY_LEFT" mapto="left" flags="mr" />
                <key id="KEY_RIGHT" mapto="right" flags="mr" />
                <key id="KEY_CHANNELUP" mapto="size+" flags="mr" />
                <key id="KEY_CHANNELDOWN" mapto="size-" flags="mr" />
        </map>
-       
+
        <map context="MediaPlayerActions">
                <device name="dreambox advanced remote control (native)">
                        <key id="KEY_RECORD" mapto="shift_record" flags="l" />
index 2a0db45..0cffe2c 100644 (file)
@@ -1,7 +1,7 @@
 <menu text="Main menu" title="Main menu">
        <id val="mainmenu" />
 <!-- the following types are allowed:
-       <screen [module="mod"] [screen="classname"]>[arguments]</screen> 
+       <screen [module="mod"] [screen="classname"]>[arguments]</screen>
                executes Screen called "classname" from module "Screen.mod"
                if no module is given, Screen must be globally available.
                if no screen is given, module is used as screen class name.
index d344fcb..59feb5c 100644 (file)
                <widget source="TimeshiftPossible" render="FixedLabel" text="Timeshift" position="460,130" zPosition="1" size="85,22" font="Regular;16" backgroundColor="#182946" shadowColor="#1d354c" shadowOffset="-1,-1" transparent="1">
                        <convert type="ConditionalShowHide" />
                </widget>
-               
+
                <!-- Yellow button (used for audio on boxes with new rc?) -->
                <widget source="ShowAudioOnYellow" render="Pixmap" pixmap="skin_default/buttons/button_yellow.png" position="440,130" zPosition="1" size="15,16" alphatest="on">
                        <convert type="ConditionalShowHide" />
index 5275041..f41d225 100644 (file)
        <!-- Audio selection -->
        <screen name="AudioSelection" position="center,center" size="485,330" title="Audio">
                <widget name="config" position="50,10" size="425,110" scrollbarMode="showOnDemand" />
-               
+
                <widget source="key_red" render="Pixmap" pixmap="skin_default/buttons/key_red.png" position="10,10" size="35,25" alphatest="on">
                        <convert type="ConditionalShowHide" />
                </widget>
                <widget source="key_blue" render="Pixmap" pixmap="skin_default/buttons/key_blue.png" position="10,85" size="35,25" alphatest="on">
                        <convert type="ConditionalShowHide" />
                </widget>
-               
+
                <ePixmap pixmap="skin_default/div-h.png" position="10,112" zPosition="10" size="465,2" />
 
                <widget source="streams" render="Listbox" scrollbarMode="showOnDemand" position="10,120" size="465,200" zPosition="3" transparent="1" >
                        <convert type="TemplatedMultiContent">
                                {"templates":
-                                       {"default": (25, [ 
+                                       {"default": (25, [
                                                MultiContentEntryText(pos = (0, 0),   size = (35, 25),  font = 0, flags = RT_HALIGN_LEFT,  text = 1), # key,
                                                MultiContentEntryText(pos = (40, 0),  size = (60, 25),  font = 0, flags = RT_HALIGN_LEFT,  text = 2), # number,
                                                MultiContentEntryText(pos = (110, 0), size = (120, 25), font = 0, flags = RT_HALIGN_LEFT,  text = 3), # description,
                                                MultiContentEntryText(pos = (240, 0), size = (200, 25), font = 0, flags = RT_HALIGN_LEFT,  text = 4), # language,
                                                MultiContentEntryText(pos = (450, 4), size = (15, 25),  font = 1, flags = RT_HALIGN_RIGHT, text = 5), # selection,
                                        ], True, "showNever"),
-                                       "notselected": (25, [ 
+                                       "notselected": (25, [
                                                MultiContentEntryText(pos = (0, 0),   size = (35, 25),  font = 0, flags = RT_HALIGN_LEFT,  text = 1), # key,
                                                MultiContentEntryText(pos = (40, 0),  size = (60, 25),  font = 0, flags = RT_HALIGN_LEFT,  text = 2), # number,
                                                MultiContentEntryText(pos = (110, 0), size = (120, 25), font = 0, flags = RT_HALIGN_LEFT,  text = 3), # description,
@@ -346,10 +346,10 @@ self.autoResize()
                <widget name="key_blue" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" />
                <widget name="timeline_text" position="0,41" size="560,20" />
                <widget name="list" position="0,65" size="560,270" EntryBorderColor="#071930" EntryBackgroundColor="#2f4964" EntryBackgroundColorSelected="#25688caf" scrollbarMode="showOnDemand" />
-               <eLabel position="0,41" size="560,1" backgroundColor="#2f4964" zPosition="1" />                                                                                                   
-               <eLabel position="0,65" size="560,2" backgroundColor="#2f4964" zPosition="1" />                                                                                                   
-               <eLabel position="0,335" size="560,2" backgroundColor="#2f4964" zPosition="1" />                                                                                                  
-               <eLabel position="530,65" size="1,270" backgroundColor="#2f4964" zPosition="1" />                                                                                                 
+               <eLabel position="0,41" size="560,1" backgroundColor="#2f4964" zPosition="1" />
+               <eLabel position="0,65" size="560,2" backgroundColor="#2f4964" zPosition="1" />
+               <eLabel position="0,335" size="560,2" backgroundColor="#2f4964" zPosition="1" />
+               <eLabel position="530,65" size="1,270" backgroundColor="#2f4964" zPosition="1" />
                <widget name="timeline0" position="0,65" zPosition="1" size="1,270" pixmap="skin_default/timeline.png" />
                <widget name="timeline1" position="0,65" zPosition="1" size="1,270" pixmap="skin_default/timeline.png" />
                <widget name="timeline2" position="0,65" zPosition="1" size="1,270" pixmap="skin_default/timeline.png" />
@@ -489,13 +489,13 @@ self.autoResize()
                <widget name="textbook" position="0,272" size="540,22" font="Regular;22" />
                <widget name="booklist" position="5,302" zPosition="2" size="535,100" scrollbarMode="showOnDemand" />
                <widget name="red" position="0,415" zPosition="1" size="135,40" pixmap="skin_default/buttons/red.png" transparent="1" alphatest="on" />
-               <widget name="key_red" position="0,415" zPosition="2" size="135,40" halign="center" valign="center" font="Regular;22" transparent="1" shadowColor="black" shadowOffset="-1,-1" />       
+               <widget name="key_red" position="0,415" zPosition="2" size="135,40" halign="center" valign="center" font="Regular;22" transparent="1" shadowColor="black" shadowOffset="-1,-1" />
                <widget name="green" position="135,415" zPosition="1" size="135,40" pixmap="skin_default/buttons/green.png" transparent="1" alphatest="on" />
                <widget name="key_green" position="135,415" zPosition="2" size="135,40" halign="center" valign="center" font="Regular;22" transparent="1" shadowColor="black" shadowOffset="-1,-1" />
                <widget name="yellow" position="270,415" zPosition="1" size="135,40" pixmap="skin_default/buttons/yellow.png" transparent="1" alphatest="on" />
                <widget name="key_yellow" position="270,415" zPosition="2" size="135,40" halign="center" valign="center" font="Regular;22" transparent="1" shadowColor="black" shadowOffset="-1,-1" />
                <widget name="blue" position="405,415" zPosition="1" size="135,40" pixmap="skin_default/buttons/blue.png" transparent="1" alphatest="on" />
-               <widget name="key_blue" position="405,415" zPosition="2" size="135,40" halign="center" valign="center" font="Regular;22" transparent="1" shadowColor="black" shadowOffset="-1,-1" />                    
+               <widget name="key_blue" position="405,415" zPosition="2" size="135,40" halign="center" valign="center" font="Regular;22" transparent="1" shadowColor="black" shadowOffset="-1,-1" />
        </screen>
        <!-- Mediaplayer -->
        <screen name="MediaPlayer" position="70,70" size="580,475" title="Media player">
index 666d76f..650e219 100755 (executable)
@@ -54,7 +54,7 @@
                        <convert type="ClockToText"></convert>
                </widget>
        </screen>
+
 <!-- channelselection-->
        <screen name="ChannelSelection_summary" position="0,0" size="96,64">
                <widget source="parent.ServiceEvent" render="Label" position="0,0" size="96,21" font="FdLcD;20" halign="left" noWrap="1" >
@@ -73,7 +73,7 @@
                        <convert type="ConditionalShowHide"></convert>
                </widget>
        </screen>
-  
+
 <!-- menus-->
        <screen name="MenuSummary" position="0,0" size="96,64">
                <widget source="parent.title" render="Label" position="0,0" size="96,16" font="FdLcD;14" halign="center" valign="top" noWrap="1"  foregroundColor="lightyellow" />
                        <convert type="ClockToText"></convert>
                </widget>
        </screen>
-       
+
        <screen name="MovieContextMenuSummary" position="0,0" size="96,64">
                <widget source="parent.Title" render="Label" position="0,0" size="96,14" font="FdLcD;12" halign="left" valign="top" noWrap="1"  foregroundColor="lightyellow" />
                <widget source="selected" render="Label" position="0,14" size="96,32" font="FdLcD;16" />
        <screen name="ChoiceBox_summary" position="0,0" size="96,64">
                <widget source="parent.Title" render="Label" position="0,0" size="96,14" font="FdLcD;14" halign="left" noWrap="1" foregroundColor="lightyellow" />
                <widget source="parent.summary_selection" render="Label" position="0,14" size="96,50" font="FdLcD;14" halign="left" />
-       </screen>       
+       </screen>
 
        <screen name="MessageBox_summary" position="0,0" size="96,64">
                <widget source="parent.Text" render="Label" position="0,0" size="96,52" font="FdLcD;11" halign="center" valign="center" />
index caed5b2..ed23576 100644 (file)
@@ -48,8 +48,8 @@
                        </widget>
                </panel>
        </screen>
-    
-  
+
+
 <!-- channelselection-->
        <screen name="ChannelSelection_summary" position="fill">
                <widget source="parent.ServiceEvent" render="Label" position="top" size="*,21" font="FdLcD;20" halign="left" noWrap="1" >
@@ -63,7 +63,7 @@
                </widget>
                <panel position="bottom" size="*,24" name="SummaryClockPanel" />
        </screen>
-  
+
 <!-- menus-->
        <screen name="MenuSummary" position="fill">
                <widget source="parent.title" render="Label" position="top" size="*,16" font="FdLcD;14" halign="center" valign="top" noWrap="1" />
@@ -86,7 +86,7 @@
                        </widget>
                </panel>
        </screen>
-       
+
        <screen name="MovieContextMenuSummary" position="fill">
                <widget source="parent.Title" render="Label" position="top" size="*,14" font="FdLcD;12" halign="left" valign="top" noWrap="1" />
                <widget source="selected" render="Label" position="top" size="*,32" font="FdLcD;16" />
 
        <screen name="ChoiceBox_summary" position="fill">
                <widget source="parent.summary_list" render="Label" position="fill" font="FdLcD;11" />
-       </screen>       
+       </screen>
 
        <screen name="MessageBox_summary" position="fill">
                <widget source="parent.Text" render="Label" position="top" size="*,52" font="FdLcD;11" halign="center" valign="center" />
index 1807754..662dbd4 100644 (file)
                        <panel name="RecordIconPanel"/>
                </panel>
        </screen>
-       
+
        <screen name="MovieContextMenuSummary" position="fill">
                <widget source="parent.Title" render="Label" position="top" size="*,16" font="Big" noWrap="1"/>
                <widget source="selected" render="Label" position="top" size="*,16" font="Big" noWrap="1"/>
                <widget source="SetupValue" render="Label" position="fill" font="Medium" noWrap="1"/>
        </screen>
 
-       <screen name="SleepTimerEdit_summary"><panel name="SetupSummary"/></screen>     
+       <screen name="SleepTimerEdit_summary"><panel name="SetupSummary"/></screen>
 
 <!-- misc-->
        <screen name="SimpleSummary" position="fill">
        <screen name="ChoiceBox_summary" position="fill">
                <widget source="parent.text" render="Label" position="top" size="*,16" font="Big" noWrap="1"/>
                <widget source="parent.summary_selection" render="Label" position="fill" font="Big" noWrap="1"/>
-       </screen>       
+       </screen>
 
        <screen name="MessageBox_summary" position="fill" layout="stack">
                <widget source="parent.Text" render="Label" position="top" size="*,32" font="Small"/>
index 8016fc7..b9a21b3 100755 (executable)
                </widget>
                -->
        </screen>
-    
-  
+
+
 <!-- channelselection-->
        <screen name="ChannelSelection_summary" position="0,0" size="132,64">
                <widget source="parent.ServiceEvent" render="Label" position="0,0" size="132,1" halign="left" noWrap="1" >
                        <convert type="ServiceName">Name</convert>
                </widget>
        </screen>
-  
+
 <!-- menus-->
        <screen name="MenuSummary" position="0,0" size="16,1">
                <widget source="parent.menu" render="Label" position="0,0" size="132,1" font="Regular;16" halign="left" valign="top">
@@ -34,7 +34,7 @@
                        <convert type="ServicePosition">Summary</convert>
                </widget>
        </screen>
-       
+
        <screen name="MovieContextMenuSummary" position="0,0" size="132,64">
                <widget source="selected" render="Label" position="0,0" size="124,32" font="Regular;16" />
        </screen>
index fc1a0ed..fdf6066 100644 (file)
@@ -137,7 +137,7 @@ self.hideRc()
                        <condition>
 from Components.NimManager import nimmanager
 self.condition = nimmanager.somethingConnected() and not config.misc.installwizard.channellistdownloaded.value
-                       </condition>                    
+                       </condition>
                        <text value="What do you want to scan?" />
                        <config screen="ScanSimple" module="ScanSetup" type="ConfigList" />
                </step>
index 33951d7..4aba472 100644 (file)
@@ -18,7 +18,7 @@ unicable (version)
   |  |  |\
   |  |  | \
   |  |  | product
-  |  |  
+  |  |
   |  |\
   |  | \
   |  | manufacturer
@@ -44,7 +44,7 @@ unicable (version)
      |  |\
      |  | \
      |  | product
-     |  
+     |
      |\
      | \
      | manufacturer
index cca2f35..61447e2 100644 (file)
@@ -31,10 +31,10 @@ class E2SharedPoll:
 
        def register(self, fd, eventmask = select.POLLIN | select.POLLERR | select.POLLOUT):
                self.dict[fd] = eventmask
-       
+
        def unregister(self, fd):
                del self.dict[fd]
-       
+
        def poll(self, timeout = None):
                try:
                        r = self.eApp.poll(timeout, self.dict)
@@ -61,8 +61,8 @@ class PollReactor(posixbase.PosixReactorBase):
                        poller.register(fd, mask)
                else:
                        if selectables.has_key(fd): del selectables[fd]
-               
-               
+
+
                poller.eApp.interruptPoll()
 
        def _dictRemove(self, selectable, mdict):
@@ -125,7 +125,7 @@ class PollReactor(posixbase.PosixReactorBase):
                selectables.clear()
                for fd in fds:
                        poller.unregister(fd)
-                       
+
                if self.waker is not None:
                        self.addReader(self.waker)
                return result
@@ -139,7 +139,7 @@ class PollReactor(posixbase.PosixReactorBase):
                           POLLIN=select.POLLIN,
                           POLLOUT=select.POLLOUT):
                """Poll the poller for new events."""
-               
+
                if timeout is not None:
                        timeout = int(timeout * 1000) # convert seconds to milliseconds
 
@@ -166,7 +166,7 @@ class PollReactor(posixbase.PosixReactorBase):
 
        doIteration = doPoll
 
-       def _doReadOrWrite(self, selectable, fd, event, POLLIN, POLLOUT, log, 
+       def _doReadOrWrite(self, selectable, fd, event, POLLIN, POLLOUT, log,
                faildict={
                        error.ConnectionDone: failure.Failure(error.ConnectionDone()),
                        error.ConnectionLost: failure.Failure(error.ConnectionLost())
@@ -198,7 +198,7 @@ class PollReactor(posixbase.PosixReactorBase):
 
 def install():
        """Install the poll() reactor."""
-       
+
        p = PollReactor()
        main.installReactor(p)
 
index cddfda9..69d80d7 100644 (file)
--- a/keyids.py
+++ b/keyids.py
-KEYIDS = { 
-"KEY_RESERVED": 0, 
-"KEY_ESC": 1, 
-"KEY_1": 2, 
-"KEY_2": 3, 
-"KEY_3": 4, 
-"KEY_4": 5, 
-"KEY_5": 6, 
-"KEY_6": 7, 
-"KEY_7": 8, 
-"KEY_8": 9, 
-"KEY_9": 10, 
-"KEY_0": 11, 
-"KEY_MINUS": 12, 
-"KEY_EQUAL": 13, 
-"KEY_BACKSPACE": 14, 
-"KEY_TAB": 15, 
-"KEY_Q": 16, 
-"KEY_W": 17, 
-"KEY_E": 18, 
-"KEY_R": 19, 
-"KEY_T": 20, 
-"KEY_Y": 21, 
-"KEY_U": 22, 
-"KEY_I": 23, 
-"KEY_O": 24, 
-"KEY_P": 25, 
-"KEY_LEFTBRACE": 26, 
-"KEY_RIGHTBRACE": 27, 
-"KEY_ENTER": 28, 
-"KEY_LEFTCTRL": 29, 
-"KEY_A": 30, 
-"KEY_S": 31, 
-"KEY_D": 32, 
-"KEY_F": 33, 
-"KEY_G": 34, 
-"KEY_H": 35, 
-"KEY_J": 36, 
-"KEY_K": 37, 
-"KEY_L": 38, 
-"KEY_SEMICOLON": 39, 
-"KEY_APOSTROPHE": 40, 
-"KEY_GRAVE": 41, 
-"KEY_LEFTSHIFT": 42, 
-"KEY_BACKSLASH": 43, 
-"KEY_Z": 44, 
-"KEY_X": 45, 
-"KEY_C": 46, 
-"KEY_V": 47, 
-"KEY_B": 48, 
-"KEY_N": 49, 
-"KEY_M": 50, 
-"KEY_COMMA": 51, 
-"KEY_DOT": 52, 
-"KEY_SLASH": 53, 
-"KEY_RIGHTSHIFT": 54, 
-"KEY_KPASTERISK": 55, 
-"KEY_LEFTALT": 56, 
-"KEY_SPACE": 57, 
-"KEY_CAPSLOCK": 58, 
-"KEY_F1": 59, 
-"KEY_F2": 60, 
-"KEY_F3": 61, 
-"KEY_F4": 62, 
-"KEY_F5": 63, 
-"KEY_F6": 64, 
-"KEY_F7": 65, 
-"KEY_F8": 66, 
-"KEY_F9": 67, 
-"KEY_F10": 68, 
-"KEY_NUMLOCK": 69, 
-"KEY_SCROLLLOCK": 70, 
-"KEY_KP7": 71, 
-"KEY_KP8": 72, 
-"KEY_KP9": 73, 
-"KEY_KPMINUS": 74, 
-"KEY_KP4": 75, 
-"KEY_KP5": 76, 
-"KEY_KP6": 77, 
-"KEY_KPPLUS": 78, 
-"KEY_KP1": 79, 
-"KEY_KP2": 80, 
-"KEY_KP3": 81, 
-"KEY_KP0": 82, 
-"KEY_KPDOT": 83, 
-"KEY_103RD": 84, 
-"KEY_F13": 85, 
-"KEY_102ND": 86, 
-"KEY_F11": 87, 
-"KEY_F12": 88, 
-"KEY_F14": 89, 
-"KEY_F15": 90, 
-"KEY_F16": 91, 
-"KEY_F17": 92, 
-"KEY_F18": 93, 
-"KEY_F19": 94, 
-"KEY_F20": 95, 
-"KEY_KPENTER": 96, 
-"KEY_RIGHTCTRL": 97, 
-"KEY_KPSLASH": 98, 
-"KEY_SYSRQ": 99, 
-"KEY_RIGHTALT": 100, 
-"KEY_LINEFEED": 101, 
-"KEY_HOME": 102, 
-"KEY_UP": 103, 
-"KEY_PAGEUP": 104, 
-"KEY_LEFT": 105, 
-"KEY_RIGHT": 106, 
-"KEY_END": 107, 
-"KEY_DOWN": 108, 
-"KEY_PAGEDOWN": 109, 
-"KEY_INSERT": 110, 
-"KEY_DELETE": 111, 
-"KEY_MACRO": 112, 
-"KEY_MUTE": 113, 
-"KEY_VOLUMEDOWN": 114, 
-"KEY_VOLUMEUP": 115, 
-"KEY_POWER": 116, 
-"KEY_KPEQUAL": 117, 
-"KEY_KPPLUSMINUS": 118, 
-"KEY_PAUSE": 119, 
-"KEY_F21": 120, 
-"KEY_F22": 121, 
-"KEY_F23": 122, 
-"KEY_F24": 123, 
-"KEY_KPCOMMA": 124, 
-"KEY_LEFTMETA": 125, 
-"KEY_RIGHTMETA": 126, 
-"KEY_COMPOSE": 127, 
-"KEY_STOP": 128, 
-"KEY_AGAIN": 129, 
-"KEY_PROPS": 130, 
-"KEY_UNDO": 131, 
-"KEY_FRONT": 132, 
-"KEY_COPY": 133, 
-"KEY_OPEN": 134, 
-"KEY_PASTE": 135, 
-"KEY_FIND": 136, 
-"KEY_CUT": 137, 
-"KEY_HELP": 138, 
-"KEY_MENU": 139, 
-"KEY_CALC": 140, 
-"KEY_SETUP": 141, 
-"KEY_SLEEP": 142, 
-"KEY_WAKEUP": 143, 
-"KEY_FILE": 144, 
-"KEY_SENDFILE": 145, 
-"KEY_DELETEFILE": 146, 
-"KEY_XFER": 147, 
-"KEY_PROG1": 148, 
-"KEY_PROG2": 149, 
-"KEY_WWW": 150, 
-"KEY_MSDOS": 151, 
-"KEY_COFFEE": 152, 
-"KEY_DIRECTION": 153, 
-"KEY_CYCLEWINDOWS": 154, 
-"KEY_MAIL": 155, 
-"KEY_BOOKMARKS": 156, 
-"KEY_COMPUTER": 157, 
-"KEY_BACK": 158, 
-"KEY_FORWARD": 159, 
-"KEY_CLOSECD": 160, 
-"KEY_EJECTCD": 161, 
-"KEY_EJECTCLOSECD": 162, 
-"KEY_NEXTSONG": 163, 
-"KEY_PLAYPAUSE": 164, 
-"KEY_PREVIOUSSONG": 165, 
-"KEY_STOPCD": 166, 
-"KEY_RECORD": 167, 
-"KEY_REWIND": 168, 
-"KEY_PHONE": 169, 
-"KEY_ISO": 170, 
-"KEY_CONFIG": 171, 
-"KEY_HOMEPAGE": 172, 
-"KEY_REFRESH": 173, 
-"KEY_EXIT": 174, 
-"KEY_MOVE": 175, 
-"KEY_EDIT": 176, 
-"KEY_SCROLLUP": 177, 
-"KEY_SCROLLDOWN": 178, 
-"KEY_KPLEFTPAREN": 179, 
-"KEY_KPRIGHTPAREN": 180, 
-"KEY_INTL1": 181, 
-"KEY_INTL2": 182, 
-"KEY_INTL3": 183, 
-"KEY_INTL4": 184, 
-"KEY_INTL5": 185, 
-"KEY_INTL6": 186, 
-"KEY_INTL7": 187, 
-"KEY_INTL8": 188, 
-"KEY_INTL9": 189, 
-"KEY_LANG1": 190, 
-"KEY_LANG2": 191, 
-"KEY_LANG3": 192, 
-"KEY_LANG4": 193, 
-"KEY_LANG5": 194, 
-"KEY_LANG6": 195, 
-"KEY_LANG7": 196, 
-"KEY_LANG8": 197, 
-"KEY_LANG9": 198, 
-"KEY_PLAYCD": 200, 
-"KEY_PAUSECD": 201, 
-"KEY_PROG3": 202, 
-"KEY_PROG4": 203, 
-"KEY_SUSPEND": 205, 
-"KEY_CLOSE": 206, 
-"KEY_PLAY": 207, 
-"KEY_FASTFORWARD": 208, 
-"KEY_BASSBOOST": 209, 
-"KEY_PRINT": 210, 
-"KEY_HP": 211, 
-"KEY_CAMERA": 212, 
-"KEY_SOUND": 213, 
-"KEY_QUESTION": 214, 
-"KEY_EMAIL": 215, 
-"KEY_CHAT": 216, 
-"KEY_SEARCH": 217, 
-"KEY_CONNECT": 218, 
-"KEY_FINANCE": 219, 
-"KEY_SPORT": 220, 
-"KEY_SHOP": 221, 
-"KEY_ALTERASE": 222, 
-"KEY_CANCEL": 223, 
-"KEY_BRIGHTNESSDOWN": 224, 
-"KEY_BRIGHTNESSUP": 225, 
-"KEY_MEDIA": 226, 
+KEYIDS = {
+"KEY_RESERVED": 0,
+"KEY_ESC": 1,
+"KEY_1": 2,
+"KEY_2": 3,
+"KEY_3": 4,
+"KEY_4": 5,
+"KEY_5": 6,
+"KEY_6": 7,
+"KEY_7": 8,
+"KEY_8": 9,
+"KEY_9": 10,
+"KEY_0": 11,
+"KEY_MINUS": 12,
+"KEY_EQUAL": 13,
+"KEY_BACKSPACE": 14,
+"KEY_TAB": 15,
+"KEY_Q": 16,
+"KEY_W": 17,
+"KEY_E": 18,
+"KEY_R": 19,
+"KEY_T": 20,
+"KEY_Y": 21,
+"KEY_U": 22,
+"KEY_I": 23,
+"KEY_O": 24,
+"KEY_P": 25,
+"KEY_LEFTBRACE": 26,
+"KEY_RIGHTBRACE": 27,
+"KEY_ENTER": 28,
+"KEY_LEFTCTRL": 29,
+"KEY_A": 30,
+"KEY_S": 31,
+"KEY_D": 32,
+"KEY_F": 33,
+"KEY_G": 34,
+"KEY_H": 35,
+"KEY_J": 36,
+"KEY_K": 37,
+"KEY_L": 38,
+"KEY_SEMICOLON": 39,
+"KEY_APOSTROPHE": 40,
+"KEY_GRAVE": 41,
+"KEY_LEFTSHIFT": 42,
+"KEY_BACKSLASH": 43,
+"KEY_Z": 44,
+"KEY_X": 45,
+"KEY_C": 46,
+"KEY_V": 47,
+"KEY_B": 48,
+"KEY_N": 49,
+"KEY_M": 50,
+"KEY_COMMA": 51,
+"KEY_DOT": 52,
+"KEY_SLASH": 53,
+"KEY_RIGHTSHIFT": 54,
+"KEY_KPASTERISK": 55,
+"KEY_LEFTALT": 56,
+"KEY_SPACE": 57,
+"KEY_CAPSLOCK": 58,
+"KEY_F1": 59,
+"KEY_F2": 60,
+"KEY_F3": 61,
+"KEY_F4": 62,
+"KEY_F5": 63,
+"KEY_F6": 64,
+"KEY_F7": 65,
+"KEY_F8": 66,
+"KEY_F9": 67,
+"KEY_F10": 68,
+"KEY_NUMLOCK": 69,
+"KEY_SCROLLLOCK": 70,
+"KEY_KP7": 71,
+"KEY_KP8": 72,
+"KEY_KP9": 73,
+"KEY_KPMINUS": 74,
+"KEY_KP4": 75,
+"KEY_KP5": 76,
+"KEY_KP6": 77,
+"KEY_KPPLUS": 78,
+"KEY_KP1": 79,
+"KEY_KP2": 80,
+"KEY_KP3": 81,
+"KEY_KP0": 82,
+"KEY_KPDOT": 83,
+"KEY_103RD": 84,
+"KEY_F13": 85,
+"KEY_102ND": 86,
+"KEY_F11": 87,
+"KEY_F12": 88,
+"KEY_F14": 89,
+"KEY_F15": 90,
+"KEY_F16": 91,
+"KEY_F17": 92,
+"KEY_F18": 93,
+"KEY_F19": 94,
+"KEY_F20": 95,
+"KEY_KPENTER": 96,
+"KEY_RIGHTCTRL": 97,
+"KEY_KPSLASH": 98,
+"KEY_SYSRQ": 99,
+"KEY_RIGHTALT": 100,
+"KEY_LINEFEED": 101,
+"KEY_HOME": 102,
+"KEY_UP": 103,
+"KEY_PAGEUP": 104,
+"KEY_LEFT": 105,
+"KEY_RIGHT": 106,
+"KEY_END": 107,
+"KEY_DOWN": 108,
+"KEY_PAGEDOWN": 109,
+"KEY_INSERT": 110,
+"KEY_DELETE": 111,
+"KEY_MACRO": 112,
+"KEY_MUTE": 113,
+"KEY_VOLUMEDOWN": 114,
+"KEY_VOLUMEUP": 115,
+"KEY_POWER": 116,
+"KEY_KPEQUAL": 117,
+"KEY_KPPLUSMINUS": 118,
+"KEY_PAUSE": 119,
+"KEY_F21": 120,
+"KEY_F22": 121,
+"KEY_F23": 122,
+"KEY_F24": 123,
+"KEY_KPCOMMA": 124,
+"KEY_LEFTMETA": 125,
+"KEY_RIGHTMETA": 126,
+"KEY_COMPOSE": 127,
+"KEY_STOP": 128,
+"KEY_AGAIN": 129,
+"KEY_PROPS": 130,
+"KEY_UNDO": 131,
+"KEY_FRONT": 132,
+"KEY_COPY": 133,
+"KEY_OPEN": 134,
+"KEY_PASTE": 135,
+"KEY_FIND": 136,
+"KEY_CUT": 137,
+"KEY_HELP": 138,
+"KEY_MENU": 139,
+"KEY_CALC": 140,
+"KEY_SETUP": 141,
+"KEY_SLEEP": 142,
+"KEY_WAKEUP": 143,
+"KEY_FILE": 144,
+"KEY_SENDFILE": 145,
+"KEY_DELETEFILE": 146,
+"KEY_XFER": 147,
+"KEY_PROG1": 148,
+"KEY_PROG2": 149,
+"KEY_WWW": 150,
+"KEY_MSDOS": 151,
+"KEY_COFFEE": 152,
+"KEY_DIRECTION": 153,
+"KEY_CYCLEWINDOWS": 154,
+"KEY_MAIL": 155,
+"KEY_BOOKMARKS": 156,
+"KEY_COMPUTER": 157,
+"KEY_BACK": 158,
+"KEY_FORWARD": 159,
+"KEY_CLOSECD": 160,
+"KEY_EJECTCD": 161,
+"KEY_EJECTCLOSECD": 162,
+"KEY_NEXTSONG": 163,
+"KEY_PLAYPAUSE": 164,
+"KEY_PREVIOUSSONG": 165,
+"KEY_STOPCD": 166,
+"KEY_RECORD": 167,
+"KEY_REWIND": 168,
+"KEY_PHONE": 169,
+"KEY_ISO": 170,
+"KEY_CONFIG": 171,
+"KEY_HOMEPAGE": 172,
+"KEY_REFRESH": 173,
+"KEY_EXIT": 174,
+"KEY_MOVE": 175,
+"KEY_EDIT": 176,
+"KEY_SCROLLUP": 177,
+"KEY_SCROLLDOWN": 178,
+"KEY_KPLEFTPAREN": 179,
+"KEY_KPRIGHTPAREN": 180,
+"KEY_INTL1": 181,
+"KEY_INTL2": 182,
+"KEY_INTL3": 183,
+"KEY_INTL4": 184,
+"KEY_INTL5": 185,
+"KEY_INTL6": 186,
+"KEY_INTL7": 187,
+"KEY_INTL8": 188,
+"KEY_INTL9": 189,
+"KEY_LANG1": 190,
+"KEY_LANG2": 191,
+"KEY_LANG3": 192,
+"KEY_LANG4": 193,
+"KEY_LANG5": 194,
+"KEY_LANG6": 195,
+"KEY_LANG7": 196,
+"KEY_LANG8": 197,
+"KEY_LANG9": 198,
+"KEY_PLAYCD": 200,
+"KEY_PAUSECD": 201,
+"KEY_PROG3": 202,
+"KEY_PROG4": 203,
+"KEY_SUSPEND": 205,
+"KEY_CLOSE": 206,
+"KEY_PLAY": 207,
+"KEY_FASTFORWARD": 208,
+"KEY_BASSBOOST": 209,
+"KEY_PRINT": 210,
+"KEY_HP": 211,
+"KEY_CAMERA": 212,
+"KEY_SOUND": 213,
+"KEY_QUESTION": 214,
+"KEY_EMAIL": 215,
+"KEY_CHAT": 216,
+"KEY_SEARCH": 217,
+"KEY_CONNECT": 218,
+"KEY_FINANCE": 219,
+"KEY_SPORT": 220,
+"KEY_SHOP": 221,
+"KEY_ALTERASE": 222,
+"KEY_CANCEL": 223,
+"KEY_BRIGHTNESSDOWN": 224,
+"KEY_BRIGHTNESSUP": 225,
+"KEY_MEDIA": 226,
 "KEY_VMODE": 227,
-"KEY_UNKNOWN": 240, 
-"KEY_OK": 352, 
-"KEY_SELECT": 353, 
-"KEY_GOTO": 354, 
-"KEY_CLEAR": 355, 
-"KEY_POWER2": 356, 
-"KEY_OPTION": 357, 
-"KEY_INFO": 358, 
-"KEY_TIME": 359, 
-"KEY_VENDOR": 360, 
-"KEY_ARCHIVE": 361, 
-"KEY_PROGRAM": 362, 
-"KEY_CHANNEL": 363, 
-"KEY_FAVORITES": 364, 
-"KEY_EPG": 365, 
-"KEY_PVR": 366, 
-"KEY_MHP": 367, 
-"KEY_LANGUAGE": 368, 
-"KEY_TITLE": 369, 
-"KEY_SUBTITLE": 370, 
-"KEY_ANGLE": 371, 
-"KEY_ZOOM": 372, 
-"KEY_MODE": 373, 
-"KEY_KEYBOARD": 374, 
-"KEY_SCREEN": 375, 
-"KEY_PC": 376, 
-"KEY_TV": 377, 
-"KEY_TV2": 378, 
-"KEY_VCR": 379, 
-"KEY_VCR2": 380, 
-"KEY_SAT": 381, 
-"KEY_SAT2": 382, 
-"KEY_CD": 383, 
-"KEY_TAPE": 384, 
-"KEY_RADIO": 385, 
-"KEY_TUNER": 386, 
-"KEY_PLAYER": 387, 
-"KEY_TEXT": 388, 
-"KEY_DVD": 389, 
-"KEY_AUX": 390, 
-"KEY_MP3": 391, 
-"KEY_AUDIO": 392, 
-"KEY_VIDEO": 393, 
-"KEY_DIRECTORY": 394, 
-"KEY_LIST": 395, 
-"KEY_MEMO": 396, 
-"KEY_CALENDAR": 397, 
-"KEY_RED": 398, 
-"KEY_GREEN": 399, 
-"KEY_YELLOW": 400, 
-"KEY_BLUE": 401, 
-"KEY_CHANNELUP": 402, 
-"KEY_CHANNELDOWN": 403, 
-"KEY_FIRST": 404, 
-"KEY_LAST": 405, 
-"KEY_AB": 406, 
-"KEY_NEXT": 407, 
-"KEY_RESTART": 408, 
-"KEY_SLOW": 409, 
-"KEY_SHUFFLE": 410, 
-"KEY_BREAK": 411, 
-"KEY_PREVIOUS": 412, 
-"KEY_DIGITS": 413, 
-"KEY_TEEN": 414, 
-"KEY_TWEN": 415, 
-"KEY_DEL_EOL": 448, 
-"KEY_DEL_EOS": 449, 
-"KEY_INS_LINE": 450, 
-"KEY_DEL_LINE": 451, 
+"KEY_UNKNOWN": 240,
+"KEY_OK": 352,
+"KEY_SELECT": 353,
+"KEY_GOTO": 354,
+"KEY_CLEAR": 355,
+"KEY_POWER2": 356,
+"KEY_OPTION": 357,
+"KEY_INFO": 358,
+"KEY_TIME": 359,
+"KEY_VENDOR": 360,
+"KEY_ARCHIVE": 361,
+"KEY_PROGRAM": 362,
+"KEY_CHANNEL": 363,
+"KEY_FAVORITES": 364,
+"KEY_EPG": 365,
+"KEY_PVR": 366,
+"KEY_MHP": 367,
+"KEY_LANGUAGE": 368,
+"KEY_TITLE": 369,
+"KEY_SUBTITLE": 370,
+"KEY_ANGLE": 371,
+"KEY_ZOOM": 372,
+"KEY_MODE": 373,
+"KEY_KEYBOARD": 374,
+"KEY_SCREEN": 375,
+"KEY_PC": 376,
+"KEY_TV": 377,
+"KEY_TV2": 378,
+"KEY_VCR": 379,
+"KEY_VCR2": 380,
+"KEY_SAT": 381,
+"KEY_SAT2": 382,
+"KEY_CD": 383,
+"KEY_TAPE": 384,
+"KEY_RADIO": 385,
+"KEY_TUNER": 386,
+"KEY_PLAYER": 387,
+"KEY_TEXT": 388,
+"KEY_DVD": 389,
+"KEY_AUX": 390,
+"KEY_MP3": 391,
+"KEY_AUDIO": 392,
+"KEY_VIDEO": 393,
+"KEY_DIRECTORY": 394,
+"KEY_LIST": 395,
+"KEY_MEMO": 396,
+"KEY_CALENDAR": 397,
+"KEY_RED": 398,
+"KEY_GREEN": 399,
+"KEY_YELLOW": 400,
+"KEY_BLUE": 401,
+"KEY_CHANNELUP": 402,
+"KEY_CHANNELDOWN": 403,
+"KEY_FIRST": 404,
+"KEY_LAST": 405,
+"KEY_AB": 406,
+"KEY_NEXT": 407,
+"KEY_RESTART": 408,
+"KEY_SLOW": 409,
+"KEY_SHUFFLE": 410,
+"KEY_BREAK": 411,
+"KEY_PREVIOUS": 412,
+"KEY_DIGITS": 413,
+"KEY_TEEN": 414,
+"KEY_TWEN": 415,
+"KEY_DEL_EOL": 448,
+"KEY_DEL_EOS": 449,
+"KEY_INS_LINE": 450,
+"KEY_DEL_LINE": 451,
 "KEY_ASCII": 510,
-"KEY_MAX": 511, 
-"BTN_0": 256, 
-"BTN_1": 257, 
+"KEY_MAX": 511,
+"BTN_0": 256,
+"BTN_1": 257,
 }
index a2d85ff..a07271c 100644 (file)
@@ -13,7 +13,7 @@ we need:
  - maybe a lookup "device,key,flags" -> actions? (lazy validation, on bindAction)
  - devices as ids
  - seperate native from python keys? (currently, if an action wasn't found, it's ignored.)
+
 Sorry. I spent 3 days on thinking how this could be made better, and it just DID NOT WORKED OUT.
 
 If you have a better idea, please tell me.
@@ -45,7 +45,7 @@ RESULT eActionMap::getInstance(ePtr<eActionMap> &ptr)
 void eActionMap::bindAction(const std::string &context, int priority, int id, eWidget *widget)
 {
        eActionBinding bnd;
-       
+
        bnd.m_context = context;
        bnd.m_widget = widget;
        bnd.m_id = id;
@@ -55,7 +55,7 @@ void eActionMap::bindAction(const std::string &context, int priority, int id, eW
 void eActionMap::bindAction(const std::string &context, int priority, ePyObject function)
 {
        eActionBinding bnd;
-       
+
        bnd.m_context = context;
        bnd.m_widget = 0;
        Py_INCREF(function);
@@ -107,7 +107,7 @@ void eActionMap::bindKey(const std::string &domain, const std::string &device, i
                        return;
                }
        }
-       
+
                // we didn't find the action, so it must be a pythonAction
        ePythonKeyBinding bind;
 
@@ -148,7 +148,7 @@ struct call_entry
 void eActionMap::keyPressed(const std::string &device, int key, int flags)
 {
        std::list<call_entry> call_list;
-       
+
                /* iterate active contexts. */
        for (std::multimap<int,eActionBinding>::iterator c(m_bindings.begin());
                c != m_bindings.end(); ++c)
index edcfac6..cdc854f 100644 (file)
@@ -30,9 +30,9 @@ public:
 
        void bindKey(const std::string &domain, const std::string &device, int key, int flags, const std::string &context, const std::string &action);
        void unbindKeyDomain(const std::string &domain);
-       
+
        void keyPressed(const std::string &device, int key, int flags);
-       
+
 #ifndef SWIG
        static RESULT getInstance(ePtr<eActionMap> &);
 private:
@@ -45,14 +45,14 @@ private:
 //             eActionContext *m_context;
                std::string m_context; // FIXME
                std::string m_domain;
-               
+
                ePyObject m_fnc;
-               
+
                eWidget *m_widget;
                int m_id;
                int m_prev_seen_make_key;
        };
-       
+
        std::multimap<int, eActionBinding> m_bindings;
 
        friend struct compare_string_keybind_native;
@@ -62,13 +62,13 @@ private:
                std::string m_domain;
                int m_key;
                int m_flags;
-               
+
 //             eActionContext *m_context;
                int m_action;
        };
-       
+
        std::multimap<std::string, eNativeKeyBinding> m_native_keys;
-       
+
        friend struct compare_string_keybind_python;
        struct ePythonKeyBinding
        {
@@ -76,10 +76,10 @@ private:
                std::string m_domain;
                int m_key;
                int m_flags;
-               
+
                std::string m_action;
        };
-       
+
        std::multimap<std::string, ePythonKeyBinding> m_python_keys;
 #endif
 };
index cad432a..f1a0992 100644 (file)
@@ -13,78 +13,78 @@ def filter(g):
                        while g.next()[1] != "\n":
                                pass
                        continue
-               
+
                if t[1] != "\n":
 #                      print t
                        yield t[1]
 
 def do_file(f, mode):
        tokens = filter(tokenize.generate_tokens(open(f, 'r').readline))
-       
+
        sys.stderr.write("parsing %s\n" % f)
-       
+
        state = 0
-       
+
        classstate = 0
-       
+
        firsthit = 1
-       
+
        while 1:
                try:
                        t = tokens.next()
                except:
                        break
-               
+
                if t == "class":
                        classname = tokens.next()
                        classstate = state
-               
+
                if t == "{":
                        state = state + 1
-               
+
                if t == "}":
                        state = state - 1
-               
+
                if t == "enum" and state == classstate + 1:
                        actionname = tokens.next()
-                       
+
                        if actionname == "{":
                                while tokens.next() != "}":
                                        pass
                                continue
-                       
+
                        if actionname[-7:] == "Actions":
                                if tokens.next() != "{":
                                        try:
                                                print classname
                                        except:
                                                pass
-                               
+
                                        try:
                                                print actionname
                                        except:
                                                pass
-                               
+
                                        raise Exception("action enum must be simple.")
-                       
+
                                counter = 0
-                       
+
                                while 1:
-       
+
                                        t = tokens.next()
-                                       
+
                                        if t == "=":
                                                tokens.next()
                                                t = tokens.next()
-       
+
                                        if t == "}":
                                                break
-                                       
+
                                        if counter:
                                                if t != ",":
                                                        raise Exception("no comma")
                                                t = tokens.next()
-                               
+
                                        if firsthit:
 
                                                if mode == "include":
index 43000ff..c5386f8 100644 (file)
@@ -5,17 +5,17 @@ class Stopwatch
 public:
        struct timespec m_start;
        struct timespec m_stop;
-       
+
        Stopwatch()
        {
                clock_gettime(CLOCK_MONOTONIC, &m_start);
        }
-       
+
        void start()
        {
                clock_gettime(CLOCK_MONOTONIC, &m_start);
        }
-       
+
        void stop()
        {
                clock_gettime(CLOCK_MONOTONIC, &m_stop);
@@ -23,7 +23,7 @@ public:
 
        unsigned int elapsed_us()
        {
-               return 
+               return
                        ((m_stop.tv_sec - m_start.tv_sec) * 1000000) +
                                (m_stop.tv_nsec - m_start.tv_nsec) / 1000;
        }
index 5dfdfad..38670e4 100644 (file)
@@ -55,20 +55,20 @@ int eIOBuffer::peek(void *dest, int len) const
        int p=ptr;
        int written=0;
        while (len)
-       {       
+       {
                if (i == buffer.end())
                        break;
                int tc=i->len-p;
                if (tc > len)
                        tc = len;
-       
+
                memcpy(dst, i->data+p, tc);
                dst+=tc;
                written+=tc;
-       
+
                ++i;
                p=0;
-                       
+
                len-=tc;
        }
        return written;
@@ -149,13 +149,13 @@ int eIOBuffer::tofile(int fd, int len)
        int written=0;
        int w;
        while (len && !buffer.empty())
-       {       
+       {
                if (buffer.begin() == buffer.end())
                        break;
                int tc=buffer.front().len-ptr;
                if (tc > len)
                        tc = len;
-       
+
                w=::write(fd, buffer.front().data+ptr, tc);
                if (w < 0)
                {
@@ -166,7 +166,7 @@ int eIOBuffer::tofile(int fd, int len)
                ptr+=w;
                if (ptr == buffer.front().len)
                        removeblock();
-               written+=w;     
+               written+=w;
 
                len-=w;
                if (tc != w)
@@ -181,7 +181,7 @@ int eIOBuffer::searchchr(char ch) const
        int p=ptr;
        int c=0;
        while (1)
-       {       
+       {
                if (i == buffer.end())
                        break;
                while (p < i->len)
index 6f79844..699c154 100644 (file)
@@ -41,7 +41,7 @@ int bidirpipe(int pfd[], const char *cmd , const char * const argv[], const char
                if (cwd)
                        chdir(cwd);
 
-               execvp(cmd, (char * const *)argv); 
+               execvp(cmd, (char * const *)argv);
                                /* the vfork will actually suspend the parent thread until execvp is called. thus it's ok to use the shared arg/cmdline pointers here. */
                _exit(0);
        }
@@ -115,7 +115,7 @@ int eConsoleAppContainer::execute(const char *cmdline, const char * const argv[]
        ::fcntl(fd[1], F_SETFL, O_NONBLOCK);
        ::fcntl(fd[2], F_SETFL, O_NONBLOCK);
        in = eSocketNotifier::create(eApp, fd[0], eSocketNotifier::Read|eSocketNotifier::Priority|eSocketNotifier::Hungup );
-       out = eSocketNotifier::create(eApp, fd[1], eSocketNotifier::Write, false);  
+       out = eSocketNotifier::create(eApp, fd[1], eSocketNotifier::Write, false);
        err = eSocketNotifier::create(eApp, fd[2], eSocketNotifier::Read|eSocketNotifier::Priority );
        CONNECT(in->activated, eConsoleAppContainer::readyRead);
        CONNECT(out->activated, eConsoleAppContainer::readyWrite);
index 5b1c729..c33018d 100644 (file)
@@ -187,7 +187,7 @@ int eMainloop::processOneEvent(unsigned int twisted_timeout, PyObject **res, ePy
                if (it != m_timer_list.end())
                {
                        eTimer *tmr = *it;
-                       timespec now; 
+                       timespec now;
                        clock_gettime(CLOCK_MONOTONIC, &now);
                        /* process all timers which are ready. first remove them out of the list. */
                        while (tmr->needsActivation(now))
index 6040565..86bd7f1 100644 (file)
@@ -2,7 +2,7 @@
 #define __E_ERROR__
 
 #include <string>
-#include <map>       
+#include <map>
 #include <new>
 #include <libsig_comp.h>
 
index 9034727..a3604c3 100644 (file)
@@ -176,7 +176,7 @@ class eSemaphore
 public:
        eSemaphore();
        ~eSemaphore();
-       
+
        int down();
        int decrement();
        int up();
index 8fec09a..e2ad7ac 100644 (file)
@@ -68,51 +68,51 @@ private:
        iterator cur;
 public:
        iterator begin()
-       {                               
+       {
        //      makes implicit type conversion form std::list::iterator to ePtrList::iterator
-               return std::list<T*>::begin();          
+               return std::list<T*>::begin();
        }
 
        iterator end()
-       {                               
+       {
        //      makes implicit type conversion form std::list::iterator to ePtrList::iterator
-               return std::list<T*>::end();            
+               return std::list<T*>::end();
        }
 
        const_iterator begin() const
-       {                               
+       {
        //      makes implicit type conversion form std::list::const_iterator to ePtrList::const_iterator
-               return std::list<T*>::begin();          
+               return std::list<T*>::begin();
        }
 
        const_iterator end() const
-       {                               
+       {
        //      makes implicit type conversion form std::list::const_iterator to ePtrList::const_iterator
-               return std::list<T*>::end();            
+               return std::list<T*>::end();
        }
 
        reverse_iterator rbegin()
-       {                               
+       {
        //      makes implicit type conversion form std::list::reverse:_iterator to ePtrList::reverse_iterator
-               return std::list<T*>::rbegin();         
+               return std::list<T*>::rbegin();
        }
 
        reverse_iterator rend()
-       {                               
+       {
        //      makes implicit type conversion form std::list::reverse_iterator to ePtrList::reverse_iterator
-               return std::list<T*>::rend();           
+               return std::list<T*>::rend();
        }
 
        const_reverse_iterator rbegin() const
-       {                               
+       {
        //      makes implicit type conversion form std::list::const_reverse_iterator to ePtrList::const_reverse_iterator
-               return std::list<T*>::rbegin();         
+               return std::list<T*>::rbegin();
        }
 
        const_reverse_iterator rend() const
-       {                               
+       {
        //      makes implicit type conversion form std::list::const_reverse_iterator to ePtrList::const_reverse_iterator
-               return std::list<T*>::rend();           
+               return std::list<T*>::rend();
        }
 
        iterator erase(iterator it)
@@ -131,32 +131,32 @@ public:
        //      If auto-deletion is enabled, than the list call delete for all removed items
                while (from != to)
                        from = erase(from);
-       
+
                return from;
        }
 
-       operator iterator()     
+       operator iterator()
        {
        //      Returns a iterator that equal to begin() of the list
-               return begin(); 
+               return begin();
        }
 
        operator const_iterator() const
        {
        //      Returns a const_iterator that equal to begin() of the list
-               return begin(); 
+               return begin();
        }
 
        operator reverse_iterator()
        {
        //      Returns a reverse_iterator that equal to rbegin() of the list
-               return rbegin();        
+               return rbegin();
        }
 
-       operator const_reverse_iterator() const 
+       operator const_reverse_iterator() const
        {
        //      Returns a const_reverse_iterator that equal to rbegin() of the list
-               return rbegin();        
+               return rbegin();
        }
 
        std::vector<T>* getVector()
@@ -198,7 +198,7 @@ public:
        {
                return *operator->();
        }
-       
+
        operator T*() const
        {
                return operator->();
@@ -372,7 +372,7 @@ public:
 template <class T>
 ePtrList<T>::ePtrList()
     :cur(std::list<T*>::begin())
-{              
+{
 
 }
 
@@ -380,7 +380,7 @@ ePtrList<T>::ePtrList()
 template <class T>
 ePtrList<T>::ePtrList(const ePtrList& e)
        :std::list<T*>(e), cur(e.cur)
-{              
+{
 }
 
 /////////////////// ePtrList Destructor /////////////////////////////
@@ -392,11 +392,11 @@ inline ePtrList<T>::~ePtrList()
 /////////////////// ePtrList sort() /////////////////////////
 template <class T>
 inline void ePtrList<T>::sort()
-{              
+{
 //     Sorts all items in the list.
 //     The type T must have a operator <.
        std::list<T*>::sort(typename ePtrList<T>::less());
-}      
+}
 
 /////////////////// ePtrList remove(T*) /////////////////////////
 template <class T>
@@ -420,7 +420,7 @@ inline void ePtrList<T>::remove(T* t)
                        it = std::list<T*>::erase(it);  // remove all other items that equals to t (no delete is called..)
                else
                        it++;
-                       
+
 }
 
 /////////////////// ePtrList singleremove(T*) /////////////////////////
@@ -443,11 +443,11 @@ inline void ePtrList<T>::singleremove(T* t)
 
 /////////////////// ePtrList clear() //////////////////
 template <class T>
-inline void ePtrList<T>::clear()       
-{              
+inline void ePtrList<T>::clear()
+{
 //     Remove all items from the list
 //     If auto-deletion is enabled, than the list call delete for all items in the list
-       erase(std::list<T*>::begin(), std::list<T*>::end());    
+       erase(std::list<T*>::begin(), std::list<T*>::end());
 }
 
 /////////////////// ePtrList pop_back() ////////////////////
@@ -472,22 +472,22 @@ inline void ePtrList<T>::pop_front()
 
 /////////////////// ePtrList push_back(T*) ////////////////////
 template <class T>
-inline void ePtrList<T>::push_back(T* x)       
-{              
+inline void ePtrList<T>::push_back(T* x)
+{
 // Add a new item at the end of the list.
 // The current item is set to the last item;
        std::list<T*>::push_back(x);
-       last(); 
+       last();
 }
 
 /////////////////// ePtrList push_front(T*) ////////////////////
 template <class T>
-inline void ePtrList<T>::push_front(T* x)      
-{              
+inline void ePtrList<T>::push_front(T* x)
+{
 // Add a new item at the begin of the list.
 // The current item is set to the first item;
        std::list<T*>::push_front(x);
-       first();        
+       first();
 }
 
 /////////////////// ePtrList take() ////////////////////
@@ -532,7 +532,7 @@ template <class T>
 inline T* ePtrList<T>::current()
 {
 //     Returns a pointer to the current list item. The current item may be null (implies that the current index is -1).
-       return cur==end() ? 0 : *cur;   
+       return cur==end() ? 0 : *cur;
 }
 
 /////////////////// ePtrList next() ////////////////////
@@ -567,7 +567,7 @@ template <class T>
 inline T* ePtrList<T>::first()
 {
 // Returns a pointer to the first item in the list and makes this the current list item, or null if the list is empty.
-       return *(cur = begin());        
+       return *(cur = begin());
 }
 
 /////////////////// ePtrList last() ////////////////////
@@ -583,7 +583,7 @@ template <class T>
 inline const T* ePtrList<T>::current() const
 {
 //     Returns a pointer to the current list item. The current item may be null (implies that the current index is not valid)
-       return cur==end() ? 0 : *cur;   
+       return cur==end() ? 0 : *cur;
 }
 
 /////////////////// const ePtrList next() ////////////////////
@@ -618,7 +618,7 @@ template <class T>
 inline const T* ePtrList<T>::first() const
 {
 // Returns a pointer to the first item in the list and makes this the current list item, or null if the list is empty.
-       return *(cur = begin());        
+       return *(cur = begin());
 }
 
 /////////////////// const ePtrList last() ////////////////////
@@ -645,14 +645,14 @@ template <class T>
 ePtrList<T>::operator bool() const
 {
 //     Returns a bool that contains true, when the list is NOT empty otherwise false
-       return !std::list<T*>::empty(); 
+       return !std::list<T*>::empty();
 }
 
 template <class T>
 bool ePtrList<T>::operator!() const
 {
 //     Returns a bool that contains true, when the list is empty otherwise false
-       return std::list<T*>::empty();  
+       return std::list<T*>::empty();
 }
 
 template <class T>
@@ -715,51 +715,51 @@ private:
        iterator cur;
 public:
        iterator begin()
-       {                               
+       {
        //      makes implicit type conversion form std::list::iterator to eSmartPtrList::iterator
-               return std::list<ePtr<T> >::begin();            
+               return std::list<ePtr<T> >::begin();
        }
 
        iterator end()
-       {                               
+       {
        //      makes implicit type conversion form std::list::iterator to eSmartPtrList::iterator
-               return std::list<ePtr<T> >::end();              
+               return std::list<ePtr<T> >::end();
        }
 
        const_iterator begin() const
-       {                               
+       {
        //      makes implicit type conversion form std::list::const_iterator to eSmartPtrList::const_iterator
-               return std::list<ePtr<T> >::begin();            
+               return std::list<ePtr<T> >::begin();
        }
 
        const_iterator end() const
-       {                               
+       {
        //      makes implicit type conversion form std::list::const_iterator to eSmartPtrList::const_iterator
-               return std::list<ePtr<T> >::end();              
+               return std::list<ePtr<T> >::end();
        }
 
        reverse_iterator rbegin()
-       {                               
+       {
        //      makes implicit type conversion form std::list::reverse:_iterator to eSmartPtrList::reverse_iterator
-               return std::list<ePtr<T> >::rbegin();           
+               return std::list<ePtr<T> >::rbegin();
        }
 
        reverse_iterator rend()
-       {                               
+       {
        //      makes implicit type conversion form std::list::reverse_iterator to eSmartPtrList::reverse_iterator
-               return std::list<ePtr<T> >::rend();             
+               return std::list<ePtr<T> >::rend();
        }
 
        const_reverse_iterator rbegin() const
-       {                               
+       {
        //      makes implicit type conversion form std::list::const_reverse_iterator to eSmartPtrList::const_reverse_iterator
-               return std::list<ePtr<T> >::rbegin();           
+               return std::list<ePtr<T> >::rbegin();
        }
 
        const_reverse_iterator rend() const
-       {                               
+       {
        //      makes implicit type conversion form std::list::const_reverse_iterator to eSmartPtrList::const_reverse_iterator
-               return std::list<ePtr<T> >::rend();             
+               return std::list<ePtr<T> >::rend();
        }
 
        iterator erase(iterator it)
@@ -779,32 +779,32 @@ public:
        //      If auto-deletion is enabled, than the list call delete for all removed items
                while (from != to)
                        from = erase(from);
-       
+
                return from;
        }
 
-       operator iterator()     
+       operator iterator()
        {
        //      Returns a iterator that equal to begin() of the list
-               return begin(); 
+               return begin();
        }
 
        operator const_iterator() const
        {
        //      Returns a const_iterator that equal to begin() of the list
-               return begin(); 
+               return begin();
        }
 
        operator reverse_iterator()
        {
        //      Returns a reverse_iterator that equal to rbegin() of the list
-               return rbegin();        
+               return rbegin();
        }
 
-       operator const_reverse_iterator() const 
+       operator const_reverse_iterator() const
        {
        //      Returns a const_reverse_iterator that equal to rbegin() of the list
-               return rbegin();        
+               return rbegin();
        }
 
        std::vector<T>* getVector()
@@ -846,7 +846,7 @@ public:
        {
                return *operator->();
        }
-       
+
        operator T*() const
        {
                return operator->();
@@ -1020,7 +1020,7 @@ public:
 template <class T>
 eSmartPtrList<T>::eSmartPtrList()
     :cur(std::list<ePtr<T> >::begin())
-{              
+{
 
 }
 
@@ -1028,7 +1028,7 @@ eSmartPtrList<T>::eSmartPtrList()
 template <class T>
 eSmartPtrList<T>::eSmartPtrList(const eSmartPtrList& e)
        :std::list<ePtr<T> >(e), cur(e.cur)
-{              
+{
 }
 
 /////////////////// eSmartPtrList Destructor /////////////////////////////
@@ -1041,11 +1041,11 @@ inline eSmartPtrList<T>::~eSmartPtrList()
 /////////////////// eSmartPtrList sort() /////////////////////////
 template <class T>
 inline void eSmartPtrList<T>::sort()
-{              
+{
 //     Sorts all items in the list.
 //     The type T must have a operator <.
        std::list<ePtr<T> >::sort(eSmartPtrList<T>::less());
-}      
+}
 
 /////////////////// eSmartPtrList remove(T*) /////////////////////////
 template <class T>
@@ -1063,22 +1063,22 @@ inline void eSmartPtrList<T>::remove(T* t)
                }
                else
                        it++;
-       
+
        while (it != std::list<ePtr<T> >::end())
                if (*it == t)
                        it = std::list<ePtr<T> >::erase(it);  // remove all other items that equals to t (no delete is called..)
                else
                        it++;
-                       
+
 }
 
 /////////////////// eSmartPtrList clear() //////////////////
 template <class T>
-inline void eSmartPtrList<T>::clear()  
-{              
+inline void eSmartPtrList<T>::clear()
+{
 //     Remove all items from the list
 //     If auto-deletion is enabled, than the list call delete for all items in the list
-       erase(std::list<ePtr<T> >::begin(), std::list<ePtr<T> >::end());        
+       erase(std::list<ePtr<T> >::begin(), std::list<ePtr<T> >::end());
 }
 
 /////////////////// eSmartPtrList pop_back() ////////////////////
@@ -1103,22 +1103,22 @@ inline void eSmartPtrList<T>::pop_front()
 
 /////////////////// eSmartPtrList push_back(T*) ////////////////////
 template <class T>
-inline void eSmartPtrList<T>::push_back(T* x)  
-{              
+inline void eSmartPtrList<T>::push_back(T* x)
+{
 // Add a new item at the end of the list.
 // The current item is set to the last item;
        std::list<ePtr<T> >::push_back(x);
-       last(); 
+       last();
 }
 
 /////////////////// eSmartPtrList push_front(T*) ////////////////////
 template <class T>
-inline void eSmartPtrList<T>::push_front(T* x) 
-{              
+inline void eSmartPtrList<T>::push_front(T* x)
+{
 // Add a new item at the begin of the list.
 // The current item is set to the first item;
        std::list<ePtr<T> >::push_front(x);
-       first();        
+       first();
 }
 
 /////////////////// eSmartPtrList setCurrent(T*) ////////////////////
@@ -1142,7 +1142,7 @@ template <class T>
 inline T* eSmartPtrList<T>::current()
 {
 //     Returns a pointer to the current list item. The current item may be null (implies that the current index is -1).
-       return cur==end() ? 0 : *cur;   
+       return cur==end() ? 0 : *cur;
 }
 
 /////////////////// eSmartPtrList next() ////////////////////
@@ -1177,7 +1177,7 @@ template <class T>
 inline T* eSmartPtrList<T>::first()
 {
 // Returns a pointer to the first item in the list and makes this the current list item, or null if the list is empty.
-       return *(cur = begin());        
+       return *(cur = begin());
 }
 
 /////////////////// eSmartPtrList last() ////////////////////
@@ -1193,7 +1193,7 @@ template <class T>
 inline const T* eSmartPtrList<T>::current() const
 {
 //     Returns a pointer to the current list item. The current item may be null (implies that the current index is not valid)
-       return cur==end() ? 0 : *cur;   
+       return cur==end() ? 0 : *cur;
 }
 
 /////////////////// const eSmartPtrList next() ////////////////////
@@ -1228,7 +1228,7 @@ template <class T>
 inline const T* eSmartPtrList<T>::first() const
 {
 // Returns a pointer to the first item in the list and makes this the current list item, or null if the list is empty.
-       return *(cur = begin());        
+       return *(cur = begin());
 }
 
 /////////////////// const eSmartPtrList last() ////////////////////
@@ -1255,14 +1255,14 @@ template <class T>
 eSmartPtrList<T>::operator bool() const
 {
 //     Returns a bool that contains true, when the list is NOT empty otherwise false
-       return !std::list<T>::empty();  
+       return !std::list<T>::empty();
 }
 
 template <class T>
 bool eSmartPtrList<T>::operator!() const
 {
 //     Returns a bool that contains true, when the list is empty otherwise false
-       return std::list<T>::empty();   
+       return std::list<T>::empty();
 }
 
 #endif // _E_PTRLIST
index 641cc2d..a068118 100644 (file)
@@ -31,8 +31,8 @@ std::string getNum(int val, int sys)
        if (sys == 10)
                snprintf(buf, 12, "%i", val);
        else if (sys == 16)
-               snprintf(buf, 12, "%X", val);           
-       
+               snprintf(buf, 12, "%X", val);
+
        std::string res;
        res.assign(buf);
        return res;
@@ -695,10 +695,10 @@ std::string removeDVBChars(const std::string &s)
                                continue;
                        }
                }
-               
+
                res += s[i];
        }
-       
+
        return res;
 }
 
index 1c15e42..354cae4 100644 (file)
@@ -66,9 +66,9 @@ void eFilePushThread::thread()
                        m_current_position = current_span_offset;
                        bytes_read = 0;
                }
-               
+
                size_t maxread = m_buffersize;
-               
+
                        /* if we have a source span, don't read past the end */
                if (m_sg && maxread > current_span_remaining)
                        maxread = current_span_remaining;
@@ -143,9 +143,9 @@ void eFilePushThread::thread()
                        if (m_stop)
                                break;
 
-                               /* in stream_mode, we are sending EOF events 
+                               /* in stream_mode, we are sending EOF events
                                   over and over until somebody responds.
-                                  
+
                                   in stream_mode, think of evtEOF as "buffer underrun occurred". */
                        sendEvent(evtEOF);
 
@@ -209,7 +209,7 @@ void eFilePushThread::thread()
                if (m_stop == 0)
                        m_run_state = 1;
        }
-       
+
        } while (m_stop == 0);
        eDebug("FILEPUSH THREAD STOP");
 }
index c52443a..47ec4ed 100644 (file)
@@ -26,12 +26,12 @@ public:
 
        void pause();
        void resume();
-       
+
        void enablePVRCommit(int);
        /* stream mode will wait on EOF until more data is available. */
        void setStreamMode(int);
        void setScatterGather(iFilePushScatterGather *);
-       
+
        enum { evtEOF, evtReadError, evtWriteError, evtUser, evtStopped };
        Signal1<void,int> m_event;
 
index df7e577..b66f85e 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
 FreeSat Huffman decoder for VDR
 Copyright (C) 2008  DOM http://www.rst38.org.uk/vdr/
 Port to C++ / Enigma 2
@@ -60,8 +60,8 @@ freesatHuffmanDecoder::~freesatHuffmanDecoder()
        int     i, j;
        huffTableEntry *currentEntry, *nextEntry;
        for ( j = 0 ; j < 2; j++ )
-       { 
-               for ( i = 0 ; i < 256; i++ ) 
+       {
+               for ( i = 0 ; i < 256; i++ )
                {
                        currentEntry = m_tables[j][i];
                        while ( currentEntry != NULL )
@@ -198,7 +198,7 @@ std::string freesatHuffmanDecoder::decode(const unsigned char *src, size_t size)
 
        if (src[0] != 0x1f)
                return uncompressed;
-       
+
        const unsigned int table_index = src[1] - 1;
 
        if (table_index <= 1)
index 7200925..6c17a12 100644 (file)
@@ -1,13 +1,13 @@
 #ifndef FREESAT_H
 #define FREESAT_H
 
-#include <stdlib.h> 
+#include <stdlib.h>
 #include <unistd.h>
 #include <string>
 
 struct huffTableEntry;
 
-class freesatHuffmanDecoder 
+class freesatHuffmanDecoder
 {
 private:
        huffTableEntry *m_tables[2][256];
index 1aeaf3f..0da7eb4 100644 (file)
@@ -43,12 +43,12 @@ int eHttpStream::openUrl(const std::string &url, std::string &newurl)
        close();
 
        int pathindex = uri.find("/", 7);
-       if (pathindex > 0) 
+       if (pathindex > 0)
        {
                hostname = uri.substr(7, pathindex - 7);
                uri = uri.substr(pathindex, uri.length() - pathindex);
-       } 
-       else 
+       }
+       else
        {
                hostname = uri.substr(7, uri.length() - 7);
                uri = "/";
@@ -76,12 +76,12 @@ int eHttpStream::openUrl(const std::string &url, std::string &newurl)
                BIO_free_all(bio);
        }
        int customportindex = hostname.find(":");
-       if (customportindex > 0) 
+       if (customportindex > 0)
        {
                port = atoi(hostname.substr(customportindex + 1, hostname.length() - customportindex - 1).c_str());
                hostname = hostname.substr(0, customportindex);
-       } 
-       else if (customportindex == 0) 
+       }
+       else if (customportindex == 0)
        {
                port = atoi(hostname.substr(1, hostname.length() - 1).c_str());
                hostname = "localhost";
@@ -258,7 +258,7 @@ ssize_t eHttpStream::syncNextRead(void *buf, ssize_t length)
                {
                        memcpy(partialPkt, e, partialPktSz);
                }
-       } 
+       }
        return (length - partialPktSz);
 }
 
@@ -289,7 +289,7 @@ ssize_t eHttpStream::httpChunkedRead(void *buf, size_t count)
                {
                        if (0 == currentChunkSize)
                        {
-                               do 
+                               do
                                {
                                        ret = readLine(streamSocket, &tmpBuf, &tmpBufSize);
                                        if (ret < 0) return -1;
index b9cf1de..0243b92 100644 (file)
@@ -39,7 +39,7 @@ void eInit::setRunlevel(int nrl)
        while (nrl>rl)
        {
                rl++;
-                       
+
                for (std::list<std::pair<int,eAutoInit*> >::iterator i(cl->begin()); i!=cl->end(); ++i)
                {
                        if ((*i).first == rl)
@@ -49,7 +49,7 @@ void eInit::setRunlevel(int nrl)
                        }
                }
        }
-       
+
        while (nrl<rl)
        {
                for (std::list<std::pair<int,eAutoInit*> >::iterator i(cl->begin()); i!=cl->end(); ++i)
index a7ad500..a0e94dd 100644 (file)
@@ -10,7 +10,7 @@ protected:
 
 public:
        iTsSource(int packetsize = 188) : packetSize(packetsize) {}
-       
+
        /* NOTE: you must be able to handle short reads! */
        virtual ssize_t read(off_t offset, void *buf, size_t count)=0; /* NOTE: this is what you in normal case have to use!! */
 
index d6a5603..eb696c4 100644 (file)
@@ -9,7 +9,7 @@ eMessagePumpMT::eMessagePumpMT():
 }
 
 eMessagePumpMT::~eMessagePumpMT()
-{      
+{
        content.lock(); // blocks until all messages are processed.
        close(fd[0]);
        close(fd[1]);
index 1d80408..0f20b7e 100644 (file)
@@ -2,33 +2,33 @@
 
 eConfigManager *eConfigManager::instance = NULL;
 
-eConfigManager::eConfigManager() 
-{ 
-       instance = this; 
+eConfigManager::eConfigManager()
+{
+       instance = this;
 }
 
-eConfigManager::~eConfigManager() 
-{ 
-       instance = NULL; 
+eConfigManager::~eConfigManager()
+{
+       instance = NULL;
 }
 
-eConfigManager *eConfigManager::getInstance() 
-{ 
-       return instance; 
+eConfigManager *eConfigManager::getInstance()
+{
+       return instance;
 }
 
-std::string eConfigManager::getConfigValue(const char *key) 
+std::string eConfigManager::getConfigValue(const char *key)
 {
        return instance ? instance->getConfig(key) : "";
 }
 
-int eConfigManager::getConfigIntValue(const char *key, int defaultvalue) 
+int eConfigManager::getConfigIntValue(const char *key, int defaultvalue)
 {
        std::string value = getConfigValue(key);
        return (value != "") ? atoi(value.c_str()) : defaultvalue;
 }
 
-bool eConfigManager::getConfigBoolValue(const char *key, bool defaultvalue) 
+bool eConfigManager::getConfigBoolValue(const char *key, bool defaultvalue)
 {
        std::string value = getConfigValue(key);
        if (value == "True" || value == "true") return true;
index a899d0d..0066fb0 100644 (file)
@@ -81,9 +81,9 @@ ssize_t eRawFile::read(off_t offset, void *buf, size_t count)
                if (count < 0)
                        return 0;
        }
-       
+
        int ret;
-       
+
        ret = ::read(m_fd, buf, count);
 
        if (ret > 0)
@@ -124,7 +124,7 @@ int eRawFile::switchOffset(off_t off)
                if (filenr >= m_nrfiles)
                        filenr = m_nrfiles - 1;
                if (filenr != m_current_file)
-               {       
+               {
 //                     eDebug("-> %d", filenr);
                        close();
                        m_fd = openFileUncached(filenr);
@@ -133,7 +133,7 @@ int eRawFile::switchOffset(off_t off)
                }
        } else
                m_base_offset = 0;
-       
+
        if (off != m_last_offset)
        {
                m_last_offset = ::lseek(m_fd, off - m_base_offset, SEEK_SET) + m_base_offset;
index 9a2dd7a..f2dbc81 100644 (file)
@@ -38,12 +38,12 @@ int eThread::runAsync(int prio, int policy)
                /* the thread might already run. */
        if (sync())
                return -1;
-       
+
        ASSERT(m_state.value() == 1); /* sync postconditions */
        ASSERT(!m_alive);
        m_state.down();
        ASSERT(m_state.value() == 0);
-       
+
        m_alive = 1;
        m_started = 0;
 
@@ -52,7 +52,7 @@ int eThread::runAsync(int prio, int policy)
        pthread_attr_init(&attr);
        if (pthread_attr_setstacksize(&attr, default_stack_size) != 0)
                eDebug("[eThread] pthread_attr_setstacksize failed");
-       
+
        if (prio || policy)
        {
                struct sched_param p;
@@ -73,7 +73,7 @@ int eThread::runAsync(int prio, int policy)
                eDebug("couldn't create new thread");
                return -1;
        }
-       
+
        pthread_attr_destroy(&attr);
        return 0;
 }
index 8ee9659..85b2608 100644 (file)
  3 thread is running
  4 thread has finished, but not yet joined
  5 thread has joined (same as state 1)
+
  sync() will return:
        0 (="not alive") for 1, 4, 5
        1 for 3, 4
-       
+
        it will wait when state is 2. It can't differentiate between
        state 3 and 4, because a thread could always finish.
-       
+
        all other state transitions (1 -> 2, 4 -> 5) must be activately
        changed by either calling run() or kill().
  */
@@ -46,7 +46,7 @@ public:
        int run(int prio=0, int policy=0);
 
        virtual void thread()=0;
-       
+
                /* waits until thread is in "run" state */
                /* result: 0 - thread is not alive
                           1 - thread state unknown */
index 7a8ffd9..cc5edd8 100644 (file)
@@ -106,9 +106,9 @@ ssize_t readLine(int fd, char** buffer, size_t* bufsize)
 {
        size_t i = 0;
        int result;
-       while (1) 
+       while (1)
        {
-               if (i >= *bufsize) 
+               if (i >= *bufsize)
                {
                        char *newbuf = (char*)realloc(*buffer, (*bufsize)+1024);
                        if (newbuf == NULL)
index e9517cf..f36ca69 100644 (file)
@@ -9,7 +9,7 @@ DEFINE_REF(eComponentScan);
 void eComponentScan::scanEvent(int evt)
 {
 //     eDebug("scan event %d!", evt);
-       
+
        switch(evt)
        {
                case eDVBScan::evtFinish:
@@ -17,7 +17,7 @@ void eComponentScan::scanEvent(int evt)
                        m_done = 1;
                        ePtr<iDVBChannelList> db;
                        ePtr<eDVBResourceManager> res;
-                       
+
                        int err;
                        if ((err = eDVBResourceManager::getInstance(res)) != 0)
                        {
@@ -91,10 +91,10 @@ int eComponentScan::start(int feid, int flags, int networkid)
 
        if (m_done != -1)
                return -1;
-       
+
        m_done = 0;
        ePtr<eDVBResourceManager> mgr;
-       
+
        eDVBResourceManager::getInstance(mgr);
 
        eUsePtr<iDVBChannel> channel;
index a399796..ecfa27e 100644 (file)
@@ -13,37 +13,37 @@ class eComponentScan: public Object, public iObject
        void scanEvent(int event);
        ePtr<eConnection> m_scan_event_connection;
        ePtr<eDVBScan> m_scan;
-       
+
        int m_done, m_failed;
        eSmartPtrList<iDVBFrontendParameters> m_initial;
 #endif
 public:
        eComponentScan();
        ~eComponentScan();
-       
+
        PSignal0<void> statusChanged;
        PSignal0<void> newService;
-       
+
                /* progress between 0 and 100 */
        int getProgress();
-       
+
                /* get number of services */
        int getNumServices();
-       
+
                /* true when done or error */
        int isDone();
-       
+
                /* get last added service */
        void getLastServiceName(std::string &SWIG_OUTPUT);
        void getLastServiceRef(std::string &SWIG_OUTPUT);
-       
+
        int getError();
-       
+
        void clear();
        void addInitial(const eDVBFrontendParametersSatellite &p);
        void addInitial(const eDVBFrontendParametersCable &p);
        void addInitial(const eDVBFrontendParametersTerrestrial &p);
-       
+
                /* please keep the flags in sync with lib/dvb/scan.h ! */
        enum { scanNetworkSearch=1, scanRemoveServices=4, scanDontRemoveFeeds=8, scanDontRemoveUnscanned=16, clearToScanOnFirstNIT = 32, scanOnlyFree = 64 };
 
index c00c2e8..76e99ad 100644 (file)
@@ -153,7 +153,7 @@ void eAVSwitch::setColorFormat(int format)
        const char *svideo="svideo";
        const char *yuv="yuv";
        int fd;
-       
+
        if((fd = open("/proc/stb/avs/0/colorformat", O_WRONLY)) < 0) {
                printf("cannot open /proc/stb/avs/0/colorformat\n");
                return;
@@ -171,7 +171,7 @@ void eAVSwitch::setColorFormat(int format)
                case 3:
                        write(fd, yuv, strlen(yuv));
                        break;
-       }       
+       }
        close(fd);
 }
 
@@ -212,7 +212,7 @@ void eAVSwitch::setVideomode(int mode)
 {
        const char *pal="pal";
        const char *ntsc="ntsc";
-       
+
        if (mode == m_video_mode)
                return;
 
index 7aecc9f..0968496 100644 (file)
@@ -7,7 +7,7 @@
 #if !defined(KEY_OK)
 
 /**
- *  define some additional remote control keys in case they 
+ *  define some additional remote control keys in case they
  *  were not already defined above in <linux/input.h>
  */
 
index a3598dd..ad2ade4 100644 (file)
 /*
  *  note on the enigma input layer:
  *  the enigma input layer (rc*) supports n different devices which
- *  all have completely different interfaces, mapped down to 32bit + 
+ *  all have completely different interfaces, mapped down to 32bit +
  *  make/break/release codes mapped down (via xml files) to "actions".
  *  this was necessary to support multiple remote controls with proprietary
  *  interfaces. now everybody is using input devices, and thus adding
  *  another input layer seems to be a bit overkill. BUT:
  *  image a remote control with two hundred buttons. each and every function
- *  in enigma can be bound to a button. no need to use them twice. 
+ *  in enigma can be bound to a button. no need to use them twice.
  *  for example, you would have KEY_MENU assigned to a menu for setup etc.,
  *  but no audio and video settings, since you have special keys for that,
  *  and you don't want to display a big menu with entries that are available
@@ -28,8 +28,8 @@
  *  take this just as a (bad) example. another (better) example might be front-
  *  button-keys. usually you have KEY_UP, KEY_DOWN, KEY_POWER. you don't want
  *  them to behave like the remote-control-KEY_UP, KEY_DOWN and KEY_POWER,
- *  don't you? 
- *  so here we can map same keys of different input devices to different 
+ *  don't you?
+ *  so here we can map same keys of different input devices to different
  *  actions. have fun.
  */
 
index e879272..6288dc0 100644 (file)
@@ -90,7 +90,7 @@ public:
                listeners.remove(dev);
        }
        ~eRCDriver();
-       
+
        void enable(int en) { enabled=en; }
        virtual void setExclusive(bool) { }
        virtual bool isKeyboard() { return false; }
@@ -132,7 +132,7 @@ public:
        eRCDevice *producer;
        int code, flags;
 
-       eRCKey(eRCDevice *producer, int code, int flags): 
+       eRCKey(eRCDevice *producer, int code, int flags):
                producer(producer), code(code), flags(flags)
        {
        }
@@ -184,7 +184,7 @@ public:
 
 class eRCInput: public Object
 {
-       int locked;     
+       int locked;
        static eRCInput *instance;
        int keyboardMode;
 #ifdef SWIG
@@ -214,16 +214,16 @@ public:
           i.e. not plain remote controls. It's up to the input device
           driver to decide wheter an input device is a keyboard or
           not.
-          
-          kmNone will ignore all Ascii Characters sent from the 
+
+          kmNone will ignore all Ascii Characters sent from the
           keyboard/console driver, only give normal keycodes to the
           application.
-          
+
           kmAscii will filter out all keys which produce ascii characters,
           and send them instead. Note that Modifiers like shift will still
           be send. Control keys which produce escape codes are send using
-          normal keycodes. 
-          
+          normal keycodes.
+
           kmAll will ignore all keycodes, and send everything as ascii,
           including escape codes. Pretty much useless, since you should
           lock the console and pass this as the console fd for making the
@@ -234,7 +234,7 @@ public:
        {
                /*emit*/ keyEvent(key);
        }
-       
+
        void addDevice(const std::string &id, eRCDevice *dev);
        void removeDevice(const std::string &id);
        eRCDevice *getDevice(const std::string &id);
index 7aec43c..4e58442 100644 (file)
@@ -42,7 +42,7 @@ void eRCConsoleDriver::keyPressed(int)
        unsigned char *d = data;
        int num = read(handle, data, 16);
        unsigned char code;
-       
+
        int km = input->getKeyboardMode();
 
        if (km == eRCInput::kmNone)
index 9ea3b59..00d1959 100644 (file)
@@ -81,7 +81,7 @@ void eRCDeviceInputDev::handleCode(long rccode)
                                        ke.kb_index = ev->code;
                                        ::ioctl(consoleFd, KDGKBENT, &ke);
                                        if (ke.kb_value)
-                                               input->keyPressed(eRCKey(this, ke.kb_value & 0xff, eRCKey::flagAscii)); /* emit */ 
+                                               input->keyPressed(eRCKey(this, ke.kb_value & 0xff, eRCKey::flagAscii)); /* emit */
                                }
                        }
                        return;
@@ -102,13 +102,13 @@ void eRCDeviceInputDev::handleCode(long rccode)
        switch (ev->value)
        {
                case 0:
-                       input->keyPressed(eRCKey(this, ev->code, eRCKey::flagBreak)); /*emit*/ 
+                       input->keyPressed(eRCKey(this, ev->code, eRCKey::flagBreak)); /*emit*/
                        break;
                case 1:
-                       input->keyPressed(eRCKey(this, ev->code, 0)); /*emit*/ 
+                       input->keyPressed(eRCKey(this, ev->code, 0)); /*emit*/
                        break;
                case 2:
-                       input->keyPressed(eRCKey(this, ev->code, eRCKey::flagRepeat)); /*emit*/ 
+                       input->keyPressed(eRCKey(this, ev->code, eRCKey::flagRepeat)); /*emit*/
                        break;
        }
 }
@@ -175,7 +175,7 @@ public:
                }
                eDebug("Found %d input devices.", i);
        }
-       
+
        ~eInputDeviceInit()
        {
                for (itemlist::iterator it = items.begin(); it != items.end(); ++it)
index bcd74c4..7041829 100644 (file)
@@ -21,7 +21,7 @@ eRFmod::eRFmod()
 {
        ASSERT(!instance);
        instance = this;
-       
+
        fd = open("/dev/rfmod0", O_RDWR);
        if (fd < 0)
                eDebug("couldnt open /dev/rfmod0!!!!");
index 56f9ef5..72c4c51 100644 (file)
@@ -4,7 +4,7 @@
 class eRFmod
 {
        static eRFmod *instance;
-       
+
        int fd;
 #ifdef SWIG
        eRFmod();
index 2548609..b545f6d 100644 (file)
@@ -122,7 +122,7 @@ void ePMTClient::clientTLVReceived(unsigned char *tag, int length, unsigned char
                switch (tag[2])
                {
                case 0x31: /* ca_info */
-                       
+
                        break;
                case 0x33: /* ca_pmt_reply */
                        /* currently not used */
index 9925453..962f6e2 100644 (file)
@@ -9,7 +9,7 @@ extern const uint32_t crc32_table[256];
 
 /* Return a 32-bit CRC of the contents of the buffer. */
 
-static inline uint32_t 
+static inline uint32_t
 crc32(uint32_t val, const void *ss, int len)
 {
        const unsigned char *s =(const unsigned char *) ss;
index bacccfe..481bea6 100644 (file)
@@ -346,7 +346,7 @@ static ePtr<eDVBFrontendParameters> parseFrontendData(const char* line, int vers
 {
        switch(line[0])
        {
-               case 's': 
+               case 's':
                {
                        eDVBFrontendParametersSatellite sat;
                        int frequency, symbol_rate, polarisation, fec, orbital_position, inversion,
@@ -378,7 +378,7 @@ static ePtr<eDVBFrontendParameters> parseFrontendData(const char* line, int vers
                        feparm->setFlags(flags);
                        return feparm;
                }
-               case 't': 
+               case 't':
                {
                        eDVBFrontendParametersTerrestrial ter;
                        int frequency, bandwidth, code_rate_HP, code_rate_LP, modulation, transmission_mode,
index 62a9b93..9176ba1 100644 (file)
@@ -271,15 +271,15 @@ eDVBVideo::eDVBVideo(eDVBDemux *demux, int dev)
 
        if (m_close_invalidates_attributes < 0)
        {
-               /* 
-                * Some hardware does not invalidate the video attributes, 
+               /*
+                * Some hardware does not invalidate the video attributes,
                 * when we open the video device.
                 * If that is the case, we cannot rely on receiving VIDEO_EVENTs
                 * when the new video attributes are available, because they might
                 * be equal to the old attributes.
                 * Instead, we should just query the old attributes, and assume
                 * them to be correct untill we receive VIDEO_EVENTs.
-                * 
+                *
                 * Though this is merely a cosmetic issue, we do try to detect
                 * whether attributes are invalidated or not.
                 * So we can avoid polling for valid attributes, when we know
@@ -865,7 +865,7 @@ int eTSMPEGDecoder::setState()
        if (changed & (changeState|changeVideo|changeAudio))
        {
                                        /* play, slowmotion, fast-forward */
-               int state_table[6][4] = 
+               int state_table[6][4] =
                        {
                                /* [stateStop] =                 */ {0, 0, 0},
                                /* [statePause] =                */ {0, 0, 0},
@@ -941,7 +941,7 @@ RESULT eTSMPEGDecoder::setAC3Delay(int delay)
 }
 
 eTSMPEGDecoder::eTSMPEGDecoder(eDVBDemux *demux, int decoder)
-       : m_demux(demux), 
+       : m_demux(demux),
                m_vpid(-1), m_vtype(-1), m_apid(-1), m_atype(-1), m_pcrpid(-1), m_textpid(-1),
                m_changed(0), m_decoder(decoder), m_video_clip_fd(-1), m_showSinglePicTimer(eTimer::create(eApp))
 {
@@ -1059,7 +1059,7 @@ RESULT eTSMPEGDecoder::play()
        {
                if (!m_changed)
                        return 0;
-       } else  
+       } else
        {
                m_state = statePlay;
                m_changed |= changeState;
index 849f257..e179991 100644 (file)
@@ -101,8 +101,8 @@ private:
        int m_vpid, m_vtype, m_apid, m_atype, m_pcrpid, m_textpid;
        enum
        {
-               changeVideo = 1, 
-               changeAudio = 2, 
+               changeVideo = 1,
+               changeAudio = 2,
                changePCR   = 4,
                changeText  = 8,
                changeState = 16,
@@ -114,7 +114,7 @@ private:
        int setState();
        ePtr<eConnection> m_demux_event_conn;
        ePtr<eConnection> m_video_event_conn;
-       
+
        void demux_event(int event);
        void video_event(struct videoEvent);
        Signal1<void, struct videoEvent> m_video_event;
@@ -136,10 +136,10 @@ public:
        RESULT setSyncPCR(int pcrpid);
        RESULT setTextPID(int textpid);
        RESULT setSyncMaster(int who);
-       
+
                /*
                The following states exist:
-               
+
                 - stop: data source closed, no playback
                 - pause: data source active, decoder paused
                 - play: data source active, decoder consuming
index f7eabd6..063e0d4 100644 (file)
@@ -130,25 +130,25 @@ RESULT eDVBDemux::getMPEGDecoder(ePtr<iTSMPEGDecoder> &decoder, int index)
 RESULT eDVBDemux::getSTC(pts_t &pts, int num)
 {
        int fd = openDemux();
-       
+
        if (fd < 0)
                return -ENODEV;
 
        struct dmx_stc stc;
        stc.num = num;
        stc.base = 1;
-       
+
        if (ioctl(fd, DMX_GET_STC, &stc) < 0)
        {
                eDebug("DMX_GET_STC failed!");
                ::close(fd);
                return -1;
        }
-       
+
        pts = stc.stc;
-       
+
        eDebug("DMX_GET_STC - %lld", pts);
-       
+
        ::close(fd);
        return 0;
 }
@@ -156,7 +156,7 @@ RESULT eDVBDemux::getSTC(pts_t &pts, int num)
 RESULT eDVBDemux::flush()
 {
        // FIXME: implement flushing the PVR queue here.
-       
+
        m_event(evtFlush);
        return 0;
 }
@@ -196,7 +196,7 @@ void eDVBSectionReader::data(int)
 eDVBSectionReader::eDVBSectionReader(eDVBDemux *demux, eMainloop *context, RESULT &res): demux(demux), active(0)
 {
        fd = demux->openDemux();
-       
+
        if (fd >= 0)
        {
                notifier=eSocketNotifier::create(context, fd, eSocketNotifier::Read, false);
@@ -244,7 +244,7 @@ RESULT eDVBSectionReader::start(const eDVBSectionFilterMask &mask)
                checkcrc = 1;
        } else
                checkcrc = 0;
-       
+
        memcpy(sct.filter.filter, mask.data, DMX_FILTER_SIZE);
        memcpy(sct.filter.mask, mask.mask, DMX_FILTER_SIZE);
        memcpy(sct.filter.mode, mask.mode, DMX_FILTER_SIZE);
@@ -348,11 +348,11 @@ RESULT eDVBPESReader::start(int pid)
        flt.pid     = pid;
        flt.input   = DMX_IN_FRONTEND;
        flt.output  = DMX_OUT_TAP;
-       
+
        flt.flags   = DMX_IMMEDIATE_START;
 
        res = ::ioctl(m_fd, DMX_SET_PES_FILTER, &flt);
-       
+
        if (res)
                eWarning("PES filter: DMX_SET_PES_FILTER - %m");
        if (!res)
@@ -514,7 +514,7 @@ int eDVBRecordFileThread::asyncWrite(int len)
        eDebug("[eFilePushThreadRecorder] m_ts_parser.parseData: %9u us", (unsigned int)diff);
        gettimeofday(&starttime, NULL);
 #endif
-       
+
        int r = m_current_buffer->start(m_fd_dest, m_current_offset, len, m_buffer);
        if (r < 0)
        {
@@ -678,7 +678,7 @@ RESULT eDVBTSRecorder::start()
 
        if (m_running)
                return -1;
-       
+
        if (m_target_fd == -1)
                return -2;
 
@@ -689,7 +689,7 @@ RESULT eDVBTSRecorder::start()
        snprintf(filename, 128, "/dev/dvb/adapter%d/demux%d", m_demux->adapter, m_demux->demux);
 
        m_source_fd = ::open(filename, O_RDONLY);
-       
+
        if (m_source_fd < 0)
        {
                eDebug("FAILED to open demux (%s) in ts recoder (%m)", filename);
@@ -713,12 +713,12 @@ RESULT eDVBTSRecorder::start()
                m_source_fd = -1;
                return -3;
        }
-       
+
        ::ioctl(m_source_fd, DMX_START);
 
        if (!m_target_filename.empty())
                m_thread->startSaveMetaInformation(m_target_filename);
-       
+
        m_thread->start(m_source_fd);
        m_running = 1;
 
@@ -742,7 +742,7 @@ RESULT eDVBTSRecorder::addPID(int pid)
 {
        if (m_pids.find(pid) != m_pids.end())
                return -1;
-       
+
        m_pids.insert(std::pair<int,int>(pid, -1));
        if (m_running)
                startPID(pid);
@@ -753,10 +753,10 @@ RESULT eDVBTSRecorder::removePID(int pid)
 {
        if (m_pids.find(pid) == m_pids.end())
                return -1;
-               
+
        if (m_running)
                stopPID(pid);
-       
+
        m_pids.erase(pid);
        return 0;
 }
index 10e3a0e..60ab0a1 100644 (file)
@@ -16,11 +16,11 @@ public:
        };
        eDVBDemux(int adapter, int demux);
        virtual ~eDVBDemux();
-       
+
        RESULT setSourceFrontend(int fenum);
        int getSource() { return source; }
        RESULT setSourcePVR(int pvrnum);
-       
+
        RESULT createSectionReader(eMainloop *context, ePtr<iDVBSectionReader> &reader);
        RESULT createPESReader(eMainloop *context, ePtr<iDVBPESReader> &reader);
        RESULT createTSRecorder(ePtr<iDVBTSRecorder> &recorder, int packetsize = 188, bool streaming=false);
@@ -35,7 +35,7 @@ public:
        int getRefCount() { return ref; }
 private:
        int adapter, demux, source;
-       
+
        int m_dvr_busy;
        friend class eDVBSectionReader;
        friend class eDVBPESReader;
@@ -47,7 +47,7 @@ private:
        friend class eDVBCAService;
        friend class eTSMPEGDecoder;
        Signal1<void, int> m_event;
-       
+
        int openDemux(void);
 };
 
@@ -152,14 +152,14 @@ public:
        RESULT start();
        RESULT addPID(int pid);
        RESULT removePID(int pid);
-       
+
        RESULT setTimingPID(int pid, timing_pid_type pidtype, int streamtype);
-       
+
        RESULT setTargetFD(int fd);
        RESULT setTargetFilename(const std::string& filename);
        RESULT setBoundary(off_t max);
        RESULT enableAccessPoints(bool enable);
-       
+
        RESULT stop();
 
        RESULT getCurrentPCR(pts_t &pcr);
@@ -169,14 +169,14 @@ public:
 private:
        RESULT startPID(int pid);
        void stopPID(int pid);
-       
+
        void filepushEvent(int event);
-       
+
        std::map<int,int> m_pids;
        Signal1<void,int> m_event;
-       
+
        ePtr<eDVBDemux> m_demux;
-       
+
        int m_running;
        int m_target_fd;
        int m_source_fd;
index 9a556ce..fb63399 100644 (file)
@@ -73,7 +73,7 @@ class eDVBAllocatedFrontend
 {
        DECLARE_REF(eDVBAllocatedFrontend);
 public:
-       
+
        eDVBAllocatedFrontend(eDVBRegisteredFrontend *fe);
        ~eDVBAllocatedFrontend();
        eDVBFrontend &get() { return *m_fe->m_frontend; }
@@ -88,13 +88,13 @@ class eDVBAllocatedDemux
 {
        DECLARE_REF(eDVBAllocatedDemux);
 public:
-       
+
        eDVBAllocatedDemux(eDVBRegisteredDemux *demux);
        ~eDVBAllocatedDemux();
        eDVBDemux &get() { return *m_demux->m_demux; }
        operator eDVBRegisteredDemux*() { return m_demux; }
        operator eDVBDemux*() { return m_demux->m_demux; }
-       
+
 private:
        eDVBRegisteredDemux *m_demux;
 };
@@ -104,7 +104,7 @@ class iDVBAdapter: public iObject
 public:
        virtual int getNumDemux() = 0;
        virtual RESULT getDemux(ePtr<eDVBDemux> &demux, int nr) = 0;
-       
+
        virtual int getNumFrontends() = 0;
        virtual RESULT getFrontend(ePtr<eDVBFrontend> &fe, int nr, bool simulate=false) = 0;
 };
@@ -119,7 +119,7 @@ public:
 
        int getNumDemux();
        RESULT getDemux(ePtr<eDVBDemux> &demux, int nr);
-       
+
        int getNumFrontends();
        RESULT getFrontend(ePtr<eDVBFrontend> &fe, int nr, bool simulate=false);
 
@@ -175,16 +175,16 @@ class eDVBResourceManager: public iObject, public Object
                eDVBChannelID m_channel_id;
                        /* we don't hold a reference here. */
                eDVBChannel *m_channel;
-               
+
                active_channel(const eDVBChannelID &chid, eDVBChannel *ch) : m_channel_id(chid), m_channel(ch) { }
        };
-       
+
        std::list<active_channel> m_active_channels, m_active_simulate_channels;
-       
+
        ePtr<iDVBChannelList> m_list;
        ePtr<iDVBSatelliteEquipmentControl> m_sec;
        static eDVBResourceManager *instance;
-       
+
        friend class eDVBChannel;
        RESULT addChannel(const eDVBChannelID &chid, eDVBChannel *ch);
        RESULT removeChannel(eDVBChannel *ch);
@@ -205,7 +205,7 @@ public:
 
        RESULT setChannelList(iDVBChannelList *list);
        RESULT getChannelList(ePtr<iDVBChannelList> &list);
-       
+
        enum {
                        /* errNoFrontend = -1 replaced by more spcific messages */
                errNoDemux    = -2,
@@ -215,7 +215,7 @@ public:
                errAllSourcesBusy = -6,
                errNoSourceFound = -7,
        };
-       
+
        RESULT connectChannelAdded(const Slot1<void,eDVBChannel*> &channelAdded, ePtr<eConnection> &connection);
        int canAllocateChannel(const eDVBChannelID &channelid, const eDVBChannelID &ignore, int &system, bool simulate=false);
 
@@ -276,7 +276,7 @@ public:
 
        RESULT connectStateChange(const Slot1<void,iDVBChannel*> &stateChange, ePtr<eConnection> &connection);
        RESULT connectEvent(const Slot2<void,iDVBChannel*,int> &eventChange, ePtr<eConnection> &connection);
-       
+
        RESULT getState(int &state);
 
        RESULT setCIRouting(const eDVBCIRouting &routing);
@@ -302,7 +302,7 @@ public:
 private:
        ePtr<eDVBAllocatedFrontend> m_frontend;
        ePtr<eDVBAllocatedDemux> m_demux, m_decoder_demux;
-       
+
        ePtr<iDVBFrontendParameters> m_current_frontend_parameters;
        eDVBChannelID m_channel_id;
        Signal1<void,iDVBChannel*> m_stateChanged;
@@ -312,24 +312,24 @@ private:
 
                        /* for channel list */
        ePtr<eDVBResourceManager> m_mgr;
-       
+
        void frontendStateChanged(iDVBFrontend*fe);
        ePtr<eConnection> m_conn_frontendStateChanged;
-       
+
                /* for PVR playback */
        eDVBChannelFilePush *m_pvr_thread;
        void pvrEvent(int event);
-       
+
        int m_pvr_fd_dst;
        eSingleLock m_tstools_lock;
        eDVBTSTools m_tstools;
-       
+
        ePtr<eCueSheet> m_cue;
-       
+
        void cueSheetEvent(int event);
        ePtr<eConnection> m_conn_cueSheetEvent;
        int m_skipmode_m, m_skipmode_n, m_skipmode_frames, m_skipmode_frames_remainder;
-       
+
        std::list<std::pair<off_t, off_t> > m_source_span;
        void getNextSourceSpan(off_t current_offset, size_t bytes_read, off_t &start, size_t &size);
        void flushPVR(iDVBDemux *decoding_demux=0);
index 36b113d..9aace53 100644 (file)
@@ -11,9 +11,9 @@ class eDVBServiceEITHandler: public Object
        ePtr<iDVBDemux> m_demux;
        eAUTable<eTable<EventInformationSection> > m_EIT;
        void EITready(int error);
-       
+
        RESULT parseEvent(ePtr<eServiceEvent> &serviceevent, const Event &dvbevent);
-       
+
        ePtr<eServiceEvent> m_event_now, m_event_next;
 public:
        eDVBServiceEITHandler();
@@ -21,9 +21,9 @@ public:
        void inject(ePtr<eServiceEvent> &event, int nownext);
        void start(iDVBDemux *demux, int sid);
        void startOther(iDVBDemux *demux, int sid);
-       
+
        RESULT getEvent(ePtr<eServiceEvent> &event, int nownext);
-       
+
        PSignal1<void, int> m_eit_changed;
 };
 
index df8e37b..236efcc 100644 (file)
@@ -1,7 +1,7 @@
 #include <lib/dvb/epgcache.h>
 #include <lib/dvb/dvb.h>
 
-#undef EPG_DEBUG  
+#undef EPG_DEBUG
 
 #ifdef EPG_DEBUG
 #include <lib/service/event.h>
@@ -337,7 +337,7 @@ pthread_mutex_t eEPGCache::channel_map_lock=
 DEFINE_REF(eEPGCache)
 
 eEPGCache::eEPGCache()
-       :messages(this,1), cleanTimer(eTimer::create(this)), m_running(false) 
+       :messages(this,1), cleanTimer(eTimer::create(this)), m_running(false)
 {
        eDebug("[EPGC] Initialized EPGCache (wait for setCacheFile call now)");
 
@@ -599,9 +599,9 @@ bool eEPGCache::FixOverlapping(std::pair<eventMap,timeMap> &servicemap, time_t T
        timeMap::iterator tmp = tm_it;
        while ((tmp->first+tmp->second->getDuration()-300) > TM)
        {
-               if(tmp->first != TM 
+               if(tmp->first != TM
 #ifdef ENABLE_PRIVATE_EPG
-                       && tmp->second->type != PRIVATE 
+                       && tmp->second->type != PRIVATE
 #endif
 #ifdef ENABLE_MHW_EPG
                        && tmp->second->type != MHW
@@ -645,7 +645,7 @@ bool eEPGCache::FixOverlapping(std::pair<eventMap,timeMap> &servicemap, time_t T
                {
                        __u16 event_id = tmp->second->getEventID();
                        servicemap.first.erase(event_id);
-#ifdef EPG_DEBUG  
+#ifdef EPG_DEBUG
                        Event evt((uint8_t*)tmp->second->get());
                        eServiceEvent event;
                        event.parseFrom(&evt, service.sid<<16|service.onid);
@@ -676,12 +676,12 @@ void eEPGCache::sectionRead(const __u8 *data, int source, channel_data *channel)
        if ( ptr >= len )
                return;
 
-#if 0 
-               /* 
-                * disable for now, as this hack breaks EIT parsing for 
+#if 0
+               /*
+                * disable for now, as this hack breaks EIT parsing for
                 * services with a low segment_last_table_id
-                * 
-                * Multichoice should be the exception, not the rule... 
+                *
+                * Multichoice should be the exception, not the rule...
                 */
 
        // This fixed the EPG on the Multichoice irdeto systems
@@ -905,7 +905,7 @@ next:
                                int i = 0;
                                for (eventMap::iterator it(servicemap.first.begin()); it != servicemap.first.end(); ++it )
                                {
-                                       fprintf(f, "%d(key %d) -> time %d, event_id %d, data %p\n", 
+                                       fprintf(f, "%d(key %d) -> time %d, event_id %d, data %p\n",
                                        i++, (int)it->first, (int)it->second->getStartTime(), (int)it->second->getEventID(), it->second );
                                }
                        }
@@ -918,8 +918,8 @@ next:
                                                i++, (int)it->first, (int)it->second->getStartTime(), (int)it->second->getEventID(), it->second );
                                }
                        }
-                       eFatal("(1)map sizes not equal :( sid %04x tsid %04x onid %04x size %d size2 %d", 
-                               service.sid, service.tsid, service.onid, 
+                       eFatal("(1)map sizes not equal :( sid %04x tsid %04x onid %04x size %d size2 %d",
+                               service.sid, service.tsid, service.onid,
                                servicemap.first.size(), servicemap.second.size() );
                }
 #endif
@@ -2002,7 +2002,7 @@ bool freesatEITSubtableStatus::isSectionPresent(__u8 sectionNo)
 {
        __u8 sectionIdx = sectionNo / 8;
        __u8 bitOffset = sectionNo % 8;
-       
+
        return ((sectionMap[sectionIdx] & (1 << bitOffset)) != 0);
 }
 
@@ -2464,7 +2464,7 @@ PyObject *eEPGCache::lookupEvent(ePyObject list, ePyObject convertFunc)
                eDebug("not params given");
                return NULL;
        }
-       else 
+       else
        {
                ePyObject argv=PyList_GET_ITEM(list, 0); // borrowed reference!
                if (PyString_Check(argv))
@@ -2699,8 +2699,8 @@ static inline __u8 HI(int x) { return (__u8) ((x >> 8) & 0xFF); }
 static inline __u8 LO(int x) { return (__u8) (x & 0xFF); }
 #define SET_HILO(x, val) {x##_hi = ((val) >> 8); x##_lo = (val) & 0xff; }
 // convert from set of strings to DVB format (EIT)
-void eEPGCache::submitEventData(const std::vector<eServiceReferenceDVB>& serviceRefs, long start, 
-       long duration, const char* title, const char* short_summary, 
+void eEPGCache::submitEventData(const std::vector<eServiceReferenceDVB>& serviceRefs, long start,
+       long duration, const char* title, const char* short_summary,
        const char* long_description, char event_type)
 {
        if (!title)
@@ -2717,7 +2717,7 @@ void eEPGCache::submitEventData(const std::vector<eServiceReferenceDVB>& service
        packet->current_next_indicator = 0;
        packet->section_number = 0;     // eEPGCache::sectionRead() will dig this for the moment
        packet->last_section_number = 0;        // eEPGCache::sectionRead() will dig this for the moment
-       
+
        packet->segment_last_section_number = 0; // eEPGCache::sectionRead() will dig this for the moment
        packet->segment_last_table_id = 0x50;
 
@@ -2729,7 +2729,7 @@ void eEPGCache::submitEventData(const std::vector<eServiceReferenceDVB>& service
        //6 bytes start time, 3 bytes duration
        fill_eit_start(evt_struct, start);
        fill_eit_duration(evt_struct, duration);
-       
+
        evt_struct->running_status = 0;
        evt_struct->free_CA_mode = 0;
 
@@ -2739,10 +2739,10 @@ void eEPGCache::submitEventData(const std::vector<eServiceReferenceDVB>& service
        x += EIT_LOOP_SIZE;
        int nameLength = strnlen(title, 246);
        int descLength = short_summary ? strnlen(short_summary, 246 - nameLength) : 0;
-       
+
        eit_short_event_descriptor_struct *short_evt = (eit_short_event_descriptor_struct*) x;
        short_evt->descriptor_tag = SHORT_EVENT_DESCRIPTOR;
-       short_evt->descriptor_length = EIT_SHORT_EVENT_DESCRIPTOR_SIZE + nameLength + descLength + 1 - 2; //+1 for length of short description, -2 for tag and length 
+       short_evt->descriptor_length = EIT_SHORT_EVENT_DESCRIPTOR_SIZE + nameLength + descLength + 1 - 2; //+1 for length of short description, -2 for tag and length
        if (nameLength) ++short_evt->descriptor_length; // +1 for codepage byte
        if (descLength) ++short_evt->descriptor_length;
        short_evt->language_code_1 = 'e';
@@ -2783,7 +2783,7 @@ void eEPGCache::submitEventData(const std::vector<eServiceReferenceDVB>& service
        //Long description
        int currentLoopLength = x - (__u8*)short_evt;
        static const int overheadPerDescriptor = 9; //increase if codepages are added!!!
-       static const int MAX_LEN = 256 - overheadPerDescriptor; 
+       static const int MAX_LEN = 256 - overheadPerDescriptor;
 
        int textLength = long_description ? strnlen(long_description, EIT_LENGTH) : 0;//EIT_LENGTH is a bit too much, but it's only here as a reasonable end point
        int lastDescriptorNumber = (textLength + MAX_LEN-1) / MAX_LEN - 1;
@@ -2816,10 +2816,10 @@ void eEPGCache::submitEventData(const std::vector<eServiceReferenceDVB>& service
                x[8] = codePage;
                memcpy(x + 9, &long_description[descrIndex*MAX_LEN], currentTextLength);
 
-               x += 2 + ext_evt->descriptor_length; 
+               x += 2 + ext_evt->descriptor_length;
        }
 
-       //TODO: add age and more 
+       //TODO: add age and more
        int desc_loop_length = x - ((__u8*)evt_struct + EIT_LOOP_SIZE);
        SET_HILO(evt_struct->descriptors_loop_length, desc_loop_length);
 
@@ -2882,7 +2882,7 @@ void eEPGCache::importEvent(ePyObject serviceReference, ePyObject list)
 void eEPGCache::importEvents(ePyObject serviceReferences, ePyObject list)
 {
        std::vector<eServiceReferenceDVB> refs;
-       
+
        if (PyString_Check(serviceReferences))
        {
                char *refstr;
@@ -2921,13 +2921,13 @@ void eEPGCache::importEvents(ePyObject serviceReferences, ePyObject list)
        bool isTuple = PyTuple_Check(list);
        if (!isTuple && !PyList_Check(list))
        {
-               
+
                eDebug("[EPG:import] argument 'list' is neither list nor tuple.");
                return;
        }
 
        int numberOfEvents = isTuple ? PyTuple_Size(list) : PyList_Size(list);
-       
+
        for (int i = 0; i < numberOfEvents;  ++i)
        {
                ePyObject singleEvent = isTuple ? PyTuple_GET_ITEM(list, i) : PyList_GET_ITEM(list, i);
@@ -2942,7 +2942,7 @@ void eEPGCache::importEvents(ePyObject serviceReferences, ePyObject list)
                        eDebug("[EPG:import] eventdata tuple does not contain enough fields, aborting");
                        return;
                }
-               
+
                long start = PyLong_AsLong(PyTuple_GET_ITEM(singleEvent, 0));
                long duration = PyInt_AsLong(PyTuple_GET_ITEM(singleEvent, 1));
                const char *title = getStringFromPython(PyTuple_GET_ITEM(singleEvent, 2));
@@ -3396,7 +3396,7 @@ void eEPGCache::PMTready(eDVBServicePMTHandler *pmthandler)
                                                switch ((*desc)->getTag())
                                                {
                                                        case 0xC2: // user defined
-                                                               if ((*desc)->getLength() == 8) 
+                                                               if ((*desc)->getLength() == 8)
                                                                {
                                                                        __u8 buffer[10];
                                                                        (*desc)->writeToBuffer(buffer);
@@ -4260,7 +4260,7 @@ void eEPGCache::channel_data::readMHWData2(const __u8 *data)
                while (pos < dataLen)
                {
 //                     eDebugNoNewLine("    [%02x] %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x [%02x %02x %02x %02x %02x %02x %02x] LL - DESCR - ",
-//                             data[pos], data[pos+1], data[pos+2], data[pos+3], data[pos+4], data[pos+5], data[pos+6], data[pos+7], 
+//                             data[pos], data[pos+1], data[pos+2], data[pos+3], data[pos+4], data[pos+5], data[pos+6], data[pos+7],
 //                             data[pos+8], data[pos+9], data[pos+10], data[pos+11], data[pos+12], data[pos+13], data[pos+14], data[pos+15], data[pos+16], data[pos+17]);
                        title.channel_id = data[pos]+1;
                        title.mhw2_mjd_hi = data[pos+11];
index 313c507..6d32972 100644 (file)
@@ -76,8 +76,8 @@ struct uniqueEPGKey
                return (tsid < a.tsid);
        }
        operator bool() const
-       { 
-               return !(sid == -1 && onid == -1 && tsid == -1); 
+       {
+               return !(sid == -1 && onid == -1 && tsid == -1);
        }
        bool operator==(const uniqueEPGKey &a) const
        {
@@ -109,7 +109,7 @@ struct hash_uniqueEPGKey
 };
 
 #define tidMap std::set<__u32>
-#if 0 
+#if 0
        typedef std::unordered_map<uniqueEPGKey, std::pair<eventMap, timeMap>, hash_uniqueEPGKey, uniqueEPGKey::equal> eventCache;
        #ifdef ENABLE_PRIVATE_EPG
                typedef std::unordered_map<time_t, std::pair<time_t, __u16> > contentTimeMap;
@@ -372,7 +372,7 @@ public:
 
 #ifndef SWIG
 private:
-       // For internal use only. Acquire the cache lock before calling. 
+       // For internal use only. Acquire the cache lock before calling.
        RESULT lookupEventId(const eServiceReference &service, int event_id, const eventData *&);
        RESULT lookupEventTime(const eServiceReference &service, time_t, const eventData *&, int direction=0);
        RESULT getNextTimeEntry(const eventData *&);
index e01445b..f46517a 100644 (file)
@@ -577,7 +577,7 @@ void eFastScan::parseResult()
                         * untill the user selects a different audio track.
                         * So we will not store the default audio pid in the cache.
                         */
-#if 0 
+#if 0
                        service->setCacheEntry(eDVBService::cMPEGAPID, (*it)->getDefaultAudioPid());
 #endif
                        service->setCacheEntry(eDVBService::cPCRPID, (*it)->getDefaultPcrPid());
index f22550c..9a69b63 100644 (file)
@@ -1181,7 +1181,7 @@ int eDVBFrontend::readInputpower()
        sprintf(proc_name, "/proc/stb/fp/lnb_sense%d", m_slotid);
        if (CFile::parseInt(&power, proc_name) == 0)
                return power;
-       
+
        // open front processor
        int fp=::open("/dev/dbox/fp0", O_RDWR);
        if (fp < 0)
@@ -2397,7 +2397,7 @@ void eDVBFrontend::setDeliverySystemWhitelist(const std::vector<fe_delivery_syst
 
 bool eDVBFrontend::setSlotInfo(int id, const char *descr, bool enabled, bool isDVBS2, int frontendid)
 {
-       if (frontendid < 0 || frontendid != m_dvbid) 
+       if (frontendid < 0 || frontendid != m_dvbid)
        {
                return false;
        }
index 2af62fd..9c4f03c 100644 (file)
@@ -62,7 +62,7 @@ struct eDVBFrontendParametersCable
                Inversion_Off, Inversion_On, Inversion_Unknown
        };
 
-       /* 
+       /*
         * WARNING: do not change the order of these values, they are used to parse lamedb and cables.xml FEC fields.
         * The values are the same as those in eDVBFrontendParametersSatellite.
         */
@@ -92,7 +92,7 @@ struct eDVBFrontendParametersTerrestrial
                Bandwidth_8MHz, Bandwidth_7MHz, Bandwidth_6MHz, Bandwidth_Auto, Bandwidth_5MHz, Bandwidth_1_712MHz, Bandwidth_10MHz
        };
 
-       /* 
+       /*
         * WARNING: do not change the order of these values, they are used to parse lamedb and terrestrial.xml FEC fields.
         * The values are NOT the same as those in eDVBFrontendParametersSatellite/eDVBFrontendParametersCable
         * (and it's too late to fix this now, we would break backward compatibility)
index c909192..a36e05d 100644 (file)
@@ -35,18 +35,18 @@ public:
 
        enum timing_pid_type { none = -1, video_pid, audio_pid };
        virtual RESULT setTimingPID(int pid, timing_pid_type pidtype, int streamtype) = 0;
-       
+
        virtual RESULT setTargetFD(int fd) = 0;
                /* for saving additional meta data. */
        virtual RESULT setTargetFilename(const std::string& filename) = 0;
        virtual RESULT setBoundary(off_t max) = 0;
        virtual RESULT enableAccessPoints(bool enable) = 0;
-       
+
        virtual RESULT stop() = 0;
 
        virtual RESULT getCurrentPCR(pts_t &pcr) = 0;
        virtual RESULT getFirstPTS(pts_t &pts) = 0;
-       
+
        enum {
                eventWriteError,
                                /* a write error has occurred. data won't get lost if fd is writable after return. */
index 7698526..48751f0 100644 (file)
@@ -73,11 +73,11 @@ struct eBouquet
                /* these structures have by intention no operator int() defined.
                   the reason of these structures is to avoid mixing for example
                   a onid and a tsid (as there's no general order for them).
-                  
+
                   defining an operator int() would implicitely convert values
                   between them over the constructor with the int argument.
-                  
-                  'explicit' doesn't here - eTransportStreamID(eOriginalNetworkID(n)) 
+
+                  'explicit' doesn't here - eTransportStreamID(eOriginalNetworkID(n))
                   would still work. */
 
 struct eTransportStreamID
@@ -141,14 +141,14 @@ struct eDVBChannelID
        eDVBNamespace dvbnamespace;
        eTransportStreamID transport_stream_id;
        eOriginalNetworkID original_network_id;
-       
+
        bool operator==(const eDVBChannelID &c) const
        {
                return dvbnamespace == c.dvbnamespace &&
                        transport_stream_id == c.transport_stream_id &&
                        original_network_id == c.original_network_id;
        }
-       
+
        bool operator<(const eDVBChannelID &c) const
        {
                if (dvbnamespace < c.dvbnamespace)
@@ -163,7 +163,7 @@ struct eDVBChannelID
                }
                return 0;
        }
-       eDVBChannelID(eDVBNamespace dvbnamespace, eTransportStreamID tsid, eOriginalNetworkID onid): 
+       eDVBChannelID(eDVBNamespace dvbnamespace, eTransportStreamID tsid, eOriginalNetworkID onid):
                        dvbnamespace(dvbnamespace), transport_stream_id(tsid), original_network_id(onid)
        {
        }
@@ -223,14 +223,14 @@ struct eServiceReferenceDVB: public eServiceReference
                setServiceID(service_id);
                setServiceType(service_type);
        }
-       
+
        void set(const eDVBChannelID &chid)
        {
                setDVBNamespace(chid.dvbnamespace);
                setOriginalNetworkID(chid.original_network_id);
                setTransportStreamID(chid.transport_stream_id);
        }
-       
+
        void getChannelID(eDVBChannelID &chid) const
        {
                chid = eDVBChannelID(getDVBNamespace(), getTransportStreamID(), getOriginalNetworkID());
@@ -278,7 +278,7 @@ public:
                /* m_service_name_sort is uppercase, with special chars removed, to increase sort performance. */
        std::string m_service_name, m_service_name_sort;
        std::string m_provider_name;
-       
+
        void genSortName();
 
        int m_flags;
@@ -297,9 +297,9 @@ public:
        CAID_LIST m_ca;
 
        virtual ~eDVBService();
-       
+
        eDVBService &operator=(const eDVBService &);
-       
+
        // iStaticServiceInformation
        RESULT getName(const eServiceReference &ref, std::string &name);
        RESULT getEvent(const eServiceReference &ref, ePtr<eServiceEvent> &ptr, time_t start_time);
@@ -341,20 +341,20 @@ public:
                tAny,
                tFlags
        };
-       
+
        int m_type;
        int m_inverse;
-       
+
        std::string m_string;
        int m_int;
        eDVBChannelID m_channelid;
-       
+
                /* sort is only valid in root, and must be from the enum above. */
        int m_sort;
        std::string m_bouquet_name;
-       
+
        static RESULT compile(ePtr<eDVBChannelQuery> &res, std::string query);
-       
+
        ePtr<eDVBChannelQuery> m_p1, m_p2;
 };
 
@@ -371,9 +371,9 @@ public:
        virtual RESULT removeFlags(unsigned int flagmask, int dvb_namespace=-1, int tsid=-1, int onid=-1, unsigned int orb_pos=0xFFFFFFFF)=0;
        virtual RESULT addChannelToList(const eDVBChannelID &id, iDVBFrontendParameters *feparm)=0;
        virtual RESULT removeChannel(const eDVBChannelID &id)=0;
-       
+
        virtual RESULT getChannelFrontendData(const eDVBChannelID &id, ePtr<iDVBFrontendParameters> &parm)=0;
-       
+
        virtual RESULT addService(const eServiceReferenceDVB &reference, eDVBService *service)=0;
        virtual RESULT getService(const eServiceReferenceDVB &reference, ePtr<eDVBService> &service)=0;
        virtual RESULT flush()=0;
@@ -557,7 +557,7 @@ public:
        virtual RESULT getState(int &)=0;
 
        virtual RESULT getCurrentFrontendParameters(ePtr<iDVBFrontendParameters> &)=0;
-       enum 
+       enum
        {
                evtPreStart, evtEOF, evtSOF, evtFailed, evtStopped
        };
@@ -572,7 +572,7 @@ public:
        };
        virtual RESULT setCIRouting(const eDVBCIRouting &routing)=0;
        virtual RESULT getDemux(ePtr<iDVBDemux> &demux, int cap=0)=0;
-       
+
                /* use count handling */
        virtual void AddUse() = 0;
        virtual void ReleaseUse() = 0;
@@ -582,13 +582,13 @@ SWIG_TEMPLATE_TYPEDEF(eUsePtr<iDVBChannel>, iDVBChannelPtr);
 
 #ifndef SWIG
        /* signed, so we can express deltas. */
-       
+
 typedef long long pts_t;
 
 class iFilePushScatterGather;
 class iTSMPEGDecoder;
 
-       /* note that a cue sheet describes the logical positions. thus 
+       /* note that a cue sheet describes the logical positions. thus
           everything is specified in pts and not file positions */
 
        /* implemented in dvb.cpp */
@@ -597,20 +597,20 @@ class eCueSheet: public iObject, public Object
        DECLARE_REF(eCueSheet);
 public:
        eCueSheet();
-       
+
                        /* frontend */
        void seekTo(int relative, const pts_t &pts);
-       
+
        void clear();
        void addSourceSpan(const pts_t &begin, const pts_t &end);
        void commitSpans();
-       
+
        void setSkipmode(const pts_t &ratio); /* 90000 is 1:1 */
        void setDecodingDemux(iDVBDemux *demux, iTSMPEGDecoder *decoder);
-       
+
                        /* frontend and backend */
        eRdWrLock m_lock;
-       
+
                        /* backend */
        enum { evtSeek, evtSkipmode, evtSpanChanged };
        RESULT connectEvent(const Slot1<void, int> &event, ePtr<eConnection> &connection);
@@ -630,16 +630,16 @@ public:
        {
                state_eof = state_release + 1  /* end-of-file reached. */
        };
-       
+
        virtual RESULT playFile(const char *file) = 0;
        virtual RESULT playSource(ePtr<iTsSource> &source, const char *priv=NULL) = 0;
        virtual void stop() = 0;
-       
+
        virtual void setCueSheet(eCueSheet *cuesheet) = 0;
        virtual void setOfflineDecodeMode(int parityswitchdelay) = 0;
 
        virtual RESULT getLength(pts_t &pts) = 0;
-       
+
                /* we explicitely ask for the decoding demux here because a channel
                   can be shared between multiple decoders.
                */
@@ -713,7 +713,7 @@ public:
 
                /** Display any complete data as fast as possible */
        virtual RESULT setTrickmode()=0;
-       
+
        virtual RESULT getPTS(int what, pts_t &pts) = 0;
 
        virtual RESULT showSinglePic(const char *filename) = 0;
index affd06c..4918903 100644 (file)
@@ -8,16 +8,16 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- * 
+ *
  * The author may be reached as dent@cosy.sbg.ac.at, or
  * Thomas Mirlacher, Jakob-Haringerstr. 2, A-5020 Salzburg,
  * Austria
@@ -103,20 +103,20 @@ struct eit_loop_struct1 {
 struct eit_short_event_descriptor_struct {
        u_char  descriptor_tag                  : 8;
        u_char  descriptor_length               : 8;
-       
+
        u_char  language_code_1                 : 8;
        u_char  language_code_2                 : 8;
        u_char  language_code_3                 : 8;
 
        u_char  event_name_length               : 8;
 };
-       
+
 #define EIT_EXTENDED_EVENT_DESCRIPOR 0x4e
 
 typedef struct eit_event_struct {
        u_char  event_id_hi                     : 8;
        u_char  event_id_lo                     : 8;
-       
+
        u_char  start_time_1                    : 8;
        u_char  start_time_2                    : 8;
        u_char  start_time_3                    : 8;
@@ -138,7 +138,7 @@ typedef struct eit_event_struct {
 #endif
 
        u_char  descriptors_loop_length_lo      : 8;
-       
+
 } eit_event_t;
 #define EIT_LOOP_SIZE 12
 
@@ -160,4 +160,4 @@ struct eit_extended_descriptor_struct {
 };
 
 
-#endif 
+#endif
index e85f832..7720f9c 100644 (file)
@@ -52,7 +52,7 @@ int eDVBMetaParser::parseFile(const std::string &basename)
                /* first, try parsing the .meta file */
        if (!parseMeta(basename))
                return 0;
-       
+
                /* otherwise, use recordings.epl */
        if (!parseRecordings(basename))
                return 0;
@@ -146,27 +146,27 @@ int eDVBMetaParser::parseRecordings(const std::string &filename)
        std::string::size_type slash = filename.rfind('/');
        if (slash == std::string::npos)
                return -1;
-       
+
        std::string recordings = filename.substr(0, slash) + "/recordings.epl";
-       
+
        CFile f(recordings.c_str(), "r");
        if (!f)
        {
 //             eDebug("no recordings.epl found: %s: %m", recordings.c_str());
                return -1;
        }
-       
+
        std::string description;
        eServiceReferenceDVB ref;
-       
+
 //     eDebug("parsing recordings.epl..");
-       
+
        while (1)
        {
                char line[1024];
                if (!fgets(line, 1024, f))
                        break;
-               
+
                size_t len = strlen(line);
                if (len < 2)
                        // Lines with less than one char aren't meaningful
@@ -176,7 +176,7 @@ int eDVBMetaParser::parseRecordings(const std::string &filename)
                line[len] = 0;
                if (line[len-1] == '\r')
                        line[len-1] = 0;
-               
+
                if (strncmp(line, "#SERVICE: ", 10) == 0)
                        ref = eServiceReferenceDVB(line + 10);
                else if (strncmp(line, "#DESCRIPTION: ", 14) == 0)
index b0352fe..d880d0c 100644 (file)
@@ -31,9 +31,9 @@ void ePESParser::processData(const __u8 *p, int len)
                        memcpy(m_pes_buffer + m_pes_position, p, max);
                        m_pes_position += max;
                        p += max;
-                       
+
                        len -= max;
-                       
+
                        if (m_pes_position == m_pes_length)
                        {
                                processPESPacket(m_pes_buffer, m_pes_position);
index 799ae93..53aad24 100755 (executable)
@@ -89,7 +89,7 @@ void eDVBServicePMTHandler::channelStateChanged(iDVBChannel *channel)
 
                        serviceEvent(eventTuned);
                }
-       } else if ((m_last_channel_state != iDVBChannel::state_failed) && 
+       } else if ((m_last_channel_state != iDVBChannel::state_failed) &&
                        (state == iDVBChannel::state_failed))
        {
                eDebug("tune failed.");
@@ -473,7 +473,7 @@ int eDVBServicePMTHandler::getProgramInfo(program &program)
                                {
                                        if ((*it).find(program.audioStreams[i].language_code) != std::string::npos)
                                        {
-                                               if (program.audioStreams[i].type == audioStream::atMPEG && (autoaudio_level > x || autoaudio_mpeg == -1)) 
+                                               if (program.audioStreams[i].type == audioStream::atMPEG && (autoaudio_level > x || autoaudio_mpeg == -1))
                                                        autoaudio_mpeg = i;
                                                else if (program.audioStreams[i].type == audioStream::atAC3 && (autoaudio_level > x || autoaudio_ac3 == -1))
                                                        autoaudio_ac3 = i;
@@ -701,7 +701,7 @@ int eDVBServicePMTHandler::getDecodeDemux(ePtr<iDVBDemux> &demux)
                demux = m_demux;
                return ret;
        }
-       
+
        ASSERT(m_channel); /* calling without a previous ::tune is certainly bad. */
 
        ret = m_channel->getDemux(demux, iDVBChannel::capDecode);
@@ -820,13 +820,13 @@ int eDVBServicePMTHandler::tuneExt(eServiceReferenceDVB &ref, int use_decode_dem
                if (m_channel)
                {
                        m_channel->connectStateChange(
-                               slot(*this, &eDVBServicePMTHandler::channelStateChanged), 
+                               slot(*this, &eDVBServicePMTHandler::channelStateChanged),
                                m_channelStateChanged_connection);
                        m_last_channel_state = -1;
                        channelStateChanged(m_channel);
 
                        m_channel->connectEvent(
-                               slot(*this, &eDVBServicePMTHandler::channelEvent), 
+                               slot(*this, &eDVBServicePMTHandler::channelEvent),
                                m_channelEvent_connection);
 
                        if (ref.path.empty())
@@ -862,7 +862,7 @@ int eDVBServicePMTHandler::tuneExt(eServiceReferenceDVB &ref, int use_decode_dem
                        else
                                m_pvr_channel->playFile(ref.path.c_str());
 
-                       if (m_service_type == offline) 
+                       if (m_service_type == offline)
                        {
                                m_pvr_channel->setOfflineDecodeMode(eConfigManager::getConfigIntValue("config.recording.offline_decode_delay"));
                        }
index c653e2c..c743be3 100644 (file)
@@ -103,11 +103,11 @@ public:
                eventNoPMT,        // no pmt could be received (timeout)
                eventNewProgramInfo, // we just received a PMT
                eventTuned,        // a channel was sucessfully (re-)tuned in, you may start additional filters now
-               
+
                eventPreStart,     // before start filepush thread
                eventSOF,          // seek pre start
                eventEOF,          // a file playback did end
-               
+
                eventMisconfiguration, // a channel was not found in any list, or no frontend was found which could provide this channel
 
                eventHBBTVInfo, /* HBBTV information was detected in the AIT */
@@ -122,7 +122,7 @@ public:
        int getDecodeDemux(ePtr<iDVBDemux> &demux);
        void getAITApplications(std::map<int, std::string> &aitlist);
        void getCaIds(std::vector<int> &caids, std::vector<int> &ecmpids);
-       
+
        int getPVRChannel(ePtr<iDVBPVRChannel> &pvr_channel);
        int getServiceReference(eServiceReferenceDVB &service) { service = m_reference; return 0; }
        int getService(ePtr<eDVBService> &service) { service = m_service; return 0; }
@@ -159,7 +159,7 @@ private:
        bool m_have_cached_program;
        program m_cached_program;
        serviceType m_service_type;
-       
+
        struct aitInfo
        {
                int id;
index 925858a..78ecf1b 100644 (file)
@@ -26,14 +26,14 @@ public:
                enum { vtMPEG2, vtMPEG4_H264, vtMPEG1, vtMPEG4_Part2, vtVC1, vtVC1_SM };
                int type;
        };
-       
+
        struct audioStream
        {
                int pid,
                rdsPid; // hack for some radio services which transmit radiotext on different pid (i.e. harmony fm, HIT RADIO FFH, ...)
                enum { atMPEG, atAC3, atDTS, atAAC, atAACHE, atLPCM, atDTSHD, atDDP };
                int type; // mpeg2, ac3, dts, ...
-               
+
                int component_tag;
                std::string language_code; /* iso-639, if available. */
        };
index 1f3f310..ac514c0 100644 (file)
@@ -107,7 +107,7 @@ void eMPEGStreamInformation::fixupDiscontinuties()
        {
                pts_t current = i->second - currentDelta;
                pts_t diff = current - lastpts_t;
-               
+
                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);
@@ -138,7 +138,7 @@ int eMPEGStreamInformation::fixupPTS(const off_t &offset, pts_t &ts)
        {
                /*
                 * The access points are measured in stream time, rather than actual mpeg pts.
-                * Overrule the timestamp with the nearest access point pts. 
+                * Overrule the timestamp with the nearest access point pts.
                 */
                off_t nearestoffset = offset;
                getPTS(nearestoffset, ts);
@@ -147,9 +147,9 @@ int eMPEGStreamInformation::fixupPTS(const off_t &offset, pts_t &ts)
        if (m_timestamp_deltas.empty())
                return -1;
 
-       std::multimap<pts_t, off_t>::const_iterator 
-               l = m_pts_to_offset.upper_bound(ts - 60 * 90000), 
-               u = m_pts_to_offset.upper_bound(ts + 60 * 90000), 
+       std::multimap<pts_t, off_t>::const_iterator
+               l = m_pts_to_offset.upper_bound(ts - 60 * 90000),
+               u = m_pts_to_offset.upper_bound(ts + 60 * 90000),
                nearest = m_pts_to_offset.end();
 
        while (l != u)
@@ -175,16 +175,16 @@ int eMPEGStreamInformation::getPTS(off_t &offset, pts_t &pts)
                /* usually, we prefer the AP before the given offset. however if there is none, we take any. */
        if (before != m_access_points.begin())
                --before;
-       
+
        if (before == m_access_points.end())
        {
                pts = 0;
                return -1;
        }
-       
+
        offset = before->first;
        pts = before->second - getDelta(offset);
-       
+
        return 0;
 }
 
@@ -207,21 +207,21 @@ pts_t eMPEGStreamInformation::getInterpolated(off_t offset)
                /* if after == end, then we need to extrapolate ... FIXME */
        if ((before->first == offset) || (after == m_access_points.end()))
                return before->second - getDelta(offset);
-       
+
        pts_t before_ts = before->second - getDelta(before->first);
        pts_t after_ts = after->second - getDelta(after->first);
-       
+
 //     eDebug("%08llx .. ? .. %08llx", before_ts, after_ts);
 //     eDebug("%08llx .. %08llx .. %08llx", before->first, offset, after->first);
-       
+
        pts_t diff = after_ts - before_ts;
        off_t diff_off = after->first - before->first;
-       
+
        diff = (offset - before->first) * diff / diff_off;
 //     eDebug("%08llx .. %08llx .. %08llx", before_ts, before_ts + diff, after_ts);
        return before_ts + diff;
 }
+
 off_t eMPEGStreamInformation::getAccessPoint(pts_t ts, int marg)
 {
        //eDebug("eMPEGStreamInformation::getAccessPoint(ts=%llu, marg=%d)", ts, marg);
@@ -569,11 +569,11 @@ int eMPEGStreamInformation::getLastFrame(off_t &offset, pts_t& pts)
                        pts = 0;
                        return 1;
                }
-               
+
                int index = l - 1;
                if (index < 0)
                        index = 0;
-               
+
                int num = moveCache(index);
                if (num <= 0)
                {
@@ -685,9 +685,9 @@ void eMPEGStreamInformationWriter::addAccessPoint(off_t offset, pts_t pts, bool
        }
        else
        {
-               /* 
+               /*
                 * We've got real pts now, drop the leading 'extrapolated' accesspoints,
-                * avoid unnecessary pts discontinuity 
+                * avoid unnecessary pts discontinuity
                 */
                m_streamtime_access_points.clear();
                m_access_points.push_back(AccessPoint(offset, pts));
@@ -864,7 +864,7 @@ int eMPEGStreamParserTS::processPacket(const unsigned char *pkt, off_t offset)
 
        bool pusi = (pkt[1] & 0x40) != 0;
 
-       if (pkt[3] & 0xc0) 
+       if (pkt[3] & 0xc0)
        {
                /* scrambled stream, we cannot parse pts, extrapolate with measured stream time instead */
                if (pusi && m_enable_accesspoints)
@@ -900,7 +900,7 @@ int eMPEGStreamParserTS::processPacket(const unsigned char *pkt, off_t offset)
 
        pts_t pts = 0;
        int ptsvalid = 0;
-       
+
        if (pusi)
        {
                        // ok, we now have the start of the payload, aligned with the PES packet start.
@@ -918,13 +918,13 @@ int eMPEGStreamParserTS::processPacket(const unsigned char *pkt, off_t offset)
                        pts |= ((unsigned long long)(pkt[12]&0xFF)) << 7;
                        pts |= ((unsigned long long)(pkt[13]&0xFE)) >> 1;
                        ptsvalid = 1;
-                       
+
                        m_last_pts = pts;
                        m_last_pts_valid = 1;
                        if (!m_pts_found) m_first_pts = pts;
                        m_pts_found = true;
                }
-               
+
                        /* advance to payload */
                pkt += pkt[8] + 9;
        }
@@ -1018,10 +1018,10 @@ inline int eMPEGStreamParserTS::wantPacket(const unsigned char *pkt) const
 
        if (ppid != m_pid)
                return 0;
-               
+
        if (m_need_next_packet)  /* next packet (on this pid) was required? */
                return 1;
-       
+
        if (hdr[1] & 0x40)       /* pusi set: yes. */
                return 1;
 
@@ -1032,16 +1032,16 @@ void eMPEGStreamParserTS::parseData(off_t offset, const void *data, unsigned int
 {
        const unsigned char *packet = (const unsigned char*)data;
        const unsigned char *packet_start = packet;
-       
+
                        /* sorry for the redundant code here, but there are too many special cases... */
        while (len)
        {
-                       /* emergency resync. usually, this should not happen, because the data should 
+                       /* emergency resync. usually, this should not happen, because the data should
                           be sync-aligned.
-                          
-                          to make this code work for non-strictly-sync-aligned data, (for example, bad 
+
+                          to make this code work for non-strictly-sync-aligned data, (for example, bad
                           files) we fix a possible resync here by skipping data until the next 0x47.
-                          
+
                           if this is a false 0x47, the packet will be dropped by wantPacket, and the
                           next time, sync will be re-established. */
                int skipped = 0;
@@ -1053,13 +1053,13 @@ void eMPEGStreamParserTS::parseData(off_t offset, const void *data, unsigned int
                        packet++;
                        skipped++;
                }
-               
+
                if (skipped)
                        eDebug("SYNC LOST: skipped %d bytes.", skipped);
-               
+
                if (!len)
                        break;
-               
+
                if (m_pktptr)
                {
                                /* skip last packet */
@@ -1078,11 +1078,11 @@ void eMPEGStreamParserTS::parseData(off_t offset, const void *data, unsigned int
                                if (storelen > len)
                                        storelen = len;
                                memcpy(m_pkt + m_pktptr, packet,  storelen);
-                               
+
                                m_pktptr += storelen;
                                len -= storelen;
                                packet += storelen;
-                               
+
                                if (m_pktptr == m_header_offset + 4)
                                        if (!wantPacket(m_pkt))
                                        {
@@ -1101,7 +1101,7 @@ void eMPEGStreamParserTS::parseData(off_t offset, const void *data, unsigned int
                        m_pktptr += storelen;
                        len -= storelen;
                        packet += storelen;
-                       
+
                        if (m_pktptr == m_packetsize)
                        {
                                m_need_next_packet = processPacket(m_pkt, offset + (packet - packet_start));
index ab1dac7..dbf54bb 100644 (file)
@@ -18,23 +18,23 @@ public:
        ~eMPEGStreamInformation();
 
        int load(const char *filename);
-       
+
                /* fixup timestamp near offset, i.e. convert to zero-based */
        int fixupPTS(const off_t &offset, pts_t &ts);
 
-               /* get PTS before offset */     
+               /* get PTS before offset */
        int getPTS(off_t &offset, pts_t &pts);
-       
-       
+
+
        off_t getAccessPoint(pts_t ts, int marg=0);
-       
+
        int getNextAccessPoint(pts_t &ts, const pts_t &start, int direction);
-       
+
        bool hasAccessPoints() { return !m_access_points.empty(); }
        bool hasStructure() { return m_structure_read_fd >= 0; }
-       
+
                /* get a structure entry at given offset (or previous one, if no exact match was found).
-                  optionally, return next element. Offset will be returned. this allows you to easily 
+                  optionally, return next element. Offset will be returned. this allows you to easily
                   get previous and next structure elements. */
        int getStructureEntryFirst(off_t &offset, unsigned long long &data);
        int getStructureEntryNext(off_t &offset, unsigned long long &data, int delta);
@@ -42,7 +42,7 @@ public:
        // Get first or last PTS value and offset.
        int getFirstFrame(off_t &offset, pts_t& pts);
        int getLastFrame(off_t &offset, pts_t& pts);
-       
+
 private:
        void close();
        int loadCache(int index);
index 78b707c..5cdb4c4 100644 (file)
@@ -62,7 +62,7 @@ static inline unsigned short crc_ccitt_byte( unsigned short crc, unsigned char c
 static int bitrate[3][3][16] = {
        {
                // MPEG-2, L3
-               {-1,8000,16000,24000,32000,40000,48000,56000,64000,80000,96000,112000,128000,144000,160000,0}, 
+               {-1,8000,16000,24000,32000,40000,48000,56000,64000,80000,96000,112000,128000,144000,160000,0},
                // MPEG-2, L2
                {-1,8000,16000,24000,32000,40000,48000,56000,64000,80000,96000,112000,128000,144000,160000,0},
                // MPEG-2, L1
@@ -70,7 +70,7 @@ static int bitrate[3][3][16] = {
        },
        {
                // MPEG-1, L3
-               {-1,32000,40000,48000,56000,64000,80000,96000,112000,128000,160000,192000,224000,256000,320000,0}, 
+               {-1,32000,40000,48000,56000,64000,80000,96000,112000,128000,160000,192000,224000,256000,320000,0},
                // MPEG-1, L2
                {-1,32000,48000,56000,64000,80000,96000,112000,128000,160000,192000,224000,256000,320000,384000,0},
                // MPEG-1, L1
@@ -215,29 +215,29 @@ void eDVBRdsDecoder::process_qdar(unsigned char *buf)
                ptr=4;cnt=0;
                item=buf[2]<<8; // Number of Items
                item|=buf[3];
-               
+
                while ( cnt++ < item ) //read in items
                {
                        id=buf[ptr++]<<8; //QDarID
                        id|=buf[ptr++];
-                       
+
                        item_no=buf[ptr++]<<8; // Item Number
                        item_no|=buf[ptr++];
-                       
+
                        ctrl=buf[ptr++]; //controlbyte
                        item_type=buf[ptr++]; //item type
-                       
+
                        item_length=buf[ptr++]<<24; // Item length
                        item_length|=buf[ptr++]<<16;
                        item_length|=buf[ptr++]<<8;
                        item_length|=buf[ptr++];
-                       
+
                        ptr=ptr+4; // rfu Bytes ... not used
                        tmp=ptr; // calc crc
                        crc_qdar=0xFFFF;
                        while (tmp < ptr+item_length)
                                crc_qdar = crc_ccitt_byte(crc_qdar, buf[tmp++]);
-               
+
                        crc_read=buf[ptr+item_length]<<8;
                        crc_read|=buf[ptr+item_length+1];
                        //eDebug("[RDS/Rass] CRC read: %04X calculated: %04X",crc_read,crc_qdar^0xFFFF);
@@ -301,12 +301,12 @@ void eDVBRdsDecoder::process_qdar(unsigned char *buf)
                                        default: //nothing more yet defined
                                                break;
                                }
-                       } 
+                       }
                        else
                        {
                                eDebug("[RDS/Rass] CRC error, skip Rass-Qdar-Item");
                        }
-                       
+
                        ptr=+item_length;
                }
        }
@@ -340,12 +340,12 @@ void eDVBRdsDecoder::gotAncillaryData(const __u8 *buf, int len)
                        }
                }
 
-               if (c == 0xFD && bsflag ==0) 
+               if (c == 0xFD && bsflag ==0)
                        bsflag=1;
                else
                        bsflag=0;
-                                       
-               if (bsflag == 0) 
+
+               if (bsflag == 0)
                {
                        if ( state == 1 )
                                crc=0xFFFF;
@@ -487,7 +487,7 @@ void eDVBRdsDecoder::gotAncillaryData(const __u8 *buf, int len)
                                        break;
                                case 35:
                                        datamessage[t_ptr++]=c;
-                                       if(text_len) 
+                                       if(text_len)
                                                --text_len;
                                        else
                                                ++state;
@@ -500,9 +500,9 @@ void eDVBRdsDecoder::gotAncillaryData(const __u8 *buf, int len)
                                        crc16|=c;
                                        //eDebug("[RDS/Rass] CRC read: %04X CRC calculated: %04X",crc16,crc^0xFFFF);
                                        state=0;
-                                       if ( crc16 == (crc^0xFFFF) ) 
+                                       if ( crc16 == (crc^0xFFFF) )
                                        {
-                                               if (partcnt == -1) 
+                                               if (partcnt == -1)
                                                        partcnt=1;
                                                if (partcnt == part)
                                                {
@@ -532,12 +532,12 @@ void eDVBRdsDecoder::gotAncillaryData(const __u8 *buf, int len)
                                        state=0;
                                        break;
 
-                               // process RT plus tags ... 
+                               // process RT plus tags ...
                                case 38: // Message Element Length
-                                       text_len=c;     
+                                       text_len=c;
                                        ++state;
                                        break;
-                               case 39: // Application ID 
+                               case 39: // Application ID
                                case 40: // always 0x4BD7 so we ignore it ;)
                                case 41: // Applicationgroup Typecode/PTY ... ignore
                                        ++state;
@@ -572,15 +572,15 @@ void eDVBRdsDecoder::gotAncillaryData(const __u8 *buf, int len)
                                        rtp_typ[1]   = (0x20 & rtp_buf[2]<<5) | rtp_buf[3]>>3;
                                        rtp_start[1] = (0x38 & rtp_buf[3]<<3) | rtp_buf[4]>>5;
                                        rtp_len[1]   = 0x1f & rtp_buf[4];
-                                                                       
+
                                        unsigned char rtplus_osd_tmp[64];
-                                       
+
                                        if (rtp_start[0] < 66 && (rtp_len[0]+rtp_start[0]) < 66)
                                        {
                                                memcpy(rtp_item[rtp_typ[0]],lastmessage+rtp_start[0],rtp_len[0]+1);
                                                rtp_item[rtp_typ[0]][rtp_len[0]+1]=0;
                                        }
-                                                                       
+
                                        if (rtp_typ[0] != rtp_typ[1])
                                        {
                                                if (rtp_start[1] < 66 && (rtp_len[1]+rtp_start[1]) < 66)
@@ -600,22 +600,22 @@ void eDVBRdsDecoder::gotAncillaryData(const __u8 *buf, int len)
                                        // 41 phone.hotline
                                        // 46 email.hotline
                                        // todo: make a window to display all saved items ...
-       
+
                                        //create RTPlus OSD for title/artist
                                        rtplus_osd[0]=0;
-                                                               
+
                                        if ( rtp_item[4][0] != 0 )//artist
                                                sprintf((char*)rtplus_osd_tmp," (%s)",rtp_item[4]);
-                                                               
+
                                        if ( rtp_item[1][0] != 0 )//title
                                                sprintf((char*)rtplus_osd,"%s%s",rtp_item[1],rtplus_osd_tmp);
-                                                                       
+
                                        if ( rtplus_osd[0] != 0 )
                                        {
                                                /*emit*/ m_event(RtpTextChanged);
                                                eDebug("RTPlus: %s",rtplus_osd);
                                        }
-                                               
+
                                        state=0;
                                        break;
                        }
@@ -626,7 +626,7 @@ void eDVBRdsDecoder::gotAncillaryData(const __u8 *buf, int len)
 std::string eDVBRdsDecoder::getRassPicture(int page, int subpage)
 {
        int val=0;
-       
+
        switch(subpage)
        {
                case 0:
index 12182ee..7b15faf 100644 (file)
@@ -126,7 +126,7 @@ void eDVBScan::stateChange(iDVBChannel *ch)
                return;
        if (m_channel_state == state)
                return;
-       
+
        if (state == iDVBChannel::state_ok)
        {
                startFilter();
@@ -151,10 +151,10 @@ RESULT eDVBScan::nextChannel()
 
                /* check what we need */
        m_ready_all = readySDT;
-       
+
        if (m_flags & scanNetworkSearch)
                m_ready_all |= readyNIT;
-       
+
        if (m_flags & scanSearchBAT)
                m_ready_all |= readyBAT;
 
@@ -170,11 +170,11 @@ RESULT eDVBScan::nextChannel()
                m_event(evtFinish);
                return -ENOENT;
        }
-       
+
        m_ch_current = m_ch_toScan.front();
-       
+
        m_ch_toScan.pop_front();
-       
+
        if (m_channel->getFrontend(fe))
        {
                m_event(evtFail);
@@ -362,7 +362,7 @@ void eDVBScan::PMTready(int err)
                                case 0x04: // MPEG 2 audio
                                case 0x0f: // MPEG 2 AAC
                                case 0x11: // MPEG 4 AAC
-                                       if (!isvideo) 
+                                       if (!isvideo)
                                        {
                                                forced_audio = 1;
                                                isaudio = 1;
@@ -581,19 +581,19 @@ void eDVBScan::channelDone()
                unsigned long hash = 0;
 
                m_ch_current->getHash(hash);
-               
+
                eDVBNamespace dvbnamespace = buildNamespace(
                        (**m_SDT->getSections().begin()).getOriginalNetworkId(),
                        (**m_SDT->getSections().begin()).getTransportStreamId(),
                        hash);
-               
+
                SCAN_eDebug("SDT: ");
                std::vector<ServiceDescriptionSection*>::const_iterator i;
                for (i = m_SDT->getSections().begin(); i != m_SDT->getSections().end(); ++i)
                        processSDT(dvbnamespace, **i);
                m_ready &= ~validSDT;
        }
-       
+
        if (m_ready & validNIT)
        {
                int system;
@@ -609,16 +609,16 @@ void eDVBScan::channelDone()
                for (i = m_NIT->getSections().begin(); i != m_NIT->getSections().end(); ++i)
                {
                        const TransportStreamInfoList &tsinfovec = *(*i)->getTsInfo();
-