Skip to content
Browse files

Mega-Merge remote branch 'dream/master' into mm

Conflicts:
	configure.ac
	data/skin_default.xml
	enigma2.bb
	lib/Makefile.am
	lib/base/Makefile.am
	lib/base/filepush.cpp
	lib/base/filepush.h
	lib/components/Makefile.am
	lib/dvb/Makefile.am
	lib/dvb/dvb.cpp
	lib/dvb/pmt.cpp
	lib/dvb/pmt.h
	lib/python/Components/Renderer/Picon.py
	lib/python/Components/UsageConfig.py
	lib/python/Plugins/Extensions/DVDPlayer/plugin.py
	lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py
	lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
	lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py
	lib/python/Screens/ChannelSelection.py
	lib/python/enigma_python.i
	lib/service/servicedvb.cpp
	main/Makefile.am
	main/bsod.cpp
	main/enigma.cpp
	mytest.py
	po/LINGUAS
	po/Makefile.am
  • Loading branch information...
2 parents e5698bb + 0cbccde commit b6cdb3c2c0864518f93e7777f0ddc3ed8721fcb1 Mike Looijmans committed Dec 30, 2010
Showing with 3,484 additions and 16,349 deletions.
  1. +15 −21 .gitignore
  2. +1 −0 COPYING
  3. +7 −5 Makefile.am
  4. +59 −0 README
  5. +0 −112 config.h.in
  6. +83 −61 configure.ac
  7. +1 −1 data/Makefile.am
  8. +3 −2 data/fonts/Makefile.am
  9. BIN data/fonts/tuxtxt.ttf
  10. +6 −0 data/keymaps/Makefile.am
  11. +2 −0 data/keymaps/dream-de.info
  12. BIN data/keymaps/dream-de.kmap
  13. +2 −0 data/keymaps/eng.info
  14. BIN data/keymaps/eng.kmap
  15. +0 −4 debug
  16. +0 −3 debug.gdb
  17. +1 −0 enigma2.bb
  18. +1 −1 include/Makefile.am
  19. +0 −20 lib/Makefile.am
  20. +1 −0 lib/actions/.gitignore
  21. +15 −9 lib/actions/Makefile.am
  22. +1 −0 lib/base/.gitignore
  23. +52 −9 lib/base/Makefile.am
  24. +117 −0 lib/base/eenv.cpp.in
  25. +16 −0 lib/base/eenv.h
  26. +4 −3 lib/base/encoding.cpp
  27. +27 −250 lib/base/filepush.cpp
  28. +7 −12 lib/base/filepush.h
  29. +19 −0 lib/base/itssource.h
  30. +23 −4 lib/base/rawfile.cpp
  31. +10 −5 lib/base/rawfile.h
  32. +13 −3 lib/components/Makefile.am
  33. +33 −4 lib/driver/Makefile.am
  34. +22 −35 lib/driver/rcconsole.cpp
  35. +1 −0 lib/driver/rcconsole.h
  36. +390 −0 lib/driver/rcsdl.cpp
  37. +37 −0 lib/driver/rcsdl.h
  38. +61 −7 lib/dvb/Makefile.am
  39. +8 −7 lib/dvb/db.cpp
  40. +32 −56 lib/dvb/dvb.cpp
  41. +5 −2 lib/dvb/dvb.h
  42. +2 −2 lib/dvb/frontend.cpp
  43. +5 −0 lib/dvb/idvb.h
  44. +2 −1 lib/dvb/lowlevel/Makefile.am
  45. +48 −17 lib/dvb/pmt.cpp
  46. +14 −3 lib/dvb/pmt.h
  47. +4 −2 lib/dvb/scan.cpp
  48. +17 −19 lib/dvb/sec.cpp
  49. +42 −40 lib/dvb/tstools.cpp
  50. +5 −3 lib/dvb/tstools.h
  51. +22 −6 lib/dvb_ci/Makefile.am
  52. +3 −2 lib/dvb_ci/dvbci.cpp
  53. +51 −8 lib/gdi/Makefile.am
  54. +1 −0 lib/gdi/epng.cpp
  55. +1 −15 lib/gdi/gfbdc.cpp
  56. +3 −23 lib/gdi/gfbdc.h
  57. +1 −1 lib/gdi/glcddc.cpp
  58. +1 −1 lib/gdi/glcddc.h
  59. +28 −0 lib/gdi/gmaindc.cpp
  60. +33 −0 lib/gdi/gmaindc.h
  61. +1 −1 lib/gdi/grc.cpp
  62. +5 −5 lib/gdi/grc.h
  63. +11 −4 lib/gdi/lcd.cpp
  64. +2 −1 lib/gdi/picload.cpp
  65. +116 −51 lib/gdi/sdl.cpp
  66. +22 −10 lib/gdi/sdl.h
  67. +45 −7 lib/gui/Makefile.am
  68. +4 −1 lib/gui/ewidgetdesktop.cpp
  69. +9 −3 lib/mmi/Makefile.am
  70. +10 −5 lib/nav/Makefile.am
  71. +2 −0 lib/python/.gitignore
  72. +4 −3 lib/python/Components/Keyboard.py
  73. +3 −2 lib/python/Components/NimManager.py
  74. +2 −1 lib/python/Components/UsageConfig.py
  75. +30 −9 lib/python/Makefile.am
  76. +1 −1 lib/python/Plugins/DemoPlugins/TPMDemo/Makefile.am
  77. +0 −2 lib/python/Plugins/Extensions/DVDPlayer/Makefile.am
  78. +10 −16 lib/python/Plugins/Extensions/DVDPlayer/src/Makefile.am
  79. +5 −1 lib/python/Plugins/Extensions/Makefile.am
  80. +10 −16 lib/python/Plugins/Extensions/SocketMMI/src/Makefile.am
  81. +4 −3 lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py
  82. +3 −3 lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py
  83. +2 −1 lib/python/Plugins/SystemPlugins/SkinSelector/plugin.py
  84. +2 −2 lib/python/Plugins/SystemPlugins/SoftwareManager/BackupRestore.py
  85. +2 −1 lib/python/Plugins/SystemPlugins/SoftwareManager/ImageWizard.py
  86. +35 −15 lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py
  87. +2 −2 lib/python/Plugins/SystemPlugins/TempFanControl/Makefile.am
  88. +2 −2 lib/python/Plugins/SystemPlugins/WirelessLan/plugin.py
  89. +1 −1 lib/python/Plugins/newplugin.py
  90. +2 −2 lib/python/Screens/ChannelSelection.py
  91. +2 −1 lib/python/Screens/Setup.py
  92. +2 −2 lib/python/Screens/Wizard.py
  93. +14 −13 lib/python/Tools/Directories.py
  94. +10 −10 lib/python/Tools/NumericalTextInput.py
  95. +4 −1 lib/python/enigma_python.i
  96. +32 −6 lib/service/Makefile.am
  97. +1 −0 lib/service/iservice.h
  98. +19 −0 lib/service/service.cpp
  99. +2 −0 lib/service/service.h
  100. +26 −9 lib/service/servicedvb.cpp
  101. +3 −1 lib/service/servicedvb.h
  102. +0 −5 lib/service/servicemp3.cpp
  103. +0 −2 lib/service/servicemp3.h
  104. +5 −0 m4/.gitignore
  105. +133 −0 m4/ax_pkg_swig.m4
  106. +53 −0 m4/ax_swig_enable_cxx.m4
  107. +64 −0 m4/ax_swig_python.m4
  108. +0 −134 m4/tuxbox.m4
  109. +2 −1 main/.gitignore
  110. +71 −37 main/Makefile.am
  111. +160 −330 main/bsod.cpp
  112. +5 −4 main/enigma-gdi.cpp
  113. +4 −4 main/enigma-gui.cpp
  114. +37 −42 main/enigma.cpp
  115. +18 −0 main/version_info.cpp
  116. +8 −0 main/version_info.h
  117. +188 −0 main/xmlgenerator.cpp
  118. +43 −0 main/xmlgenerator.h
  119. +2 −1 mytest.py
  120. +2 −0 po/.gitignore
  121. +0 −1 po/LINGUAS
  122. +31 −47 po/Makefile.am
  123. +0 −13,646 po/enigma2.pot
  124. +360 −822 po/et.po
  125. +6 −1 po/fi.po
  126. +11 −12 po/is.po
  127. +410 −261 po/pl.po
  128. +3 −4 po/sv.po
  129. +2 −2 skin.py
  130. +1 −0 tools/.gitignore
  131. +3 −0 tools/Makefile.am
  132. +42 −0 tools/enigma2.sh.in
View
36 .gitignore
@@ -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
View
1 COPYING
@@ -0,0 +1 @@
+See LICENSE.
View
12 Makefile.am
@@ -3,14 +3,16 @@ SUBDIRS = include lib main data po tools
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 GlobalActions.py \
e2reactor.py
-install-exec-hook:
- $(PYTHON) $(srcdir)/tools/genmetaindex.py $(DESTDIR)$(datadir)/meta/plugin_*.xml > $(DESTDIR)$(datadir)/meta/index-enigma2.xml
+metadir = $(datadir)/meta
+meta_DATA = index-enigma2.xml
+CLEANFILES = index-enigma2.xml
+
+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) $^ > $@
View
59 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
+
View
112 config.h.in
@@ -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
View
144 configure.ac
@@ -1,34 +1,64 @@
AC_INIT([enigma2],[2.8.0],[enigma2-devel@lists.elitedvb.net])
-AM_INIT_AUTOMAKE([dist-bzip2 no-define silent-rules])
+AM_INIT_AUTOMAKE([dist-bzip2 no-define tar-pax -Wno-portability])
+AC_CONFIG_HEADERS([enigma2_config.h])
+
+# 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
-TUXBOX_APPS_DIRECTORY
-TUXBOX_APPS_PKGCONFIG
-
AC_PROG_CC
AC_PROG_CXX
-LT_INIT
+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_PATH_PROG(MSGINIT,[msginit])
+AC_PATH_PROG(MSGMERGE,[msgmerge])
+AC_PATH_PROG(MSGUNIQ,[msguniq])
+AC_PATH_PROG(XGETTEXT,[xgettext])
+if test -z "$MSGFMT" -o -z "$MSGINIT" -o -z "$MSGMERGE" -o -z "$MSGUNIQ" -o -z "$XGETTEXT"; then
+ AC_MSG_ERROR([Could not find required gettext tools])
+fi
+
+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(boxtype,
[ --with-boxtype=NAME box type [[none,dm7025,dm800...]]],
[BOXTYPE="$withval"],[BOXTYPE="dm800"])
-
AC_SUBST(BOXTYPE)
AC_DEFINE_UNQUOTED(BOXTYPE,"$BOXTYPE",[box type])
-if test x"$BOXTYPE" == "xdm8000" ; then
- AC_DEFINE(KEY_PLAY_ACTUALLY_IS_KEY_PLAYPAUSE, 1,[define when rc sends a KEY_PLAY event for its KEY_PLAYPAUSE key])
-fi
-
-AC_ARG_WITH(libsdl,
- AS_HELP_STRING([--with-libsdl],[use sdl, yes or no]),
- [[with_sdl=$withval]],
- [[with_sdl=no]]
-)
-
AC_ARG_WITH(textlcd,
AC_HELP_STRING([--with-textlcd], [use ascii based lcd, yes or no]),
[[withtextlcd=$withval]],
@@ -49,52 +79,45 @@ if test x"$withcolorlcd" != xno ; then
fi
AM_CONDITIONAL(HAVE_COLORLCD, test x"$withcolorlcd" != xno)
-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])
+AC_ARG_WITH(libsdl,
+ 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_PATH_PYTHON
-AX_PYTHON_DEVEL
-AX_PTHREAD
-
-TUXBOX_APPS_DVB
-
-PKG_CHECK_MODULES(BASE, [freetype2 fribidi gstreamer-0.10 gstreamer-pbutils-0.10 libdvbsi++ libpng libxml-2.0 sigc++-1.2])
-PKG_CHECK_MODULES(LIBXINE, libxine, HAVE_LIBXINE="yes", HAVE_LIBXINE="no")
-
-AC_CHECK_LIB([dl], [dlopen], [LIBDL_LIBS="-ldl"])
-AC_SUBST(LIBDL_LIBS)
-AC_CHECK_LIB([jpeg], [jpeg_set_defaults])
-AC_CHECK_LIB([xmlccwrap], [exit])
-
-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"])]))
-AC_SUBST(LIBUNGIF_LIBS)
-
-if test "$with_sdl" = "yes" ; then
- PKG_CHECK_MODULES(SDL, sdl)
- AC_DEFINE([WITH_SDL],[1],[Define to 1 if you have libsdl])
+AM_CONDITIONAL(HAVE_LIBSDL, test "$with_libsdl" = "yes")
+
+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")
+
+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
-# allow 'if WITH_SDL' conditionals in Makefile.am
-AM_CONDITIONAL(WITH_SDL, test "$with_sdl" = "yes")
-CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
-CXXFLAGS="$CXXFLAGS $BASE_CFLAGS $LIBUNGIF_CFLAGS $LIBXINE_CFLAGS $PTHREAD_CFLAGS $SDL_CFLAGS -fno-rtti -fno-exceptions -Wall"
-LDFLAGS="$LDFLAGS $BASE_LDFLAGS $PYTHON_LDFLAGS $SDL_LDFLAGS $LIBUNGIF_LDFLAGS $LIBXINE_LDFLAGS"
+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
-#CPPFLAGS="$CPPFLAGS -DMEMLEAK_CHECK"
-CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions -Wall"
+AC_ARG_WITH(po,
+ AS_HELP_STRING([--without-po],[disable updating of po files]),
+ [with_po="$withval"],[with_po="yes"])
+AM_CONDITIONAL(UPDATE_PO, test "$with_po" = "yes")
-TUXBOX_APPS_GETTEXT
+CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
+CXXFLAGS="$CXXFLAGS $BASE_CFLAGS $PTHREAD_CFLAGS $DEBUG_CFLAGS -fno-rtti -fno-exceptions -Wall"
AC_CONFIG_FILES([
Makefile
@@ -106,6 +129,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
@@ -115,6 +139,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
@@ -123,7 +148,6 @@ lib/gdi/Makefile
lib/gui/Makefile
lib/mmi/Makefile
lib/nav/Makefile
-lib/network/Makefile
lib/python/Makefile
lib/python/Components/Makefile
lib/python/Components/Converter/Makefile
@@ -208,9 +232,7 @@ lib/components/Makefile
po/Makefile
main/Makefile
tools/Makefile
+tools/enigma2.sh
enigma2.pc
])
AC_OUTPUT
-
-#lib/python/Plugins/Extensions/SimpleRSS/Makefile
-#lib/python/Plugins/Extensions/FileManager/Makefile
View
2 data/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = countries fonts defaults extensions skin_default
+SUBDIRS = countries fonts defaults extensions keymaps skin_default
dist_pkgdata_DATA = \
defaultsatlists.xml \
View
5 data/fonts/Makefile.am
@@ -1,8 +1,9 @@
-installdir = $(FONTDIR)
+installdir = $(datadir)/fonts
dist_install_DATA = \
ae_AlMateen.ttf \
andale.ttf \
lcd.ttf \
md_khmurabi_10.ttf \
- nmsbd.ttf
+ nmsbd.ttf \
+ tuxtxt.ttf
View
BIN data/fonts/tuxtxt.ttf
Binary file not shown.
View
6 data/keymaps/Makefile.am
@@ -0,0 +1,6 @@
+keymapsdir = $(datadir)/keymaps
+keymaps_DATA = \
+ dream-de.info \
+ dream-de.kmap \
+ eng.info \
+ eng.kmap
View
2 data/keymaps/dream-de.info
@@ -0,0 +1,2 @@
+kmap=dream-de.kmap
+name=Dreambox Keyboard Deutsch
View
BIN data/keymaps/dream-de.kmap
Binary file not shown.
View
2 data/keymaps/eng.info
@@ -0,0 +1,2 @@
+kmap=eng.kmap
+name=Keyboard English
View
BIN data/keymaps/eng.kmap
Binary file not shown.
View
4 debug
@@ -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
-
View
3 debug.gdb
@@ -1,3 +0,0 @@
-set solib-absolute-prefix /home/tmbinc/mips/target
-target remote 10.0.0.203:1234
-continue
View
1 enigma2.bb
@@ -48,6 +48,7 @@ RRECOMMENDS_${PN} = "${@["","gst-plugin-dtsdec"][bb.data.getVar("TARGET_FPU",d,1
DESCRIPTION_append_enigma2-plugin-extensions-cutlisteditor = "enables you to cut your movies."
RDEPENDS_enigma2-plugin-extensions-cutlisteditor = "aio-grab"
+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."
View
2 include/Makefile.am
@@ -1,3 +1,3 @@
-EXTRA_DIST = \
+pkginclude_HEADERS = \
connection.h \
libsig_comp.h
View
20 lib/Makefile.am
@@ -1,21 +1 @@
SUBDIRS = actions base components dvb dvb_ci gdi service driver nav gui python mmi
-#PLi changes:
-SUBDIRS += network
-
-noinst_LTLIBRARIES = libenigma.la
-
-libenigma_la_SOURCES =
-libenigma_la_LIBADD = \
- $(top_builddir)/lib/actions/libenigma_actions.la \
- $(top_builddir)/lib/base/libenigma_base.la \
- $(top_builddir)/lib/components/libenigma_components.la \
- $(top_builddir)/lib/driver/libenigma_driver.la \
- $(top_builddir)/lib/mmi/libenigma_mmi.la \
- $(top_builddir)/lib/dvb/libenigma_dvb.la \
- $(top_builddir)/lib/dvb_ci/libenigma_dvb_ci.la \
- $(top_builddir)/lib/gdi/libenigma_gdi.la \
- $(top_builddir)/lib/gui/libenigma_gui.la \
- $(top_builddir)/lib/python/libenigma_python.la \
- $(top_builddir)/lib/nav/libenigma_nav.la \
- $(top_builddir)/lib/service/libenigma_service.la \
- $(top_builddir)/lib/network/libenigma_network.la
View
1 lib/actions/.gitignore
@@ -0,0 +1 @@
+actionids.h
View
24 lib/actions/Makefile.am
@@ -1,21 +1,27 @@
AM_CPPFLAGS = \
-I$(top_builddir) \
+ -I$(top_srcdir) \
-I$(top_srcdir)/include \
- -include Python.h
+ -include Python.h \
+ -include $(top_builddir)/enigma2_config.h
EXTRA_DIST = parseactions.py
-noinst_LTLIBRARIES = libenigma_actions.la
+noinst_LIBRARIES = libenigma_actions.a
-libenigma_actions_la_SOURCES = \
- action.cpp \
+libenigma_actions_a_SOURCES = \
+ action.cpp
+
+actionsincludedir = $(pkgincludedir)/lib/actions
+actionsinclude_HEADERS = \
action.h
+nodist_actionsinclude_HEADERS = \
+ actionids.h
+
BUILT_SOURCES = actionids.h
CLEANFILES = actionids.h
-action.cpp: actionids.h
-
-actionids.h: $(top_srcdir)/lib/gui/*.h
- $(PYTHON) $(srcdir)/parseactions.py include $(top_srcdir)/lib/gui/*.h > $@
- $(PYTHON) $(srcdir)/parseactions.py parse $(top_srcdir)/lib/gui/*.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 >> $@
View
1 lib/base/.gitignore
@@ -0,0 +1 @@
+eenv.cpp
View
61 lib/base/Makefile.am
@@ -1,14 +1,57 @@
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
- -include Python.h
+ -include Python.h \
+ -include $(top_builddir)/enigma2_config.h
-noinst_LTLIBRARIES = libenigma_base.la
+noinst_LIBRARIES = libenigma_base.a
-libenigma_base_la_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 \
- freesatv2.cpp
+libenigma_base_a_SOURCES = \
+ buffer.cpp \
+ connection.cpp \
+ console.cpp \
+ ebase.cpp \
+ eenv.cpp \
+ eerror.cpp \
+ elock.cpp \
+ encoding.cpp \
+ estring.cpp \
+ etpm.cpp \
+ filepush.cpp \
+ freesatv2.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
View
117 lib/base/eenv.cpp.in
@@ -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;
+}
View
16 lib/base/eenv.h
@@ -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
View
7 lib/base/encoding.cpp
@@ -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)
View
277 lib/base/filepush.cpp
@@ -4,8 +4,6 @@
#include <errno.h>
#include <fcntl.h>
#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <netdb.h>
//#define SHOW_WRITE_TIME
@@ -40,7 +38,6 @@ void setFlushSize(int size)
eFilePushThread::eFilePushThread(int io_prio_class, int io_prio_level, int blocksize, size_t buffersize)
:prio_class(io_prio_class),
prio(io_prio_level),
- streamFd(-1),
m_sg(NULL),
m_stop(0),
m_buf_start(0),
@@ -58,191 +55,20 @@ eFilePushThread::eFilePushThread(int io_prio_class, int io_prio_level, int block
eFilePushThread::~eFilePushThread()
{
- if (streamFd >= 0) ::close(streamFd);
free(m_buffer);
}
static void signal_handler(int x)
{
}
-int eFilePushThread::connectStream(std::string &url)
-{
- std::string host;
- int port = 80;
- std::string uri;
-
- int slash = url.find("/", 7);
- if (slash > 0)
- {
- host = url.substr(7, slash - 7);
- uri = url.substr(slash, url.length() - slash);
- }
- else
- {
- host = url.substr(7, url.length() - 7);
- uri = "";
- }
- int dp = host.find(":");
- if (dp == 0)
- {
- port = atoi(host.substr(1, host.length() - 1).c_str());
- host = "localhost";
- }
- else if (dp > 0)
- {
- port = atoi(host.substr(dp + 1, host.length() - dp - 1).c_str());
- host = host.substr(0, dp);
- }
-
- struct hostent* h = gethostbyname(host.c_str());
- if (h == NULL || h->h_addr_list == NULL) return -1;
- int fd = socket(PF_INET, SOCK_STREAM, 0);
- if (fd == -1) return -1;
-
- struct sockaddr_in addr;
- addr.sin_family = AF_INET;
- addr.sin_addr.s_addr = *((in_addr_t*)h->h_addr_list[0]);
- addr.sin_port = htons(port);
-
- eDebug("connecting to %s", url.c_str());
-
- if (::connect(fd, (sockaddr*)&addr, sizeof(addr)) == -1)
- {
- ::close(fd);
- std::string msg = "connect failed for: " + url;
- eDebug(msg.c_str());
- return -1;
- }
-
- std::string request = "GET ";
- request.append(uri).append(" HTTP/1.1\n");
- request.append("Host: ").append(host).append("\n");
- request.append("Accept: */*\n");
- request.append("Connection: close\n");
- request.append("\n");
- socketWrite(fd, request.c_str(), request.length());
-
- char linebuf[1024] = {0};
- if (timedSocketRead(fd, linebuf, sizeof(linebuf) - 1, 5000) <= 0)
- {
- ::close(fd);
- eDebug("read timeout");
- return -1;
- }
-
- char proto[100];
- int statuscode = 0;
- char statusmsg[100];
- int rc = sscanf(linebuf, "%99s %d %99s", proto, &statuscode, statusmsg);
- if (rc != 3 || statuscode != 200)
- {
- eDebug("wrong response: \"200 OK\" expected.\n %d --- %d", rc, statuscode);
- ::close(fd);
- return -1;
- }
-
- return fd;
-}
-
-ssize_t eFilePushThread::socketRead(int fd, void *buf, size_t count)
-{
- int retval;
- while (1)
- {
- retval = ::read(fd, buf, count);
- if (retval < 0)
- {
- if (errno == EINTR)
- {
- if (m_stop) return -1;
- continue;
- }
- eDebug("eFilePushThread::socketRead %m");
- }
- return retval;
- }
-}
-
-ssize_t eFilePushThread::timedSocketRead(int fd, void *data, size_t size, int msinitial, int msinterbyte)
-{
- fd_set rset;
- struct timeval timeout;
- int result;
- size_t totalread = 0;
-
- while (totalread < size)
- {
- int maxfd = 0;
- FD_ZERO(&rset);
- FD_SET(fd, &rset);
- maxfd = fd + 1;
- if (totalread == 0)
- {
- timeout.tv_sec = msinitial/1000;
- timeout.tv_usec = (msinitial%1000) * 1000;
- }
- else
- {
- timeout.tv_sec = msinterbyte/1000;
- timeout.tv_usec = (msinterbyte%1000) * 1000;
- }
- result = ::select(maxfd, &rset, NULL, NULL, &timeout);
- if (result < 0)
- {
- if (errno == EINTR)
- {
- if (m_stop) return -1;
- continue;
- }
- return -1;
- }
- if (result == 0) break;
- if ((result = socketRead(fd, ((char*)data) + totalread, size - totalread)) < 0)
- {
- return -1;
- }
- if (result == 0) break;
- totalread += result;
- }
- return totalread;
-}
-
-ssize_t eFilePushThread::socketWrite(int fd, const void *buf, size_t count)
-{
- int retval;
- char *ptr = (char*)buf;
- size_t handledcount = 0;
- while (handledcount < count)
- {
- retval = ::write(fd, &ptr[handledcount], count - handledcount);
-
- if (retval == 0) return -1;
- if (retval < 0)
- {
- if (errno == EINTR)
- {
- if (m_stop) return -1;
- continue;
- }
- eDebug("eFilePushThread::socketWrite %m");
- return retval;
- }
- handledcount += retval;
- }
- return handledcount;
-}
-
void eFilePushThread::thread()
{
- if (m_raw_source.valid()) setIoPrio(prio_class, prio);
+ setIoPrio(prio_class, prio);
- off_t source_pos = 0;
size_t bytes_read = 0;
-
off_t current_span_offset = 0;
size_t current_span_remaining = 0;
-
off_t offset_last_sync = 0;
size_t written_since_last_sync = 0;
@@ -256,19 +82,6 @@ void eFilePushThread::thread()
hasStarted();
- if (m_raw_source.valid()) source_pos = m_raw_source.lseek(0, SEEK_CUR);
-
- if (streamFd >= 0)
- {
- ::close(streamFd);
- streamFd = -1;
- }
- if (!streamUrl.empty())
- {
- streamFd = connectStream(streamUrl);
- if (streamFd < 0) return;
- }
-
/* m_stop must be evaluated after each syscall. */
while (!m_stop)
{
@@ -385,41 +198,30 @@ void eFilePushThread::thread()
}
/* now fill our buffer. */
-
- if (m_raw_source.valid() && m_sg && !current_span_remaining)
+
+ 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 = m_buffersize;
/* if we have a source span, don't read past the end */
- if (m_raw_source.valid() && m_sg && maxread > current_span_remaining)
+ if (m_sg && maxread > current_span_remaining)
maxread = current_span_remaining;
/* align to blocksize */
- if (m_raw_source.valid()) maxread -= maxread % m_blocksize;
+ maxread -= maxread % m_blocksize;
m_buf_start = 0;
m_filter_end = 0;
m_buf_end = 0;
-
+
if (maxread)
- {
- if (m_raw_source.valid())
- {
- m_buf_end = m_raw_source.read(m_buffer, maxread);
- }
- else if (streamFd)
- {
- m_buf_end = timedSocketRead(streamFd, m_buffer, maxread, 15000);
- }
- }
+ m_buf_end = m_source->read(m_current_position, m_buffer, maxread);
if (m_buf_end < 0)
{
@@ -434,16 +236,10 @@ void eFilePushThread::thread()
eDebug("eFilePushThread *read error* (%m) - not yet handled");
}
- if (m_raw_source.valid())
- {
/* 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;
- }
- }
+ int d = m_buf_end % m_blocksize;
+ if (d)
+ m_buf_end -= d;
if (m_buf_end == 0)
{
@@ -479,18 +275,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;
@@ -502,35 +290,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 (!strncmp(filename, "http://", 7))
- {
- streamUrl = filename;
- }
- else
- {
- if (m_raw_source.open(filename) < 0)
- return -1;
- }
- m_fd_dest = fd_dest;
- resume();
+ eRawFile *f = new eRawFile();
+ ePtr<iTsSource> source = f;
+ if (f->open(file) < 0)
+ return -1;
+ start(source, fd_dest);
return 0;
}
-int eFilePushThread::startUrl(const char *url, int fd_dest)
+void eFilePushThread::start(ePtr<iTsSource> &source, int fd_dest)
{
- streamUrl = url;
+ m_source = source;
m_fd_dest = fd_dest;
+ m_current_position = 0;
resume();
- return 0;
}
void eFilePushThread::stop()
@@ -551,12 +334,6 @@ void eFilePushThread::pause()
stop();
}
-void eFilePushThread::seek(int whence, off_t where)
-{
- if (!m_raw_source.valid()) return;
- m_raw_source.lseek(where, whence);
-}
-
void eFilePushThread::resume()
{
m_stop = 0;
View
19 lib/base/filepush.h
@@ -18,24 +18,17 @@ class iFilePushScatterGather
class eFilePushThread: public eThread, public Object
{
int prio_class, prio;
- std::string streamUrl;
- int streamFd;
- int connectStream(std::string &url);
- ssize_t socketRead(int fd, void *buf, size_t count);
- ssize_t timedSocketRead(int fd, void *data, size_t size, int msinitial, int msinterbyte = 200);
- ssize_t socketWrite(int fd, const void *buf, size_t count);
-
public:
eFilePushThread(int prio_class=IOPRIO_CLASS_BE, int prio_level=0, int blocksize=188, size_t buffersize=188*1024);
~eFilePushThread();
void thread();
void stop();
void start(int sourcefd, int destfd);
int start(const char *filename, int destfd);
- int startUrl(const char *url, int destfd);
-
+
+ void start(ePtr<iTsSource> &source, int destfd);
+
void pause();
- void seek(int whence, off_t where);
void resume();
/* flushes the internal readbuffer */
@@ -67,10 +60,12 @@ class eFilePushThread: public eThread, public Object
int m_blocksize;
size_t m_buffersize;
unsigned char* m_buffer;
+ off_t m_current_position;
+
+ ePtr<iTsSource> m_source;
- eRawFile m_raw_source;
eFixedMessagePump<int> m_messagepump;
-
+
void recvEvent(const int &evt);
};
View
19 lib/base/itssource.h
@@ -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
View
27 lib/base/rawfile.cpp
@@ -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);
}
}
@@ -104,11 +115,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)
View
15 lib/base/rawfile.h
@@ -2,31 +2,36 @@
#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;
int m_nrfiles;
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);
};
View
16 lib/components/Makefile.am
@@ -1,8 +1,18 @@
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
- -include Python.h
+ -include Python.h \
+ -include $(top_builddir)/enigma2_config.h
-noinst_LTLIBRARIES = libenigma_components.la
+noinst_LIBRARIES = libenigma_components.a
-libenigma_components_la_SOURCES = scan.cpp file_eraser.cpp tuxtxtapp.cpp
+libenigma_components_a_SOURCES = \
+ file_eraser.cpp \
+ scan.cpp \
+ tuxtxtapp.cpp
+
+
+componentsincludedir = $(pkgincludedir)/lib/components
+componentsinclude_HEADERS = \
+ file_eraser.h \
+ scan.h
View
37 lib/driver/Makefile.am
@@ -1,9 +1,38 @@
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
- -include Python.h
+ -include Python.h \
+ -include $(top_builddir)/enigma2_config.h
-noinst_LTLIBRARIES = libenigma_driver.la
+AM_CXXFLAGS = \
+ $(LIBSDL_CFLAGS)
-libenigma_driver_la_SOURCES = \
- rc.cpp rcinput.cpp rcconsole.cpp avswitch.cpp rfmod.cpp etimezone.cpp misc_options.cpp
+noinst_LIBRARIES = libenigma_driver.a
+
+libenigma_driver_a_SOURCES = \
+ 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
View
57 lib/driver/rcconsole.cpp
@@ -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);
+ }
}
}
View
1 lib/driver/rcconsole.h
@@ -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);
View
390 lib/driver/rcsdl.cpp
@@ -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");
View
37 lib/driver/rcsdl.h
@@ -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
View
68 lib/dvb/Makefile.am
@@ -3,12 +3,66 @@ SUBDIRS = lowlevel
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/include \
- -include Python.h
+ -include Python.h \
+ -include $(top_builddir)/enigma2_config.h
-noinst_LTLIBRARIES = libenigma_dvb.la
+noinst_LIBRARIES = libenigma_dvb.a
-libenigma_dvb_la_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 cahandler.cpp \
- fastscan.cpp cablescan.cpp
+libenigma_dvb_a_SOURCES = \
+ cablescan.cpp \
+ crc32.cpp \
+ db.cpp \
+ decoder.cpp \
+ demux.cpp \
+ dvb.cpp \
+ dvbtime.cpp \
+ eit.cpp \
+ epgcache.cpp \
+ esection.cpp \
+ fastscan.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 = \
+ cablescan.h \
+ crc32.h \
+ db.h \
+ decoder.h \
+ demux.h \
+ dvb.h \
+ dvbtime.h \
+ eit.h \
+ epgcache.h \
+ esection.h \
+ fastscan.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
View
15 lib/dvb/db.cpp
@@ -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) )
{