Merge branch 'bug_537_vobsub' into experimental
authorghost <andreas.monzner@multimedia-labs.de>
Thu, 2 Dec 2010 10:29:40 +0000 (11:29 +0100)
committerghost <andreas.monzner@multimedia-labs.de>
Thu, 2 Dec 2010 10:29:40 +0000 (11:29 +0100)
321 files changed:
.gitignore
COPYING [new file with mode: 0644]
Makefile.am
README
RecordTimer.py
ServiceReference.py
acinclude.m4 [deleted file]
autogen.sh
config.h.in [deleted file]
configure.ac [changed mode: 0755->0644]
data/Makefile.am
data/defaults/Dream/Makefile.am
data/defaults/Dream/dm500hd.info
data/defaults/Dream/dm7020hd.info [new file with mode: 0644]
data/defaults/Dream/dm7025.info
data/defaults/Dream/dm800.info
data/defaults/Dream/dm8000.info
data/defaults/Dream/dm800se.info
data/defaults/Dream/hdbouquets/userbouquet.favourites.tv
data/defaults/Dream/sdbouquets/userbouquet.favourites.tv
data/defaults/Dream/settings.7020hd [new file with mode: 0644]
data/defaults/Dream/settings.c [new file with mode: 0644]
data/defaults/Dream/settings.t [new file with mode: 0644]
data/defaultsatlists.xml
data/fonts/Makefile.am
data/fonts/tuxtxt.ttf [new file with mode: 0644]
data/keymaps/Makefile.am [new file with mode: 0644]
data/keymaps/dream-de.info [new file with mode: 0644]
data/keymaps/dream-de.kmap [new file with mode: 0644]
data/keymaps/eng.info [new file with mode: 0644]
data/keymaps/eng.kmap [new file with mode: 0644]
data/menu.xml
data/setup.xml
data/skin.xml
data/skin_default.xml
data/skin_default/icons/Makefile.am
data/skin_default/icons/input_keyboard-configured.png [new file with mode: 0644]
data/skin_default/icons/input_keyboard.png [new file with mode: 0644]
data/skin_default/icons/input_mouse-configured.png [new file with mode: 0644]
data/skin_default/icons/input_mouse.png [new file with mode: 0644]
data/skin_default/icons/input_rcnew-configured.png [new file with mode: 0644]
data/skin_default/icons/input_rcnew.png [new file with mode: 0644]
data/skin_default/icons/input_rcold-configured.png [new file with mode: 0644]
data/skin_default/icons/input_rcold.png [new file with mode: 0644]
data/startwizard.xml
debug [deleted file]
debug.gdb [deleted file]
enigma2.bb [new file with mode: 0644]
enigma2.pc.in
include/Makefile.am
lib/actions/.gitignore [new file with mode: 0644]
lib/actions/Makefile.am
lib/actions/action.h
lib/actions/parseactions.py
lib/base/.gitignore [new file with mode: 0644]
lib/base/Makefile.am
lib/base/console.h
lib/base/eenv.cpp.in [new file with mode: 0644]
lib/base/eenv.h [new file with mode: 0644]
lib/base/encoding.cpp
lib/base/filepush.cpp
lib/base/filepush.h
lib/base/itssource.h [new file with mode: 0644]
lib/base/rawfile.cpp
lib/base/rawfile.h
lib/components/Makefile.am
lib/driver/Makefile.am
lib/driver/rcconsole.cpp
lib/driver/rcconsole.h
lib/driver/rcinput.cpp
lib/driver/rcsdl.cpp [new file with mode: 0644]
lib/driver/rcsdl.h [new file with mode: 0644]
lib/dvb/Makefile.am
lib/dvb/db.cpp
lib/dvb/decoder.cpp
lib/dvb/decoder.h
lib/dvb/demux.cpp
lib/dvb/demux.h
lib/dvb/dvb.cpp
lib/dvb/dvb.h
lib/dvb/dvbtime.cpp
lib/dvb/epgcache.cpp
lib/dvb/epgcache.h
lib/dvb/frontend.cpp
lib/dvb/idemux.h
lib/dvb/idvb.h
lib/dvb/lowlevel/Makefile.am
lib/dvb/pmt.cpp
lib/dvb/pmt.h
lib/dvb/pvrparse.cpp
lib/dvb/scan.cpp
lib/dvb/sec.cpp
lib/dvb/tstools.cpp
lib/dvb/tstools.h
lib/dvb_ci/Makefile.am
lib/dvb_ci/dvbci.cpp
lib/gdi/Makefile.am
lib/gdi/accel.cpp
lib/gdi/bcm.cpp
lib/gdi/epng.cpp
lib/gdi/font.cpp
lib/gdi/font.h
lib/gdi/gfbdc.cpp
lib/gdi/gfbdc.h
lib/gdi/glcddc.cpp
lib/gdi/glcddc.h
lib/gdi/gmaindc.cpp [new file with mode: 0644]
lib/gdi/gmaindc.h [new file with mode: 0644]
lib/gdi/grc.cpp
lib/gdi/grc.h
lib/gdi/lcd.cpp
lib/gdi/picload.cpp
lib/gdi/sdl.cpp
lib/gdi/sdl.h
lib/gui/Makefile.am
lib/gui/elistboxcontent.cpp
lib/gui/epixmap.cpp
lib/gui/epixmap.h
lib/gui/epositiongauge.cpp
lib/gui/ewidgetdesktop.cpp
lib/gui/ewindowstyle.cpp
lib/mmi/Makefile.am
lib/nav/Makefile.am
lib/python/.gitignore [new file with mode: 0644]
lib/python/Components/About.py [changed mode: 0644->0755]
lib/python/Components/DreamInfoHandler.py
lib/python/Components/FileList.py
lib/python/Components/Harddisk.py [changed mode: 0755->0644]
lib/python/Components/InputDevice.py [changed mode: 0644->0755]
lib/python/Components/Keyboard.py
lib/python/Components/Network.py
lib/python/Components/NimManager.py
lib/python/Components/ParentalControl.py
lib/python/Components/ParentalControlList.py
lib/python/Components/Renderer/Picon.py
lib/python/Components/Task.py
lib/python/Components/UsageConfig.py
lib/python/Components/VolumeControl.py
lib/python/Components/config.py
lib/python/Makefile.am
lib/python/Plugins/DemoPlugins/TPMDemo/Makefile.am
lib/python/Plugins/Extensions/CutListEditor/meta/Makefile.am
lib/python/Plugins/Extensions/CutListEditor/meta/plugin_cutlisteditor.xml
lib/python/Plugins/Extensions/DVDBurn/DVDProject.py
lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py
lib/python/Plugins/Extensions/DVDBurn/DreamboxDVD.ddvdp.xml
lib/python/Plugins/Extensions/DVDBurn/Process.py
lib/python/Plugins/Extensions/DVDBurn/Text_menu_boat.ddvdm.xml
lib/python/Plugins/Extensions/DVDBurn/Thumbs_menu_clouds.ddvdm.xml
lib/python/Plugins/Extensions/DVDBurn/TitleCutter.py
lib/python/Plugins/Extensions/DVDBurn/meta/Makefile.am
lib/python/Plugins/Extensions/DVDBurn/meta/plugin_dvdburn.xml
lib/python/Plugins/Extensions/DVDPlayer/Makefile.am
lib/python/Plugins/Extensions/DVDPlayer/meta/Makefile.am
lib/python/Plugins/Extensions/DVDPlayer/meta/plugin_dvdplayer.xml
lib/python/Plugins/Extensions/DVDPlayer/plugin.py
lib/python/Plugins/Extensions/DVDPlayer/src/Makefile.am
lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
lib/python/Plugins/Extensions/GraphMultiEPG/meta/Makefile.am
lib/python/Plugins/Extensions/GraphMultiEPG/meta/plugin_graphmultiepg.xml
lib/python/Plugins/Extensions/Makefile.am
lib/python/Plugins/Extensions/MediaPlayer/meta/Makefile.am
lib/python/Plugins/Extensions/MediaPlayer/meta/plugin_mediaplayer.xml
lib/python/Plugins/Extensions/MediaPlayer/plugin.py
lib/python/Plugins/Extensions/MediaScanner/meta/Makefile.am
lib/python/Plugins/Extensions/MediaScanner/meta/plugin_mediascanner.xml
lib/python/Plugins/Extensions/PicturePlayer/meta/Makefile.am
lib/python/Plugins/Extensions/PicturePlayer/meta/plugin_pictureplayer.xml
lib/python/Plugins/Extensions/SocketMMI/meta/Makefile.am
lib/python/Plugins/Extensions/SocketMMI/meta/plugin_socketmmi.xml [changed mode: 0644->0755]
lib/python/Plugins/Extensions/SocketMMI/src/Makefile.am
lib/python/Plugins/Extensions/TuxboxPlugins/meta/Makefile.am
lib/python/Plugins/Extensions/TuxboxPlugins/meta/plugin_tuxboxplugins.xml [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/CleanupWizard/meta/Makefile.am
lib/python/Plugins/SystemPlugins/CleanupWizard/meta/plugin_cleanupwizard.xml
lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/Makefile.am
lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/meta/plugin_commoninterfaceassignment.xml
lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py
lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/__init__.py
lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/Makefile.am
lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/meta/plugin_crashlogautosubmit.xml
lib/python/Plugins/SystemPlugins/CrashlogAutoSubmit/plugin.py
lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/Makefile.am
lib/python/Plugins/SystemPlugins/DefaultServicesScanner/meta/plugin_defaultservicesscanner.xml
lib/python/Plugins/SystemPlugins/DiseqcTester/meta/Makefile.am
lib/python/Plugins/SystemPlugins/DiseqcTester/meta/plugin_diseqctester.xml
lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/meta/Makefile.am
lib/python/Plugins/SystemPlugins/FrontprocessorUpgrade/meta/plugin_frontprocessorupgrade.xml [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/Hotplug/meta/Makefile.am
lib/python/Plugins/SystemPlugins/Hotplug/meta/plugin_hotplug.xml [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/Hotplug/plugin.py
lib/python/Plugins/SystemPlugins/NFIFlash/dm8000_writenand [deleted file]
lib/python/Plugins/SystemPlugins/NFIFlash/downloader.py
lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py
lib/python/Plugins/SystemPlugins/NFIFlash/meta/Makefile.am
lib/python/Plugins/SystemPlugins/NFIFlash/meta/plugin_nfiflash.xml
lib/python/Plugins/SystemPlugins/NFIFlash/mywritenand [deleted file]
lib/python/Plugins/SystemPlugins/NFIFlash/plugin.py
lib/python/Plugins/SystemPlugins/NetworkWizard/NetworkWizard.py
lib/python/Plugins/SystemPlugins/NetworkWizard/meta/Makefile.am
lib/python/Plugins/SystemPlugins/NetworkWizard/meta/plugin_networkwizard.xml
lib/python/Plugins/SystemPlugins/PositionerSetup/meta/Makefile.am
lib/python/Plugins/SystemPlugins/PositionerSetup/meta/plugin_positionersetup.xml
lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/Makefile.am
lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/meta/plugin_satelliteequipmentcontrol.xml
lib/python/Plugins/SystemPlugins/Satfinder/meta/Makefile.am
lib/python/Plugins/SystemPlugins/Satfinder/meta/plugin_satfinder.xml
lib/python/Plugins/SystemPlugins/SkinSelector/meta/Makefile.am
lib/python/Plugins/SystemPlugins/SkinSelector/meta/plugin_skinselector.xml
lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py
lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py
lib/python/Plugins/SystemPlugins/SoftwareManager/ImageWizard.py
lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py
lib/python/Plugins/SystemPlugins/SoftwareManager/meta/Makefile.am
lib/python/Plugins/SystemPlugins/SoftwareManager/meta/plugin_softwaremanager.xml
lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
lib/python/Plugins/SystemPlugins/TempFanControl/LICENSE [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/TempFanControl/Makefile.am [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/TempFanControl/meta/Makefile.am [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/TempFanControl/meta/plugin_tempfancontrol.xml [new file with mode: 0755]
lib/python/Plugins/SystemPlugins/TempFanControl/plugin.py [changed mode: 0644->0755]
lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/Makefile.am
lib/python/Plugins/SystemPlugins/VideoEnhancement/meta/plugin_videoenhancement.xml
lib/python/Plugins/SystemPlugins/VideoTune/meta/Makefile.am
lib/python/Plugins/SystemPlugins/VideoTune/meta/plugin_videotune.xml
lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
lib/python/Plugins/SystemPlugins/Videomode/VideoWizard.py
lib/python/Plugins/SystemPlugins/Videomode/meta/Makefile.am
lib/python/Plugins/SystemPlugins/Videomode/meta/plugin_videomode.xml
lib/python/Plugins/SystemPlugins/WirelessLan/Makefile.am
lib/python/Plugins/SystemPlugins/WirelessLan/Wlan.py
lib/python/Plugins/SystemPlugins/WirelessLan/flags.py [deleted file]
lib/python/Plugins/SystemPlugins/WirelessLan/iwlibs.py [deleted file]
lib/python/Plugins/SystemPlugins/WirelessLan/meta/Makefile.am
lib/python/Plugins/SystemPlugins/WirelessLan/meta/plugin_wirelesslan.xml
lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py
lib/python/Plugins/newplugin.py [changed mode: 0644->0755]
lib/python/Screens/ChannelSelection.py
lib/python/Screens/InfoBarGenerics.py
lib/python/Screens/InputDeviceSetup.py [new file with mode: 0755]
lib/python/Screens/Makefile.am
lib/python/Screens/NetworkSetup.py
lib/python/Screens/ParentalControlSetup.py
lib/python/Screens/Satconfig.py
lib/python/Screens/ScanSetup.py
lib/python/Screens/Setup.py
lib/python/Screens/TaskView.py
lib/python/Screens/TimerEntry.py
lib/python/Screens/Wizard.py
lib/python/Tools/Directories.py
lib/python/Tools/NumericalTextInput.py
lib/python/connections.h
lib/python/enigma_python.i
lib/python/python.h
lib/service/Makefile.am
lib/service/iservice.h
lib/service/service.cpp
lib/service/service.h
lib/service/servicedvb.cpp
lib/service/servicedvb.h
lib/service/servicem2ts.cpp [new file with mode: 0644]
lib/service/servicem2ts.h [new file with mode: 0644]
lib/service/servicemp3.cpp
lib/service/servicemp3.h
m4/.gitignore [new file with mode: 0644]
m4/ax_pkg_swig.m4 [new file with mode: 0644]
m4/ax_pthread.m4 [new file with mode: 0644]
m4/ax_python_devel.m4 [new file with mode: 0644]
m4/ax_swig_enable_cxx.m4 [new file with mode: 0644]
m4/ax_swig_python.m4 [new file with mode: 0644]
m4/tuxbox.m4 [new file with mode: 0644]
main/.gitignore
main/Makefile.am
main/bsod.cpp [changed mode: 0755->0644]
main/enigma-gdi.cpp
main/enigma-gui.cpp
main/enigma.cpp
main/version_info.cpp [new file with mode: 0644]
main/version_info.h [new file with mode: 0644]
main/xmlgenerator.cpp [new file with mode: 0644]
main/xmlgenerator.h [new file with mode: 0644]
mytest.py
po/.gitignore [new file with mode: 0644]
po/LINGUAS [deleted file]
po/Makefile.am [changed mode: 0755->0644]
po/ar.po
po/ca.po
po/cs.po
po/da.po
po/de.po
po/el.po
po/en.po
po/enigma2.pot [deleted file]
po/es.po
po/et.po
po/fi.po
po/fr.po
po/fy.po
po/hr.po
po/hu.po
po/is.po
po/it.po
po/lt.po
po/lv.po
po/nl.po
po/no.po
po/pl.po
po/pt.po
po/ru.po
po/sk.po
po/sl.po
po/sr.po
po/sv.po
po/tr.po
po/uk.po
skin.py
tools/.gitignore [new file with mode: 0644]
tools/Makefile.am
tools/create_picon_links.py
tools/enigma2.sh.in [new file with mode: 0755]
tools/genmetaindex.py

index 274231a..da59fcf 100644 (file)
@@ -2,16 +2,8 @@
 # Lines that start with '#' are comments.
 # For a project mostly in C, the following would be a good set of
 # exclude patterns (uncomment them if you want to use them):
-*.[oa]
 *~
-Makefile.in
-Makefile
-*.so
-*.so.0.0
-*.cxx
-.deps
-COPYING
-INSTALL
+*.a
 aclocal.m4
 autom4te.cache/
 config.guess
@@ -20,22 +12,24 @@ config.status
 config.sub
 configure
 depcomp
+.deps/
+enigma2_config.h
+enigma2_config.h.in
 enigma2.pc
+index-enigma2.xml
+INSTALL
 install-sh
-lib/actions/actionids.h
-lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.d
-lib/python/enigma.py
-missing
-py-compile
-po/
-main/enigma2
-version.h
-*.d
 *.la
-*.lo
 .libs/
-*.tar.gz
-config.h
 libtool
+*.lo
 ltmain.sh
+Makefile
+Makefile.in
+missing
+moc_*.cpp
+*.o
+py-compile
 stamp-h1
+*.tar.bz2
+*.tar.gz
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..322cb19
--- /dev/null
+++ b/COPYING
@@ -0,0 +1 @@
+See LICENSE.
index c517d9c..ff252e6 100755 (executable)
@@ -1,18 +1,21 @@
 SUBDIRS = include lib main data po tools
 
-installdir = $(pkglibdir)/python
+ACLOCAL_AMFLAGS = -I m4
 
+installdir = $(pkglibdir)/python
 install_PYTHON = \
        Navigation.py NavigationInstance.py RecordTimer.py SleepTimer.py ServiceReference.py \
        keyids.py keymapparser.py mytest.py skin.py timer.py tools.py GlobalActions.py \
        e2reactor.py
 
-LANGS := $(shell cat $(srcdir)/po/LINGUAS)
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = enigma2.pc
+
+metadir = $(datadir)/meta
+meta_DATA = index-enigma2.xml
+CLEANFILES = index-enigma2.xml
 
-install-exec-hook:
-       for lang in $(LANGS); do \
-               $(PYTHON) $(srcdir)/tools/genmetaindex.py $$lang $(DESTDIR)$(datadir)/meta/plugin_*.xml > $(DESTDIR)$(datadir)/meta/index-enigma2_$$lang.xml; \
-       done
+EXTRA_DIST = lamedb
 
-uninstall-hook:
-       $(RM) $(DESTDIR)$(datadir)/meta/index-enigma2_*.xml
+index-enigma2.xml: $(top_srcdir)/tools/genmetaindex.py $(top_srcdir)/lib/python/Plugins/*/*/meta/plugin_*.xml
+       $(AM_V_GEN)$(PYTHON) $^ > $@
diff --git a/README b/README
index e69de29..f745e9c 100644 (file)
--- a/README
+++ b/README
@@ -0,0 +1,59 @@
+To build enigma2 on Ubuntu 10.04, follow these steps:
+
+0.) Consider using OE to build it for a Dreambox instead.
+
+    To build this version for a Dreambox, you will need
+    a recent OE (branch "opendreambox-1.6" will do, but "3.0" won't)
+    or at least a backported BitBake recipe from there.
+
+    See http://opendreambox.org/.
+
+    Stop reading here. It's not very useful for most people
+    to build enigma2 for a PC.
+
+1.) Install these packages:
+
+autoconf
+automake
+build-essential
+gettext
+libfreetype6-dev
+libfribidi-dev
+libgif-dev
+libgstreamer0.10-dev
+libgstreamer-plugins-base0.10-dev
+libjpeg62-dev
+libpng12-dev
+libsdl1.2-dev
+libsigc++-1.2-dev
+libtool
+libxml2-dev
+libxslt1-dev
+python-dev
+swig
+
+2.) Build and install libdvbsi++:
+
+git clone git://git.opendreambox.org/git/obi/libdvbsi++.git
+cd libdvbsi++
+dpkg-buildpackage -uc -us
+cd ..
+sudo dpkg -i libdvbsi++*.deb
+
+3.) Build and install libxmlccwrap:
+
+git clone git://git.opendreambox.org/git/obi/libxmlccwrap.git
+cd libxmlccwrap
+dpkg-buildpackage -uc -us
+cd ..
+sudo dpkg -i libxmlccwrap*.deb
+
+4.) Build and install enigma2:
+
+git clone git://git.opendreambox.org/git/enigma2.git
+cd enigma2
+autoreconf -i
+./configure --prefix=$HOME/enigma2 --with-libsdl
+make
+make install
+
index def7568..4ece9c5 100755 (executable)
@@ -102,7 +102,7 @@ class RecordTimerEntry(timer.TimerEntry, object):
                
                assert isinstance(serviceref, ServiceReference)
                
-               if serviceref.getType() == eServiceReference.idDVB and serviceref.getPath() == "":
+               if serviceref.isRecordable():
                        self.service_ref = serviceref
                else:
                        self.service_ref = ServiceReference(None)
index 5d11ae7..4907fa2 100644 (file)
@@ -10,7 +10,7 @@ class ServiceReference(eServiceReference):
 
        def __str__(self):
                return self.ref.toString()
-       
+
        def getServiceName(self):
                info = self.info()
                return info and info.getName(self.ref) or ""
@@ -20,9 +20,16 @@ class ServiceReference(eServiceReference):
 
        def list(self):
                return self.serviceHandler.list(self.ref)
-       
+
        def getType(self):
                return self.ref.type
-       
+
        def getPath(self):
                return self.ref.getPath()
+
+       def getFlags(self):
+               return self.ref.flags
+
+       def isRecordable(self):
+               ref = self.ref
+               return ref.flags & eServiceReference.isGroup or (ref.type == eServiceReference.idDVB and ref.getPath() == "")
\ No newline at end of file
diff --git a/acinclude.m4 b/acinclude.m4
deleted file mode 100644 (file)
index 6f1cb0a..0000000
+++ /dev/null
@@ -1,445 +0,0 @@
-AC_DEFUN([TUXBOX_APPS],[
-
-INSTALL="$INSTALL -p"
-
-AC_GNU_SOURCE
-AC_SYS_LARGEFILE
-
-AC_ARG_WITH(target,
-       [  --with-target=TARGET    target for compilation [[native,cdk]]],
-       [TARGET="$withval"],[TARGET="native"])
-
-AC_ARG_WITH(targetprefix,
-       [  --with-targetprefix=PATH  prefix relative to target root (only applicable in cdk mode)],
-       [targetprefix="$withval"],[targetprefix="NONE"])
-
-AC_ARG_WITH(debug,
-       [  --without-debug         disable debugging code],
-       [DEBUG="$withval"],[DEBUG="yes"])
-
-if test "$DEBUG" = "yes"; then
-       DEBUG_CFLAGS="-g3 -ggdb"
-       AC_DEFINE(DEBUG,1,[Enable debug messages])
-fi
-
-AC_MSG_CHECKING(target)
-
-if test "$TARGET" = "native"; then
-       AC_MSG_RESULT(native)
-
-       if test "$CFLAGS" = "" -a "$CXXFLAGS" = ""; then
-               CFLAGS="-Wall -O2 -pipe $DEBUG_CFLAGS"
-               CXXFLAGS="-Wall -O2 -pipe $DEBUG_CFLAGS"
-       fi
-       if test "$prefix" = "NONE"; then
-               prefix=/usr/local
-       fi
-       targetprefix=$prefix
-elif test "$TARGET" = "cdk"; then
-       AC_MSG_RESULT(cdk)
-
-       if test "$CC" = "" -a "$CXX" = ""; then
-               CC=powerpc-tuxbox-linux-gnu-gcc CXX=powerpc-tuxbox-linux-gnu-g++
-       fi
-       if test "$CFLAGS" = "" -a "$CXXFLAGS" = ""; then
-               CFLAGS="-Wall -Os -mcpu=823 -pipe $DEBUG_CFLAGS"
-               CXXFLAGS="-Wall -Os -mcpu=823 -pipe $DEBUG_CFLAGS"
-       fi
-       if test "$prefix" = "NONE"; then
-               AC_MSG_ERROR(invalid prefix, you need to specify one in cdk mode)
-       fi
-       if test "$targetprefix" = "NONE"; then
-               targetprefix=""
-       fi
-       if test "$host_alias" = ""; then
-               cross_compiling=yes
-               host_alias=powerpc-tuxbox-linux-gnu
-       fi
-else
-       AC_MSG_RESULT(none)
-       AC_MSG_ERROR([invalid target $TARGET, choose on from native,cdk]);
-fi
-
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
-
-check_path () {
-       return $(perl -e "if(\"$1\"=~m#^/usr/(local/)?bin#){print \"0\"}else{print \"1\";}")
-}
-
-])
-
-AC_DEFUN([TUXBOX_APPS_DIRECTORY_ONE],[
-AC_ARG_WITH($1,[  $6$7 [[PREFIX$4$5]]],[
-       _$2=$withval
-       if test "$TARGET" = "cdk"; then
-               $2=`eval echo "${targetprefix}$withval"`
-       else
-               $2=$withval
-       fi
-],[
-       $2="\${$3}$5"
-       if test "$TARGET" = "cdk"; then
-               _$2=`eval echo "${target$3}$5"`
-       else
-               _$2=`eval echo "${$3}$5"`
-       fi
-])
-
-dnl automake <= 1.6 don't support this
-dnl AC_SUBST($2)
-AC_DEFINE_UNQUOTED($2,"$_$2",$7)
-])
-
-AC_DEFUN([TUXBOX_APPS_DIRECTORY],[
-AC_REQUIRE([TUXBOX_APPS])
-
-if test "$TARGET" = "cdk"; then
-       datadir="\${prefix}/share"
-       tuxboxdatadir="\${prefix}/share/tuxbox"
-       zoneinfodir="\${datadir}/zoneinfo"
-       sysconfdir="\${prefix}/etc"
-       localstatedir="\${prefix}/var"
-       localedir="\${prefix}/var"
-       libdir="\${prefix}/lib"
-       targetdatadir="\${targetprefix}/share"
-       targetsysconfdir="\${targetprefix}/etc"
-       targetlocalstatedir="\${targetprefix}/var"
-       targetlibdir="\${targetprefix}/lib"
-fi
-
-TUXBOX_APPS_DIRECTORY_ONE(configdir,CONFIGDIR,sysconfdir,/etc,,
-       [--with-configdir=PATH   ],[where to find the config files])
-
-TUXBOX_APPS_DIRECTORY_ONE(datadir,DATADIR,datadir,/share,,
-       [--with-datadir=PATH     ],[where to find data])
-
-TUXBOX_APPS_DIRECTORY_ONE(fontdir,FONTDIR,datadir,/share,/fonts,
-       [--with-fontdir=PATH     ],[where to find the fonts])
-
-TUXBOX_APPS_DIRECTORY_ONE(libdir,LIBDIR,libdir,/lib,,
-       [--with-libdir=PATH      ],[where to find the internal libs])
-])
-
-dnl automake <= 1.6 needs this specifications
-AC_SUBST(CONFIGDIR)
-AC_SUBST(DATADIR)
-AC_SUBST(FONTDIR)
-AC_SUBST(LIBDIR)
-dnl end workaround
-
-AC_DEFUN([TUXBOX_APPS_DVB],[
-AC_ARG_WITH(dvbincludes,
-       [  --with-dvbincludes=PATH  path for dvb includes [[NONE]]],
-       [DVBINCLUDES="$withval"],[DVBINCLUDES=""])
-
-if test "$DVBINCLUDES"; then
-       CPPFLAGS="$CPPFLAGS -I$DVBINCLUDES"
-fi
-
-AC_CHECK_HEADERS(ost/dmx.h,[
-       DVB_API_VERSION=1
-       AC_MSG_NOTICE([found dvb version 1])
-])
-
-if test -z "$DVB_API_VERSION"; then
-AC_CHECK_HEADERS(linux/dvb/version.h,[
-       AC_LANG_PREPROC_REQUIRE()
-       AC_REQUIRE([AC_PROG_EGREP])
-       AC_LANG_CONFTEST([AC_LANG_SOURCE([[
-#include <linux/dvb/version.h>
-version DVB_API_VERSION
-       ]])])
-       DVB_API_VERSION=`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | $EGREP "^version" | sed "s,version\ ,,"`
-       rm -f conftest*
-
-       AC_MSG_NOTICE([found dvb version $DVB_API_VERSION])
-])
-fi
-
-if test "$DVB_API_VERSION"; then
-       AC_DEFINE(HAVE_DVB,1,[Define to 1 if you have the dvb includes])
-       AC_DEFINE_UNQUOTED(HAVE_DVB_API_VERSION,$DVB_API_VERSION,[Define to the version of the dvb api])
-else
-       AC_MSG_ERROR([can't find dvb headers])
-fi
-])
-
-AC_DEFUN([_TUXBOX_APPS_LIB_CONFIG],[
-AC_PATH_PROG($1_CONFIG,$2,no)
-if test "$$1_CONFIG" != "no"; then
-       if test "$TARGET" = "cdk" && check_path "$$1_CONFIG"; then
-               AC_MSG_$3([could not find a suitable version of $2]);
-       else
-               $1_CFLAGS=$($$1_CONFIG --cflags)
-               $1_LIBS=$($$1_CONFIG --libs)
-       fi
-fi
-
-AC_SUBST($1_CFLAGS)
-AC_SUBST($1_LIBS)
-])
-
-AC_DEFUN([TUXBOX_APPS_LIB_CONFIG],[
-_TUXBOX_APPS_LIB_CONFIG($1,$2,ERROR)
-if test "$$1_CONFIG" = "no"; then
-       AC_MSG_ERROR([could not find $2]);
-fi
-])
-
-AC_DEFUN([TUXBOX_APPS_LIB_CONFIG_CHECK],[
-_TUXBOX_APPS_LIB_CONFIG($1,$2,WARN)
-])
-
-AC_DEFUN([TUXBOX_APPS_PKGCONFIG],[
-AC_PATH_PROG(PKG_CONFIG, pkg-config,no)
-if test "$PKG_CONFIG" = "no" ; then
-       AC_MSG_ERROR([could not find pkg-config]);
-fi
-])
-
-AC_DEFUN([_TUXBOX_APPS_LIB_PKGCONFIG],[
-PKG_CHECK_MODULES($1,$2)
-AC_SUBST($1_CFLAGS)
-AC_SUBST($1_LIBS)
-])
-
-AC_DEFUN([_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL],[
-PKG_CHECK_MODULES($1,$2,$3="yes",$3="no")
-if test "$$3" = "yes"; then
-       AC_DEFINE($3, 1, [$2 available])
-else
-       $1_CFLAGS=""
-       $1_LIBS=""
-fi
-AC_SUBST($1_CFLAGS)
-AC_SUBST($1_LIBS)
-])
-
-AC_DEFUN([TUXBOX_APPS_LIB_PKGCONFIG],[
-_TUXBOX_APPS_LIB_PKGCONFIG($1,$2)
-if test -z "$$1_CFLAGS" ; then
-       AC_MSG_ERROR([could not find package $2]);
-fi
-])
-
-AC_DEFUN([TUXBOX_APPS_LIB_PKGCONFIG_CHECK],[
-_TUXBOX_APPS_LIB_PKGCONFIG($1,$2)
-])
-
-AC_DEFUN([_TUXBOX_APPS_LIB_SYMBOL],[
-AC_CHECK_LIB($2,$3,HAVE_$1="yes",HAVE_$1="no")
-if test "$HAVE_$1" = "yes"; then
-       $1_LIBS=-l$2
-fi
-
-AC_SUBST($1_LIBS)
-])
-
-AC_DEFUN([TUXBOX_APPS_LIB_SYMBOL],[
-_TUXBOX_APPS_LIB_SYMBOL($1,$2,$3,ERROR)
-if test "$HAVE_$1" = "no"; then
-       AC_MSG_ERROR([could not find $2]);
-fi
-])
-
-AC_DEFUN([TUXBOX_APPS_LIB_CONFIG_SYMBOL],[
-_TUXBOX_APPS_LIB_SYMBOL($1,$2,$3,WARN)
-])
-
-AC_DEFUN([TUXBOX_APPS_GETTEXT],[
-AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
-       [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
-       (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
-       :)
-AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-
-AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
-       [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 &&
-       (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
-       :)
-
-AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,[$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1],:)
-
-AC_MSG_CHECKING([whether NLS is requested])
-AC_ARG_ENABLE(nls,
-       [  --disable-nls           do not use Native Language Support],
-       USE_NLS=$enableval, USE_NLS=yes)
-AC_MSG_RESULT($USE_NLS)
-AC_SUBST(USE_NLS)
-
-if test "$USE_NLS" = "yes"; then
-       AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,[
-               AC_TRY_LINK([
-                       #include <libintl.h>
-                       #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
-                       #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
-                       #endif
-                       extern int _nl_msg_cat_cntr;
-                       extern int *_nl_domain_bindings;
-                       ],[
-                       bindtextdomain ("", "");
-                       return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings;
-                       ], gt_cv_func_gnugettext_libc=yes, gt_cv_func_gnugettext_libc=no
-               )]
-       )
-
-       if test "$gt_cv_func_gnugettext_libc" = "yes"; then
-               AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.])
-               gt_use_preinstalled_gnugettext=yes
-       else
-               USE_NLS=no
-       fi
-fi
-
-if test -f "$srcdir/po/LINGUAS"; then
-       ALL_LINGUAS=$(sed -e "/^#/d" "$srcdir/po/LINGUAS")
-fi
-
-POFILES=
-GMOFILES=
-UPDATEPOFILES=
-DUMMYPOFILES=
-for lang in $ALL_LINGUAS; do
-       POFILES="$POFILES $srcdirpre$lang.po"
-       GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
-       UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
-       DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
-done
-INST_LINGUAS=
-if test -n "$ALL_LINGUAS"; then
-       for presentlang in $ALL_LINGUAS; do
-               useit=no
-               if test -n "$LINGUAS"; then
-                       desiredlanguages="$LINGUAS"
-               else
-                       desiredlanguages="$ALL_LINGUAS"
-               fi
-               for desiredlang in $desiredlanguages; do
-                       case "$desiredlang" in
-                               "$presentlang"*) useit=yes;;
-                       esac
-               done
-               if test $useit = yes; then
-                       INST_LINGUAS="$INST_LINGUAS $presentlang"
-               fi
-       done
-fi
-CATALOGS=
-if test -n "$INST_LINGUAS"; then
-       for lang in $INST_LINGUAS; do
-               CATALOGS="$CATALOGS $lang.gmo"
-       done
-fi
-AC_SUBST(POFILES)
-AC_SUBST(GMOFILES)
-AC_SUBST(UPDATEPOFILES)
-AC_SUBST(DUMMYPOFILES)
-AC_SUBST(CATALOGS)
-])
-
-dnl backward compatiblity
-AC_DEFUN([AC_GNU_SOURCE],
-[AH_VERBATIM([_GNU_SOURCE],
-[/* Enable GNU extensions on systems that have them.  */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif])dnl
-AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
-AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
-AC_DEFINE([_GNU_SOURCE])
-])
-
-AC_DEFUN([AC_PROG_EGREP],
-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
-   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-    then ac_cv_prog_egrep='grep -E'
-    else ac_cv_prog_egrep='egrep'
-    fi])
- EGREP=$ac_cv_prog_egrep
- AC_SUBST([EGREP])
-])
-
-AC_DEFUN([AC_PYTHON_DEVEL],[
-       #
-       # should allow for checking of python version here...
-       #
-       if test $cross_compiling = "yes"; then
-               # Check for Python include path
-               AC_MSG_CHECKING([for Python include path])
-               
-               # FIXME: yes, this is wrong. sorry about that. (tmbinc)
-               cross_PYTHON_VERSION=$PYTHON_VERSION
-               python_path=
-               for i in $CPPFLAGS ; do
-                       p=`echo $i | sed "s,^-I,,"`
-                       p=`echo $p | sed "s,^-isystem,,"`
-                       if test -f "$p/python$cross_PYTHON_VERSION/Python.h"; then
-                               python_path="$p/python$cross_PYTHON_VERSION"
-                               break
-                       fi
-               done
-               AC_MSG_RESULT([$python_path])
-               if test -z "$python_path" ; then
-                                               AC_MSG_ERROR([cannot find Python include path])
-               fi
-               AC_SUBST([PYTHON_CPPFLAGS],[-I$python_path])
-
-               # Check for Python library path
-               AC_MSG_CHECKING([for Python library path])
-               python_path=
-               for i in $LDFLAGS; do
-                       l=`echo $i | sed "s,^-L,,"`
-                       python_path=`find $l -type f -name libpython$cross_PYTHON_VERSION.* -print | sed "1q"`
-                       if test -n "$python_path" ; then
-                               break
-                       fi
-               done
-               python_path=`echo $python_path | sed "s,/libpython.*$,,"`
-               AC_MSG_RESULT([$python_path])
-               if test -z "$python_path" ; then
-                                               AC_MSG_ERROR([cannot find Python library path])
-               fi
-               AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$cross_PYTHON_VERSION"])
-               #
-               python_site=`echo $python_path | sed "s/config/site-packages/"`
-               AC_SUBST([PYTHON_SITE_PKG],[$python_site])
-       else
-               AC_REQUIRE([AM_PATH_PYTHON])
-
-               # Check for Python include path
-               AC_MSG_CHECKING([for Python include path])
-               python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
-               for i in "$python_path/include/python$PYTHON_VERSION/" "$python_path/include/python/" "$python_path/" ; do
-                       python_path=`find $i -type f -name Python.h -print | sed "1q"`
-                       if test -n "$python_path" ; then
-                               break
-                       fi
-               done
-               python_path=`echo $python_path | sed "s,/Python.h$,,"`
-               AC_MSG_RESULT([$python_path])
-               if test -z "$python_path" ; then
-                       AC_MSG_ERROR([cannot find Python include path])
-               fi
-               AC_SUBST([PYTHON_CPPFLAGS],[-I$python_path])
-
-               # Check for Python library path
-               AC_MSG_CHECKING([for Python library path])
-               python_path=`echo $PYTHON | sed "s,/bin.*$,,"`
-               for i in "$python_path/lib/python$PYTHON_VERSION/config/" "$python_path/lib/python$PYTHON_VERSION/" "$python_path/lib/python/config/" "$python_path/lib/python/" "$python_path/" ; do
-                       python_path=`find $i -type f -name libpython$PYTHON_VERSION.* -print | sed "1q"`
-                       if test -n "$python_path" ; then
-                               break
-                       fi
-               done
-               python_path=`echo $python_path | sed "s,/libpython.*$,,"`
-               AC_MSG_RESULT([$python_path])
-               if test -z "$python_path" ; then
-                       AC_MSG_ERROR([cannot find Python library path])
-               fi
-               AC_SUBST([PYTHON_LDFLAGS],["-L$python_path -lpython$PYTHON_VERSION"])
-               #
-               python_site=`echo $python_path | sed "s/config/site-packages/"`
-               AC_SUBST([PYTHON_SITE_PKG],[$python_site])
-       fi
-])
index 584a74e..68f4a17 100755 (executable)
@@ -1,60 +1,2 @@
 #!/bin/sh
-
-package="enigma2"
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-cd "$srcdir"
-DIE=0
-
-(autoconf --version) < /dev/null > /dev/null 2>&1 || {
-       echo
-       echo "You must have autoconf installed to compile $package."
-       echo "Download the appropriate package for your system,"
-       echo "or get the source from one of the GNU ftp sites"
-       echo "listed in http://www.gnu.org/order/ftp.html"
-       DIE=1
-}
-
-(automake --version) < /dev/null > /dev/null 2>&1 || {
-       echo
-       echo "You must have automake installed to compile $package."
-       echo "Download the appropriate package for your system,"
-       echo "or get the source from one of the GNU ftp sites"
-       echo "listed in http://www.gnu.org/order/ftp.html"
-       DIE=1
-}
-
-(libtool --version) < /dev/null > /dev/null 2>&1 || {
-       echo
-       echo "You must have libtool installed to compile $package."
-       echo "Download the appropriate package for your system,"
-       echo "or get the source from one of the GNU ftp sites"
-       echo "listed in http://www.gnu.org/order/ftp.html"
-       DIE=1
-}
-
-if test "$DIE" -eq 1; then
-       exit 1
-fi
-
-if [ ! -e acinclude.m4 ]; then
-       for i in .. ../.. ../../..; do
-               if [ -e `pwd`/$i/acinclude.m4 ]; then
-                       ln -s `pwd`/$i/acinclude.m4 .
-               fi
-       done
-fi
-
-echo "Generating configuration files for $package, please wait...."
-
-echo "  aclocal"
-aclocal
-echo "  libtoolize --automake"
-libtoolize --automake
-echo "  autoconf"
-autoconf
-echo "  automake --add-missing"
-automake --add-missing 
-
+autoreconf -i
diff --git a/config.h.in b/config.h.in
deleted file mode 100644 (file)
index 3564836..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/* config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* where to find the config files */
-#undef CONFIGDIR
-
-/* where to find data */
-#undef DATADIR
-
-/* Enable debug messages */
-#undef DEBUG
-
-/* Define to 1 if translation of program messages to the user's native
-   language is requested. */
-#undef ENABLE_NLS
-
-/* where to find the fonts */
-#undef FONTDIR
-
-/* where games data is stored */
-#undef GAMESDIR
-
-/* Define to 1 if you have the dvb includes */
-#undef HAVE_DVB
-
-/* Define to the version of the dvb api */
-#undef HAVE_DVB_API_VERSION
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define to 1 if you have the <linux/dvb/version.h> header file. */
-#undef HAVE_LINUX_DVB_VERSION_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the <ost/dmx.h> header file. */
-#undef HAVE_OST_DMX_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* where to find the internal libs */
-#undef LIBDIR
-
-/* where to find locales */
-#undef LOCALEDIR
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* where to find the plugins */
-#undef PLUGINDIR
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* where to find tuxbox data */
-#undef TUXBOXDATADIR
-
-/* Version number of package */
-#undef VERSION
-
-/* With SDL */
-#undef WITH_SDL
-
-/* where to find zoneinfo db */
-#undef ZONEINFODIR
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-#undef _FILE_OFFSET_BITS
-
-/* Enable GNU extensions on systems that have them.  */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif
-
-/* Define for large files, on AIX-style hosts. */
-#undef _LARGE_FILES
old mode 100755 (executable)
new mode 100644 (file)
index 05c3a8e..0c54f5b
-AC_INIT(enigma2,2.4)
-AM_INIT_AUTOMAKE(enigma2,2.4)
+AC_INIT([enigma2],[3.0.0],[enigma2-devel@lists.elitedvb.net])
+AM_INIT_AUTOMAKE([dist-bzip2 no-define tar-pax -Wno-portability])
+AC_CONFIG_HEADERS([enigma2_config.h])
 
-TUXBOX_APPS
-TUXBOX_APPS_DIRECTORY
+# Silent rules are available since 1.11, but older versions
+# are still in use. So don't use them unconditionally.
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
 
 AC_PROG_CC
 AC_PROG_CXX
-AC_PROG_RANLIB
+m4_ifdef([LT_INIT], [LT_INIT], [AC_PROG_LIBTOOL])
+AC_CONFIG_MACRO_DIR([m4])
+
+AC_CHECK_HEADERS([dbox/fp.h dbox/lcd-ks0713.h])
+
+AC_PATH_PROG(MSGFMT, msgfmt, AC_MSG_ERROR(Could not find msgfmt))
+
+AM_PATH_PYTHON
+AX_PYTHON_DEVEL
+AX_PKG_SWIG
+AX_SWIG_ENABLE_CXX
+AX_SWIG_PYTHON
+AX_PTHREAD
+
+TUXBOX_APPS_DVB
+
+AM_CONDITIONAL(HAVE_GIT_DIR, test -d "$srcdir/.git")
+AM_CONDITIONAL(HAVE_FAKE_GIT_DIR, test -f "$srcdir/.git/last_commit_info")
+
+PKG_CHECK_MODULES(BASE, [freetype2 fribidi gstreamer-0.10 gstreamer-pbutils-0.10 libdvbsi++ libpng libxml-2.0 sigc++-1.2])
+PKG_CHECK_MODULES(LIBDDVD, libdreamdvd, HAVE_LIBDDVD="yes", HAVE_LIBDDVD="no")
+AM_CONDITIONAL(HAVE_LIBDDVD, test "$HAVE_LIBDDVD" = "yes")
+
+AC_CHECK_LIB([dl], [dlopen], [LIBDL_LIBS="-ldl"], [AC_MSG_ERROR([Could not find libdl])])
+AC_SUBST(LIBDL_LIBS)
+AC_CHECK_LIB([jpeg], [jpeg_set_defaults], [LIBJPEG_LIBS="-ljpeg"], [AC_MSG_ERROR([Could not find libjpeg])])
+AC_SUBST(LIBJPEG_LIBS)
+AC_CHECK_LIB([ungif], [DGifOpen], [LIBGIF_LIBS="-lungif"], [AC_CHECK_LIB([gif], [DGifOpen], [LIBGIF_LIBS="-lgif"], [AC_MSG_ERROR([Could not find libgif or libungif])])])
+AC_SUBST(LIBGIF_LIBS)
+
+AC_LANG_PUSH([C++])
+AC_CHECK_LIB([xmlccwrap], [exit], [LIBXMLCCWRAP_LIBS="-lxmlccwrap"], [AC_MSG_ERROR([Could not find libxmlccwrap])])
+AC_SUBST(LIBXMLCCWRAP_LIBS)
+AC_LANG_POP
 
 AC_ARG_WITH(libsdl,
-       AC_HELP_STRING([--with-libsdl], [use sdl, yes or no]),
-       [[withsdl=$withval]],
-       [[withsdl=yes]]
-)
-
-AC_CHECK_HEADER(dreamdvd/ddvdlib.h,have_ddvdlib="yes",have_ddvdlib="no")
-if test x"${have_ddvdlib}" = xyes ; then
-       AC_DEFINE(HAVE_DDVDLIB, 1,[Define if ddvdlib is available])
-else
-       AC_MSG_NOTICE([ddvdlib not found... dont build dvd plugin])
+       AS_HELP_STRING([--with-libsdl],[use libsdl, yes or no]),
+       [with_libsdl=$withval],[with_libsdl=no])
+if test "$with_libsdl" = "yes"; then
+       PKG_CHECK_MODULES(LIBSDL, sdl)
 fi
-AM_CONDITIONAL(HAVE_DDVDLIB, test "$have_ddvdlib" = "yes")
+AM_CONDITIONAL(HAVE_LIBSDL, test "$with_libsdl" = "yes")
 
-AM_PATH_PYTHON()
-AC_PYTHON_DEVEL
-#AM_PATH_XINE(1.1.0,, AC_MSG_ERROR([*** Please install xine-lib (devel) first ***]))
+AC_ARG_WITH(libxine,
+       AS_HELP_STRING([--with-libxine],[use libxine, yes or no]),
+       [with_libxine=$withval],[with_libxine=no])
+if test "$with_libxine" = "yes"; then
+       PKG_CHECK_MODULES(LIBXINE, libxine)
+       AC_DEFINE([WITH_XINE],[1],[Define to 1 if you have libxine])
+fi
+AM_CONDITIONAL(HAVE_LIBXINE, test "$with_libxine" = "yes")
 
-TUXBOX_APPS_DVB
+AC_ARG_WITH(debug,
+       AS_HELP_STRING([--without-debug],[disable debugging code]),
+       [with_debug="$withval"],[with_debug="yes"])
+if test "$with_debug" = "yes"; then
+       DEBUG_CFLAGS="-ggdb3"
+       AC_DEFINE([DEBUG],[1],[Define to 1 to enable debugging code])
+fi
 
-_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(FREETYPE, freetype2, HAVE_FREETYPE2)
-if test "$HAVE_FREETYPE2" = "no" ; then
-       TUXBOX_APPS_LIB_CONFIG(FREETYPE, freetype-config)
+AC_ARG_WITH(memcheck,
+       AS_HELP_STRING([--with-memcheck],[enable memory leak checks]),
+       [with_memcheck="$withval"],[with_memcheck="no"])
+if test "$with_memcheck" = "yes"; then
+       AC_DEFINE([MEMLEAK_CHECK],[1],[Define to 1 to enable memory leak checks])
 fi
-TUXBOX_APPS_LIB_PKGCONFIG(FRIBIDI,fribidi)
-TUXBOX_APPS_LIB_PKGCONFIG(ID3TAG,id3tag)
-TUXBOX_APPS_LIB_PKGCONFIG(MAD,mad)
-#TUXBOX_APPS_LIB_PKGCONFIG(PLUGINS,tuxbox-plugins)
-TUXBOX_APPS_LIB_PKGCONFIG(PNG,libpng)
-TUXBOX_APPS_LIB_PKGCONFIG(SIGC,sigc++-1.2)
-TUXBOX_APPS_LIB_PKGCONFIG(DVBSI,libdvbsi++)
-_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(GSTREAMER,gstreamer,HAVE_GSTREAMER)
-_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(GSTREAMERPBUTILS,gstreamer-pbutils,HAVE_GSTSTREAMERPBUTILS)
-_TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(LIBXINE,libxine,HAVE_LIBXINE)
-AC_CHECK_LIB(jpeg, jpeg_set_defaults, HAVE_JPEG="yes", HAVE_JPEG="no")
-JPEG_LIBS="-ljpeg"
-AC_SUBST(JPEG_LIBS)
-
-AC_SUBST(LIBUNGIF_LIBS,"")
-AC_CHECK_HEADERS(gif_lib.h,
-       AC_CHECK_LIB(ungif,DGifOpen,
-       [AC_DEFINE(HAVE_LIBUNGIF,1,[Define if you have libgif/libungif including devel headers])
-               LIBUNGIF_LIBS="-lungif"],
-               [AC_CHECK_LIB(gif,DGifOpen,
-                       [AC_DEFINE(HAVE_LIUNBGIF,1)
-                       LIBUNGIF_LIBS="-lgif"])]))
-
-TUXBOX_APPS_LIB_PKGCONFIG(XML2,libxml-2.0)
-
-# ok, we are in trouble: XMLCCWRAP only defines C++ symbols. So let's just check if linking works,
-# and assume everything will be ok. Then just check for the "exit" symbol, which should be always there.
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
-TUXBOX_APPS_LIB_SYMBOL(XMLCCWRAP, xmlccwrap, exit)
-AC_LANG_RESTORE
-
-if test "$withsdl" = "yes" ; then
-       _TUXBOX_APPS_LIB_PKGCONFIG_OPTIONAL(SDL,sdl,WITH_SDL)
-       if test "$WITH_SDL" = "no" ; then
-               TUXBOX_APPS_LIB_CONFIG(SDL,sdl-config)
-               AC_DEFINE_UNQUOTED([WITH_SDL],[$withsdl],[With SDL])
+
+AC_ARG_WITH(po,
+       AS_HELP_STRING([--with-po],[enable updating of po files]),
+       [with_po="$withval"],[with_po="no"])
+if test "$with_po" = "yes"; then
+       AC_PATH_PROG(MSGINIT, msginit)
+       AC_PATH_PROG(MSGMERGE, msgmerge)
+       AC_PATH_PROG(MSGUNIQ, msguniq)
+       AC_PATH_PROG(XGETTEXT, xgettext)
+       if test -z "$MSGINIT" -o -z "$MSGMERGE" -o -z "$MSGUNIQ" -o -z "$XGETTEXT"; then
+               AC_MSG_ERROR([Could not find required gettext tools])
        fi
 fi
-# allow 'if WITH_SDL' conditionals in Makefile.am
-AM_CONDITIONAL(WITH_SDL, test "$WITH_SDL" = "yes")
+AM_CONDITIONAL(UPDATE_PO, test "$with_po" = "yes")
 
-CPPFLAGS="$CPPFLAGS "'-I$(top_srcdir)'
-CPPFLAGS="$CPPFLAGS -D_REENTRANT $PYTHON_CPPFLAGS $MD5SUM_CFLAGS $FREETYPE_CFLAGS $FRIBIDI_CFLAGS $ID3TAG_CFLAGS $MAD_CFLAGS $PLUGINS_CFLAGS $PNG_CFLAGS $SDL_CFLAGS $SIGC_CFLAGS $XMLTREE_CFLAGS $DVBSI_CFLAGS $GSTREAMER_CFLAGS $GSTREAMERPBUTILS_CFLAGS $LIBXINE_CFLAGS $LIBUNGIF_CFLAGS"
-#CPPFLAGS="$CPPFLAGS -DMEMLEAK_CHECK"
-CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions -Wall"
-LDFLAGS="$LDFLAGS -pthread $PYTHON_LDFLAGS $SDL_LDFLAGS $GSTREAMER_LDFLAGS $GSTREAMERPBUTILS_LDFLAGS $LIBXINE_LDFLAGS $LIBUNGIF_LDFLAGS"
-#LDFLAGS="-rdynamic $LDFLAGS"
+ENIGMA2_CFLAGS="-fno-rtti -fno-exceptions"
+AC_SUBST(ENIGMA2_CFLAGS)
 
-TUXBOX_APPS_GETTEXT
+CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
+CFLAGS="$CFLAGS $DEBUG_CFLAGS -Wall"
+CXXFLAGS="$CXXFLAGS $DEBUG_CFLAGS -Wall $BASE_CFLAGS $ENIGMA2_CFLAGS $PTHREAD_CFLAGS"
 
-AC_OUTPUT([
+AC_CONFIG_FILES([
 Makefile
 data/Makefile
 data/fonts/Makefile
@@ -93,6 +109,7 @@ data/defaults/Dream/Makefile
 data/defaults/Dream/hdbouquets/Makefile
 data/defaults/Dream/sdbouquets/Makefile
 data/extensions/Makefile
+data/keymaps/Makefile
 data/skin_default/Makefile
 data/skin_default/menu/Makefile
 data/skin_default/icons/Makefile
@@ -102,6 +119,7 @@ include/Makefile
 lib/Makefile
 lib/actions/Makefile
 lib/base/Makefile
+lib/base/eenv.cpp
 lib/driver/Makefile
 lib/dvb/Makefile
 lib/dvb/lowlevel/Makefile
@@ -159,6 +177,7 @@ lib/python/Plugins/SystemPlugins/Hotplug/Makefile
 lib/python/Plugins/SystemPlugins/Hotplug/meta/Makefile
 lib/python/Plugins/SystemPlugins/Makefile
 lib/python/Plugins/SystemPlugins/TempFanControl/Makefile
+lib/python/Plugins/SystemPlugins/TempFanControl/meta/Makefile
 lib/python/Plugins/SystemPlugins/NetworkWizard/Makefile
 lib/python/Plugins/SystemPlugins/NetworkWizard/meta/Makefile
 lib/python/Plugins/SystemPlugins/NFIFlash/Makefile
@@ -187,8 +206,7 @@ lib/components/Makefile
 po/Makefile
 main/Makefile
 tools/Makefile
+tools/enigma2.sh
 enigma2.pc
 ])
-
-#lib/python/Plugins/Extensions/SimpleRSS/Makefile
-#lib/python/Plugins/Extensions/FileManager/Makefile
+AC_OUTPUT
index 1ed9444..0eaa082 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = countries fonts defaults extensions skin_default
+SUBDIRS = countries fonts defaults extensions keymaps skin_default
 
 dist_pkgdata_DATA = \
        defaultsatlists.xml \
index cda5583..ee66c93 100644 (file)
@@ -6,11 +6,15 @@ dist_install_DATA = \
        bouquets.tv \
        dm800se.info \
        dm500hd.info \
+       dm7020hd.info \
        dm7025.info \
        dm8000.info \
        dm800.info \
        settings.800se \
        settings.500hd \
+       settings.7020hd \
        settings.7025 \
        settings.800 \
-       settings.8000
+       settings.8000 \
+       settings.c \
+       settings.t
index b1b4d53..29d14b6 100644 (file)
                                <satellite type="192" />
                        </prerequisites>
                </file-->
-               <file type="favourites" directory="" name="bouquets.tv" />              
-               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv" />
+               <file type="favourites" directory="" name="bouquets.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <!--satellite type="192" /-->
+                       </prerequisites>
+               </file>
+               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <!--satellite type="192" /-->
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.c">
+                       <prerequisites>
+                               <bcastsystem type="DVB-C" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.t">
+                       <prerequisites>
+                               <bcastsystem type="DVB-T" />
+                       </prerequisites>
+               </file>
                <!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
        </files>
 </default>
diff --git a/data/defaults/Dream/dm7020hd.info b/data/defaults/Dream/dm7020hd.info
new file mode 100644 (file)
index 0000000..e0a1fbb
--- /dev/null
@@ -0,0 +1,46 @@
+<default>
+       <prerequisites>
+               <!-- hardware can occur more than once -->
+               <hardware type="dm7020hd" />
+       </prerequisites>
+       
+       <info>
+               <author>Dream Multimedia GmbH</author>
+               <name>Dream Multimedia Default</name>
+       </info>
+
+               <!-- available types: "directories" -->
+       <files type="directories">
+               <!--file type="skin" directory="test_skin/" flag="default" name="Default Skin" /-->
+               <file type="config" name="settings.7020hd" />
+               <!--file type="services" name="lamedb.192">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <satellite type="192" />
+                       </prerequisites>
+               </file-->
+               <file type="favourites" directory="" name="bouquets.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <!--satellite type="192" /-->
+                       </prerequisites>
+               </file>
+               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <!--satellite type="192" /-->
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.c">
+                       <prerequisites>
+                               <bcastsystem type="DVB-C" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.t">
+                       <prerequisites>
+                               <bcastsystem type="DVB-T" />
+                       </prerequisites>
+               </file>
+               <!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
+       </files>
+</default>
index a1585cf..0211199 100644 (file)
                                <satellite type="192" />
                        </prerequisites>
                </file-->
-               <file type="favourites" directory="" name="bouquets.tv" />              
-               <file type="favourites" directory="sdbouquets/" name="userbouquet.favourites.tv" />
+               <file type="favourites" directory="" name="bouquets.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <!--satellite type="192" /-->
+                       </prerequisites>
+               </file>
+               <file type="favourites" directory="sdbouquets/" name="userbouquet.favourites.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <!--satellite type="192" /-->
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.c">
+                       <prerequisites>
+                               <bcastsystem type="DVB-C" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.t">
+                       <prerequisites>
+                               <bcastsystem type="DVB-T" />
+                       </prerequisites>
+               </file>
                <!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
        </files>
 </default>
index 4793bd8..39b0cb0 100644 (file)
                                <satellite type="192" />
                        </prerequisites>
                </file-->
-               <file type="favourites" directory="" name="bouquets.tv" />              
-               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv" />
+               <file type="favourites" directory="" name="bouquets.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <!--satellite type="192" /-->
+                       </prerequisites>
+               </file>
+               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <!--satellite type="192" /-->
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.c">
+                       <prerequisites>
+                               <bcastsystem type="DVB-C" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.t">
+                       <prerequisites>
+                               <bcastsystem type="DVB-T" />
+                       </prerequisites>
+               </file>
                <!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
        </files>
 </default>
index 2ef2013..f052226 100644 (file)
                                <satellite type="192" />
                        </prerequisites>
                </file-->
-               <file type="favourites" directory="" name="bouquets.tv" />              
-               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv" />
+               <file type="favourites" directory="" name="bouquets.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <!--satellite type="192" /-->
+                       </prerequisites>
+               </file>
+               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <!--satellite type="192" /-->
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.c">
+                       <prerequisites>
+                               <bcastsystem type="DVB-C" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.t">
+                       <prerequisites>
+                               <bcastsystem type="DVB-T" />
+                       </prerequisites>
+               </file>
                <!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
        </files>
 </default>
index 6974b12..1685ede 100644 (file)
                                <satellite type="192" />
                        </prerequisites>
                </file-->
-               <file type="favourites" directory="" name="bouquets.tv" />              
-               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv" />
+               <file type="favourites" directory="" name="bouquets.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <!--satellite type="192" /-->
+                       </prerequisites>
+               </file>
+               <file type="favourites" directory="hdbouquets/" name="userbouquet.favourites.tv">
+                       <prerequisites>
+                               <bcastsystem type="DVB-S" />
+                               <!--satellite type="192" /-->
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.c">
+                       <prerequisites>
+                               <bcastsystem type="DVB-C" />
+                       </prerequisites>
+               </file>
+               <file type="config" name="settings.t">
+                       <prerequisites>
+                               <bcastsystem type="DVB-T" />
+                       </prerequisites>
+               </file>
                <!--file type="package" directory="packages/" name="small-test_1.0_mipsel.ipk" /-->
        </files>
 </default>
index 91536b1..b6bc62f 100644 (file)
@@ -11,6 +11,7 @@
 #SERVICE 1:0:1:701:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:2F1C:441:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:6D6E:437:1:C00000:0:0:0:\r
+#SERVICE 1:0:1:308:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:2FC:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:F98:454:1:C00000:0:0:0:\r
 #SERVICE 1:0:19:2B70:3F3:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:6E42:431:1:C00000:0:0:0:\r
 #SERVICE 1:64:B:0:0:0:0:0:0:0::Doku/Wissen/Themen\r
 #DESCRIPTION Doku/Wissen/Themen\r
-#SERVICE 1:0:1:6DD0:44D:1:C00000:0:0:0:\r
+#SERVICE 1:0:1:6F47:445:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:6D6B:437:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:2775:444:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:293:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:6D70:437:1:C00000:0:0:0:\r
-#SERVICE 1:0:1:277B:444:1:C00000:0:0:0:\r
+#SERVICE 1:0:1:49:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:332D:45B:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:3139:459:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:2F5A:454:1:C00000:0:0:0:\r
index 5f89c48..1cea366 100644 (file)
@@ -11,6 +11,7 @@
 #SERVICE 1:0:1:701:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:2F1C:441:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:6D6E:437:1:C00000:0:0:0:\r
+#SERVICE 1:0:1:308:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:2FC:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:F98:454:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:7034:41B:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:6E42:431:1:C00000:0:0:0:\r
 #SERVICE 1:64:B:0:0:0:0:0:0:0::Doku/Wissen/Themen\r
 #DESCRIPTION Doku/Wissen/Themen\r
-#SERVICE 1:0:1:6DD0:44D:1:C00000:0:0:0:\r
+#SERVICE 1:0:1:6F47:445:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:6D6B:437:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:2775:444:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:293:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:6D70:437:1:C00000:0:0:0:\r
-#SERVICE 1:0:1:277B:444:1:C00000:0:0:0:\r
+#SERVICE 1:0:1:49:5:85:C00000:0:0:0:\r
 #SERVICE 1:0:1:332D:45B:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:3139:459:1:C00000:0:0:0:\r
 #SERVICE 1:0:1:2F5A:454:1:C00000:0:0:0:\r
diff --git a/data/defaults/Dream/settings.7020hd b/data/defaults/Dream/settings.7020hd
new file mode 100644 (file)
index 0000000..ae2963b
--- /dev/null
@@ -0,0 +1 @@
+config.misc.rcused=1
\ No newline at end of file
diff --git a/data/defaults/Dream/settings.c b/data/defaults/Dream/settings.c
new file mode 100644 (file)
index 0000000..72ab938
--- /dev/null
@@ -0,0 +1 @@
+config.tv.lastroot=1:7:1:0:0:0:0:0:0:0:(type == 1) || (type == 17) || (type == 22) || (type == 25) || (type == 134) || (type == 195) ORDER BY name;
diff --git a/data/defaults/Dream/settings.t b/data/defaults/Dream/settings.t
new file mode 100644 (file)
index 0000000..72ab938
--- /dev/null
@@ -0,0 +1 @@
+config.tv.lastroot=1:7:1:0:0:0:0:0:0:0:(type == 1) || (type == 17) || (type == 22) || (type == 25) || (type == 134) || (type == 195) ORDER BY name;
index 132b427..ff0ae8b 100644 (file)
@@ -12,11 +12,14 @@ self.condition = self.runWizard
 self.disableKeys = True
                </code>
        </step>
-       <step id="nopackages" nextstep="finisheddefaultsatlists">
+
+       <!--step id="nopackages" nextstep="finisheddefaultsatlists"-->
+       <step id="nopackages" nextstep="scanquestion">
                <text value="There are no default services lists in your image." />
        </step>
        
-       <step id="nothingtoinstall" nextstep="finisheddefaultsatlists">
+       <!--step id="nothingtoinstall" nextstep="finisheddefaultsatlists"-->
+       <step id="nothingtoinstall" nextstep="scanquestion">
                <condition>
 if self.runWizard:
        self.condition = True
index f743b8c..2f7e7c7 100644 (file)
@@ -1,7 +1,8 @@
-installdir = $(FONTDIR)
+installdir = $(datadir)/fonts
 
 dist_install_DATA = \
        ae_AlMateen.ttf \
        lcd.ttf \
        md_khmurabi_10.ttf \
-       nmsbd.ttf
+       nmsbd.ttf \
+       tuxtxt.ttf
diff --git a/data/fonts/tuxtxt.ttf b/data/fonts/tuxtxt.ttf
new file mode 100644 (file)
index 0000000..9be6547
Binary files /dev/null and b/data/fonts/tuxtxt.ttf differ
diff --git a/data/keymaps/Makefile.am b/data/keymaps/Makefile.am
new file mode 100644 (file)
index 0000000..8499d99
--- /dev/null
@@ -0,0 +1,6 @@
+keymapsdir = $(datadir)/keymaps
+keymaps_DATA = \
+       dream-de.info \
+       dream-de.kmap \
+       eng.info \
+       eng.kmap
diff --git a/data/keymaps/dream-de.info b/data/keymaps/dream-de.info
new file mode 100644 (file)
index 0000000..d7f5b07
--- /dev/null
@@ -0,0 +1,2 @@
+kmap=dream-de.kmap
+name=Dreambox Keyboard Deutsch
diff --git a/data/keymaps/dream-de.kmap b/data/keymaps/dream-de.kmap
new file mode 100644 (file)
index 0000000..693317a
Binary files /dev/null and b/data/keymaps/dream-de.kmap differ
diff --git a/data/keymaps/eng.info b/data/keymaps/eng.info
new file mode 100644 (file)
index 0000000..d73372c
--- /dev/null
@@ -0,0 +1,2 @@
+kmap=eng.kmap
+name=Keyboard English
diff --git a/data/keymaps/eng.kmap b/data/keymaps/eng.kmap
new file mode 100644 (file)
index 0000000..15a722f
Binary files /dev/null and b/data/keymaps/eng.kmap differ
index 0d87471..6e10354 100755 (executable)
@@ -61,8 +61,9 @@
                                </menu>
                                <!--<item text="Remote Control"><setup id="rc" /></item>-->
                                <!--<item text="OSD"><setup id="osd" /></item>-->
-                               <item requires="Display"><setup level="1" id="lcd" /></item>
                                <item level="0" text="Network" entryID="network_setup"><screen module="NetworkSetup" screen="NetworkAdapterSelection" /></item>
+                               <item level="1" text="Input devices" entryID="input_device_setup"><screen module="InputDeviceSetup" screen="InputDeviceSelection" /></item>
+                               <item requires="Display"><setup level="1" id="lcd" /></item>
                                <item text="Keyboard"><setup id="keyboard" /></item>
                                <!--<menu level="1" text="Network..." entryID="network_setup">
                                        <id val="network" />
index f5dea73..c5eb07f 100755 (executable)
                        <item level="2" text="Fast Forward speeds">config.seek.speeds_forward</item>
                        <item level="2" text="Rewind speeds">config.seek.speeds_backward</item>
                        <item level="2" text="Slow Motion speeds">config.seek.speeds_slowmotion</item>
-<!-- TRANSLATORS: Note that "Enter" in the two strings below should *not*
-     be interpreted as "Give speed as input". The intended meaning is
-     instead "Initial speed when starting winding", i.e. the speed at
-     which "winding mode" is entered when first pressing "rewind" or
-     "fast forward". -->  
-                       <item level="2" text="Enter Fast Forward at speed">config.seek.enter_forward</item>
-                       <item level="2" text="Enter Rewind at speed">config.seek.enter_backward</item>
-<!-- TRANSLATORS: The effect of "Non-smooth winding" is that rather
-     than using ordinary "continuous" or "smooth" winding, a fast
-     sequence of stills is shown when winding at high speeds. This
-     makes it much easier too follow when almost each frame comes from
-     a new scene. The effect is achieved by repeating each shown frame
-     a couple of times. The settings control both at which speed this
-     winding mode sets in, and how many times each frame should be
-     repeated. This was previously called "Discontinuous playback"
-     which was incomprehensible. "Non-smooth winding" may be a better
-     term, but note that there is nothing irregular about it. Synonyms
-     better suited for translation to other languages may be "stepwise
-     winding/playback", or "winding/playback using stills". -->
-                       <item level="2" text="Use non-smooth winding at speeds above">config.seek.stepwise_minspeed</item>
-                       <item level="2" text="Frame repeat count during non-smooth winding">config.seek.stepwise_repeat</item>
+<!-- TRANSLATORS: The following is the speed you get on the first press on fast-forward.
+     It was previously called "enter fast forward at speed" which was easily misunderstood. -->  
+                       <item level="2" text="Initial Fast Forward speed">config.seek.enter_forward</item>
+                       <item level="2" text="Initial Rewind speed">config.seek.enter_backward</item>
                        <item level="2" text="Behavior of 'pause' when paused">config.seek.on_pause</item>
                        <item level="2" text="Behavior of 0 key in PiP-mode">config.usage.pip_zero_button</item>
                        <item level="2" text="Alternative services tuner priority">config.usage.alternatives_priority</item>
index 868fbc4..b4b6cbc 100755 (executable)
                        <pixmap pos="bpBottomRight" filename="skin_default/b_br.png" />
                </borderset>
        </windowstyle>
-       <!-- Main screen colors (id=1 LCD) -->
-       <windowstyle type="skinned" id="1">
-               <color name="Background" color="#000000" />
-               <color name="LabelForeground" color="#ffffff" />
-               <color name="ListboxBackground" color="#000000" />
-               <color name="ListboxForeground" color="#ffffff" />
-               <color name="ListboxSelectedBackground" color="#000000" />
-               <color name="ListboxSelectedForeground" color="#ffffff" />
-               <color name="ListboxMarkedBackground" color="#000000" />
-               <color name="ListboxMarkedForeground" color="#ffffff" />
-               <color name="ListboxMarkedAndSelectedBackground" color="#000000" />
-               <color name="ListboxMarkedAndSelectedForeground" color="#ffffff" />
-               <color name="WindowTitleForeground" color="#ffffff" />
-               <color name="WindowTitleBackground" color="#000000" />
-       </windowstyle>
-       <windowstyle type="skinned" id="2">
-               <color name="Background" color="#000000" />
-               <color name="LabelForeground" color="#ffffff" />
-               <color name="ListboxBackground" color="#000000" />
-               <color name="ListboxForeground" color="#ffffff" />
-               <color name="ListboxSelectedBackground" color="#000000" />
-               <color name="ListboxSelectedForeground" color="#ffffff" />
-               <color name="ListboxMarkedBackground" color="#000000" />
-               <color name="ListboxMarkedForeground" color="#ffffff" />
-               <color name="ListboxMarkedAndSelectedBackground" color="#000000" />
-               <color name="ListboxMarkedAndSelectedForeground" color="#ffffff" />
-               <color name="WindowTitleForeground" color="#ffffff" />
-               <color name="WindowTitleBackground" color="#000000" />
-       </windowstyle>
        <!-- Fonts -->
        <fonts>
                <!-- <font filename="md_khmurabi_10.ttf" name="Regular" scale="90" /> -->
index a2bcc6f..dcd2e8b 100755 (executable)
@@ -1,4 +1,34 @@
 <skin>
+       <!-- Main screen colors (id=1 LCD) -->
+       <windowstyle type="skinned" id="1">
+               <color name="Background" color="#000000" />
+               <color name="LabelForeground" color="#ffffff" />
+               <color name="ListboxBackground" color="#000000" />
+               <color name="ListboxForeground" color="#ffffff" />
+               <color name="ListboxSelectedBackground" color="#000000" />
+               <color name="ListboxSelectedForeground" color="#ffffff" />
+               <color name="ListboxMarkedBackground" color="#000000" />
+               <color name="ListboxMarkedForeground" color="#ffffff" />
+               <color name="ListboxMarkedAndSelectedBackground" color="#000000" />
+               <color name="ListboxMarkedAndSelectedForeground" color="#ffffff" />
+               <color name="WindowTitleForeground" color="#ffffff" />
+               <color name="WindowTitleBackground" color="#000000" />
+       </windowstyle>
+       <!-- Main screen colors (id=2 Color OLED (dm800se)) -->
+       <windowstyle type="skinned" id="2">
+               <color name="Background" color="#000000" />
+               <color name="LabelForeground" color="#ffffff" />
+               <color name="ListboxBackground" color="#000000" />
+               <color name="ListboxForeground" color="#ffffff" />
+               <color name="ListboxSelectedBackground" color="#000000" />
+               <color name="ListboxSelectedForeground" color="#ffffff" />
+               <color name="ListboxMarkedBackground" color="#000000" />
+               <color name="ListboxMarkedForeground" color="#ffffff" />
+               <color name="ListboxMarkedAndSelectedBackground" color="#000000" />
+               <color name="ListboxMarkedAndSelectedForeground" color="#ffffff" />
+               <color name="WindowTitleForeground" color="#ffffff" />
+               <color name="WindowTitleBackground" color="#000000" />
+       </windowstyle>
        <!-- Screwed Stone II skin (skin_default.xml) /Nemesis -->
        <!-- About screen -->
        <screen name="About" position="center,center" size="420,350" title="About">
@@ -670,12 +700,12 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
                <widget name="menu" position="10,10" size="440,310" />
        </screen>
        <!-- Nim selection -->
-       <screen name="NimSelection" position="center,center" size="400,330" title="Choose Tuner">
-               <widget source="nimlist" render="Listbox" position="0,0" size="380,360" scrollbarMode="showOnDemand">
+       <screen name="NimSelection" position="center,center" size="490,330" title="Choose Tuner">
+               <widget source="nimlist" render="Listbox" position="0,0" size="460,360" scrollbarMode="showOnDemand">
                        <convert type="TemplatedMultiContent">
                                {"template": [
-                                               MultiContentEntryText(pos = (10, 5), size = (360, 30), flags = RT_HALIGN_LEFT, text = 1), # index 1 is the nim name,
-                                               MultiContentEntryText(pos = (50, 30), size = (320, 50), font = 1, flags = RT_HALIGN_LEFT, text = 2), # index 2 is a description of the nim settings,
+                                               MultiContentEntryText(pos = (10, 5), size = (440, 30), flags = RT_HALIGN_LEFT, text = 1), # index 1 is the nim name,
+                                               MultiContentEntryText(pos = (50, 30), size = (400, 50), font = 1, flags = RT_HALIGN_LEFT, text = 2), # index 2 is a description of the nim settings,
                                        ],
                                 "fonts": [gFont("Regular", 20), gFont("Regular", 15)],
                                 "itemHeight": 80
@@ -1151,13 +1181,13 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
        </screen> 
        <!-- Color OLED screen (ChannelSelection) -->
        <screen name="ChannelSelection_summary" position="0,0" size="96,64" id="2">
-               <widget source="parent.ServiceEvent" render="Label" position="0,0" size="96,25" font="Regular;14" halign="center" valign="center" >
+               <widget source="parent.ServiceEvent" render="Label" position="0,0" size="96,28" font="Regular;16" halign="center" valign="center" >
                        <convert type="ServiceName">Name</convert>
                </widget>
-               <widget source="parent.ServiceEvent" render="Progress" position="0,27" size="96,5" borderWidth="1" >
+               <widget source="session.Event_Now" render="Progress" position="0,30" size="96,8" borderWidth="1" backgroundColor="dark">
                        <convert type="EventTime">Progress</convert>
                </widget>
-               <widget source="global.CurrentTime" render="Label" position="0,32" size="96,32" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" >
+               <widget source="global.CurrentTime" render="Label" position="0,38" size="96,26" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" >
                        <convert type="ClockToText">Format:%H:%M</convert>
                </widget>
        </screen>
@@ -1175,23 +1205,23 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
                <widget source="global.CurrentTime" render="Label" position="100,34" zPosition="1" size="26,30" font="Regular;16" valign="top">
                        <convert type="ClockToText">Format:%S</convert>
                </widget>
-               <widget source="session.RecordState" render="FixedLabel" text=" " position="6,30" zPosition="1" size="120,34">
+               <widget source="session.RecordState" render="FixedLabel" text=" " position="6,32" zPosition="1" size="126,32">
                        <convert type="ConfigEntryTest">config.usage.blinking_display_clock_during_recording,True,CheckSourceBoolean</convert>
                        <convert type="ConditionalShowHide">Blink</convert>
                </widget>
        </screen>
        <!-- Color OLED screen (main) -->
        <screen name="InfoBarSummary" position="0,0" size="96,64" id="2">
-               <widget source="session.CurrentService" render="Label" position="0,0" size="96,25" font="Regular;14" halign="center" valign="center" >
+               <widget source="session.CurrentService" render="Label" position="0,0" size="96,28" font="Regular;16" halign="center" valign="center" >
                        <convert type="ServiceName">Name</convert>
                </widget>
-               <widget source="session.Event_Now" render="Progress" position="0,27" size="96,5" borderWidth="1" >
+               <widget source="session.Event_Now" render="Progress" position="0,30" size="96,8" borderWidth="1" backgroundColor="dark">
                        <convert type="EventTime">Progress</convert>
                </widget>
-               <widget source="global.CurrentTime" render="Label" position="0,32" size="96,32" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" >
+               <widget source="global.CurrentTime" render="Label" position="0,38" size="96,26" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" >
                        <convert type="ClockToText">Format:%H:%M</convert>
                </widget>
-               <widget source="session.RecordState" render="FixedLabel" text=" " position="0,32" zPosition="1" size="96,32">
+               <widget source="session.RecordState" render="FixedLabel" text=" " position="0,38" zPosition="1" size="96,26">
                        <convert type="ConfigEntryTest">config.usage.blinking_display_clock_during_recording,True,CheckSourceBoolean</convert>
                        <convert type="ConditionalShowHide">Blink</convert>
                </widget>
@@ -1214,16 +1244,16 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
        </screen>
        <!-- Color OLED screen (movieplayer) -->
        <screen name="InfoBarMoviePlayerSummary" position="0,0" size="96,64" id="2">
-               <widget source="session.CurrentService" render="Label" position="0,0" size="96,25" font="Regular;14" halign="center" valign="center" >
+               <widget source="session.CurrentService" render="Label" position="0,0" size="96,28" font="Regular;16" halign="center" valign="center" >
                        <convert type="ServiceName">Name</convert>
                </widget>
-               <widget source="session.CurrentService" render="Progress" position="0,27" size="96,5" borderWidth="1" >
-                       <convert type="ServicePosition">Position</convert>
+               <widget source="session.Event_Now" render="Progress" position="0,30" size="96,8" borderWidth="1" backgroundColor="dark">
+                       <convert type="EventTime">Progress</convert>
                </widget>
-               <widget source="global.CurrentTime" render="Label" position="0,32" size="96,32" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" >
+               <widget source="global.CurrentTime" render="Label" position="0,38" size="96,26" font="Regular;32" halign="center" valign="center" foregroundColor="#FFFFFF" backgroundColor="#000000" >
                        <convert type="ClockToText">Format:%H:%M</convert>
                </widget>
-               <widget source="session.RecordState" render="FixedLabel" text=" " position="0,32" zPosition="1" size="96,32">
+               <widget source="session.RecordState" render="FixedLabel" text=" " position="0,38" zPosition="1" size="96,26">
                        <convert type="ConfigEntryTest">config.usage.blinking_display_clock_during_recording,True,CheckSourceBoolean</convert>
                        <convert type="ConditionalShowHide">Blink</convert>
                </widget>
@@ -1246,7 +1276,6 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
                <widget source="parent.Text" render="Label" position="0,0" size="96,52" font="Regular;10" halign="center" valign="center" />
                <widget source="parent.selectedChoice" render="Label" position="0,50" size="96,14" font="Regular;12" halign="center" valign="center" />
        </screen>
-
        <!-- LCD screen (menus) -->
        <screen name="MenuSummary" position="0,0" size="132,64" id="1">
                <widget source="parent.title" render="Label" position="6,0" size="120,32" font="Regular;14" halign="center" valign="center"/>
@@ -1256,8 +1285,8 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
        </screen> 
        <!-- Color OLED screen (menus) -->
        <screen name="MenuSummary" position="0,0" size="96,64" id="2">
-               <widget source="parent.title" render="Label" position="0,0" size="96,32" font="Regular;14" halign="center" valign="center"/>
-               <widget source="parent.menu" render="Label" position="0,32" size="96,32" font="Regular;14" halign="center" valign="center">
+               <widget source="parent.title" render="Label" position="0,0" size="96,32" font="Regular;15" halign="center" valign="center"/>
+               <widget source="parent.menu" render="Label" position="0,32" size="96,32" font="Regular;16" halign="center" valign="top">
                        <convert type="StringListSelection" />
                </widget>
        </screen>       
@@ -1305,7 +1334,7 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
        </screen>
        <!-- Color OLED screen (standby) -->
        <screen name="StandbySummary" position="0,0" size="96,64" id="2">
-               <widget source="global.CurrentTime" render="Label" position="0,0" size="96,64" font="Regular;40" halign="center" valign="center">
+               <widget source="global.CurrentTime" render="Label" position="0,0" size="96,64" font="Regular;38" halign="center" valign="center">
                        <convert type="ClockToText">Format:%H:%M</convert>
                </widget>
                <widget source="session.RecordState" render="FixedLabel" position="0,0" zPosition="1" size="96,64" text=" ">
@@ -1346,5 +1375,4 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y()))
                </widget>
        </screen>
 
-
 </skin>
index 61c0059..7a709b0 100755 (executable)
@@ -27,7 +27,15 @@ dist_install_DATA = \
        icon_view.png \
        input_error.png \
        input_info.png \
+       input_keyboard-configured.png \
+       input_keyboard.png \
+       input_mouse-configured.png \
+       input_mouse.png \
        input_question.png \
+       input_rcnew-configured.png \
+       input_rcnew.png \
+       input_rcold-configured.png \
+       input_rcold.png \
        lock_error.png \
        lock_off.png \
        lock_on.png \
@@ -37,10 +45,10 @@ dist_install_DATA = \
        mp_buttons.png \
        network_wired.png \
        network_wired-active.png \
-       network_wired-inactive.png \    
+       network_wired-inactive.png \
        network_wireless.png \
        network_wireless-active.png \
-       network_wireless-inactive.png \ 
+       network_wireless-inactive.png \
        plugin.png \
        rass_logo.png \
        rass_page1.png \
@@ -57,3 +65,4 @@ dist_install_DATA = \
        selectioncross.png \
        unlock.png \
        unlockBouquet.png
+
diff --git a/data/skin_default/icons/input_keyboard-configured.png b/data/skin_default/icons/input_keyboard-configured.png
new file mode 100644 (file)
index 0000000..c6623a5
Binary files /dev/null and b/data/skin_default/icons/input_keyboard-configured.png differ
diff --git a/data/skin_default/icons/input_keyboard.png b/data/skin_default/icons/input_keyboard.png
new file mode 100644 (file)
index 0000000..a922c89
Binary files /dev/null and b/data/skin_default/icons/input_keyboard.png differ
diff --git a/data/skin_default/icons/input_mouse-configured.png b/data/skin_default/icons/input_mouse-configured.png
new file mode 100644 (file)
index 0000000..3db9447
Binary files /dev/null and b/data/skin_default/icons/input_mouse-configured.png differ
diff --git a/data/skin_default/icons/input_mouse.png b/data/skin_default/icons/input_mouse.png
new file mode 100644 (file)
index 0000000..f70c84e
Binary files /dev/null and b/data/skin_default/icons/input_mouse.png differ
diff --git a/data/skin_default/icons/input_rcnew-configured.png b/data/skin_default/icons/input_rcnew-configured.png
new file mode 100644 (file)
index 0000000..6b16d39
Binary files /dev/null and b/data/skin_default/icons/input_rcnew-configured.png differ
diff --git a/data/skin_default/icons/input_rcnew.png b/data/skin_default/icons/input_rcnew.png
new file mode 100644 (file)
index 0000000..19cdeea
Binary files /dev/null and b/data/skin_default/icons/input_rcnew.png differ
diff --git a/data/skin_default/icons/input_rcold-configured.png b/data/skin_default/icons/input_rcold-configured.png
new file mode 100644 (file)
index 0000000..8d62685
Binary files /dev/null and b/data/skin_default/icons/input_rcold-configured.png differ
diff --git a/data/skin_default/icons/input_rcold.png b/data/skin_default/icons/input_rcold.png
new file mode 100644 (file)
index 0000000..ef8680b
Binary files /dev/null and b/data/skin_default/icons/input_rcold.png differ
index 70a6e0d..a6b773e 100644 (file)
@@ -142,10 +142,10 @@ config.ParentalControl.configured.save()
                        </code>
                </step>
                <step id="parentalsetup">
-                       <text value="You need to set a pin code and hide it from your children.\n\nDo you want to set the pin now?" />
+                       <text value="You need to set a PIN code and hide it from your children.\n\nDo you want to set the pin now?" />
                        <list>
                                <listentry caption="Yes" step="finishparentalsetup" />
-                               <listentry caption="No" step="finishparentalsetup" />
+                               <listentry caption="No" step="warnpin" />
                        </list>
                        <code pos="after">
 from ParentalControlSetup import ParentalControlChangePin
@@ -153,9 +153,15 @@ if self["list"].index == 0:
        self.session.open(ParentalControlChangePin, config.ParentalControl.servicepin[0], _("parental control pin"))
                        </code>
                </step>
+               <step id="warnpin">
+                       <text value="Please be aware, that anyone can disable the parental control, if you have not set a PIN." />
+               </step>
                <step id="finishparentalsetup">
                        <code>
-config.ParentalControl.setuppinactive.value = True
+if config.ParentalControl.setuppin.value == "aaaa":
+       config.ParentalControl.setuppinactive.value = False
+else:
+       config.ParentalControl.setuppinactive.value = True
 config.ParentalControl.setuppinactive.save()
 config.ParentalControl.servicepinactive.value = True
 config.ParentalControl.servicepinactive.save()
diff --git a/debug b/debug
deleted file mode 100755 (executable)
index d247b3e..0000000
--- a/debug
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-/home/dump/tmb/oe-mono/build/tmp/work/gdb-cross-6.3-r0/install/gdb-cross/usr/local/mipsel/oe/bin/mipsel-linux-gdb main/enigma2 -x debug.gdb
-
diff --git a/debug.gdb b/debug.gdb
deleted file mode 100644 (file)
index 69cf5d0..0000000
--- a/debug.gdb
+++ /dev/null
@@ -1,3 +0,0 @@
-set solib-absolute-prefix /home/tmbinc/mips/target
-target remote 10.0.0.203:1234
-continue
diff --git a/enigma2.bb b/enigma2.bb
new file mode 100644 (file)
index 0000000..2da423c
--- /dev/null
@@ -0,0 +1,75 @@
+DESCRIPTION = "Enigma2 is an experimental, but useful framebuffer-based frontend for DVB functions"
+DESCRIPTION_append_enigma2-plugin-extensions-cutlisteditor = "enables you to cut your movies."
+DESCRIPTION_append_enigma2-plugin-extensions-graphmultiepg = "shows a graphical timeline EPG."
+DESCRIPTION_append_enigma2-plugin-extensions-pictureplayer = "displays photos on the TV."
+DESCRIPTION_append_enigma2-plugin-systemplugins-frontprocessorupdate = "keeps your frontprocessor up to date."
+DESCRIPTION_append_enigma2-plugin-systemplugins-positionersetup = "helps you installing a motorized dish."
+DESCRIPTION_append_enigma2-plugin-systemplugins-satelliteequipmentcontrol = "allows you to fine-tune DiSEqC-settings."
+DESCRIPTION_append_enigma2-plugin-systemplugins-satfinder = "helps you to align your dish."
+DESCRIPTION_append_enigma2-plugin-systemplugins-skinselector = "shows a menu with selectable skins."
+DESCRIPTION_append_enigma2-plugin-systemplugins-videomode = "selects advanced video modes"
+DESCRIPTION_append_enigma2-plugin-systemplugins-crashlogautosubmit = "automatically send crashlogs to Dream Multimedia"
+DESCRIPTION_append_enigma2-plugin-systemplugins-cleanupwizard = "informs you on low internal memory on system startup."
+DESCRIPTION_append_enigma2-plugin-extenstions-modem = "opens a menu to connect to internet via builtin modem."
+DESCRIPTION_append_enigma2-plugin-systemplugins-wirelesslan = "helps you configuring your wireless lan"
+DESCRIPTION_append_enigma2-plugin-systemplugins-networkwizard = "provides easy step by step network configuration"
+
+DEPENDS = "jpeg libungif libpng libsigc++-1.2 gettext-native \
+        dreambox-dvbincludes freetype libdvbsi++ python swig-native \
+        libfribidi libxmlccwrap libdreamdvd gstreamer gst-plugin-dvbmediasink \
+        gst-plugins-bad gst-plugins-good gst-plugins-ugly python-wifi"
+
+RDEPENDS = "python-codecs python-core python-lang python-re python-threading \
+        python-xml python-fcntl gst-plugin-decodebin gst-plugin-decodebin2 python-stringold \
+        python-pickle gst-plugin-app \
+        gst-plugin-id3demux gst-plugin-mad gst-plugin-ogg gst-plugin-playbin \
+        gst-plugin-typefindfunctions gst-plugin-audioconvert gst-plugin-audioresample \
+        gst-plugin-wavparse python-netclient gst-plugin-mpegstream gst-plugin-selector \
+        gst-plugin-flac gst-plugin-dvbmediasink gst-plugin-mpegdemux \
+        gst-plugin-souphttpsrc gst-plugin-mpegaudioparse gst-plugin-subparse \
+        gst-plugin-apetag gst-plugin-icydemux gst-plugin-autodetect \
+        glibc-gconv-iso8859-15 ethtool"
+
+GST_ALSA_RDEPENDS = "gst-plugin-alsa alsa-conf"
+GST_DVD_RDEPENDS = "gst-plugin-cdxaparse gst-plugin-cdio gst-plugin-vcdsrc"
+GST_MISC_RDEPENDS = "gst-plugin-matroska gst-plugin-qtdemux gst-plugin-vorbis gst-plugin-audioparsersbad"
+GST_RTSP_RDEPENDS = "gst-plugin-udp gst-plugin-rtsp gst-plugin-rtp gst-plugin-rtpmanager"
+GST_BASE_RDEPENDS = "${GST_ALSA_RDEPENDS} ${GST_MISC_RDEPENDS} ${GST_RTSP_RDEPENDS}"
+
+RDEPENDS_append_dm800 = " ${GST_BASE_RDEPENDS} gst-plugin-ivorbisdec"
+RDEPENDS_append_dm8000 = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
+RDEPENDS_append_dm500hd = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
+RDEPENDS_append_dm800se = " ${GST_BASE_RDEPENDS} ${GST_DVD_RDEPENDS} gst-plugin-avi"
+
+RDEPENDS_enigma2-plugin-extensions-cutlisteditor = "aio-grab"
+RDEPENDS_enigma2-plugin-extensions-dvdplayer = "libdreamdvd0"
+RDEPENDS_enigma2-plugin-systemplugins-nfiflash = "python-twisted-web"
+RDEPENDS_enigma2-plugin-systemplugins-softwaremanager = "python-twisted-web"
+RDEPENDS_enigma2-plugin-systemplugins-crashlogautosubmit = "twisted-mail twisted-names python-compression python-mime python-email"
+RDEPENDS_enigma2-plugin-extensions-modem = "dreambox-modem-ppp-scripts ppp"
+RDEPENDS_enigma2-plugin-systemplugins-wirelesslan = "wpa-supplicant wireless-tools python-wifi"
+
+RCONFLICTS_enigma2-plugin-systemplugins-softwaremanager = "enigma2-plugin-systemplugins-configurationbackup enigma2-plugin-systemplugins-softwareupdate"
+RREPLACES_enigma2-plugin-systemplugins-softwaremanager = "enigma2-plugin-systemplugins-configurationbackup enigma2-plugin-systemplugins-softwareupdate"
+
+PV = "${GITVER}"
+
+inherit srctree autotools gitver pkgconfig
+
+EXTRA_OECONF = " \
+        BUILD_SYS=${BUILD_SYS} \
+        HOST_SYS=${HOST_SYS} \
+        STAGING_INCDIR=${STAGING_INCDIR} \
+        STAGING_LIBDIR=${STAGING_LIBDIR} \
+"
+
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+PACKAGES += "${PN}-meta"
+
+FILES_${PN} += "${datadir}/fonts"
+FILES_${PN}-meta = "${datadir}/meta"
+
+python populate_packages_prepend () {
+        enigma2_plugindir = bb.data.expand('${libdir}/enigma2/python/Plugins', d)
+        do_split_packages(d, enigma2_plugindir, '(.*?/.*?)/.*', 'enigma2-plugin-%s', '%s ', recursive=True, match_path=True, prepend=True)
+}
index 01ba434..f34d904 100644 (file)
@@ -6,5 +6,5 @@ includedir=@includedir@
 Name: enigma2
 Description: Enigma2
 Version: @VERSION@
-Libs: 
-Cflags: -I${includedir}/enigma2
+Cflags: -I${includedir}/enigma2 @ENIGMA2_CFLAGS@
+Requires.private: sigc++-1.2
index d0c682f..ada16ca 100644 (file)
@@ -1,3 +1,3 @@
-EXTRA_DIST = \
+pkginclude_HEADERS = \
        connection.h \
        libsig_comp.h
diff --git a/lib/actions/.gitignore b/lib/actions/.gitignore
new file mode 100644 (file)
index 0000000..460e43d
--- /dev/null
@@ -0,0 +1 @@
+actionids.h
index 8da583f..eb8327d 100644 (file)
@@ -1,15 +1,27 @@
-INCLUDES = \
-       -I$(top_srcdir)/include
+AM_CPPFLAGS = \
+       -I$(top_builddir) \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
+
+EXTRA_DIST = parseactions.py
 
 noinst_LIBRARIES = libenigma_actions.a
 
 libenigma_actions_a_SOURCES = \
-       action.cpp 
+       action.cpp
 
-CLEANFILES = actionids.h
+actionsincludedir = $(pkgincludedir)/lib/actions
+actionsinclude_HEADERS = \
+       action.h
 
-action.cpp: actionids.h
+nodist_actionsinclude_HEADERS = \
+       actionids.h
+
+BUILT_SOURCES = actionids.h
+CLEANFILES = actionids.h
 
-actionids.h:
-        python ./parseactions.py include ../gui/*.h > actionids.h
-        python ./parseactions.py parse ../gui/*.h >> actionids.h
+actionids.h: $(srcdir)/parseactions.py $(top_srcdir)/lib/gui/*.h
+       $(AM_V_GEN)$(PYTHON) $(srcdir)/parseactions.py include $(top_srcdir)/lib/gui/*.h > $@
+       $(AM_V_at)$(PYTHON) $(srcdir)/parseactions.py parse $(top_srcdir)/lib/gui/*.h >> $@
index cbf5370..edcfac6 100644 (file)
@@ -3,10 +3,6 @@
 
 #include <lib/base/object.h>
 
-               /* avoid warnigs :) */
-#include <features.h>
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 200112L
 #include <lib/python/python.h>
 #include <string>
 #include <map>
index 2462a75..cad432a 100644 (file)
@@ -89,7 +89,7 @@ def do_file(f, mode):
 
                                                if mode == "include":
                                                        # hack hack hack!!
-                                                       print "#include <lib" + f[2:] + ">"
+                                                       print "#include <lib/" + '/'.join(f.split('/')[-2:]) + ">"
                                                else:
                                                        print "\t// " + f
 
diff --git a/lib/base/.gitignore b/lib/base/.gitignore
new file mode 100644 (file)
index 0000000..aa9ae18
--- /dev/null
@@ -0,0 +1 @@
+eenv.cpp
index 0508563..d76dfc9 100644 (file)
@@ -1,12 +1,56 @@
-INCLUDES = \
-       -I$(top_srcdir)/include
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LIBRARIES = libenigma_base.a
 
 libenigma_base_a_SOURCES = \
-       buffer.cpp ebase.cpp eerror.cpp elock.cpp \
-       init.cpp message.cpp thread.cpp \
-       smartptr.cpp estring.cpp connection.cpp \
-       filepush.cpp encoding.cpp console.cpp rawfile.cpp \
-       nconfig.cpp ioprio.cpp etpm.cpp
+       buffer.cpp \
+       connection.cpp \
+       console.cpp \
+       ebase.cpp \
+       eenv.cpp \
+       eerror.cpp \
+       elock.cpp \
+       encoding.cpp \
+       estring.cpp \
+       etpm.cpp \
+       filepush.cpp \
+       init.cpp \
+       ioprio.cpp \
+       message.cpp \
+       nconfig.cpp \
+       rawfile.cpp \
+       smartptr.cpp \
+       thread.cpp
 
+EXTRA_DIST = \
+       eenv.cpp.in
+
+baseincludedir = $(pkgincludedir)/lib/base
+baseinclude_HEADERS = \
+       buffer.h \
+       console.h \
+       ebase.h \
+       eenv.h \
+       eerror.h \
+       elock.h \
+       encoding.h \
+       eptrlist.h \
+       estring.h \
+       etpm.h \
+       filepush.h \
+       i18n.h \
+       itssource.h \
+       init.h \
+       init_num.h \
+       ioprio.h \
+       message.h \
+       nconfig.h \
+       object.h \
+       rawfile.h \
+       ringbuffer.h \
+       smartptr.h \
+       thread.h
index e730b40..60540da 100644 (file)
@@ -1,7 +1,6 @@
 #ifndef __LIB_BASE_CONSOLE_H__
 #define __LIB_BASE_CONSOLE_H__
 
-#include "Python.h"
 #include <string>
 #include <lib/base/ebase.h>
 #include <lib/python/connections.h>
diff --git a/lib/base/eenv.cpp.in b/lib/base/eenv.cpp.in
new file mode 100644 (file)
index 0000000..52c4214
--- /dev/null
@@ -0,0 +1,117 @@
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <wordexp.h>
+#include <lib/base/eenv.h>
+#include <lib/base/eerror.h>
+
+bool eEnv::initialized = false;
+
+void eEnv::initialize()
+{
+       static const struct {
+               std::string name;
+               std::string value;
+       } cfgenv[] = {
+               { "prefix", "@prefix@" },
+               { "exec_prefix", "@exec_prefix@" },
+               { "bindir", "@bindir@" },
+               { "sbindir", "@sbindir@" },
+               { "libexecdir", "@libexecdir@" },
+               { "datarootdir", "@datarootdir@" },
+               { "datadir", "@datadir@" },
+               { "sysconfdir", "@sysconfdir@" },
+               { "sharedstatedir", "@sharedstatedir@" },
+               { "localstatedir", "@localstatedir@" },
+               { "libdir", "@libdir@" },
+               { "localedir", "@localedir@" },
+       };
+       size_t i;
+
+       // 1st pass, as generated by configure.
+       // Variables set by the user will not be overwritten.
+       for (i = 0; i < (sizeof(cfgenv) / sizeof(*cfgenv)); i++) {
+               eDebug("setenv('%s', '%s', 0)", cfgenv[i].name.c_str(), cfgenv[i].value.c_str());
+               setenv(cfgenv[i].name.c_str(), cfgenv[i].value.c_str(), 0);
+       }
+
+       // 2nd pass: Resolve directories.
+       for (i = 0; i < (sizeof(cfgenv) / sizeof(*cfgenv)); i++) {
+               std::string dest;
+               eEnv::resolveVar(dest, "${" + cfgenv[i].name + "}");
+               eDebug("setenv('%s', '%s', 1)", cfgenv[i].name.c_str(), dest.c_str());
+               setenv(cfgenv[i].name.c_str(), dest.c_str(), 1);
+       }
+}
+
+int eEnv::resolveVar(std::string &dest, const char *src)
+{
+       size_t i = 0;
+       int ret;
+       wordexp_t p;
+
+       ret = wordexp(src, &p, WRDE_NOCMD | WRDE_UNDEF);
+       if (ret != 0) {
+               switch (ret) {
+               case WRDE_BADCHAR:
+                       eDebug("%s: bad character", __func__);
+                       break;
+               case WRDE_BADVAL:
+                       eDebug("%s: bad value", __func__);
+                       break;
+               case WRDE_CMDSUB:
+                       eDebug("%s: invalid command substitution", __func__);
+                       break;
+               case WRDE_NOSPACE:
+                       eDebug("%s: out of memory", __func__);
+                       break;
+               case WRDE_SYNTAX:
+                       eDebug("%s: syntax error", __func__);
+                       break;
+               default:
+                       eDebug("%s: unknown error", __func__);
+                       break;
+               }
+
+               return -1;
+       }
+
+       while (i < p.we_wordc) {
+               if (strchr(p.we_wordv[i], '$')) {
+                       ret = eEnv::resolveVar(dest, p.we_wordv[i]);
+                       if (ret < 0)
+                               break;
+               } else {
+                       dest.append(p.we_wordv[i]);
+               }
+
+               if (++i < p.we_wordc)
+                       dest.append(" ");
+       }
+
+       wordfree(&p);
+       return ret;
+}
+
+int eEnv::resolveVar(std::string &dest, const std::string &src)
+{
+       return eEnv::resolveVar(dest, src.c_str());
+}
+
+std::string eEnv::resolve(const std::string &src)
+{
+       std::string dest;
+
+       if (!initialized) {
+               eEnv::initialize();
+               initialized = true;
+       }
+
+       eDebug("%s: resolve %s", __func__, src.c_str());
+
+       eEnv::resolveVar(dest, src);
+
+       eDebug("%s: -> %s", __func__, dest.c_str());
+
+       return dest;
+}
diff --git a/lib/base/eenv.h b/lib/base/eenv.h
new file mode 100644 (file)
index 0000000..3d149f5
--- /dev/null
@@ -0,0 +1,16 @@
+#ifndef __lib_base_paths_h
+#define __lib_base_paths_h
+
+#include <string>
+
+class eEnv {
+private:
+       static bool initialized;
+       static void initialize();
+       static int resolveVar(std::string &dest, const char *src);
+       static int resolveVar(std::string &dest, const std::string &src);
+public:
+       static std::string resolve(const std::string &path);
+};
+
+#endif
index 8b4b592..361acce 100644 (file)
@@ -2,6 +2,7 @@
 #include <cstdlib>
 #include <lib/base/encoding.h>
 #include <lib/base/eerror.h>
+#include <lib/base/eenv.h>
 
 eDVBTextEncodingHandler encodingHandler;  // the one and only instance
 
@@ -17,8 +18,8 @@ inline char toupper(char c)
 
 eDVBTextEncodingHandler::eDVBTextEncodingHandler()
 {
-       const char * file=DATADIR "/enigma2/encoding.conf";
-       FILE *f = fopen(file, "rt");
+       std::string file = eEnv::resolve("${datadir}/enigma2/encoding.conf");
+       FILE *f = fopen(file.c_str(), "rt");
        if (f)
        {
                char *line = (char*) malloc(256);
@@ -61,7 +62,7 @@ eDVBTextEncodingHandler::eDVBTextEncodingHandler()
                free(line);
        }
        else
-               eDebug("[eDVBTextEncodingHandler] couldn't open %s !", file);
+               eDebug("[eDVBTextEncodingHandler] couldn't open %s !", file.c_str());
 }
 
 void eDVBTextEncodingHandler::getTransponderDefaultMapping(int tsidonid, int &table)
index 91f24ba..e3e2a13 100644 (file)
@@ -29,7 +29,7 @@ void eFilePushThread::thread()
 {
        setIoPrio(prio_class, prio);
 
-       off_t dest_pos = 0, source_pos = 0;
+       off_t dest_pos = 0;
        size_t bytes_read = 0;
        
        off_t current_span_offset = 0;
@@ -46,9 +46,7 @@ void eFilePushThread::thread()
        sigaction(SIGUSR1, &act, 0);
        
        hasStarted();
-       
-       source_pos = m_raw_source.lseek(0, SEEK_CUR);
-       
+
                /* m_stop must be evaluated after each syscall. */
        while (!m_stop)
        {
@@ -137,14 +135,12 @@ void eFilePushThread::thread()
                        
                if (m_sg && !current_span_remaining)
                {
-                       m_sg->getNextSourceSpan(source_pos, bytes_read, current_span_offset, current_span_remaining);
+                       m_sg->getNextSourceSpan(m_current_position, bytes_read, current_span_offset, current_span_remaining);
                        ASSERT(!(current_span_remaining % m_blocksize));
-
-                       if (source_pos != current_span_offset)
-                               source_pos = m_raw_source.lseek(current_span_offset, SEEK_SET);
+                       m_current_position = current_span_offset;
                        bytes_read = 0;
                }
-               
+
                size_t maxread = sizeof(m_buffer);
                
                        /* if we have a source span, don't read past the end */
@@ -157,9 +153,9 @@ void eFilePushThread::thread()
                m_buf_start = 0;
                m_filter_end = 0;
                m_buf_end = 0;
-               
+
                if (maxread)
-                       m_buf_end = m_raw_source.read(m_buffer, maxread);
+                       m_buf_end = m_source->read(m_current_position, m_buffer, maxread);
 
                if (m_buf_end < 0)
                {
@@ -177,10 +173,7 @@ void eFilePushThread::thread()
                        /* a read might be mis-aligned in case of a short read. */
                int d = m_buf_end % m_blocksize;
                if (d)
-               {
-                       m_raw_source.lseek(-d, SEEK_CUR);
                        m_buf_end -= d;
-               }
 
                if (m_buf_end == 0)
                {
@@ -216,18 +209,10 @@ void eFilePushThread::thread()
                                sleep(1);
                                continue;
                        }
-#if 0
-                       eDebug("FILEPUSH: end-of-file! (currently unhandled)");
-                       if (!m_raw_source.lseek(0, SEEK_SET))
-                       {
-                               eDebug("(looping)");
-                               continue;
-                       }
-#endif
                        break;
                } else
                {
-                       source_pos += m_buf_end;
+                       m_current_position += m_buf_end;
                        bytes_read += m_buf_end;
                        if (m_sg)
                                current_span_remaining -= m_buf_end;
@@ -239,20 +224,30 @@ void eFilePushThread::thread()
        eDebug("FILEPUSH THREAD STOP");
 }
 
-void eFilePushThread::start(int fd_source, int fd_dest)
+void eFilePushThread::start(int fd, int fd_dest)
 {
-       m_raw_source.setfd(fd_source);
-       m_fd_dest = fd_dest;
-       resume();
+       eRawFile *f = new eRawFile();
+       ePtr<iTsSource> source = f;
+       f->setfd(fd);
+       start(source, fd_dest);
 }
 
-int eFilePushThread::start(const char *filename, int fd_dest)
+int eFilePushThread::start(const char *file, int fd_dest)
 {
-       if (m_raw_source.open(filename) < 0)
+       eRawFile *f = new eRawFile();
+       ePtr<iTsSource> source = f;
+       if (f->open(file) < 0)
                return -1;
+       start(source, fd_dest);
+       return 0;
+}
+
+void eFilePushThread::start(ePtr<iTsSource> &source, int fd_dest)
+{
+       m_source = source;
        m_fd_dest = fd_dest;
+       m_current_position = 0;
        resume();
-       return 0;
 }
 
 void eFilePushThread::stop()
@@ -273,11 +268,6 @@ void eFilePushThread::pause()
        stop();
 }
 
-void eFilePushThread::seek(int whence, off_t where)
-{
-       m_raw_source.lseek(where, whence);
-}
-
 void eFilePushThread::resume()
 {
        m_stop = 0;
index 71ee997..a4457f6 100644 (file)
@@ -24,9 +24,10 @@ public:
        void stop();
        void start(int sourcefd, int destfd);
        int start(const char *filename, int destfd);
-       
+
+       void start(ePtr<iTsSource> &source, int destfd);
+
        void pause();
-       void seek(int whence, off_t where);
        void resume();
        
                /* flushes the internal readbuffer */ 
@@ -57,11 +58,12 @@ private:
        int m_send_pvr_commit;
        int m_stream_mode;
        int m_blocksize;
+       off_t m_current_position;
+
+       ePtr<iTsSource> m_source;
 
-       eRawFile m_raw_source;
-       
        eFixedMessagePump<int> m_messagepump;
-       
+
        void recvEvent(const int &evt);
 };
 
diff --git a/lib/base/itssource.h b/lib/base/itssource.h
new file mode 100644 (file)
index 0000000..91167ff
--- /dev/null
@@ -0,0 +1,19 @@
+#ifndef __lib_base_idatasource_h
+#define __lib_base_idatasource_h
+
+#include <lib/base/object.h>
+
+class iTsSource: public iObject
+{
+public:
+        /* NOTE: should only be used to get current position or filelength */
+       virtual off_t lseek(off_t offset, int whence)=0;
+       
+       /* 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!! */
+
+       virtual off_t length()=0;
+       virtual int valid()=0;
+};
+
+#endif
index c7e11fe..3a09e07 100644 (file)
@@ -4,7 +4,10 @@
 #include <lib/base/rawfile.h>
 #include <lib/base/eerror.h>
 
+DEFINE_REF(eRawFile);
+
 eRawFile::eRawFile()
+       :m_lock(false)
 {
        m_fd = -1;
        m_file = 0;
@@ -53,6 +56,13 @@ void eRawFile::setfd(int fd)
 
 off_t eRawFile::lseek(off_t offset, int whence)
 {
+       eSingleLocker l(m_lock);
+       m_current_offset = lseek_internal(offset, whence);
+       return m_current_offset;
+}
+
+off_t eRawFile::lseek_internal(off_t offset, int whence)
+{
 //     eDebug("lseek: %lld, %d", offset, whence);
                /* if there is only one file, use the native lseek - the file could be growing! */
        if (m_nrfiles < 2)
@@ -61,7 +71,8 @@ off_t eRawFile::lseek(off_t offset, int whence)
                        return ::lseek(m_fd, offset, whence);
                else
                {
-                       ::fseeko(m_file, offset, whence);
+                       if (::fseeko(m_file, offset, whence) < 0)
+                               perror("fseeko");
                        return ::ftello(m_file);
                }
        }
@@ -100,11 +111,19 @@ int eRawFile::close()
        }
 }
 
-ssize_t eRawFile::read(void *buf, size_t count)
+ssize_t eRawFile::read(off_t offset, void *buf, size_t count)
 {
-//     eDebug("read: %p, %d", buf, count);
+       eSingleLocker l(m_lock);
+
+       if (offset != m_current_offset)
+       {
+               m_current_offset = lseek_internal(offset, SEEK_SET);
+               if (m_current_offset < 0)
+                       return m_current_offset;
+       }
+
        switchOffset(m_current_offset);
-       
+
        if (m_nrfiles >= 2)
        {
                if (m_current_offset + count > m_totallength)
index a1c73d6..7b736a3 100644 (file)
@@ -2,24 +2,27 @@
 #define __lib_base_rawfile_h
 
 #include <string>
+#include <lib/base/itssource.h>
 
-class eRawFile
+class eRawFile: public iTsSource
 {
+       DECLARE_REF(eRawFile);
+       eSingleLock m_lock;
 public:
        eRawFile();
        ~eRawFile();
-       
        int open(const char *filename, int cached = 0);
        void setfd(int fd);
-       off_t lseek(off_t offset, int whence);
        int close();
-       ssize_t read(void *buf, size_t count); /* NOTE: you must be able to handle short reads! */
+
+       // iTsSource
+       off_t lseek(off_t offset, int whence);
+       ssize_t read(off_t offset, void *buf, size_t count);
        off_t length();
        int valid();
 private:
        int m_fd;     /* for uncached */
        FILE *m_file; /* for cached */
-       
        int m_cached;
        std::string m_basename;
        off_t m_splitsize, m_totallength, m_current_offset, m_base_offset, m_last_offset;
@@ -27,6 +30,8 @@ private:
        void scan();
        int m_current_file;
        int switchOffset(off_t off);
+
+       off_t lseek_internal(off_t offset, int whence);
        FILE *openFileCached(int nr);
        int openFileUncached(int nr);
 };
index e377ab8..364c694 100644 (file)
@@ -1,6 +1,16 @@
-INCLUDES = \
-       -I$(top_srcdir)/include
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LIBRARIES = libenigma_components.a
 
-libenigma_components_a_SOURCES = scan.cpp file_eraser.cpp
+libenigma_components_a_SOURCES = \
+       file_eraser.cpp \
+       scan.cpp
+
+componentsincludedir = $(pkgincludedir)/lib/components
+componentsinclude_HEADERS = \
+       file_eraser.h \
+       scan.h
index de1271b..b498a6c 100644 (file)
@@ -1,7 +1,38 @@
-INCLUDES = \
-       -I$(top_srcdir)/include
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
+
+AM_CXXFLAGS = \
+       $(LIBSDL_CFLAGS)
 
 noinst_LIBRARIES = libenigma_driver.a
 
 libenigma_driver_a_SOURCES = \
-       rc.cpp rcinput.cpp rcconsole.cpp avswitch.cpp rfmod.cpp etimezone.cpp misc_options.cpp
+       avswitch.cpp \
+       etimezone.cpp \
+       misc_options.cpp \
+       rc.cpp \
+       rcconsole.cpp \
+       rcinput.cpp \
+       rfmod.cpp
+
+driverincludedir = $(pkgincludedir)/lib/driver
+driverinclude_HEADERS = \
+       avswitch.h \
+       etimezone.h \
+       input_fake.h \
+       misc_options.h \
+       rc.h \
+       rcconsole.h \
+       rcdbox.h \
+       rcdreambox2.h \
+       rcinput.h \
+       rfmod.h
+
+if HAVE_LIBSDL
+libenigma_driver_a_SOURCES += \
+       rcsdl.cpp \
+       rcsdl.h
+endif
index eb5aee3..97a6e7c 100644 (file)
@@ -5,7 +5,7 @@
 #include <stdio.h>
 #include <fcntl.h>
 
-eRCConsoleDriver::eRCConsoleDriver(const char *filename): eRCDriver(eRCInput::getInstance())
+eRCConsoleDriver::eRCConsoleDriver(const char *filename): eRCDriver(eRCInput::getInstance()), m_escape(false)
 {
        handle=open(filename, O_RDONLY|O_NONBLOCK);
        if (handle<0)
@@ -38,7 +38,7 @@ void eRCConsoleDriver::keyPressed(int)
        unsigned char data[16];
        unsigned char *d = data;
        int num = read(handle, data, 16);
-       int code=-1;
+       unsigned char code;
        
        int km = input->getKeyboardMode();
 
@@ -47,42 +47,29 @@ void eRCConsoleDriver::keyPressed(int)
 
        while (num--)
        {
-//             eDebug("console code %08x\n", *d);
-               if (km == eRCInput::kmAll)
-                       code = *d++;
-               else
-               {
-                       if (*d == 27) // escape code
-                       {
-                               while (num)
-                               {
-                                       num--;
-                                       if (*++d != '[')
-                                               break;
-                               }
-                               code = -1;
-                       } else
-                               code = *d;
-                       ++d;
-
-                       if (code < 32)                  /* control characters */
-                               code = -1;
-                       else switch(code)
-                       {
-                       case 0x7E:  // mute, einfg, entf
-                       case 0x7F:  // backspace
-                       code = -1;
-                       default:
-                               break;
+               code = *d++;
+//             eDebug("console code %02x\n", code);
+               if (km == eRCInput::kmAscii) {
+                       if (m_escape) {
+                               if (code != '[')
+                                       m_escape = false;
+                               continue;
                        }
+
+                       if (code == 27) // escape code
+                               m_escape = true;
+
+                       if ((code < 32) ||      // control characters
+                           (code == 0x7e) ||   // mute, einfg, entf
+                           (code == 0x7f))     // backspace
+                               continue;
                }
 
-               if (code != -1)
-                       for (std::list<eRCDevice*>::iterator i(listeners.begin()); i!=listeners.end(); ++i)
-                       {
-//                             eDebug("ascii %08x", code);
-                               (*i)->handleCode(code);
-                       }
+               for (std::list<eRCDevice*>::iterator i(listeners.begin()); i!=listeners.end(); ++i)
+               {
+//                     eDebug("ascii %02x", code);
+                       (*i)->handleCode(code);
+               }
        }
 }
 
index 85234d5..8a24612 100644 (file)
@@ -10,6 +10,7 @@ class eRCConsoleDriver: public eRCDriver
 protected:
        int handle;
        ePtr<eSocketNotifier> sn;
+       bool m_escape;
        void keyPressed(int);
 public:
        eRCConsoleDriver(const char *filename);
index 2bfeefa..f30ba8c 100644 (file)
@@ -73,16 +73,8 @@ void eRCDeviceInputDev::handleCode(long rccode)
 eRCDeviceInputDev::eRCDeviceInputDev(eRCInputEventDriver *driver)
        :eRCDevice(driver->getDeviceName(), driver), iskeyboard(false)
 {
-       int len=id.length();
-       int idx=0;
-       while(idx <= len-8)
-       {
-               if (!strncasecmp(&id[idx++], "KEYBOARD", 8))
-               {
-                       iskeyboard=true;
-                       break;
-               }
-       }
+       if (strcasestr(id.c_str(), "keyboard") != NULL)
+               iskeyboard = true;
        setExclusive(true);
        eDebug("Input device \"%s\" is %sa keyboard.", id.c_str(), iskeyboard ? "" : "not ");
 }
diff --git a/lib/driver/rcsdl.cpp b/lib/driver/rcsdl.cpp
new file mode 100644 (file)
index 0000000..a907b80
--- /dev/null
@@ -0,0 +1,390 @@
+#include <lib/driver/rcsdl.h>
+//#include <lib/actions/action.h>
+#include <lib/base/init.h>
+#include <lib/base/init_num.h>
+#include <lib/driver/input_fake.h>
+
+/*
+ * eSDLInputDevice
+ */
+
+eSDLInputDevice::eSDLInputDevice(eRCDriver *driver) : eRCDevice("SDL", driver), m_escape(false), m_unicode(0)
+{
+}
+
+eSDLInputDevice::~eSDLInputDevice()
+{
+}
+
+void eSDLInputDevice::handleCode(long arg)
+{
+       const SDL_KeyboardEvent *event = (const SDL_KeyboardEvent *)arg;
+       const SDL_keysym *key = &event->keysym;
+       int km = input->getKeyboardMode();
+       int code, flags;
+
+       if (event->type == SDL_KEYDOWN) {
+               m_unicode = key->unicode;
+               flags = eRCKey::flagMake;
+       } else {
+               flags = eRCKey::flagBreak;
+       }
+
+       if (km == eRCInput::kmNone) {
+               code = translateKey(key->sym);
+       } else {
+               eDebug("unicode=%04x scancode=%02x", m_unicode, key->scancode);
+               if (m_unicode & 0xff80) {
+                       eDebug("SDL: skipping unicode character");
+                       return;
+               }
+               code = m_unicode & ~0xff80;
+               // unicode not set...!? use key symbol
+               if (code == 0) {
+                       // keysym is ascii
+                       if (key->sym >= 128) {
+                               eDebug("SDL: cannot emulate ASCII");
+                               return;
+                       }
+                       eDebug("SDL: emulate ASCII");
+                       code = key->sym;
+               }
+               if (km == eRCInput::kmAscii) {
+                       // skip ESC c or ESC '[' c
+                       if (m_escape) {
+                               if (code != '[')
+                                       m_escape = false;
+                               return;
+                       }
+
+                       if (code == SDLK_ESCAPE)
+                               m_escape = true;
+
+                       if ((code < SDLK_SPACE) ||
+                           (code == 0x7e) ||   // really?
+                           (code == SDLK_DELETE))
+                               return;
+               }
+               flags |= eRCKey::flagAscii;
+       }
+
+       eDebug("SDL code=%d flags=%d", code, flags);
+       input->keyPressed(eRCKey(this, code, flags));
+}
+
+const char *eSDLInputDevice::getDescription() const
+{
+       return "SDL";
+}
+
+int eSDLInputDevice::translateKey(SDLKey key)
+{
+       #define P(a)    case SDLK_##a: return KEY_##a
+       #define P2(a,b) case SDLK_##a: return KEY_##b
+
+       switch (key) {
+       P(BACKSPACE);
+       P(TAB);
+       P(CLEAR);
+       P2(RETURN,ENTER);
+       P(PAUSE);
+       P2(ESCAPE,ESC);
+       P(SPACE);
+#if 0
+       P(EXCLAIM);
+       P(QUOTEDBL);
+       P(HASH);
+#endif
+       P(DOLLAR);
+#if 0
+       P(AMPERSAND);
+#endif
+       P2(QUOTE,APOSTROPHE);
+#if 0
+       P(LEFTPAREN);
+       P(RIGHTPAREN);
+       P(ASTERISK);
+       P(PLUS);
+#endif
+       P(COMMA);
+       P(MINUS);
+       P2(PERIOD,DOT);
+       P(SLASH);
+       P(0);
+       P(1);
+       P(2);
+       P(3);
+       P(4);
+       P(5);
+       P(6);
+       P(7);
+       P(8);
+       P(9);
+#if 0
+       P(COLON);
+#endif
+       P(SEMICOLON);
+#if 0
+       P(LESS);
+#endif
+       P2(EQUALS,EQUAL);
+#if 0
+       P(GREATER);
+#endif
+       P(QUESTION);
+#if 0
+       P(AT);
+#endif
+       P2(LEFTBRACKET,LEFTBRACE);
+       P(BACKSLASH);
+       P2(RIGHTBRACKET,RIGHTBRACE);
+       P2(CARET,GRAVE);
+#if 0
+       P(UNDERSCORE);
+       P(BACKQUOTE);
+#endif
+       P2(a,A);
+       P2(b,B);
+       P2(c,C);
+       P2(d,D);
+       P2(e,E);
+       P2(f,F);
+       P2(g,G);
+       P2(h,H);
+       P2(i,I);
+       P2(j,J);
+       P2(k,K);
+       P2(l,L);
+       P2(m,M);
+       P2(n,N);
+       P2(o,O);
+       P2(p,P);
+       P2(q,Q);
+       P2(r,R);
+       P2(s,S);
+       P2(t,T);
+       P2(u,U);
+       P2(v,V);
+       P2(w,W);
+       P2(x,X);
+       P2(y,Y);
+       P2(z,Z);
+       P(DELETE);
+#if 0
+       P(WORLD_0);
+       P(WORLD_1);
+       P(WORLD_2);
+       P(WORLD_3);
+       P(WORLD_4);
+       P(WORLD_5);
+       P(WORLD_6);
+       P(WORLD_7);
+       P(WORLD_8);
+       P(WORLD_9);
+       P(WORLD_10);
+       P(WORLD_11);
+       P(WORLD_12);
+       P(WORLD_13);
+       P(WORLD_14);
+       P(WORLD_15);
+       P(WORLD_16);
+       P(WORLD_17);
+       P(WORLD_18);
+       P(WORLD_19);
+       P(WORLD_20);
+       P(WORLD_21);
+       P(WORLD_22);
+       P(WORLD_23);
+       P(WORLD_24);
+       P(WORLD_25);
+       P(WORLD_26);
+       P(WORLD_27);
+       P(WORLD_28);
+       P(WORLD_29);
+       P(WORLD_30);
+       P(WORLD_31);
+       P(WORLD_32);
+       P(WORLD_33);
+       P(WORLD_34);
+       P(WORLD_35);
+       P(WORLD_36);
+       P(WORLD_37);
+       P(WORLD_38);
+       P(WORLD_39);
+       P(WORLD_40);
+       P(WORLD_41);
+       P(WORLD_42);
+       P(WORLD_43);
+       P(WORLD_44);
+       P(WORLD_45);
+       P(WORLD_46);
+       P(WORLD_47);
+       P(WORLD_48);
+       P(WORLD_49);
+       P(WORLD_50);
+       P(WORLD_51);
+       P(WORLD_52);
+       P(WORLD_53);
+       P(WORLD_54);
+       P(WORLD_55);
+       P(WORLD_56);
+       P(WORLD_57);
+       P(WORLD_58);
+       P(WORLD_59);
+       P(WORLD_60);
+       P(WORLD_61);
+       P(WORLD_62);
+       P(WORLD_63);
+       P(WORLD_64);
+       P(WORLD_65);
+       P(WORLD_66);
+       P(WORLD_67);
+       P(WORLD_68);
+       P(WORLD_69);
+       P(WORLD_70);
+       P(WORLD_71);
+       P(WORLD_72);
+       P(WORLD_73);
+       P(WORLD_74);
+       P(WORLD_75);
+       P(WORLD_76);
+       P(WORLD_77);
+       P(WORLD_78);
+       P(WORLD_79);
+       P(WORLD_80);
+       P(WORLD_81);
+       P(WORLD_82);
+       P(WORLD_83);
+       P(WORLD_84);
+       P(WORLD_85);
+       P(WORLD_86);
+       P(WORLD_87);
+       P(WORLD_88);
+       P(WORLD_89);
+       P(WORLD_90);
+       P(WORLD_91);
+       P(WORLD_92);
+       P(WORLD_93);
+       P(WORLD_94);
+       P(WORLD_95);
+#endif
+       P(KP0);
+       P(KP1);
+       P(KP2);
+       P(KP3);
+       P(KP4);
+       P(KP5);
+       P(KP6);
+       P(KP7);
+       P(KP8);
+       P(KP9);
+       P2(KP_PERIOD,KPDOT);
+       P2(KP_DIVIDE,KPSLASH);
+       P2(KP_MULTIPLY,KPASTERISK);
+       P2(KP_MINUS,KPMINUS);
+       P2(KP_PLUS,KPPLUS);
+       P2(KP_ENTER,KPENTER);
+       P2(KP_EQUALS,KPEQUAL);
+       P(UP);
+       P(DOWN);
+       P(RIGHT);
+       P(LEFT);
+       P(INSERT);
+       P(HOME);
+       P(END);
+       P(PAGEUP);
+       P(PAGEDOWN);
+       P(F1);
+       P(F2);
+       P(F3);
+       P(F4);
+       P(F5);
+       P(F6);
+       P(F7);
+       P(F8);
+       P(F9);
+       P(F10);
+       P(F11);
+       P(F12);
+       P(F13);
+       P(F14);
+       P(F15);
+       P(NUMLOCK);
+       P(CAPSLOCK);
+       P2(SCROLLOCK,SCROLLLOCK);
+       P2(RSHIFT,RIGHTSHIFT);
+       P2(LSHIFT,LEFTSHIFT);
+       P2(RCTRL,RIGHTCTRL);
+       P2(LCTRL,LEFTCTRL);
+       P2(RALT,RIGHTALT);
+       P2(LALT,LEFTALT);
+       P2(RMETA,RIGHTMETA);
+       P2(LMETA,LEFTMETA);
+#if 0
+       P(LSUPER);
+       P(RSUPER);
+#endif
+       P(MODE);
+       P(COMPOSE);
+       P(HELP);
+       P(PRINT);
+       P2(SYSREQ,SYSRQ);
+       P(BREAK);
+       P(MENU);
+       P(POWER);
+       P(EURO);
+       P(UNDO);
+       default:
+               eDebug("unhandled SDL keycode: %d", key);
+               return KEY_RESERVED;
+       }
+
+       #undef P2
+       #undef P
+}
+
+/*
+ * eSDLInputDriver
+ */
+
+eSDLInputDriver *eSDLInputDriver::instance;
+
+eSDLInputDriver::eSDLInputDriver() : eRCDriver(eRCInput::getInstance())
+{
+       ASSERT(instance == 0);
+       instance = this;
+}
+
+eSDLInputDriver::~eSDLInputDriver()
+{
+       instance = 0;
+}
+
+void eSDLInputDriver::keyPressed(const SDL_KeyboardEvent *key)
+{
+       eDebug("km=%d enabled=%d locked=%d",
+               input->getKeyboardMode(), enabled, input->islocked());
+
+       if (!enabled || input->islocked())
+               return;
+
+       std::list<eRCDevice*>::iterator i(listeners.begin());
+       while (i != listeners.end()) {
+               (*i)->handleCode((long)key);
+               ++i;
+       }
+}
+
+class eRCSDLInit
+{
+private:
+       eSDLInputDriver driver;
+       eSDLInputDevice device;
+
+public:
+       eRCSDLInit(): driver(), device(&driver)
+       {
+       }
+};
+
+eAutoInitP0<eRCSDLInit> init_rcSDL(eAutoInitNumbers::rc+1, "SDL RC Driver");
diff --git a/lib/driver/rcsdl.h b/lib/driver/rcsdl.h
new file mode 100644 (file)
index 0000000..9732f5e
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef __lib_driver_rcsdl_h
+#define __lib_driver_rcsdl_h
+
+#include <lib/driver/rc.h>
+
+#include <SDL.h>
+
+class eSDLInputDevice : public eRCDevice
+{
+private:
+       bool m_escape;
+       unsigned int m_unicode;
+       int translateKey(SDLKey key);
+
+public:
+       eSDLInputDevice(eRCDriver *driver);
+       ~eSDLInputDevice();
+
+       virtual void handleCode(long arg);
+       virtual const char *getDescription() const;
+};
+
+class eSDLInputDriver : public eRCDriver
+{
+private:
+       static eSDLInputDriver *instance;
+
+public:
+       eSDLInputDriver();
+       ~eSDLInputDriver();
+
+       static eSDLInputDriver *getInstance() { return instance; }
+
+       void keyPressed(const SDL_KeyboardEvent *key);
+};
+
+#endif
index b47ffed..9b33755 100644 (file)
@@ -1,12 +1,64 @@
 SUBDIRS = lowlevel
 
-INCLUDES = \
-       -I$(top_srcdir)/include
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/include \
+       -include Python.h \
+       -include $(top_builddir)/enigma2_config.h
 
 noinst_LIBRARIES = libenigma_dvb.a
 
-libenigma_dvb_a_SOURCES = dvb.cpp demux.cpp frontend.cpp esection.cpp db.cpp \
-       sec.cpp scan.cpp crc32.cpp pmt.cpp decoder.cpp eit.cpp rotor_calc.cpp \
-       epgcache.cpp dvbtime.cpp metaparser.cpp volume.cpp tstools.cpp pvrparse.cpp \
-       pesparse.cpp teletext.cpp radiotext.cpp subtitle.cpp
+libenigma_dvb_a_SOURCES = \
+       crc32.cpp \
+       db.cpp \
+       decoder.cpp \
+       demux.cpp \
+       dvb.cpp \
+       dvbtime.cpp \
+       eit.cpp \
+       epgcache.cpp \
+       esection.cpp \
+       frontend.cpp \
+       metaparser.cpp \
+       pesparse.cpp \
+       pmt.cpp \
+       pvrparse.cpp \
+       radiotext.cpp \
+       rotor_calc.cpp \
+       scan.cpp \
+       sec.cpp \
+       subtitle.cpp \
+       teletext.cpp \
+       tstools.cpp \
+       volume.cpp
 
+dvbincludedir = $(pkgincludedir)/lib/dvb
+dvbinclude_HEADERS = \
+       crc32.h \
+       db.h \
+       decoder.h \
+       demux.h \
+       dvb.h \
+       dvbtime.h \
+       eit.h \
+       epgcache.h \
+       esection.h \
+       frontend.h \
+       frontendparms.h \
+       idemux.h \
+       idvb.h \
+       isection.h \
+       list.h \
+       metaparser.h \
+       pesparse.h \
+       pmt.h \
+       pvrparse.h \
+       radiotext.h \
+       rotor_calc.h \
+       scan.h \
+       sec.h \
+       specs.h \
+       subtitle.h \
+       teletext.h \
+       tstools.h \
+       volume.h
index 38be635..522035e 100644 (file)
@@ -3,6 +3,7 @@
 #include <lib/dvb/dvb.h>
 #include <lib/dvb/frontend.h>
 #include <lib/dvb/epgcache.h>
+#include <lib/base/eenv.h>
 #include <lib/base/eerror.h>
 #include <lib/base/estring.h>
 #include <xmlccwrap/xmlccwrap.h>
@@ -73,7 +74,7 @@ RESULT eBouquet::moveService(const eServiceReference &ref, unsigned int pos)
 
 RESULT eBouquet::flushChanges()
 {
-       FILE *f=fopen((CONFIGDIR"/enigma2/"+m_filename).c_str(), "w");
+       FILE *f=fopen(eEnv::resolve("${sysconfdir}/enigma2/" + m_filename).c_str(), "w");
        if (!f)
                return -1;
        if ( fprintf(f, "#NAME %s\r\n", m_bouquet_name.c_str()) < 0 )
@@ -280,7 +281,7 @@ DEFINE_REF(eDVBDB);
 
 void eDVBDB::reloadServicelist()
 {
-       loadServicelist(CONFIGDIR"/enigma2/lamedb");
+       loadServicelist(eEnv::resolve("${sysconfdir}/enigma2/lamedb").c_str());
 }
 
 void eDVBDB::parseServiceData(ePtr<eDVBService> s, std::string str)
@@ -324,14 +325,14 @@ void eDVBDB::loadServicelist(const char *file)
 {
        eDebug("---- opening lame channel db");
        FILE *f=fopen(file, "rt");
-       if (!f && strcmp(file, CONFIGDIR"/enigma2/lamedb") == 0)
+       if (!f && strcmp(file, eEnv::resolve("${sysconfdir}/enigma2/lamedb").c_str()) == 0)
        {
                struct stat s;
                if ( !stat("lamedb", &s) )
                {
-                       if ( !stat(CONFIGDIR"/enigma2", &s) )
+                       if ( !stat(eEnv::resolve("${sysconfdir}/enigma2").c_str(), &s) )
                        {
-                               rename("lamedb", CONFIGDIR"/enigma2/lamedb" );
+                               rename("lamedb", eEnv::resolve("${sysconfdir}/enigma2/lamedb").c_str());
                                reloadServicelist();
                        }
                }
@@ -594,7 +595,7 @@ void eDVBDB::saveServicelist(const char *file)
 
 void eDVBDB::saveServicelist()
 {
-       saveServicelist(CONFIGDIR"/enigma2/lamedb");
+       saveServicelist(eEnv::resolve("${sysconfdir}/enigma2/lamedb").c_str());
 }
 
 void eDVBDB::loadBouquet(const char *path)
@@ -618,7 +619,7 @@ void eDVBDB::loadBouquet(const char *path)
        std::list<eServiceReference> &list = bouquet.m_services;
        list.clear();
 
-       std::string p = CONFIGDIR"/enigma2/";
+       std::string p = eEnv::resolve("${sysconfdir}/enigma2/");
        p+=path;
        eDebug("loading bouquet... %s", p.c_str());
        FILE *fp=fopen(p.c_str(), "rt");
index ef8dadc..8ed9f43 100644 (file)
@@ -203,6 +203,9 @@ int eDVBAudio::startPid(int pid, int type)
        case aLPCM:
                bypass = 6;
                break;
+       case aDTSHD:
+               bypass = 0x10;
+               break;
        }
 
        eDebugNoNewLine("AUDIO_SET_BYPASS(%d) - ", bypass);
@@ -601,7 +604,7 @@ RESULT eDVBVideo::connectEvent(const Slot1<void, struct iTSMPEGDecoder::videoEve
        return 0;
 }
 
-static int readMpegProc(char *str, int decoder)
+static int readMpegProc(const char *str, int decoder)
 {
        int val = -1;
        char tmp[64];
index 3a0fbac..7610b65 100644 (file)
@@ -13,7 +13,7 @@ private:
        ePtr<eDVBDemux> m_demux;
        int m_fd, m_fd_demux, m_dev, m_is_freezed;
 public:
-       enum { aMPEG, aAC3, aDTS, aAAC, aAACHE, aLPCM };
+       enum { aMPEG, aAC3, aDTS, aAAC, aAACHE, aLPCM, aDTSHD };
        eDVBAudio(eDVBDemux *demux, int dev);
        enum { aMonoLeft, aStereo, aMonoRight };
        void setChannel(int channel);
index 4fba8fa..0c736c5 100644 (file)
@@ -247,6 +247,14 @@ eDVBSectionReader::~eDVBSectionReader()
                ::close(fd);
 }
 
+RESULT eDVBSectionReader::setBufferSize(int size)
+{
+       int res=::ioctl(fd, DMX_SET_BUFFER_SIZE, size);
+       if (res < 0)
+               eDebug("eDVBSectionReader DMX_SET_BUFFER_SIZE failed(%m)");
+       return res;
+}
+
 RESULT eDVBSectionReader::start(const eDVBSectionFilterMask &mask)
 {
        RESULT res;
@@ -279,8 +287,7 @@ RESULT eDVBSectionReader::start(const eDVBSectionFilterMask &mask)
        memcpy(sct.filter.mask, mask.mask, DMX_FILTER_SIZE);
 #if HAVE_DVB_API_VERSION >= 3
        memcpy(sct.filter.mode, mask.mode, DMX_FILTER_SIZE);
-       if (::ioctl(fd, DMX_SET_BUFFER_SIZE, 8192*8) < 0)
-               eDebug("DMX_SET_BUFFER_SIZE failed(%m)");
+       setBufferSize(8192*8);
 #endif
        
        res = ::ioctl(fd, DMX_SET_FILTER, &sct);
@@ -352,7 +359,7 @@ eDVBPESReader::eDVBPESReader(eDVBDemux *demux, eMainloop *context, RESULT &res):
        
        if (m_fd >= 0)
        {
-               ::ioctl(m_fd, DMX_SET_BUFFER_SIZE, 64*1024);
+               setBufferSize(64*1024);
                ::fcntl(m_fd, F_SETFL, O_NONBLOCK);
                m_notifier = eSocketNotifier::create(context, m_fd, eSocketNotifier::Read, false);
                CONNECT(m_notifier->activated, eDVBPESReader::data);
@@ -364,6 +371,14 @@ eDVBPESReader::eDVBPESReader(eDVBDemux *demux, eMainloop *context, RESULT &res):
        }
 }
 
+RESULT eDVBPESReader::setBufferSize(int size)
+{
+       int res = ::ioctl(m_fd, DMX_SET_BUFFER_SIZE, size);
+       if (res < 0)
+               eDebug("eDVBPESReader DMX_SET_BUFFER_SIZE failed(%m)");
+       return res;
+}
+
 DEFINE_REF(eDVBPESReader)
 
 eDVBPESReader::~eDVBPESReader()
@@ -484,7 +499,7 @@ eDVBTSRecorder::eDVBTSRecorder(eDVBDemux *demux): m_demux(demux)
        m_running = 0;
        m_target_fd = -1;
        m_thread = new eDVBRecordFileThread();
-  CONNECT(m_thread->m_event, eDVBTSRecorder::filepushEvent);
+       CONNECT(m_thread->m_event, eDVBTSRecorder::filepushEvent);
 #ifndef HAVE_ADD_PID
        m_demux->m_dvr_busy = 1;
 #endif
@@ -536,8 +551,8 @@ RESULT eDVBTSRecorder::start()
                eDebug("FAILED to open demux (%s) in ts recoder (%m)", filename);
                return -3;
        }
-       
-       ::ioctl(m_source_fd, DMX_SET_BUFFER_SIZE, 1024*1024);
+
+       setBufferSize(1024*1024);
 
        dmx_pes_filter_params flt;
 #if HAVE_DVB_API_VERSION > 3
@@ -577,6 +592,14 @@ RESULT eDVBTSRecorder::start()
        return 0;
 }
 
+RESULT eDVBTSRecorder::setBufferSize(int size)
+{
+       int res = ::ioctl(m_source_fd, DMX_SET_BUFFER_SIZE, size);
+       if (res < 0)
+               eDebug("eDVBTSRecorder DMX_SET_BUFFER_SIZE failed(%m)");
+       return res;
+}
+
 RESULT eDVBTSRecorder::addPID(int pid)
 {
        if (m_pids.find(pid) != m_pids.end())
@@ -625,18 +648,36 @@ RESULT eDVBTSRecorder::setBoundary(off_t max)
 
 RESULT eDVBTSRecorder::stop()
 {
+       int state=3;
+
        for (std::map<int,int>::iterator i(m_pids.begin()); i != m_pids.end(); ++i)
                stopPID(i->first);
 
        if (!m_running)
                return -1;
+
+#if HAVE_DVB_API_VERSION >= 5
+       /* workaround for record thread stop */
+       if (::ioctl(m_source_fd, DMX_STOP) < 0)
+               perror("DMX_STOP");
+       else
+               state &= ~1;
+
+       if (::close(m_source_fd) < 0)
+               perror("close");
+       else
+               state &= ~2;
+#endif
+
        m_thread->stop();
-       
-       close(m_source_fd);
+
+       if (state & 3)
+               ::close(m_source_fd);
+
+       m_running = 0;
        m_source_fd = -1;
-       
+
        m_thread->stopSaveMetaInformation();
-       
        return 0;
 }
 
index 7a697d4..d43c41b 100644 (file)
@@ -56,9 +56,9 @@ class eDVBSectionReader: public iDVBSectionReader, public Object
        void data(int);
        ePtr<eSocketNotifier> notifier;
 public:
-       
        eDVBSectionReader(eDVBDemux *demux, eMainloop *context, RESULT &res);
        virtual ~eDVBSectionReader();
+       RESULT setBufferSize(int size);
        RESULT start(const eDVBSectionFilterMask &mask);
        RESULT stop();
        RESULT connectRead(const Slot1<void,const __u8*> &read, ePtr<eConnection> &conn);
@@ -76,6 +76,7 @@ class eDVBPESReader: public iDVBPESReader, public Object
 public:
        eDVBPESReader(eDVBDemux *demux, eMainloop *context, RESULT &res);
        virtual ~eDVBPESReader();
+       RESULT setBufferSize(int size);
        RESULT start(int pid);
        RESULT stop();
        RESULT connectRead(const Slot2<void,const __u8*, int> &read, ePtr<eConnection> &conn);
@@ -90,6 +91,7 @@ public:
        eDVBTSRecorder(eDVBDemux *demux);
        ~eDVBTSRecorder();
 
+       RESULT setBufferSize(int size);
        RESULT start();
        RESULT addPID(int pid);
        RESULT removePID(int pid);
index 40d4418..414ab8d 100644 (file)
@@ -320,27 +320,34 @@ PyObject *eDVBResourceManager::setFrontendSlotInformations(ePyObject list)
                PyErr_SetString(PyExc_StandardError, "eDVBResourceManager::setFrontendSlotInformations argument should be a python list");
                return NULL;
        }
-       if ((unsigned int)PyList_Size(list) != m_frontend.size())
+       unsigned int assigned=0;
+       for (eSmartPtrList<eDVBRegisteredFrontend>::iterator i(m_frontend.begin()); i != m_frontend.end(); ++i)
        {
+               int pos=0;
+               while (pos < PyList_Size(list)) {
+                       ePyObject obj = PyList_GET_ITEM(list, pos++);
+                       if (!i->m_frontend->setSlotInfo(obj))
+                               continue;
+                       ++assigned;
+                       break;
+               }
+       }
+       if (assigned != m_frontend.size()) {
                char blasel[256];
-               sprintf(blasel, "eDVBResourceManager::setFrontendSlotInformations list size incorrect %d frontends avail, but %d entries in slotlist",
-                       m_frontend.size(), PyList_Size(list));
+               sprintf(blasel, "eDVBResourceManager::setFrontendSlotInformations .. assigned %d socket informations, but %d registered frontends!",
+                       m_frontend.size(), assigned);
                PyErr_SetString(PyExc_StandardError, blasel);
                return NULL;
        }
-       int pos=0;
-       for (eSmartPtrList<eDVBRegisteredFrontend>::iterator i(m_frontend.begin()); i != m_frontend.end(); ++i)
-       {
-               ePyObject obj = PyList_GET_ITEM(list, pos++);
-               if (!i->m_frontend->setSlotInfo(obj))
-                       return NULL;
-       }
-       pos=0;
        for (eSmartPtrList<eDVBRegisteredFrontend>::iterator i(m_simulate_frontend.begin()); i != m_simulate_frontend.end(); ++i)
        {
-               ePyObject obj = PyList_GET_ITEM(list, pos++);
-               if (!i->m_frontend->setSlotInfo(obj))
-                       return NULL;
+               int pos=0;
+               while (pos < PyList_Size(list)) {
+                       ePyObject obj = PyList_GET_ITEM(list, pos++);
+                       if (!i->m_frontend->setSlotInfo(obj))
+                               continue;
+                       break;
+               }
        }
        Py_RETURN_NONE;
 }
@@ -1745,6 +1752,20 @@ RESULT eDVBChannel::getCurrentFrontendParameters(ePtr<iDVBFrontendParameters> &p
 
 RESULT eDVBChannel::playFile(const char *file)
 {
+       eRawFile *f = new eRawFile();
+       ePtr<iTsSource> source = f;
+
+       if (f->open(file) < 0)
+       {
+               eDebug("can't open PVR file %s (%m)", file);
+               return -ENOENT;
+       }
+
+       return playSource(source, file);
+}
+
+RESULT eDVBChannel::playSource(ePtr<iTsSource> &source, const char *streaminfo_file)
+{
        ASSERT(!m_frontend);
        if (m_pvr_thread)
        {
@@ -1753,7 +1774,13 @@ RESULT eDVBChannel::playFile(const char *file)
                m_pvr_thread = 0;
        }
 
-       m_tstools.openFile(file);
+       if (!source->valid())
+       {
+               eDebug("PVR source is not valid!");
+               return -ENOENT;
+       }
+
+       m_tstools.setSource(source, streaminfo_file);
 
                /* DON'T EVEN THINK ABOUT FIXING THIS. FIX THE ATI SOURCES FIRST,
                   THEN DO A REAL FIX HERE! */
@@ -1780,15 +1807,7 @@ RESULT eDVBChannel::playFile(const char *file)
 
        m_event(this, evtPreStart);
 
-       if (m_pvr_thread->start(file, m_pvr_fd_dst))
-       {
-               delete m_pvr_thread;
-               m_pvr_thread = 0;
-               ::close(m_pvr_fd_dst);
-               m_pvr_fd_dst = -1;
-               eDebug("can't open PVR file %s (%m)", file);
-               return -ENOENT;
-       }
+       m_pvr_thread->start(source, m_pvr_fd_dst);
        CONNECT(m_pvr_thread->m_event, eDVBChannel::pvrEvent);
 
        m_state = state_ok;
@@ -1797,7 +1816,7 @@ RESULT eDVBChannel::playFile(const char *file)
        return 0;
 }
 
-void eDVBChannel::stopFile()
+void eDVBChannel::stopSource()
 {
        if (m_pvr_thread)
        {
@@ -1807,6 +1826,13 @@ void eDVBChannel::stopFile()
        }
        if (m_pvr_fd_dst >= 0)
                ::close(m_pvr_fd_dst);
+       ePtr<iTsSource> d;
+       m_tstools.setSource(d);
+}
+
+void eDVBChannel::stopFile()
+{
+       stopSource();
 }
 
 void eDVBChannel::setCueSheet(eCueSheet *cuesheet)
index fb92580..f612aff 100644 (file)
@@ -259,7 +259,10 @@ public:
                /* iDVBPVRChannel */
        RESULT playFile(const char *file);
        void stopFile();
-       
+
+       RESULT playSource(ePtr<iTsSource>& source, const char *priv=NULL);
+       void stopSource();
+
        void setCueSheet(eCueSheet *cuesheet);
        
        RESULT getLength(pts_t &len);
@@ -301,7 +304,7 @@ private:
        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);
-       
+
        eSingleLock m_cuesheet_lock;
 
        friend class eUsePtr<eDVBChannel>;
index bb6b94b..26b6767 100644 (file)
@@ -111,7 +111,7 @@ void TDT::ready(int error)
 
 int TDT::createTable(unsigned int nr, const __u8 *data, unsigned int max)
 {
-       if ( data && data[0] == 0x70 || data[0] == 0x73 )
+       if ( data && (data[0] == 0x70 || data[0] == 0x73 ))
        {
                int length = ((data[1] & 0x0F) << 8) | data[2];
                if ( length >= 5 )
index 1e8414c..8ac0c71 100644 (file)
@@ -213,9 +213,9 @@ pthread_mutex_t eEPGCache::channel_map_lock=
 DEFINE_REF(eEPGCache)
 
 eEPGCache::eEPGCache()
-       :messages(this,1), cleanTimer(eTimer::create(this))//, paused(0)
+       :messages(this,1), cleanTimer(eTimer::create(this)), m_running(0)//, paused(0)
 {
-       eDebug("[EPGC] Initialized EPGCache");
+       eDebug("[EPGC] Initialized EPGCache (wait for setCacheFile call now)");
 
        CONNECT(messages.recv_msg, eEPGCache::gotMessage);
        CONNECT(eDVBLocalTimeHandler::getInstance()->m_timeUpdated, eEPGCache::timeUpdated);
@@ -226,22 +226,46 @@ eEPGCache::eEPGCache()
        if (!res_mgr)
                eDebug("[eEPGCache] no resource manager !!!!!!!");
        else
-       {
                res_mgr->connectChannelAdded(slot(*this,&eEPGCache::DVBChannelAdded), m_chanAddedConn);
+
+       instance=this;
+       memset(m_filename, 0, sizeof(m_filename));
+}
+
+void eEPGCache::setCacheFile(const char *path)
+{
+       bool inited = !!strlen(m_filename);
+       strncpy(m_filename, path, 1024);
+       if (!inited)
+       {
+               eDebug("[EPGC] setCacheFile read/write epg data from/to '%s'", m_filename);
                if (eDVBLocalTimeHandler::getInstance()->ready())
                        timeUpdated();
        }
-       instance=this;
 }
 
 void eEPGCache::timeUpdated()
 {
-       if (!sync())
+       if (strlen(m_filename))
        {
-               eDebug("[EPGC] time updated.. start EPG Mainloop");
-               run();
-       } else
-               messages.send(Message(Message::timeChanged));
+               if (!sync())
+               {
+                       eDebug("[EPGC] time updated.. start EPG Mainloop");
+                       run();
+                       singleLock s(channel_map_lock);
+                       channelMapIterator it = m_knownChannels.begin();
+                       for (; it != m_knownChannels.end(); ++it)
+                       {
+                               if (it->second->state == -1) {
+                                       it->second->state=0;
+                                       messages.send(Message(Message::startChannel, it->second));
+                               }
+                       }
+               } else
+                       messages.send(Message(Message::timeChanged));
+       }
+       else
+               eDebug("[EPGC] time updated.. but cache file not set yet.. dont start epg!!");
 }
 
 void eEPGCache::DVBChannelAdded(eDVBChannel *chan)
@@ -337,8 +361,11 @@ void eEPGCache::DVBChannelRunning(iDVBChannel *chan)
                                        return;
                                }
 #endif
-                               messages.send(Message(Message::startChannel, chan));
-                               // -> gotMessage -> changedService
+                               if (m_running) {
+                                       data.state=0;
+                                       messages.send(Message(Message::startChannel, chan));
+                                       // -> gotMessage -> changedService
+                               }
                        }
                }
        }
@@ -365,7 +392,8 @@ void eEPGCache::DVBChannelStateChanged(iDVBChannel *chan)
                                case iDVBChannel::state_release:
                                {
                                        eDebug("[eEPGCache] remove channel %p", chan);
-                                       messages.send(Message(Message::leaveChannel, chan));
+                                       if (it->second->state >= 0)
+                                               messages.send(Message(Message::leaveChannel, chan));
                                        pthread_mutex_lock(&it->second->channel_active);
                                        singleLock s(channel_map_lock);
                                        m_knownChannels.erase(it);
@@ -953,39 +981,24 @@ void eEPGCache::gotMessage( const Message &msg )
 void eEPGCache::thread()
 {
        hasStarted();
+       m_running=1;
        nice(4);
        load();
        cleanLoop();
        runLoop();
        save();
+       m_running=0;
 }
 
 void eEPGCache::load()
 {
-       FILE *f = fopen("/hdd/epg.dat", "r");
+       FILE *f = fopen(m_filename, "r");
        if (f)
        {
-               unlink("/hdd/epg.dat");
+               unlink(m_filename);
                int size=0;
                int cnt=0;
-#if 0
-               unsigned char md5_saved[16];
-               unsigned char md5[16];
-               bool md5ok=false;
 
-               if (!md5_file("/hdd/epg.dat", 1, md5))
-               {
-                       FILE *f = fopen("/hdd/epg.dat.md5", "r");
-                       if (f)
-                       {
-                               fread( md5_saved, 16, 1, f);
-                               fclose(f);
-                               if ( !memcmp(md5_saved, md5, 16) )
-                                       md5ok=true;
-                       }
-               }
-               if ( md5ok )
-#endif
                {
                        unsigned int magic=0;
                        fread( &magic, sizeof(int), 1, f);
@@ -1027,7 +1040,7 @@ void eEPGCache::load()
                                        eventDB[key]=std::pair<eventMap,timeMap>(evMap,tmMap);
                                }
                                eventData::load(f);
-                               eDebug("[EPGC] %d events read from /hdd/epg.dat", cnt);
+                               eDebug("[EPGC] %d events read from %s", cnt, m_filename);
 #ifdef ENABLE_PRIVATE_EPG
                                char text2[11];
                                fread( text2, 11, 1, f);
@@ -1075,103 +1088,106 @@ void eEPGCache::load()
 
 void eEPGCache::save()
 {
-       struct statfs s;
-       off64_t tmp;
-       if (statfs("/hdd", &s)<0)
-               tmp=0;
-       else
+       /* create empty file */
+       FILE *f = fopen(m_filename, "w");
+
+       if (!f)
+       {
+               eDebug("[EPGC] couldn't save epg data to '%s'(%m)", m_filename);
+               return;
+       }
+
+       char *buf = realpath(m_filename, NULL);
+       if (!buf)
        {
-               tmp=s.f_blocks;
-               tmp*=s.f_bsize;
+               eDebug("[EPGC] realpath to '%s' failed in save (%m)", m_filename);
+               fclose(f);
+               return;
        }
 
-       // prevent writes to builtin flash
-       if ( tmp < 1024*1024*50 ) // storage size < 50MB
+       eDebug("[EPGC] store epg to realpath '%s'", buf);
+
+       struct statfs s;
+       off64_t tmp;
+       if (statfs(buf, &s) < 0) {
+               eDebug("[EPGC] statfs '%s' failed in save (%m)", buf);
+               fclose(f);
                return;
+       }
+
+       free(buf);
 
        // check for enough free space on storage
        tmp=s.f_bfree;
        tmp*=s.f_bsize;
        if ( tmp < (eventData::CacheSize*12)/10 ) // 20% overhead
+       {
+               eDebug("[EPGC] not enough free space at path '%s' %lld bytes availd but %d needed", buf, tmp, (eventData::CacheSize*12)/10);
+               fclose(f);
                return;
+       }
 
-       FILE *f = fopen("/hdd/epg.dat", "w");
        int cnt=0;
-       if ( f )
-       {
-               unsigned int magic = 0x98765432;
-               fwrite( &magic, sizeof(int), 1, f);
-               const char *text = "UNFINISHED_V7";
-               fwrite( text, 13, 1, f );
-               int size = eventDB.size();
-               fwrite( &size, sizeof(int), 1, f );
-               for (eventCache::iterator service_it(eventDB.begin()); service_it != eventDB.end(); ++service_it)
-               {
-                       timeMap &timemap = service_it->second.second;
-                       fwrite( &service_it->first, sizeof(uniqueEPGKey), 1, f);
-                       size = timemap.size();
-                       fwrite( &size, sizeof(int), 1, f);
-                       for (timeMap::iterator time_it(timemap.begin()); time_it != timemap.end(); ++time_it)
-                       {
-                               __u8 len = time_it->second->ByteSize;
-                               fwrite( &time_it->second->type, sizeof(__u8), 1, f );
-                               fwrite( &len, sizeof(__u8), 1, f);
-                               fwrite( time_it->second->EITdata, len, 1, f);
-                               ++cnt;
-                       }
+       unsigned int magic = 0x98765432;
+       fwrite( &magic, sizeof(int), 1, f);
+       const char *text = "UNFINISHED_V7";
+       fwrite( text, 13, 1, f );
+       int size = eventDB.size();
+       fwrite( &size, sizeof(int), 1, f );
+       for (eventCache::iterator service_it(eventDB.begin()); service_it != eventDB.end(); ++service_it)
+       {
+               timeMap &timemap = service_it->second.second;
+               fwrite( &service_it->first, sizeof(uniqueEPGKey), 1, f);
+               size = timemap.size();
+               fwrite( &size, sizeof(int), 1, f);
+               for (timeMap::iterator time_it(timemap.begin()); time_it != timemap.end(); ++time_it)
+               {
+                       __u8 len = time_it->second->ByteSize;
+                       fwrite( &time_it->second->type, sizeof(__u8), 1, f );
+                       fwrite( &len, sizeof(__u8), 1, f);
+                       fwrite( time_it->second->EITdata, len, 1, f);
+                       ++cnt;
                }
-               eDebug("[EPGC] %d events written to /hdd/epg.dat", cnt);
-               eventData::save(f);
+       }
+       eDebug("[EPGC] %d events written to %s", cnt, m_filename);
+       eventData::save(f);
 #ifdef ENABLE_PRIVATE_EPG
-               const char* text3 = "PRIVATE_EPG";
-               fwrite( text3, 11, 1, f );
-               size = content_time_tables.size();
+       const char* text3 = "PRIVATE_EPG";
+       fwrite( text3, 11, 1, f );
+       size = content_time_tables.size();
+       fwrite( &size, sizeof(int), 1, f);
+       for (contentMaps::iterator a = content_time_tables.begin(); a != content_time_tables.end(); ++a)
+       {
+               contentMap &content_time_table = a->second;
+               fwrite( &a->first, sizeof(uniqueEPGKey), 1, f);
+               int size = content_time_table.size();
                fwrite( &size, sizeof(int), 1, f);
-               for (contentMaps::iterator a = content_time_tables.begin(); a != content_time_tables.end(); ++a)
+               for (contentMap::iterator i = content_time_table.begin(); i != content_time_table.end(); ++i )
                {
-                       contentMap &content_time_table = a->second;
-                       fwrite( &a->first, sizeof(uniqueEPGKey), 1, f);
-                       int size = content_time_table.size();
+                       int size = i->second.size();
+                       fwrite( &i->first, sizeof(int), 1, f);
                        fwrite( &size, sizeof(int), 1, f);
-                       for (contentMap::iterator i = content_time_table.begin(); i != content_time_table.end(); ++i )
-                       {
-                               int size = i->second.size();
-                               fwrite( &i->first, sizeof(int), 1, f);
-                               fwrite( &size, sizeof(int), 1, f);
-                               for ( contentTimeMap::iterator it(i->second.begin());
-                                       it != i->second.end(); ++it )
-                               {
-                                       fwrite( &it->first, sizeof(time_t), 1, f);
-                                       fwrite( &it->second.first, sizeof(time_t), 1, f);
-                                       fwrite( &it->second.second, sizeof(__u16), 1, f);
-                               }
-                       }
-               }
-#endif
-               // write version string after binary data
-               // has been written to disk.
-               fsync(fileno(f));
-               fseek(f, sizeof(int), SEEK_SET);
-               fwrite("ENIGMA_EPG_V7", 13, 1, f);
-               fclose(f);
-#if 0
-               unsigned char md5[16];
-               if (!md5_file("/hdd/epg.dat", 1, md5))
-               {
-                       FILE *f = fopen("/hdd/epg.dat.md5", "w");
-                       if (f)
+                       for ( contentTimeMap::iterator it(i->second.begin());
+                               it != i->second.end(); ++it )
                        {
-                               fwrite( md5, 16, 1, f);
-                               fclose(f);
+                               fwrite( &it->first, sizeof(time_t), 1, f);
+                               fwrite( &it->second.first, sizeof(time_t), 1, f);
+                               fwrite( &it->second.second, sizeof(__u16), 1, f);
                        }
                }
-#endif
        }
+#endif
+       // write version string after binary data
+       // has been written to disk.
+       fsync(fileno(f));
+       fseek(f, sizeof(int), SEEK_SET);
+       fwrite("ENIGMA_EPG_V7", 13, 1, f);
+       fclose(f);
 }
 
 eEPGCache::channel_data::channel_data(eEPGCache *ml)
        :cache(ml)
-       ,abortTimer(eTimer::create(ml)), zapTimer(eTimer::create(ml)), state(0)
+       ,abortTimer(eTimer::create(ml)), zapTimer(eTimer::create(ml)), state(-1)
        ,isRunning(0), haveData(0)
 #ifdef ENABLE_PRIVATE_EPG
        ,startPrivateTimer(eTimer::create(ml))
@@ -2562,7 +2578,7 @@ void eEPGCache::PMTready(eDVBServicePMTHandler *pmthandler)
                                                                {
                                                                        __u8 buffer[10];
                                                                        (*desc)->writeToBuffer(buffer);
-                                                                       if (!strncmp((char*)buffer+2, "EPGDATA", 7))
+                                                                       if (!strncmp((const char *)buffer+2, "EPGDATA", 7))
                                                                        {
                                                                                eServiceReferenceDVB ref;
                                                                                if (!pmthandler->getServiceReference(ref))
@@ -2571,7 +2587,7 @@ void eEPGCache::PMTready(eDVBServicePMTHandler *pmthandler)
                                                                                        messages.send(Message(Message::got_mhw2_channel_pid, ref, pid));
                                                                                }
                                                                        }
-                                                                       else if(!strncmp((char*)buffer+2, "FICHAS", 6))
+                                                                       else if(!strncmp((const char *)buffer+2, "FICHAS", 6))
                                                                        {
                                                                                eServiceReferenceDVB ref;
                                                                                if (!pmthandler->getServiceReference(ref))
@@ -2580,7 +2596,7 @@ void eEPGCache::PMTready(eDVBServicePMTHandler *pmthandler)
                                                                                        messages.send(Message(Message::got_mhw2_summary_pid, ref, pid));
                                                                                }
                                                                        }
-                                                                       else if(!strncmp((char*)buffer+2, "GENEROS", 7))
+                                                                       else if(!strncmp((const char *)buffer+2, "GENEROS", 7))
                                                                        {
                                                                                eServiceReferenceDVB ref;
                                                                                if (!pmthandler->getServiceReference(ref))
index 4d45d87..90aff6c 100644 (file)
@@ -177,7 +177,8 @@ class eEPGCache: public eMainloop, private eThread, public Object
                eEPGCache *cache;
                ePtr<eTimer> abortTimer, zapTimer;
                int prevChannelState;
-               __u8 state, isRunning, haveData;
+               int state;
+               __u8 isRunning, haveData;
                ePtr<eDVBChannel> channel;
                ePtr<eConnection> m_stateChangedConn, m_NowNextConn, m_ScheduleConn, m_ScheduleOtherConn, m_ViasatConn;
                ePtr<iDVBSectionReader> m_NowNextReader, m_ScheduleReader, m_ScheduleOtherReader, m_ViasatReader;
@@ -290,6 +291,8 @@ private:
        void thread();  // thread function
 
 // called from epgcache thread
+       int m_running;
+       char m_filename[1024];
        void save();
        void load();
 #ifdef ENABLE_PRIVATE_EPG
@@ -325,6 +328,9 @@ public:
 #endif
 
 #endif
+       // must be called once!
+       void setCacheFile(const char *filename);
+
        // called from main thread
        inline void Lock();
        inline void Unlock();
index abbb8d2..ea9e738 100644 (file)
@@ -813,7 +813,7 @@ int eDVBFrontend::readFrontendData(int type)
                                        float fval1 = SDS_SNRE / 268435456.0,
                                                  fval2, fval3, fval4;
 
-                                       if (parm_u_qpsk_fec_inner <= FEC_S2_QPSK_9_10) // DVB-S2 QPSK
+                                       if (oparm.sat.modulation == eDVBFrontendParametersSatellite::Modulation_QPSK)
                                        {
                                                fval2 = 6.76;
                                                fval3 = 4.35;
@@ -2111,8 +2111,8 @@ RESULT eDVBFrontend::prepare_sat(const eDVBFrontendParametersSatellite &feparm,
                                        return -EINVAL;
                        }
 #if HAVE_DVB_API_VERSION < 5
-                       parm_inversion |= (feparm.rolloff << 2); // Hack.. we use bit 2..3 of inversion param for rolloff
-                       parm_inversion |= (feparm.pilot << 4); // Hack.. we use bit 4..5 of inversion param for pilot
+                       parm_inversion = (fe_spectral_inversion_t)((feparm.rolloff << 2) | parm_inversion); // Hack.. we use bit 2..3 of inversion param for rolloff
+                       parm_inversion = (fe_spectral_inversion_t)((feparm.pilot << 4) | parm_inversion); // Hack.. we use bit 4..5 of inversion param for pilot
                        if (feparm.modulation == eDVBFrontendParametersSatellite::Modulation_8PSK) 
                        {
                                parm_u_qpsk_fec_inner = (fe_code_rate_t)((int)parm_u_qpsk_fec_inner+9);
@@ -2700,17 +2700,23 @@ int eDVBFrontend::isCompatibleWith(ePtr<iDVBFrontendParameters> &feparm)
 
 bool eDVBFrontend::setSlotInfo(ePyObject obj)
 {
-       ePyObject Id, Descr, Enabled, IsDVBS2;
-       if (!PyTuple_Check(obj) || PyTuple_Size(obj) != 4)
+       ePyObject Id, Descr, Enabled, IsDVBS2, frontendId;
+       if (!PyTuple_Check(obj) || PyTuple_Size(obj) != 5)
                goto arg_error;
        Id = PyTuple_GET_ITEM(obj, 0);
        Descr = PyTuple_GET_ITEM(obj, 1);
        Enabled = PyTuple_GET_ITEM(obj, 2);
        IsDVBS2 = PyTuple_GET_ITEM(obj, 3);
-       if (!PyInt_Check(Id) || !PyString_Check(Descr) || !PyBool_Check(Enabled) || !PyBool_Check(IsDVBS2))
+       frontendId = PyTuple_GET_ITEM(obj, 4);
+       m_slotid = PyInt_AsLong(Id);
+       if (!PyInt_Check(Id) || !PyString_Check(Descr) || !PyBool_Check(Enabled) || !PyBool_Check(IsDVBS2) || !PyInt_Check(frontendId))
                goto arg_error;
        strcpy(m_description, PyString_AS_STRING(Descr));
-       m_slotid = PyInt_AsLong(Id);
+       if (PyInt_AsLong(frontendId) == -1 || PyInt_AsLong(frontendId) != m_dvbid) {
+//             eDebugNoSimulate("skip slotinfo for slotid %d, descr %s",
+//                     m_slotid, m_description);
+               return false;
+       }
        m_enabled = Enabled == Py_True;
        // HACK.. the rotor workaround is neede for all NIMs with LNBP21 voltage regulator...
        m_need_rotor_workaround = !!strstr(m_description, "Alps BSBE1") ||
index e92b1e7..86b35fd 100644 (file)
@@ -6,6 +6,7 @@
 class iDVBSectionReader: public iObject
 {
 public:
+       virtual RESULT setBufferSize(int size)=0;
        virtual RESULT start(const eDVBSectionFilterMask &mask)=0;
        virtual RESULT stop()=0;
        virtual RESULT connectRead(const Slot1<void,const __u8*> &read, ePtr<eConnection> &conn)=0;
@@ -15,6 +16,7 @@ public:
 class iDVBPESReader: public iObject
 {
 public:
+       virtual RESULT setBufferSize(int size)=0;
        virtual RESULT start(int pid)=0;
        virtual RESULT stop()=0;
        virtual RESULT connectRead(const Slot2<void,const __u8*, int> &read, ePtr<eConnection> &conn)=0;
@@ -26,6 +28,7 @@ public:
 class iDVBTSRecorder: public iObject
 {
 public:
+       virtual RESULT setBufferSize(int size) = 0;
        virtual RESULT start() = 0;
        virtual RESULT addPID(int pid) = 0;
        virtual RESULT removePID(int pid) = 0;
index f1217a6..e56a2c7 100644 (file)
@@ -15,6 +15,7 @@
 #include <lib/base/object.h>
 #include <lib/base/ebase.h>
 #include <lib/base/elock.h>
+#include <lib/base/itssource.h>
 #include <lib/service/service.h>
 #include <libsig_comp.h>
 #include <connection.h>
@@ -605,6 +606,10 @@ public:
        virtual RESULT playFile(const char *file) = 0;
        virtual void stopFile() = 0;
        
+       /* new interface */
+       virtual RESULT playSource(ePtr<iTsSource> &source, const char *priv=NULL) = 0;
+       virtual void stopSource() = 0;
+       
        virtual void setCueSheet(eCueSheet *cuesheet) = 0;
        
        virtual RESULT getLength(pts_t &pts) = 0;
@@ -645,7 +650,7 @@ public:
                /** Set Displayed Video PID and type */
        virtual RESULT setVideoPID(int vpid, int type)=0;
 
-       enum { af_MPEG, af_AC3, af_DTS, af_AAC };
+       enum { af_MPEG, af_AC3, af_DTS, af_AAC, af_DTSHD };
                /** Set Displayed Audio PID and type */
        virtual RESULT setAudioPID(int apid, int type)=0;
 
index 98e89f9..1108097 100644 (file)
@@ -1,3 +1,4 @@
-EXTRA_DIST = \
+lowlevelincludedir = $(pkgincludedir)/lib/dvb/lowlevel
+lowlevelinclude_HEADERS = \
        eit.h \
        mhw.h
index ee89a3a..d673384 100644 (file)
@@ -131,15 +131,31 @@ void eDVBServicePMTHandler::PATready(int)
        ePtr<eTable<ProgramAssociationSection> > ptr;
        if (!m_PAT.getCurrent(ptr))
        {
+               int service_id_single = -1;
+               int pmtpid_single = -1;
                int pmtpid = -1;
                std::vector<ProgramAssociationSection*>::const_iterator i;
-               for (i = ptr->getSections().begin(); i != ptr->getSections().end(); ++i)
+               for (i = ptr->getSections().begin(); pmtpid == -1 && i != ptr->getSections().end(); ++i)
                {
                        const ProgramAssociationSection &pat = **i;
                        ProgramAssociationConstIterator program;
-                       for (program = pat.getPrograms()->begin(); program != pat.getPrograms()->end(); ++program)
+                       for (program = pat.getPrograms()->begin(); pmtpid == -1 && program != pat.getPrograms()->end(); ++program)
+                       {
                                if (eServiceID((*program)->getProgramNumber()) == m_reference.getServiceID())
                                        pmtpid = (*program)->getProgramMapPid();
+                               if (pmtpid_single == -1 && pmtpid == -1)
+                               {
+                                       pmtpid_single = (*program)->getProgramMapPid();
+                                       service_id_single = (*program)->getProgramNumber();
+                               }
+                               else
+                                       pmtpid_single = service_id_single = -1;
+                       }
+               }
+               if (pmtpid_single != -1) // only one PAT entry .. so we use this one
+               {
+                       m_reference.setServiceID(eServiceID(service_id_single));
+                       pmtpid = pmtpid_single;
                }
                if (pmtpid == -1)
                        serviceEvent(eventNoPATEntry);
@@ -149,7 +165,7 @@ void eDVBServicePMTHandler::PATready(int)
                serviceEvent(eventNoPAT);
 }
 
-PyObject *eDVBServicePMTHandler::getCaIds()
+PyObject *eDVBServicePMTHandler::getCaIds(bool pair)
 {
        ePyObject ret;
 
@@ -157,20 +173,37 @@ PyObject *eDVBServicePMTHandler::getCaIds()
 
        if ( !getProgramInfo(prog) )
        {
-               int cnt=prog.caids.size();
-               if (cnt)
+               if (pair)
                {
+                       int cnt=prog.caids.size();
+                       if (cnt)
+                       {
+                               ret=PyList_New(cnt);
+                               std::list<program::capid_pair>::iterator it(prog.caids.begin());
+                               while(cnt--)
+                               {
+                                       ePyObject tuple = PyTuple_New(2);
+                                       PyTuple_SET_ITEM(tuple, 0, PyInt_FromLong(it->caid));
+                                       PyTuple_SET_ITEM(tuple, 1, PyInt_FromLong((it++)->capid));
+                                       PyList_SET_ITEM(ret, cnt, tuple);
+                               }
+                       }
+               }
+               else
+               {
+                       std::set<program::capid_pair> set(prog.caids.begin(), prog.caids.end());
+                       std::set<program::capid_pair>::iterator it(set.begin());
+                       int cnt=set.size();
                        ret=PyList_New(cnt);
-                       std::set<uint16_t>::iterator it(prog.caids.begin());
                        while(cnt--)
-                               PyList_SET_ITEM(ret, cnt, PyInt_FromLong(*it++));
+                               PyList_SET_ITEM(ret, cnt, PyInt_FromLong((it++)->caid));
                }
        }
 
        return ret ? (PyObject*)ret : (PyObject*)PyList_New(0);
 }
 
-int eDVBServicePMTHandler::getProgramInfo(struct program &program)
+int eDVBServicePMTHandler::getProgramInfo(program &program)
 {
        ePtr<eTable<ProgramMapSection> > ptr;
        int cached_apid_ac3 = -1;
@@ -213,8 +246,29 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program)
                        for (i = ptr->getSections().begin(); i != ptr->getSections().end(); ++i)
                        {
                                const ProgramMapSection &pmt = **i;
+                               int is_hdmv = 0;
+
                                program.pcrPid = pmt.getPcrPid();
 
+                               for (DescriptorConstIterator desc = pmt.getDescriptors()->begin();
+                                       desc != pmt.getDescriptors()->end(); ++desc)
+                               {
+                                       if ((*desc)->getTag() == CA_DESCRIPTOR)
+                                       {
+                                               CaDescriptor *descr = (CaDescriptor*)(*desc);
+                                               program::capid_pair pair;
+                                               pair.caid = descr->getCaSystemId();
+                                               pair.capid = descr->getCaPid();
+                                               program.caids.push_back(pair);
+                                       }
+                                       else if ((*desc)->getTag() == REGISTRATION_DESCRIPTOR)
+                                       {
+                                               RegistrationDescriptor *d = (RegistrationDescriptor*)(*desc);
+                                               if (d->getFormatIdentifier() == 0x48444d56) // HDMV
+                                                       is_hdmv = 1;
+                                       }
+                               }
+
                                ElementaryStreamInfoConstIterator es;
                                for (es = pmt.getEsInfo()->begin(); es != pmt.getEsInfo()->end(); ++es)
                                {
@@ -270,25 +324,34 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program)
                                                        audio.type = audioStream::atAACHE;
                                                        forced_audio = 1;
                                                }
-                                       case 0x80: // user private ... but blueray LPCM
-                                               if (!isvideo && !isaudio)
+                                       case 0x80: // user private ... but bluray LPCM
+                                       case 0xA0: // bluray secondary LPCM
+                                               if (!isvideo && !isaudio && is_hdmv)
                                                {
                                                        isaudio = 1;
                                                        audio.type = audioStream::atLPCM;
                                                }
-                                       case 0x81: // user private ... but blueray AC3
-                                               if (!isvideo && !isaudio)
+                                       case 0x81: // user private ... but bluray AC3
+                                       case 0xA1: // bluray secondary AC3
+                                               if (!isvideo && !isaudio && is_hdmv)
                                                {
                                                        isaudio = 1;
                                                        audio.type = audioStream::atAC3;
                                                }
-                                       case 0x82: // Blueray DTS (dvb user private...)
-                                       case 0xA2: // Blueray secondary DTS
-                                               if (!isvideo && !isaudio)
+                                       case 0x82: // bluray DTS (dvb user private...)
+                                       case 0xA2: // bluray secondary DTS
+                                               if (!isvideo && !isaudio && is_hdmv)
                                                {
                                                        isaudio = 1;
                                                        audio.type = audioStream::atDTS;
                                                }
+                                       case 0x86: // bluray DTS-HD (dvb user private...)
+                                       case 0xA6: // bluray secondary DTS-HD
+                                               if (!isvideo && !isaudio && is_hdmv)
+                                               {
+                                                       isaudio = 1;
+                                                       audio.type = audioStream::atDTSHD;
+                                               }
                                        case 0x06: // PES Private
                                        case 0xEA: // TS_PSI_ST_SMPTE_VC1
                                        {
@@ -460,7 +523,10 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program)
                                                        case CA_DESCRIPTOR:
                                                        {
                                                                CaDescriptor *descr = (CaDescriptor*)(*desc);
-                                                               program.caids.insert(descr->getCaSystemId());
+                                                               program::capid_pair pair;
+                                                               pair.caid = descr->getCaSystemId();
+                                                               pair.capid = descr->getCaPid();
+                                                               program.caids.push_back(pair);
                                                                break;
                                                        }
                                                        default:
@@ -477,9 +543,9 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program)
                                        default:
                                                break;
                                        }
-                                       if (isteletext && (isaudio || isvideo)) 
+                                       if (isteletext && (isaudio || isvideo))
                                        {
-                                               eDebug("ambiguous streamtype for PID %04x detected.. forced as teletext!", (*es)->getPid());                                    
+                                               eDebug("ambiguous streamtype for PID %04x detected.. forced as teletext!", (*es)->getPid());
                                                continue; // continue with next PID
                                        }
                                        else if (issubtitle && (isaudio || isvideo))
@@ -517,15 +583,6 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program)
                                        else
                                                continue;
                                }
-                               for (DescriptorConstIterator desc = pmt.getDescriptors()->begin();
-                                       desc != pmt.getDescriptors()->end(); ++desc)
-                               {
-                                       if ((*desc)->getTag() == CA_DESCRIPTOR)
-                                       {
-                                               CaDescriptor *descr = (CaDescriptor*)(*desc);
-                                               program.caids.insert(descr->getCaSystemId());
-                                       }
-                               }
                        }
                        ret = 0;
 
@@ -589,8 +646,12 @@ int eDVBServicePMTHandler::getProgramInfo(struct program &program)
                        program.textPid = cached_tpid;
                }
                CAID_LIST &caids = m_service->m_ca;
-               for (CAID_LIST::iterator it(caids.begin()); it != caids.end(); ++it)
-                       program.caids.insert(*it);
+               for (CAID_LIST::iterator it(caids.begin()); it != caids.end(); ++it) {
+                       program::capid_pair pair;
+                       pair.caid = *it;
+                       pair.capid = -1; // not known yet
+                       program.caids.push_back(pair);
+               }
                if ( cnt )
                        ret = 0;
        }
@@ -675,6 +736,12 @@ void eDVBServicePMTHandler::SDTScanEvent(int event)
 
 int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref, int use_decode_demux, eCueSheet *cue, bool simulate, eDVBService *service)
 {
+       ePtr<iTsSource> s;
+       return tuneExt(ref, use_decode_demux, s, NULL, cue, simulate, service);
+}
+
+int eDVBServicePMTHandler::tuneExt(eServiceReferenceDVB &ref, int use_decode_demux, ePtr<iTsSource> &source, const char *streaminfo_file, eCueSheet *cue, bool simulate, eDVBService *service)
+{
        RESULT res=0;
        m_reference = ref;
        
@@ -702,11 +769,12 @@ int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref, int use_decode_demux,
        {
                if (!ref.getServiceID().get() /* incorrect sid in meta file or recordings.epl*/ )
                {
-                       eWarning("no .meta file found, trying to find PMT pid");
                        eDVBTSTools tstools;
-                       if (tstools.openFile(ref.path.c_str()))
-                               eWarning("failed to open file");
-                       else
+                       bool b = source || !tstools.openFile(ref.path.c_str(), 1);
+                       eWarning("no .meta file found, trying to find PMT pid");
+                       if (source)
+                               tstools.setSource(source, NULL);
+                       if (b)
                        {
                                int service_id, pmt_pid;
                                if (!tstools.findPMT(pmt_pid, service_id))
@@ -716,6 +784,8 @@ int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref, int use_decode_demux,
                                        m_pmt_pid = pmt_pid;
                                }
                        }
+                       else
+                               eWarning("no valid source to find PMT pid!");
                }
                eDebug("alloc PVR");
                        /* allocate PVR */
@@ -757,7 +827,10 @@ int eDVBServicePMTHandler::tune(eServiceReferenceDVB &ref, int use_decode_demux,
                if (m_pvr_channel)
                {
                        m_pvr_channel->setCueSheet(cue);
-                       m_pvr_channel->playFile(ref.path.c_str());
+                       if (source)
+                               m_pvr_channel->playSource(source, streaminfo_file);
+                       else
+                               m_pvr_channel->playFile(ref.path.c_str());
                }
        }
 
index 483c06b..aa5d34d 100644 (file)
@@ -144,7 +144,7 @@ public:
        {
                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 };
+               enum { atMPEG, atAC3, atDTS, atAAC, atAACHE, atLPCM, atDTSHD };
                int type; // mpeg2, ac3, dts, ...
                
                int component_tag;
@@ -181,11 +181,17 @@ public:
 
        struct program
        {
+               struct capid_pair
+               {
+                       uint16_t caid;
+                       int capid;
+                       bool operator< (const struct capid_pair &t) { return t.caid < caid; }
+               };
                std::vector<videoStream> videoStreams;
                std::vector<audioStream> audioStreams;
                int defaultAudioStream;
                std::vector<subtitleStream> subtitleStreams;
-               std::set<uint16_t> caids;
+               std::list<capid_pair> caids;
                int pcrPid;
                int pmtPid;
                int textPid;
@@ -193,10 +199,10 @@ public:
                PyObject *createPythonObject();
        };
 
-       int getProgramInfo(struct program &program);
+       int getProgramInfo(program &program);
        int getDataDemux(ePtr<iDVBDemux> &demux);
        int getDecodeDemux(ePtr<iDVBDemux> &demux);
-       PyObject *getCaIds();
+       PyObject *getCaIds(bool pair=false); // caid / ecmpid pair
        
        int getPVRChannel(ePtr<iDVBPVRChannel> &pvr_channel);
        int getServiceReference(eServiceReferenceDVB &service) { service = m_reference; return 0; }
@@ -205,7 +211,12 @@ public:
        int getChannel(eUsePtr<iDVBChannel> &channel);
        void resetCachedProgram() { m_have_cached_program = false; }
 
+       /* deprecated interface */
        int tune(eServiceReferenceDVB &ref, int use_decode_demux, eCueSheet *sg=0, bool simulate=false, eDVBService *service = 0);
+
+       /* new interface */
+       int tuneExt(eServiceReferenceDVB &ref, int use_decode_demux, ePtr<iTsSource> &, const char *streaminfo_file, eCueSheet *sg=0, bool simulate=false, eDVBService *service = 0);
+
        void free();
 private:
        bool m_have_cached_program;
index 5cdecbd..e19dd1e 100644 (file)
@@ -123,7 +123,7 @@ void eMPEGStreamInformation::fixupDiscontinuties()
                pts_t current = i->second - currentDelta;
                pts_t diff = current - lastpts_t;
                
-               if (llabs(diff) > (90000*5)) // 5sec diff
+               if (llabs(diff) > (90000*10)) // 10sec diff
                {
 //                     eDebug("%llx < %llx, have discont. new timestamp is %llx (diff is %llx)!", current, lastpts_t, i->second, diff);
                        currentDelta = i->second - lastpts_t; /* FIXME: should be the extrapolated new timestamp, based on the current rate */
index b37aa71..d559614 100644 (file)
@@ -10,6 +10,7 @@
 #include <lib/dvb/esection.h>
 #include <lib/dvb/scan.h>
 #include <lib/dvb/frontend.h>
+#include <lib/base/eenv.h>
 #include <lib/base/eerror.h>
 #include <lib/base/estring.h>
 #include <lib/python/python.h>
@@ -29,7 +30,8 @@ eDVBScan::eDVBScan(iDVBChannel *channel, bool usePAT, bool debug)
        if (m_channel->getDemux(m_demux))
                SCAN_eDebug("scan: failed to allocate demux!");
        m_channel->connectStateChange(slot(*this, &eDVBScan::stateChange), m_stateChanged_connection);
-       FILE *f = fopen("/etc/enigma2/scan_tp_valid_check.py", "r");
+       std::string filename = eEnv::resolve("${sysconfdir}/scan_tp_valid_check.py");
+       FILE *f = fopen(filename.c_str(), "r");
        if (f)
        {
                char code[16384];
@@ -37,7 +39,7 @@ eDVBScan::eDVBScan(iDVBChannel *channel, bool usePAT, bool debug)
                if (rd)
                {
                        code[rd]=0;
-                       m_additional_tsid_onid_check_func = Py_CompileString(code, "/etc/enigma2/scan_tp_valid_check.py", Py_file_input);
+                       m_additional_tsid_onid_check_func = Py_CompileString(code, filename.c_str(), Py_file_input);
                }
                fclose(f);
        }
index 58fc5e3..a2bc886 100644 (file)
@@ -212,7 +212,7 @@ int eDVBSatelliteEquipmentControl::canTune(const eDVBFrontendParametersSatellite
 
                                eSecDebugNoSimulate("ret5 %d", ret);
 
-                               if (ret && lnb_param.SatCR_idx != -1)
+                               if (ret && !is_unicable)
                                {
                                        int lof = sat.frequency > lnb_param.m_lof_threshold ?
                                                lnb_param.m_lof_hi : lnb_param.m_lof_lo;
@@ -300,11 +300,6 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                if ( sit != lnb_param.m_satellites.end())
                {
                        eSecCommandList sec_sequence;
-
-                       lnb_param.guard_offset = 0; //HACK
-
-                       frontend.setData(eDVBFrontend::SATCR, lnb_param.SatCR_idx);
-                       
                        eDVBSatelliteSwitchParameters &sw_param = sit->second;
                        bool doSetFrontend = true;
                        bool doSetVoltageToneFrontend = true;
@@ -327,6 +322,11 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                        eDVBSatelliteDiseqcParameters::t_diseqc_mode diseqc_mode = di_param.m_diseqc_mode;
                        eDVBSatelliteSwitchParameters::t_voltage_mode voltage_mode = sw_param.m_voltage_mode;
                        bool diseqc13V = voltage_mode == eDVBSatelliteSwitchParameters::HV_13;
+                       bool is_unicable = lnb_param.SatCR_idx != -1;
+
+                       lnb_param.guard_offset = 0; //HACK
+
+                       frontend.setData(eDVBFrontend::SATCR, lnb_param.SatCR_idx);
 
                        if (diseqc13V)
                                voltage_mode = eDVBSatelliteSwitchParameters::HV;
@@ -371,13 +371,10 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
 
                        int lof = (band&1)?lnb_param.m_lof_hi:lnb_param.m_lof_lo;
 
-                       int local=0;
-
-
-                       if(lnb_param.SatCR_idx == -1)
+                       if(!is_unicable)
                        {
-                       // calc Frequency
-                               local = abs(sat.frequency 
+                               // calc Frequency
+                               int local= abs(sat.frequency 
                                        - lof);
                                parm.FREQUENCY = ((((local * 2) / 125) + 1) / 2) * 125;
                                frontend.setData(eDVBFrontend::FREQ_OFFSET, sat.frequency - parm.FREQUENCY);
@@ -551,6 +548,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
 
                                        if ( send_mask )
                                        {
+                                               int diseqc_repeats = diseqc_mode > eDVBSatelliteDiseqcParameters::V1_0 ? di_param.m_repeats : 0;
                                                int vlt = iDVBFrontend::voltageOff;
                                                eSecCommand::pair compare;
                                                compare.steps = +3;
@@ -623,7 +621,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                                                        if ( send_mask & 2 )
                                                                ++loops;
 
-                                                       loops <<= di_param.m_repeats;
+                                                       loops <<= diseqc_repeats;
 
                                                        for ( int i = 0; i < loops;)  // fill commands...
                                                        {
@@ -660,7 +658,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                                                                        int tmp = m_params[DELAY_BETWEEN_DISEQC_REPEATS];
                                                                        if (cmd)
                                                                        {
-                                                                               int delay = di_param.m_repeats ? (tmp - 54) / 2 : tmp;  // standard says 100msek between two repeated commands
+                                                                               int delay = diseqc_repeats ? (tmp - 54) / 2 : tmp;  // standard says 100msek between two repeated commands
                                                                                sec_sequence.push_back( eSecCommand(eSecCommand::SLEEP, delay) );
                                                                                diseqc.data[2]=cmd;
                                                                                diseqc.data[3]=(cmd==0x38) ? csw : ucsw;
@@ -693,7 +691,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                                        if ( RotorCmd != -1 && RotorCmd != lastRotorCmd )
                                        {
                                                eSecCommand::pair compare;
-                                               if (!send_mask && lnb_param.SatCR_idx == -1)
+                                               if (!send_mask && !is_unicable)
                                                {
                                                        compare.steps = +3;
                                                        compare.tone = iDVBFrontend::toneOff;
@@ -747,10 +745,10 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                                                        diseqc.data[3] = RotorCmd;
                                                        diseqc.data[4] = 0x00;
                                                }
-//                                             if(lnb_param.SatCR_idx == -1)
+//                                             if(!is_unicable)
                                                {
                                                        int mrt = m_params[MOTOR_RUNNING_TIMEOUT]; // in seconds!
-                                                       if ( rotor_param.m_inputpower_parameters.m_use || lnb_param.SatCR_idx == -1)
+                                                       if ( rotor_param.m_inputpower_parameters.m_use && !is_unicable)
                                                        { // use measure rotor input power to detect rotor state
                                                                bool turn_fast = need_turn_fast(rotor_param.m_inputpower_parameters.m_turning_speed);
                                                                eSecCommand::rotor cmd;
@@ -882,7 +880,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
                        sec_fe->setData(eDVBFrontend::NEW_UCSW, ucsw);
                        sec_fe->setData(eDVBFrontend::NEW_TONEBURST, di_param.m_toneburst_param);
 
-                       if ((doSetVoltageToneFrontend) && (lnb_param.SatCR_idx == -1))
+                       if (doSetVoltageToneFrontend && !is_unicable)
                        {
                                eSecCommand::pair compare;
                                compare.voltage = voltage;
@@ -898,7 +896,7 @@ RESULT eDVBSatelliteEquipmentControl::prepare(iDVBFrontend &frontend, FRONTENDPA
 
                        sec_sequence.push_back( eSecCommand(eSecCommand::UPDATE_CURRENT_SWITCHPARMS) );
 
-                       if(lnb_param.SatCR_idx != -1)
+                       if(is_unicable)
                        {
                                // check if voltage is disabled
                                eSecCommand::pair compare;
@@ -1004,19 +1002,6 @@ RESULT eDVBSatelliteEquipmentControl::clear()
        //reset some tuner configuration
        for (eSmartPtrList<eDVBRegisteredFrontend>::iterator it(m_avail_frontends.begin()); it != m_avail_frontends.end(); ++it)
        {
-               long tmp;
-               char c;
-               if (sscanf(it->m_frontend->getDescription(), "BCM450%c (internal)", &c) == 1 && !it->m_frontend->getData(eDVBFrontend::LINKED_PREV_PTR, tmp) && tmp != -1)
-               {
-                       FILE *f=fopen("/proc/stb/tsmux/lnb_b_input", "w");
-                       if (!f || fwrite("B", 1, 1, f) != 1)
-                               eDebug("set /proc/stb/tsmux/lnb_b_input to B failed!! (%m)");
-                       else
-                       {
-                               eDebug("set /proc/stb/tsmux/lnb_b_input to B OK");
-                               fclose(f);
-                       }
-               }
                it->m_frontend->setData(eDVBFrontend::SATPOS_DEPENDS_PTR, -1);
                it->m_frontend->setData(eDVBFrontend::LINKED_PREV_PTR, -1);
                it->m_frontend->setData(eDVBFrontend::LINKED_NEXT_PTR, -1);
@@ -1448,17 +1433,6 @@ RESULT eDVBSatelliteEquipmentControl::setTunerLinked(int tu1, int tu2)
                        char c;
                        p1->m_frontend->setData(eDVBFrontend::LINKED_PREV_PTR, (long)p2);
                        p2->m_frontend->setData(eDVBFrontend::LINKED_NEXT_PTR, (long)p1);
-                       if (!strcmp(p1->m_frontend->getDescription(), p2->m_frontend->getDescription()) && sscanf(p1->m_frontend->getDescription(), "BCM450%c (internal)", &c) == 1)
-                       {
-                               FILE *f=fopen("/proc/stb/tsmux/lnb_b_input", "w");
-                               if (!f || fwrite("A", 1, 1, f) != 1)
-                                       eDebug("set /proc/stb/tsmux/lnb_b_input to A failed!! (%m)");
-                               else
-                               {
-                                       eDebug("set /proc/stb/tsmux/lnb_b_input to A OK");
-                                       fclose(f);
-                               }
-                       }
                }
 
                p1=p2=NULL;
index d5ad249..6cd855c 100644 (file)
@@ -7,7 +7,6 @@
 #include <stdio.h>
 
 eDVBTSTools::eDVBTSTools()
-       :m_file_lock(true)
 {
        m_pid = -1;
        m_maxrange = 256*1024;
@@ -23,19 +22,39 @@ eDVBTSTools::eDVBTSTools()
        m_futile = 0;
 }
 
+void eDVBTSTools::closeSource()
+{
+       m_source = NULL;
+}
+
 eDVBTSTools::~eDVBTSTools()
 {
-       closeFile();
+       closeSource();
 }
 
 int eDVBTSTools::openFile(const char *filename, int nostreaminfo)
 {
+       eRawFile *f = new eRawFile();
+       ePtr<iTsSource> src = f;
+
+       if (f->open(filename, 1) < 0)
+               return -1;
+
+       setSource(src, nostreaminfo ? NULL : filename);
+
+       return 0;
+}
+
+void eDVBTSTools::setSource(ePtr<iTsSource> &source, const char *stream_info_filename)
+{
        closeFile();
-       
-       if (!nostreaminfo)
+
+       m_source = source;
+
+       if (stream_info_filename)
        {
-               eDebug("loading streaminfo for %s", filename);
-               m_streaminfo.load(filename);
+               eDebug("loading streaminfo for %s", stream_info_filename);
+               m_streaminfo.load(stream_info_filename);
        }
        
        if (!m_streaminfo.empty())
@@ -45,19 +64,14 @@ int eDVBTSTools::openFile(const char *filename, int nostreaminfo)
 //             eDebug("no recorded stream information available");
                m_use_streaminfo = 0;
        }
-       
-       m_samples_taken = 0;
 
-       eSingleLocker l(m_file_lock);
-       if (m_file.open(filename, 1) < 0)
-               return -1;
-       return 0;
+       m_samples_taken = 0;
 }
 
 void eDVBTSTools::closeFile()
 {
-       eSingleLocker l(m_file_lock);
-       m_file.close();
+       if (m_source)
+               closeSource();
 }
 
 void eDVBTSTools::setSyncPID(int pid)
@@ -77,31 +91,24 @@ int eDVBTSTools::getPTS(off_t &offset, pts_t &pts, int fixed)
                if (!m_streaminfo.getPTS(offset, pts))
                        return 0;
        
-       if (!m_file.valid())
+       if (!m_source || !m_source->valid())
                return -1;
 
        offset -= offset % 188;
 
-       eSingleLocker l(m_file_lock);
-       if (m_file.lseek(offset, SEEK_SET) < 0)
-       {
-               eDebug("lseek failed");
-               return -1;
-       }
-       
        int left = m_maxrange;
        
        while (left >= 188)
        {
                unsigned char packet[188];
-               if (m_file.read(packet, 188) != 188)
+               if (m_source->read(offset, packet, 188) != 188)
                {
                        eDebug("read error");
                        break;
                }
                left -= 188;
                offset += 188;
-               
+
                if (packet[0] != 0x47)
                {
                        eDebug("resync");
@@ -111,8 +118,8 @@ int eDVBTSTools::getPTS(off_t &offset, pts_t &pts, int fixed)
                                if (packet[i] == 0x47)
                                        break;
                                ++i;
+                               --offset;
                        }
-                       offset = m_file.lseek(i - 188, SEEK_CUR);
                        continue;
                }
                
@@ -205,6 +212,8 @@ int eDVBTSTools::getPTS(off_t &offset, pts_t &pts, int fixed)
                                                        break;
                                                case 0x71: // AC3 / DTS
                                                        break;
+                                               case 0x72: // DTS - HD
+                                                       break;
                                                default:
                                                        eDebug("skip unknwn stream_id_extension %02x\n", payload[9+offs]);
                                                        continue;
@@ -404,7 +413,7 @@ int eDVBTSTools::getNextAccessPoint(pts_t &ts, const pts_t &start, int direction
 
 void eDVBTSTools::calcBegin()
 {
-       if (!m_file.valid())
+       if (!m_source || !m_source->valid())
                return;
 
        if (!(m_begin_valid || m_futile))
@@ -419,11 +428,10 @@ void eDVBTSTools::calcBegin()
 
 void eDVBTSTools::calcEnd()
 {
-       if (!m_file.valid())
+       if (!m_source || !m_source->valid())
                return;
 
-       eSingleLocker l(m_file_lock);
-       off_t end = m_file.lseek(0, SEEK_END);
+       off_t end = m_source->lseek(0, SEEK_END);
        
        if (llabs(end - m_last_filelength) > 1*1024*1024)
        {
@@ -573,31 +581,28 @@ int eDVBTSTools::takeSample(off_t off, pts_t &p)
 int eDVBTSTools::findPMT(int &pmt_pid, int &service_id)
 {
                /* FIXME: this will be factored out soon! */
-       if (!m_file.valid())
+       if (!m_source || !m_source->valid())
        {
                eDebug(" file not valid");
                return -1;
        }
 
-       eSingleLocker l(m_file_lock);
-       if (m_file.lseek(0, SEEK_SET) < 0)
-       {
-               eDebug("seek failed");
-               return -1;
-       }
+       off_t position=0;
 
        int left = 5*1024*1024;
        
        while (left >= 188)
        {
                unsigned char packet[188];
-               if (m_file.read(packet, 188) != 188)
+               int ret = m_source->read(position, packet, 188);
+               if (ret != 188)
                {
                        eDebug("read error");
                        break;
                }
                left -= 188;
-               
+               position += 188;
+
                if (packet[0] != 0x47)
                {
                        int i = 0;
@@ -605,12 +610,11 @@ int eDVBTSTools::findPMT(int &pmt_pid, int &service_id)
                        {
                                if (packet[i] == 0x47)
                                        break;
+                               --position;
                                ++i;
                        }
-                       m_file.lseek(i - 188, SEEK_CUR);
                        continue;
                }
-               
                int pid = ((packet[1] << 8) | packet[2]) & 0x1FFF;
                
                int pusi = !!(packet[1] & 0x40);
@@ -698,9 +702,26 @@ int eDVBTSTools::findFrame(off_t &_offset, size_t &len, int &direction, int fram
                else if (direction == +1)
                        direction = 0;
        }
-                       /* let's find the next frame after the given offset */
        off_t start = offset;
 
+#if 0
+                       /* backtrack to find the previous sequence start, in case of MPEG2 */
+       if ((data & 0xFF) == 0x00) {
+               do {
+                       --start;
+                       if (m_streaminfo.getStructureEntry(start, data, 0))
+                       {
+                               eDebug("get previous failed");
+                               return -1;
+                       }
+               } while (((data & 0xFF) != 9) && ((data & 0xFF) != 0x00) && ((data & 0xFF) != 0xB3)); /* sequence start or previous frame */
+               if ((data & 0xFF) != 0xB3)
+                       start = offset;  /* Failed to find corresponding sequence start, so never mind */
+       }
+
+#endif
+
+                       /* let's find the next frame after the given offset */
        do {
                if (m_streaminfo.getStructureEntry(offset, data, 1))
                {
@@ -715,9 +736,11 @@ int eDVBTSTools::findFrame(off_t &_offset, size_t &len, int &direction, int fram
 //             eDebug("%08llx@%llx (next)", data, offset);
        } while (((data & 0xFF) != 9) && ((data & 0xFF) != 0x00)); /* next frame */
 
+#if 0
                        /* align to TS pkt&nbs