To use the update apply the patch in /usr/ports, stop vdr, then run: portmaster vdr-plugins and if you use vdradmin-am stop that too and run: portmaster vdradmin-am If you want to know what has changed since vdr 1.7.19 see the vdr release announce postings, the one for 1.7.22 is here: http://article.gmane.org/gmane.linux.vdr/45287 The one for vdr 1.7.21: http://article.gmane.org/gmane.linux.vdr/45033 The one for vdr 1.7.20: http://article.gmane.org/gmane.linux.vdr/44878 The changes are also listed in: /usr/local/share/doc/vdr/HISTORY (after the update) Further notes: - svdrsend.pl is now called svdrsend. - The ttxtsubs channels.conf format has changed so if you use that plugin you need to edit /usr/local/etc/vdr/channels.conf for the channels you want to receive teletext subtitles on - see: /usr/local/share/doc/vdr-plugin-ttxtsubs/HISTORY Index: multimedia/vdr/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr/Makefile,v retrieving revision 1.11 diff -u -p -r1.11 Makefile --- multimedia/vdr/Makefile 10 Dec 2011 17:14:43 -0000 1.11 +++ multimedia/vdr/Makefile 2 Jan 2012 18:54:09 -0000 @@ -6,8 +6,7 @@ # PORTNAME= vdr -PORTVERSION= 1.7.19 -PORTREVISION= 3 +PORTVERSION= 1.7.22 CATEGORIES= multimedia MASTER_SITES= ftp://ftp.tvdr.de/vdr/Developer/ @@ -27,7 +26,7 @@ USE_BZIP2= yes USE_GMAKE= yes USE_GNOME+= pkgconfig USE_GETTEXT= yes -PORTDOCS= COPYING INSTALL MANUAL README +PORTDOCS= COPYING INSTALL MANUAL README HISTORY MAKE_JOBS_SAFE= yes MAN1= vdr.1 MAN5= vdr.5 @@ -74,24 +73,21 @@ ALL_TARGET= vdr plugins .endif post-patch: -# avoid a bug found post-release by reverting parts of the 1.7.19 update -# thread: -# http://thread.gmane.org/gmane.linux.vdr/44724/focus=44729 - @${PATCH} -d ${WRKSRC} --quiet -p1 -R <${FILESDIR}/vdr-1.7.18-1.7.19-tspacketbug.diff # clang doesn't know -MG: @${REINPLACE_CMD} '/^MAKEDEP.*-MM/s/-MG[[:space:]]*$$/# -MG/' \ ${WRKSRC}/Makefile ${WRKSRC}/libsi/Makefile \ ${WRKSRC}/PLUGINS/src/*/Makefile .if defined(WITH_TTXPATCH) - @${PATCH} -d ${WRKSRC} --quiet -p1 <${FILESDIR}/vdr-1.7.15-ttxtsubs.patch-1 - @${PATCH} -d ${WRKSRC} --quiet -p1 <${FILESDIR}/vdr-1.7.15-ttxtsubs.patch-2 - @${PATCH} -d ${WRKSRC} --quiet -p1 <${FILESDIR}/vdr-1.7.19-ttxtsubs.patch-3 + @${PATCH} -d ${WRKSRC} --quiet -p1 <${FILESDIR}/vdr-1.7.21-ttxtsubs.patch-1 + @${PATCH} -d ${WRKSRC} --quiet -p1 <${FILESDIR}/vdr-1.7.21-ttxtsubs.patch-2 .endif @${SED} 's|^\(VIDEODIR[[:space:]]*\)[?]*\(=[[:space:]]*\).*|\1\2${VIDEODIR}|' \ ${WRKSRC}/Make.config.template >${WRKSRC}/Make.config @${REINPLACE_CMD} -e 's|%%CONFDIR%%|${CONFDIR}|' ${WRKSRC}/vdr.1 # We don't support this yet: @${RM} -r ${WRKSRC}/PLUGINS/src/dvbhddevice +# upstream bug: + @${CP} ${WRKSRC}/svdrpsend.pl ${WRKSRC}/svdrpsend post-install: .if !defined(WITHOUT_NLS) Index: multimedia/vdr/distinfo =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr/distinfo,v retrieving revision 1.3 diff -u -p -r1.3 distinfo --- multimedia/vdr/distinfo 25 Jun 2011 19:02:04 -0000 1.3 +++ multimedia/vdr/distinfo 2 Jan 2012 18:31:44 -0000 @@ -1,2 +1,2 @@ -SHA256 (vdr/vdr-1.7.19.tar.bz2) = 25481ac1fdc01fbed4e8bde6436346bb919c966aff4da0d67b5cc13318e6039e -SIZE (vdr/vdr-1.7.19.tar.bz2) = 717625 +SHA256 (vdr/vdr-1.7.22.tar.bz2) = 73c36058400bc86b8b5aaaf5de0989551e4e6fc052157bebd180bfac4af7f628 +SIZE (vdr/vdr-1.7.22.tar.bz2) = 757800 Index: multimedia/vdr/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr/pkg-plist,v retrieving revision 1.4 diff -u -p -r1.4 pkg-plist --- multimedia/vdr/pkg-plist 25 Jun 2011 19:02:04 -0000 1.4 +++ multimedia/vdr/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,14 +1,15 @@ -bin/svdrpsend.pl +bin/svdrpsend bin/vdr -lib/vdr/libvdr-dvbsddevice.so.1.7.19 -lib/vdr/libvdr-svcsvr.so.1.7.19 -lib/vdr/libvdr-svccli.so.1.7.19 -lib/vdr/libvdr-status.so.1.7.19 -lib/vdr/libvdr-skincurses.so.1.7.19 -lib/vdr/libvdr-pictures.so.1.7.19 -lib/vdr/libvdr-osddemo.so.1.7.19 -lib/vdr/libvdr-hello.so.1.7.19 -lib/vdr/libvdr-svdrpdemo.so.1.7.19 +lib/vdr/libvdr-dvbsddevice.so.1.7.22 +lib/vdr/libvdr-svcsvr.so.1.7.22 +lib/vdr/libvdr-svccli.so.1.7.22 +lib/vdr/libvdr-status.so.1.7.22 +lib/vdr/libvdr-skincurses.so.1.7.22 +lib/vdr/libvdr-pictures.so.1.7.22 +lib/vdr/libvdr-osddemo.so.1.7.22 +lib/vdr/libvdr-hello.so.1.7.22 +lib/vdr/libvdr-svdrpdemo.so.1.7.22 +libdata/pkgconfig/vdr.pc %%NLS%%share/locale/ar/LC_MESSAGES/vdr.mo %%NLS%%share/locale/es_ES/LC_MESSAGES/vdr.mo %%NLS%%share/locale/es_ES/LC_MESSAGES/vdr-hello.mo @@ -149,6 +150,9 @@ etc/vdr/diseqc.conf.sample @unexec if cmp -s %D/etc/vdr/keymacros.conf.sample %D/etc/vdr/keymacros.conf; then rm -f %D/etc/vdr/keymacros.conf; fi etc/vdr/keymacros.conf.sample @exec if [ ! -f %D/etc/vdr/keymacros.conf ] ; then cp -p %D/%F %B/keymacros.conf; fi +@unexec if cmp -s %D/etc/vdr/scr.conf.sample %D/etc/vdr/scr.conf; then rm -f %D/etc/vdr/scr.conf; fi +etc/vdr/scr.conf.sample +@exec if [ ! -f %D/etc/vdr/scr.conf ] ; then cp -p %D/%F %B/scr.conf; fi @unexec if cmp -s %D/etc/vdr/sources.conf.sample %D/etc/vdr/sources.conf; then rm -f %D/etc/vdr/sources.conf; fi etc/vdr/sources.conf.sample @exec if [ ! -f %D/etc/vdr/sources.conf ] ; then cp -p %D/%F %B/sources.conf; fi Index: multimedia/vdr/files/patch-PLUGINS-src-dvbsddevice-dvbsddevice.c =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr/files/patch-PLUGINS-src-dvbsddevice-dvbsddevice.c,v retrieving revision 1.1 diff -u -p -r1.1 patch-PLUGINS-src-dvbsddevice-dvbsddevice.c --- multimedia/vdr/files/patch-PLUGINS-src-dvbsddevice-dvbsddevice.c 26 Mar 2011 19:13:50 -0000 1.1 +++ multimedia/vdr/files/patch-PLUGINS-src-dvbsddevice-dvbsddevice.c 2 Jan 2012 18:31:44 -0000 @@ -1,10 +0,0 @@ ---- PLUGINS/src/dvbsddevice/dvbsddevice.c.orig -+++ PLUGINS/src/dvbsddevice/dvbsddevice.c -@@ -6,6 +6,7 @@ - * $Id: dvbsddevice.c 1.3 2010/01/30 10:05:42 kls Exp $ - */ - -+#include - #include - #include "dvbsdffdevice.h" - Index: multimedia/vdr/files/patch-diseqc.c =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr/files/patch-diseqc.c,v retrieving revision 1.1 diff -u -p -r1.1 patch-diseqc.c --- multimedia/vdr/files/patch-diseqc.c 20 Aug 2011 19:45:34 -0000 1.1 +++ multimedia/vdr/files/patch-diseqc.c 2 Jan 2012 18:31:44 -0000 @@ -1,11 +0,0 @@ ---- diseqc.c.orig -+++ diseqc.c -@@ -108,7 +108,7 @@ const char *cDiseqc::Codes(const char *s - errno = 0; - int n = strtol(t, &p, 16); - if (!errno && p != t && 0 <= n && n <= 255) { -- if (parsing) { -+ if (!parsing) { - codes[NumCodes++] = uchar(n); - numCodes = NumCodes; - } Index: multimedia/vdr/files/patch-initialchannel =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr/files/patch-initialchannel,v retrieving revision 1.1 diff -u -p -r1.1 patch-initialchannel --- multimedia/vdr/files/patch-initialchannel 10 Dec 2011 17:14:43 -0000 1.1 +++ multimedia/vdr/files/patch-initialchannel 2 Jan 2012 18:31:44 -0000 @@ -1,33 +0,0 @@ ---- config.c.orig -+++ config.c -@@ -399,7 +399,7 @@ cSetup::cSetup(void) - CurrentChannel = -1; - CurrentVolume = MAXVOLUME; - CurrentDolby = 0; -- // InitialChannel is initialized by constructor -+ InitialChannel = ""; - InitialVolume = -1; - ChannelsWrap = 0; - EmergencyExit = 1; ---- vdr.c.orig -+++ vdr.c -@@ -735,12 +723,14 @@ int main(int argc, char *argv[]) - - if (!cDevice::WaitForAllDevicesReady(DEVICEREADYTIMEOUT)) - dsyslog("not all devices ready after %d seconds", DEVICEREADYTIMEOUT); -- if (isnumber(Setup.InitialChannel)) { // for compatibility with old setup.conf files -- if (cChannel *Channel = Channels.GetByNumber(atoi(Setup.InitialChannel))) -- Setup.InitialChannel = Channel->GetChannelID().ToString(); -+ if (*Setup.InitialChannel) { -+ if (isnumber(Setup.InitialChannel)) { // for compatibility with old setup.conf files -+ if (cChannel *Channel = Channels.GetByNumber(atoi(Setup.InitialChannel))) -+ Setup.InitialChannel = Channel->GetChannelID().ToString(); -+ } -+ if (cChannel *Channel = Channels.GetByChannelID(tChannelID::FromString(Setup.InitialChannel))) -+ Setup.CurrentChannel = Channel->Number(); - } -- if (cChannel *Channel = Channels.GetByChannelID(tChannelID::FromString(Setup.InitialChannel))) -- Setup.CurrentChannel = Channel->Number(); - if (Setup.InitialVolume >= 0) - Setup.CurrentVolume = Setup.InitialVolume; - Channels.SwitchTo(Setup.CurrentChannel); Index: multimedia/vdr/files/patch-vdr-1.7.18_FreeBSD =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr/files/patch-vdr-1.7.18_FreeBSD,v retrieving revision 1.2 diff -u -p -r1.2 patch-vdr-1.7.18_FreeBSD --- multimedia/vdr/files/patch-vdr-1.7.18_FreeBSD 15 Jul 2011 22:37:00 -0000 1.2 +++ multimedia/vdr/files/patch-vdr-1.7.18_FreeBSD 2 Jan 2012 18:31:44 -0000 @@ -1,1243 +0,0 @@ -Index: Make.config.template -=================================================================== -RCS file: /progs/network/ccvs/vdr/Make.config.template,v -retrieving revision 1.1.1.3 -retrieving revision 1.5 -diff -u -r1.1.1.3 -r1.5 ---- Make.config.template 2010/03/01 09:42:48 1.1.1.3 -+++ Make.config.template 2010/03/01 09:58:06 1.5 -@@ -8,6 +8,11 @@ - # - # $Id: Make.config.template 2.2 2010/02/06 14:50:03 kls Exp $ - -+OSTYPE ?= $(shell uname -s) -+ifeq ($(OSTYPE),FreeBSD) -+FREEBSD=1 -+endif -+ - ### The C compiler and options: - - CC = gcc -@@ -23,20 +28,35 @@ - - ### The directory environment: - --#DVBDIR = /usr/src/v4l-dvb/linux --MANDIR = /usr/local/man --BINDIR = /usr/local/bin -+PREFIX = /usr/local -+MANDIR = $(PREFIX)/man -+BINDIR = $(PREFIX)/bin - --LOCDIR = ./locale - PLUGINDIR= ./PLUGINS --PLUGINLIBDIR= $(PLUGINDIR)/lib - VIDEODIR = /video -+ -+ifdef FREEBSD -+# you have to set DVBDIR to a valid path!!! -+# you will need extra patches for DVBDIR!!! -+DVBDIR = /usr/src/v4l-dvb/linux -+LOCDIR = $(PREFIX)/share/locale -+CONFDIR = $(PREFIX)/etc/vdr -+PLUGINLIBDIR= $(PREFIX)/lib/vdr -+else -+#DVBDIR = /usr/src/v4l-dvb/linux -+LOCDIR = ./locale - CONFDIR = $(VIDEODIR) -+PLUGINLIBDIR= $(PLUGINDIR)/lib -+endif - - ### The remote control: - - LIRC_DEVICE = /dev/lircd -+ifdef FREEBSD -+RCU_DEVICE = /dev/cuau0 -+else - RCU_DEVICE = /dev/ttyS1 -+endif - - ## Define if you want vdr to not run as root - #VDR_USER = vdr -@@ -45,4 +65,8 @@ - - ifdef DVBDIR - INCLUDES += -I$(DVBDIR)/include -+endif -+ -+ifdef FREEBSD -+INCLUDES += -I/usr/local/include - endif -Index: Makefile -@@ -8,6 +8,11 @@ - - .DELETE_ON_ERROR: - -+OSTYPE ?= $(shell uname -s) -+ifeq ($(OSTYPE),FreeBSD) -+FREEBSD=1 -+endif -+ - CC ?= gcc - CFLAGS ?= -g -O3 -Wall - -@@ -21,7 +26,11 @@ MANDIR = $(PREFIX)/share/man - BINDIR = $(PREFIX)/bin - INCDIR = $(PREFIX)/include - LOCDIR = ./locale -+ifdef FREEBSD -+LIBS = -ljpeg -lpthread -lrt $(shell pkg-config --libs freetype2 fontconfig) -liconv -lintl -lutil -+else - LIBS = -ljpeg -lpthread -ldl -lcap -lrt $(shell pkg-config --libs freetype2 fontconfig) -+endif - INCLUDES ?= $(shell pkg-config --cflags freetype2 fontconfig) - - PLUGINDIR= ./PLUGINS -@@ -130,7 +139,11 @@ i18n: $(I18Nmsgs) - - install-i18n: - @mkdir -p $(DESTDIR)$(LOCDIR) -+ifdef FREEBSD -+ @(cd $(LOCALEDIR); cp -R * $(DESTDIR)$(LOCDIR)) -+else - @(cd $(LOCALEDIR); cp -r --parents * $(DESTDIR)$(LOCDIR)) -+endif - - # The 'include' directory (for plugins): - -@@ -169,7 +182,11 @@ install: install-bin install-conf instal - - install-bin: vdr - @mkdir -p $(DESTDIR)$(BINDIR) -+ifdef FREEBSD -+ @cp -f vdr svdrpsend.pl $(DESTDIR)$(BINDIR) -+else - @cp --remove-destination vdr svdrpsend.pl $(DESTDIR)$(BINDIR) -+endif - - # Configuration files: - -@@ -192,13 +209,18 @@ install-doc: - - install-plugins: plugins - @mkdir -p $(DESTDIR)$(PLUGINLIBDIR) -+ifdef FREEBSD -+ @cp -f $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION) $(DESTDIR)$(PLUGINLIBDIR) -+else - @cp --remove-destination $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION) $(DESTDIR)$(PLUGINLIBDIR) -+endif - - # Includes: - - install-includes: include-dir - @mkdir -p $(DESTDIR)$(INCDIR) - @cp -pLR include/vdr include/libsi $(DESTDIR)$(INCDIR) -+ @cp Make.config Make.global $(DESTDIR)$(INCDIR)/vdr - - # Source documentation: - -Index: channels.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/channels.c,v -retrieving revision 1.1.1.5 -retrieving revision 1.6 -diff -u -r1.1.1.5 -r1.6 ---- channels.c 2010/06/07 09:07:28 1.1.1.5 -+++ channels.c 2010/06/07 09:12:57 1.6 -@@ -29,7 +29,12 @@ - int tid; - int sid; - int rid = 0; -+#ifdef __FreeBSD__ -+ sourcebuf = MALLOC(char, 10); -+ int fields = sscanf(s, "%9[^-]-%d-%d-%d-%d", sourcebuf, &nid, &tid, &sid, &rid); -+#else - int fields = sscanf(s, "%a[^-]-%d-%d-%d-%d", &sourcebuf, &nid, &tid, &sid, &rid); -+#endif - if (fields == 4 || fields == 5) { - int source = cSource::FromString(sourcebuf); - free(sourcebuf); -@@ -543,7 +548,17 @@ - char *vpidbuf = NULL; - char *apidbuf = NULL; - char *caidbuf = NULL; -+#ifdef __FreeBSD__ -+ namebuf = MALLOC(char, 256); -+ sourcebuf = MALLOC(char, 10); -+ parambuf = MALLOC(char, 256); -+ vpidbuf = MALLOC(char, 256); -+ apidbuf = MALLOC(char, 256); -+ caidbuf = MALLOC(char, 256); -+ int fields = sscanf(s, "%255[^:]:%d :%255[^:]:%9[^:] :%d :%255[^:]:%255[^:]:%d :%255[^:]:%d :%d :%d :%d ", namebuf, &frequency, parambuf, sourcebuf, &srate, vpidbuf, apidbuf, &tpid, caidbuf, &sid, &nid, &tid, &rid); -+#else - int fields = sscanf(s, "%a[^:]:%d :%a[^:]:%a[^:] :%d :%a[^:]:%a[^:]:%d :%a[^:]:%d :%d :%d :%d ", &namebuf, &frequency, ¶mbuf, &sourcebuf, &srate, &vpidbuf, &apidbuf, &tpid, &caidbuf, &sid, &nid, &tid, &rid); -+#endif - if (fields >= 9) { - if (fields == 9) { - // allow reading of old format -Index: ci.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/ci.c,v -retrieving revision 1.1.1.2 -retrieving revision 1.3 -diff -u -r1.1.1.2 -r1.3 ---- ci.c 2010/02/17 10:14:44 1.1.1.2 -+++ ci.c 2010/02/17 10:46:55 1.3 -@@ -10,7 +10,11 @@ - #include "ci.h" - #include - #include -+#ifdef __FreeBSD__ -+#include -+#else - #include -+#endif - #include - #include - #include -Index: config.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/config.c,v -retrieving revision 1.1.1.4 -retrieving revision 1.4 -diff -u -r1.1.1.4 -r1.4 ---- config.c 2010/06/07 09:07:28 1.1.1.4 -+++ config.c 2010/06/07 09:12:57 1.4 -@@ -10,6 +10,9 @@ - #include "config.h" - #include - #include -+#ifdef __FreeBSD__ -+#include -+#endif - #include "device.h" - #include "i18n.h" - #include "interface.h" -Index: diseqc.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/diseqc.c,v -retrieving revision 1.1.1.3 -retrieving revision 1.4 -diff -u -r1.1.1.3 -r1.4 ---- diseqc.c 2010/03/01 09:42:49 1.1.1.3 -+++ diseqc.c 2010/03/01 09:58:06 1.4 -@@ -50,7 +50,14 @@ - } - return true; - } -+#ifdef __FreeBSD__ -+ sourcebuf = MALLOC(char, 10); -+ if (commands == NULL) -+ commands = MALLOC(char, 256); -+ int fields = sscanf(s, "%9[^ ] %d %c %d %255[^\n]", sourcebuf, &slof, &polarization, &lof, commands); -+#else - int fields = sscanf(s, "%a[^ ] %d %c %d %a[^\n]", &sourcebuf, &slof, &polarization, &lof, &commands); -+#endif - if (fields == 4) - commands = NULL; //XXX Apparently sscanf() doesn't work correctly if the last %a argument results in an empty string - if (4 <= fields && fields <= 5) { -Index: eit.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/eit.c,v -retrieving revision 1.1.1.3 -retrieving revision 1.5 -diff -u -r1.1.1.3 -r1.5 ---- eit.c 2010/06/07 09:07:27 1.1.1.3 -+++ eit.c 2010/06/07 09:12:57 1.5 -@@ -339,10 +339,15 @@ - if (diff > 2) { - mutex.Lock(); - if (abs(diff - lastDiff) < 3) { -+#ifdef __FreeBSD__ -+ isyslog("system time would have changed from %s (%ld) to %s (%ld)", *TimeToString(loctim), loctim, *TimeToString(sattim), sattim); -+ esyslog("stime() not available on FreeBSD, maybe use adjtime()?"); -+#else - if (stime(&sattim) == 0) - isyslog("system time changed from %s (%ld) to %s (%ld)", *TimeToString(loctim), loctim, *TimeToString(sattim), sattim); - else - esyslog("ERROR while setting system time: %m"); -+#endif - } - lastDiff = diff; - mutex.Unlock(); -Index: epg.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/epg.c,v -retrieving revision 1.1.1.3 -retrieving revision 1.5 -diff -u -r1.1.1.3 -r1.5 ---- epg.c 2010/03/01 09:42:48 1.1.1.3 -+++ epg.c 2010/03/01 09:58:06 1.5 -@@ -31,7 +31,13 @@ - bool tComponent::FromString(const char *s) - { - unsigned int Stream, Type; -+#ifdef __FreeBSD__ -+ if (description == NULL) -+ description = MALLOC(char, 256); -+ int n = sscanf(s, "%X %02X %7s %255[^\n]", &Stream, &Type, language, description); // 7 = MAXLANGCODE2 - 1 -+#else - int n = sscanf(s, "%X %02X %7s %a[^\n]", &Stream, &Type, language, &description); // 7 = MAXLANGCODE2 - 1 -+#endif - if (n != 4 || isempty(description)) { - free(description); - description = NULL; -Index: font.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/font.c,v -retrieving revision 1.1.1.3 -retrieving revision 1.5 -diff -u -r1.1.1.3 -r1.5 ---- font.c 2010/10/19 20:28:48 1.1.1.3 -+++ font.c 2010/10/19 20:32:58 1.5 -@@ -383,7 +383,11 @@ - { - if (!FontNames->Size()) { - FcInit(); -+#ifdef __FreeBSD__ -+ FcObjectSet *os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, (char *)NULL); -+#else - FcObjectSet *os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, NULL); -+#endif - FcPattern *pat = FcPatternCreate(); - FcPatternAddBool(pat, FC_SCALABLE, FcTrue); - if (Monospaced) -Index: i18n.h -=================================================================== -RCS file: /progs/network/ccvs/vdr/i18n.h,v -retrieving revision 1.1.1.2 -retrieving revision 1.3 -diff -u -r1.1.1.2 -r1.3 ---- i18n.h 2010/02/17 10:14:45 1.1.1.2 -+++ i18n.h 2010/02/17 10:46:55 1.3 -@@ -48,7 +48,11 @@ - ///< have an actual locale installed. The rest are just dummy entries - ///< to allow having three letter language codes for other languages - ///< that have no actual locale on this system. -+#ifdef __FreeBSD__ -+const char *I18nTranslate(const char *s, const char *Plugin = NULL) __format_arg(1); -+#else - const char *I18nTranslate(const char *s, const char *Plugin = NULL) __attribute_format_arg__(1); -+#endif - ///< Translates the given string (with optional Plugin context) into - ///< the current language. If no translation is available, the original - ///< string will be returned. -Index: menu.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/menu.c,v -retrieving revision 1.1.1.6 -retrieving revision 1.7 -diff -u -r1.1.1.6 -r1.7 -Index: menuitems.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/menuitems.c,v -retrieving revision 1.1.1.4 -retrieving revision 1.5 -diff -u -r1.1.1.4 -r1.5 ---- menuitems.c 2010/06/07 09:07:27 1.1.1.4 -+++ menuitems.c 2010/06/07 09:12:57 1.5 -@@ -838,7 +838,11 @@ - struct tm tm_r; - localtime_r(value, &tm_r); - strftime(buf, DATEBUFFERSIZE, "%Y-%m-%d ", &tm_r); -+#ifdef __FreeBSD__ -+ strcat(buf, WeekDayNameReal(tm_r.tm_wday)); -+#else - strcat(buf, WeekDayName(tm_r.tm_wday)); -+#endif - } - else - *buf = 0; -Index: pat.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/pat.c,v -retrieving revision 1.1.1.5 -retrieving revision 1.6 -diff -u -r1.1.1.5 -r1.6 ---- pat.c 2010/10/19 20:28:48 1.1.1.5 -+++ pat.c 2010/10/19 20:32:58 1.6 -@@ -8,7 +8,11 @@ - */ - - #include "pat.h" -+#ifdef __FreeBSD__ -+#include -+#else - #include -+#endif - #include "channels.h" - #include "libsi/section.h" - #include "libsi/descriptor.h" -Index: recording.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/recording.c,v -retrieving revision 1.1.1.3 -retrieving revision 1.5 -diff -u -r1.1.1.3 -r1.5 ---- recording.c 2010/03/16 15:18:58 1.1.1.3 -+++ recording.c 2010/03/16 15:21:05 1.5 -@@ -1825,7 +1829,11 @@ - // Search for a PAT packet from the end of the file: - cPatPmtParser PatPmtParser; - sprintf(pFileNumber, RECORDFILESUFFIXTS, Number); -+#ifdef __FreeBSD__ -+ int fd = open(fileName, O_RDONLY, DEFFILEMODE); -+#else - int fd = open(fileName, O_RDONLY | O_LARGEFILE, DEFFILEMODE); -+#endif - if (fd >= 0) { - off_t pos = lseek(fd, -TS_SIZE, SEEK_END); - while (pos >= 0) { -@@ -1866,14 +1874,22 @@ - int BlockingFlag = blocking ? 0 : O_NONBLOCK; - if (record) { - dsyslog("recording to '%s'", fileName); -+#ifdef __FreeBSD__ -+ file = OpenVideoFile(fileName, O_RDWR | O_CREAT | BlockingFlag); -+#else - file = OpenVideoFile(fileName, O_RDWR | O_CREAT | O_LARGEFILE | BlockingFlag); -+#endif - if (!file) - LOG_ERROR_STR(fileName); - } - else { - if (access(fileName, R_OK) == 0) { - dsyslog("playing '%s'", fileName); -+#ifdef __FreeBSD__ -+ file = cUnbufferedFile::Create(fileName, O_RDONLY | BlockingFlag); -+#else - file = cUnbufferedFile::Create(fileName, O_RDONLY | O_LARGEFILE | BlockingFlag); -+#endif - if (!file) - LOG_ERROR_STR(fileName); - } -Index: skins.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/skins.c,v -retrieving revision 1.1.1.2 -retrieving revision 1.3 -diff -u -r1.1.1.2 -r1.3 ---- skins.c 2010/02/17 10:14:45 1.1.1.2 -+++ skins.c 2010/02/17 10:46:55 1.3 -@@ -11,6 +11,20 @@ - #include "interface.h" - #include "status.h" - -+#ifdef __FreeBSD__ -+/* XXX Implement strchrnul for FreeBSD. */ -+static char * -+strchrnul (const char *s, int c_in) -+{ -+ char c = c_in; -+ while (*s && (*s != c)) -+ s++; -+ -+ return (char *) s; -+} -+#endif -+ -+ - // --- cSkinQueuedMessage ---------------------------------------------------- - - class cSkinQueuedMessage : public cListObject { -Index: sources.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/sources.c,v -retrieving revision 1.1.1.4 -retrieving revision 1.5 -diff -u -r1.1.1.4 -r1.5 ---- sources.c 2010/03/16 15:18:58 1.1.1.4 -+++ sources.c 2010/03/16 15:21:05 1.5 -@@ -31,7 +31,14 @@ - bool cSource::Parse(const char *s) - { - char *codeBuf = NULL; -+#ifdef __FreeBSD__ -+ codeBuf = MALLOC(char, 10); -+ if (description == NULL) -+ description = MALLOC(char, 256); -+ if (2 == sscanf(s, "%9[^ ] %255[^\n]", codeBuf, description)) -+#else - if (2 == sscanf(s, "%a[^ ] %a[^\n]", &codeBuf, &description)) -+#endif - code = FromString(codeBuf); - free(codeBuf); - return code != stNone && description && *description; -Index: svdrp.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/svdrp.c,v -retrieving revision 1.1.1.2 -retrieving revision 1.4 -diff -u -r1.1.1.2 -r1.4 ---- svdrp.c 2010/02/17 10:14:45 1.1.1.2 -+++ svdrp.c 2010/02/17 12:34:54 1.4 -@@ -40,6 +40,12 @@ - #include "tools.h" - #include "videodir.h" - -+/* FreeBSD has it's own version of isnumber(), -+ but VDR's version is incompatible */ -+#ifdef __FreeBSD__ -+#undef isnumber -+#endif -+ - // --- cSocket --------------------------------------------------------------- - - cSocket::cSocket(int Port, int Queue) -Index: themes.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/themes.c,v -retrieving revision 1.1.1.2 -retrieving revision 1.3 -diff -u -r1.1.1.2 -r1.3 ---- themes.c 2010/02/17 10:14:44 1.1.1.2 -+++ themes.c 2010/02/17 10:46:55 1.3 -@@ -47,7 +47,11 @@ - // FileName is ok - if (SetName) { - free(name); -+#ifdef __FreeBSD__ -+ name = (char *)strndup(n, e - n); -+#else - name = strndup(n, e - n); -+#endif - } - } - else -Index: thread.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/thread.c,v -retrieving revision 1.1.1.2 -retrieving revision 1.6 -diff -u -r1.1.1.2 -r1.6 ---- thread.c 2010/02/17 10:14:45 1.1.1.2 -+++ thread.c 2010/02/24 08:41:13 1.6 -@@ -9,15 +9,22 @@ - - #include "thread.h" - #include -+#ifdef __FreeBSD__ -+#include -+#include -+#else - #include - #include -+#endif - #include - #include - #include - #include - #include - #include -+#ifndef __FreeBSD__ - #include -+#endif - #include - #include "tools.h" - -@@ -143,7 +150,9 @@ - { - pthread_rwlockattr_t attr; - pthread_rwlockattr_init(&attr); -+#ifndef __FreeBSD__ - pthread_rwlockattr_setkind_np(&attr, PreferWriter ? PTHREAD_RWLOCK_PREFER_WRITER_NP : PTHREAD_RWLOCK_PREFER_READER_NP); -+#endif - pthread_rwlock_init(&rwlock, &attr); - } - -@@ -179,7 +188,11 @@ - locked = 0; - pthread_mutexattr_t attr; - pthread_mutexattr_init(&attr); -+#ifdef __FreeBSD__ -+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK); -+#else - pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK_NP); -+#endif - pthread_mutex_init(&mutex, &attr); - } - -@@ -228,8 +241,12 @@ - - void cThread::SetIOPriority(int Priority) - { -+#ifdef __FreeBSD__ -+ esyslog("ERROR: syscall(SYS_ioprio_set ...) unsupported on FreeBSD"); -+#else - if (syscall(SYS_ioprio_set, 1, 0, (Priority & 0xff) | (2 << 13)) < 0) // best effort class - LOG_ERROR; -+#endif - } - - void cThread::SetDescription(const char *Description, ...) -@@ -335,7 +352,11 @@ - - tThreadId cThread::ThreadId(void) - { -+#ifdef __FreeBSD__ -+ return reinterpret_cast(::pthread_self()); -+#else - return syscall(__NR_gettid); -+#endif - } - - void cThread::SetMainThreadId(void) -@@ -461,7 +482,11 @@ - int MaxPossibleFileDescriptors = getdtablesize(); - for (int i = STDERR_FILENO + 1; i < MaxPossibleFileDescriptors; i++) - close(i); //close all dup'ed filedescriptors -+#ifdef __FreeBSD__ -+ if (execl("/bin/sh", "sh", "-c", Command, (char *)NULL) == -1) { -+#else - if (execl("/bin/sh", "sh", "-c", Command, NULL) == -1) { -+#endif - LOG_ERROR_STR(Command); - close(fd[1 - iopipe]); - _exit(-1); -@@ -544,7 +569,11 @@ - int MaxPossibleFileDescriptors = getdtablesize(); - for (int i = STDERR_FILENO + 1; i < MaxPossibleFileDescriptors; i++) - close(i); //close all dup'ed filedescriptors -+#ifdef __FreeBSD__ -+ if (execl("/bin/sh", "sh", "-c", Command, (char *)NULL) == -1) { -+#else - if (execl("/bin/sh", "sh", "-c", Command, NULL) == -1) { -+#endif - LOG_ERROR_STR(Command); - _exit(-1); - } -Index: thread.h -=================================================================== -RCS file: /progs/network/ccvs/vdr/thread.h,v -retrieving revision 1.1.1.2 -retrieving revision 1.3 -diff -u -r1.1.1.2 -r1.3 ---- thread.h 2010/02/17 10:14:44 1.1.1.2 -+++ thread.h 2010/02/17 10:46:55 1.3 -@@ -13,6 +13,9 @@ - #include - #include - #include -+#ifdef __FreeBSD__ -+#include -+#endif - - class cCondWait { - private: -Index: timers.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/timers.c,v -retrieving revision 1.1.1.2 -retrieving revision 1.3 -diff -u -r1.1.1.2 -r1.3 ---- timers.c 2010/02/17 10:14:45 1.1.1.2 -+++ timers.c 2010/02/17 10:46:55 1.3 -@@ -23,6 +23,12 @@ - // format characters in order to allow any number of blanks after a numeric - // value! - -+/* FreeBSD has it's own version of isnumber(), -+ but VDR's version is incompatible */ -+#ifdef __FreeBSD__ -+#undef isnumber -+#endif -+ - // --- cTimer ---------------------------------------------------------------- - - cTimer::cTimer(bool Instant, bool Pause, cChannel *Channel) -@@ -292,7 +298,15 @@ - s = s2; - } - bool result = false; -+#ifdef __FreeBSD__ -+ channelbuffer = MALLOC(char, 256); -+ daybuffer = MALLOC(char, 256); -+ filebuffer = MALLOC(char, 256); -+ aux = MALLOC(char, 256); -+ if (8 <= sscanf(s, "%u :%255[^:]:%255[^:]:%d :%d :%d :%d :%255[^:\n]:%255[^\n]", &flags, channelbuffer, daybuffer, &start, &stop, &priority, &lifetime, filebuffer, aux)) { -+#else - if (8 <= sscanf(s, "%u :%a[^:]:%a[^:]:%d :%d :%d :%d :%a[^:\n]:%a[^\n]", &flags, &channelbuffer, &daybuffer, &start, &stop, &priority, &lifetime, &filebuffer, &aux)) { -+#endif - ClrFlags(tfRecording); - if (aux && !*skipspace(aux)) { - free(aux); -Index: tools.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/tools.c,v -retrieving revision 1.1.1.5 -retrieving revision 1.8 -diff -u -r1.1.1.5 -r1.8 ---- tools.c 2010/10/19 20:28:48 1.1.1.5 -+++ tools.c 2010/10/19 20:32:58 1.8 -@@ -21,13 +21,24 @@ - #include - #include - #include -+#ifdef __FreeBSD__ -+#include -+#include -+#else - #include -+#endif - #include - #include - #include - #include "i18n.h" - #include "thread.h" - -+/* FreeBSD has it's own version of isnumber(), -+ but VDR's version is incompatible */ -+#ifdef __FreeBSD__ -+#undef isnumber -+#endif -+ - int SysLogLevel = 3; - - #define MAXSYSLOGBUF 256 -@@ -493,6 +504,18 @@ - { - if (!FileName) - return NULL; -+#ifdef __FreeBSD__ -+ char *resolved_path = NULL; -+ resolved_path = MALLOC(char, PATH_MAX+1); -+ if (realpath(FileName, resolved_path) == NULL) -+ { -+ if (errno != ENOENT) // some other error occurred -+ LOG_ERROR_STR(FileName); -+ else // file doesn't exist -+ resolved_path = strdup(FileName); -+ } -+ return resolved_path; -+#else - char *TargetName = canonicalize_file_name(FileName); - if (!TargetName) { - if (errno == ENOENT) // file doesn't exist -@@ -501,6 +524,7 @@ - LOG_ERROR_STR(FileName); - } - return TargetName; -+#endif - } - - bool SpinUpDisk(const char *FileName) -@@ -517,7 +541,11 @@ - int f = open(buf, O_WRONLY | O_CREAT, DEFFILEMODE); - // O_SYNC doesn't work on all file systems - if (f >= 0) { -+#ifdef __FreeBSD__ -+ if (fsync(f) < 0) -+#else - if (fdatasync(f) < 0) -+#endif - LOG_ERROR_STR(*buf); - close(f); - remove(buf); -@@ -818,7 +846,11 @@ - const char *cCharSetConv::Convert(const char *From, char *To, size_t ToLength) - { - if (cd != (iconv_t)-1 && From && *From) { -+#ifdef __FreeBSD__ -+ const char *FromPtr = (char *)From; -+#else - char *FromPtr = (char *)From; -+#endif - size_t FromLength = strlen(From); - char *ToPtr = To; - if (!ToPtr) { -@@ -920,7 +952,11 @@ - return cString(buffer, true); - } - -+#ifdef __FreeBSD__ -+cString WeekDayNameReal(int WeekDay) -+#else - cString WeekDayName(int WeekDay) -+#endif - { - char buffer[16]; - WeekDay = WeekDay == 0 ? 6 : WeekDay - 1; // we start with Monday==0! -@@ -938,10 +974,18 @@ - cString WeekDayName(time_t t) - { - struct tm tm_r; -+#ifdef __FreeBSD__ -+ return WeekDayNameReal(localtime_r(&t, &tm_r)->tm_wday); -+#else - return WeekDayName(localtime_r(&t, &tm_r)->tm_wday); -+#endif - } - -+#ifdef __FreeBSD__ -+cString WeekDayNameFullReal(int WeekDay) -+#else - cString WeekDayNameFull(int WeekDay) -+#endif - { - WeekDay = WeekDay == 0 ? 6 : WeekDay - 1; // we start with Monday==0! - switch (WeekDay) { -@@ -959,7 +1003,11 @@ - cString WeekDayNameFull(time_t t) - { - struct tm tm_r; -+#ifdef __FreeBSD__ -+ return WeekDayNameFullReal(localtime_r(&t, &tm_r)->tm_wday); -+#else - return WeekDayNameFull(localtime_r(&t, &tm_r)->tm_wday); -+#endif - } - - cString DayDateTime(time_t t) -@@ -969,7 +1017,11 @@ - time(&t); - struct tm tm_r; - tm *tm = localtime_r(&t, &tm_r); -+#ifdef __FreeBSD__ -+ snprintf(buffer, sizeof(buffer), "%s %02d.%02d. %02d:%02d", *WeekDayNameReal(tm->tm_wday), tm->tm_mday, tm->tm_mon + 1, tm->tm_hour, tm->tm_min); -+#else - snprintf(buffer, sizeof(buffer), "%s %02d.%02d. %02d:%02d", *WeekDayName(tm->tm_wday), tm->tm_mday, tm->tm_mon + 1, tm->tm_hour, tm->tm_min); -+#endif - return buffer; - } - -@@ -988,7 +1040,11 @@ - char buf[32]; - struct tm tm_r; - tm *tm = localtime_r(&t, &tm_r); -+#ifdef __FreeBSD__ -+ char *p = stpcpy(buf, WeekDayNameReal(tm->tm_wday)); -+#else - char *p = stpcpy(buf, WeekDayName(tm->tm_wday)); -+#endif - *p++ = ' '; - strftime(p, sizeof(buf) - (p - buf), "%d.%m.%Y", tm); - return buf; -@@ -1315,7 +1371,11 @@ - if (!IsOpen()) { - f = FileDes; - if (f >= 0) { -+#ifdef __FreeBSD__ -+ if ((uint)f < FD_SETSIZE) { -+#else - if (f < FD_SETSIZE) { -+#endif - if (f >= maxFiles) - maxFiles = f + 1; - if (!files[f]) -@@ -1356,7 +1416,11 @@ - if (files[i]) - FD_SET(i, &set); - } -+#ifdef __FreeBSD__ -+ if (0 <= FileDes && (uint)FileDes < FD_SETSIZE && !files[FileDes]) -+#else - if (0 <= FileDes && FileDes < FD_SETSIZE && !files[FileDes]) -+#endif - FD_SET(FileDes, &set); // in case we come in with an arbitrary descriptor - if (TimeoutMs == 0) - TimeoutMs = 10; // load gets too heavy with 0 -@@ -1451,7 +1515,9 @@ - - // --- cUnbufferedFile ------------------------------------------------------- - -+#ifndef __FreeBSD__ - #define USE_FADVISE -+#endif - - #define WRITE_BUFFER KILOBYTE(800) - -@@ -1512,11 +1578,13 @@ - readahead = ra; - } - -+#ifdef USE_FADVISE - int cUnbufferedFile::FadviseDrop(off_t Offset, off_t Len) - { - // rounding up the window to make sure that not PAGE_SIZE-aligned data gets freed. - return posix_fadvise(fd, Offset - (FADVGRAN - 1), Len + (FADVGRAN - 1) * 2, POSIX_FADV_DONTNEED); - } -+#endif - - off_t cUnbufferedFile::Seek(off_t Offset, int Whence) - { -Index: tools.h -=================================================================== -RCS file: /progs/network/ccvs/vdr/tools.h,v -retrieving revision 1.1.1.2 -retrieving revision 1.3 -diff -u -r1.1.1.2 -r1.3 ---- tools.h 2010/02/17 10:14:44 1.1.1.2 -+++ tools.h 2010/02/17 10:46:55 1.3 -@@ -26,6 +26,12 @@ - #include - #include - -+#ifdef __FreeBSD__ -+#include -+typedef int (*__compar_fn_t) (__const void *, __const void *); -+#undef isnumber -+#endif -+ - typedef unsigned char uchar; - - extern int SysLogLevel; -@@ -216,9 +222,17 @@ - bool SpinUpDisk(const char *FileName); - void TouchFile(const char *FileName); - time_t LastModifiedTime(const char *FileName); -+#ifdef __FreeBSD__ -+cString WeekDayNameReal(int WeekDay); -+#else - cString WeekDayName(int WeekDay); -+#endif - cString WeekDayName(time_t t); -+#ifdef __FreeBSD__ -+cString WeekDayNameFullReal(int WeekDay); -+#else - cString WeekDayNameFull(int WeekDay); -+#endif - cString WeekDayNameFull(time_t t); - cString DayDateTime(time_t t = 0); - cString TimeToString(time_t t); -Index: vdr.c ---- vdr.c -+++ vdr.c -@@ -32,8 +32,13 @@ - #include - #include - #include -+#ifndef __FreeBSD__ - #include - #include -+#else -+#include -+#include -+#endif - #include - #include - #include "audio.h" -@@ -107,12 +112,15 @@ static bool SetUser(const char *UserName - fprintf(stderr, "vdr: cannot set user id %u: %s\n", (unsigned int)user->pw_uid, strerror(errno)); - return false; - } -+#ifndef __FreeBSD__ - if (UserDump && prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) - fprintf(stderr, "vdr: warning - cannot set dumpable: %s\n", strerror(errno)); -+#endif - } - return true; - } - -+#ifndef __FreeBSD__ - static bool DropCaps(void) - { - // drop all capabilities except selected ones -@@ -139,6 +147,7 @@ static bool SetKeepCaps(bool On) - } - return true; - } -+#endif - - static void SignalHandler(int signum) - { -@@ -388,14 +397,18 @@ int main(int argc, char *argv[]) - if (VdrUser && geteuid() == 0) { - StartedAsRoot = true; - if (strcmp(VdrUser, "root")) { -+#ifndef __FreeBSD__ - if (!SetKeepCaps(true)) - return 2; -+#endif - if (!SetUser(VdrUser, UserDump)) - return 2; -+#ifndef __FreeBSD__ - if (!SetKeepCaps(false)) - return 2; - if (!DropCaps()) - return 2; -+#endif - } - } - -@@ -539,6 +552,24 @@ int main(int argc, char *argv[]) - CodeSet++; // skip the dot - } - } -+#ifdef __FreeBSD__ -+ // If we are started without a locale query login.conf(5) for -+ // a lang setting -+ -+ if (!CodeSet || !strcmp(CodeSet, "US-ASCII")) { -+ struct passwd *User = getpwnam(VdrUser); -+ login_cap_t *Lc = login_getuserclass(User); -+ if (!Lc) -+ Lc = login_getpwclass(User); -+ if (Lc) { -+ const char *Lang = login_getcapstr(Lc, "lang", NULL, NULL); -+ if (Lang && setlocale(LC_CTYPE, Lang)) { -+ CodeSet = nl_langinfo(CODESET); -+ } -+ login_close(Lc); -+ } -+ } -+#endif - if (CodeSet) { - bool known = SI::SetSystemCharacterTable(CodeSet); - isyslog("codeset is '%s' - %s", CodeSet, known ? "known" : "unknown"); -Index: PLUGINS/src/svdrpdemo/svdrpdemo.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/PLUGINS/src/svdrpdemo/svdrpdemo.c,v -retrieving revision 1.1.1.2 -retrieving revision 1.4 -diff -u -r1.1.1.2 -r1.4 -Index: libsi/headers.h -=================================================================== -RCS file: /progs/network/ccvs/vdr/libsi/headers.h,v -retrieving revision 1.1.1.2 -retrieving revision 1.3 -diff -u -r1.1.1.2 -r1.3 ---- libsi/headers.h 2010/02/17 10:14:45 1.1.1.2 -+++ libsi/headers.h 2010/02/17 10:46:56 1.3 -@@ -17,7 +17,11 @@ - #ifndef LIBSI_HEADERS_H - #define LIBSI_HEADERS_H - -+#ifdef __FreeBSD__ -+#include -+#else - #include -+#endif - - namespace SI { - -Index: libsi/si.c -=================================================================== -RCS file: /progs/network/ccvs/vdr/libsi/si.c,v -retrieving revision 1.1.1.4 -retrieving revision 1.7 -diff -u -r1.1.1.4 -r1.7 ---- libsi/si.c 2010/03/01 09:42:49 1.1.1.4 -+++ libsi/si.c 2010/03/01 09:58:08 1.7 -@@ -13,7 +13,9 @@ - #include "si.h" - #include - #include -+#ifndef __FreeBSD__ - #include -+#endif - #include // for broadcaster stupidity workaround - #include - #include "descriptor.h" -@@ -381,7 +383,11 @@ - if (SystemCharacterTable) { - iconv_t cd = iconv_open(SystemCharacterTable, fromCode); - if (cd != (iconv_t)-1) { -+#ifdef __FreeBSD__ -+ const char *fromPtr = from; -+#else - char *fromPtr = (char *)from; -+#endif - while (fromLength > 0 && toLength > 1) { - if (iconv(cd, &fromPtr, &fromLength, &to, &toLength) == size_t(-1)) { - if (errno == EILSEQ) { ---- PLUGINS/src/dvbsddevice/Makefile.orig -+++ PLUGINS/src/dvbsddevice/Makefile -@@ -45,7 +45,7 @@ PACKAGE = vdr-$(ARCHIVE) - - ### Includes and Defines (add further entries here): - --INCLUDES += -I$(VDRDIR)/include -+INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include - - DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' - -@@ -100,7 +100,11 @@ i18n: $(I18Nmsgs) $(I18Npot) - - libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ -- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+ifdef FREEBSD -+ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) -+else -+ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+endif - - dist: $(I18Npo) clean - @-rm -rf $(TMPDIR)/$(ARCHIVE) ---- PLUGINS/src/hello/Makefile.orig -+++ PLUGINS/src/hello/Makefile -@@ -45,7 +45,7 @@ PACKAGE = vdr-$(ARCHIVE) - - ### Includes and Defines (add further entries here): - --INCLUDES += -I$(VDRDIR)/include -+INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include - - DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' - -@@ -100,7 +100,11 @@ i18n: $(I18Nmsgs) - - libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ -- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+ifdef FREEBSD -+ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) -+else -+ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+endif - - dist: $(I18Npo) clean - @-rm -rf $(TMPDIR)/$(ARCHIVE) ---- PLUGINS/src/osddemo/Makefile.orig -+++ PLUGINS/src/osddemo/Makefile -@@ -43,7 +43,7 @@ PACKAGE = vdr-$(ARCHIVE) - - ### Includes and Defines (add further entries here): - --INCLUDES += -I$(VDRDIR)/include -+INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include - - DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' - -@@ -73,7 +73,11 @@ $(DEPFILE): Makefile - - libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ -- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+ifdef FREEBSD -+ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) -+else -+ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+endif - - dist: clean - @-rm -rf $(TMPDIR)/$(ARCHIVE) ---- PLUGINS/src/pictures/Makefile.orig -+++ PLUGINS/src/pictures/Makefile -@@ -45,7 +45,7 @@ PACKAGE = vdr-$(ARCHIVE) - - ### Includes and Defines (add further entries here): - --INCLUDES += -I$(VDRDIR)/include -+INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include - - DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' - -@@ -100,7 +100,11 @@ i18n: $(I18Nmsgs) $(I18Npot) - - libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ -- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+ifdef FREEBSD -+ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) -+else -+ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+endif - - dist: $(I18Npo) clean - @-rm -rf $(TMPDIR)/$(ARCHIVE) ---- PLUGINS/src/servicedemo/Makefile.orig -+++ PLUGINS/src/servicedemo/Makefile -@@ -45,7 +45,7 @@ PACKAGE = vdr-$(ARCHIVE) - - ### Includes and Defines (add further entries here): - --INCLUDES += -I$(VDRDIR)/include -+INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include - - DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' - -@@ -75,11 +75,19 @@ $(DEPFILE): Makefile - - libvdr-$(PLUGIN1).so: $(PLUGIN1).o - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(PLUGIN1).o -o $@ -- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+ifdef FREEBSD -+ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) -+else -+ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+endif - - libvdr-$(PLUGIN2).so: $(PLUGIN2).o - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(PLUGIN2).o -o $@ -- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+ifdef FREEBSD -+ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) -+else -+ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+endif - - dist: clean - @-rm -rf $(TMPDIR)/$(ARCHIVE) ---- PLUGINS/src/skincurses/Makefile.orig -+++ PLUGINS/src/skincurses/Makefile -@@ -45,7 +45,7 @@ PACKAGE = vdr-$(ARCHIVE) - - ### Includes and Defines (add further entries here): - --INCLUDES += -I$(VDRDIR)/include -+INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include - - DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' - -@@ -100,7 +100,11 @@ i18n: $(I18Nmsgs) $(I18Npot) - - libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -lncursesw -o $@ -- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+ifdef FREEBSD -+ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) -+else -+ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+endif - - dist: $(I18Npo) clean - @-rm -rf $(TMPDIR)/$(ARCHIVE) ---- PLUGINS/src/status/Makefile.orig -+++ PLUGINS/src/status/Makefile -@@ -43,7 +43,7 @@ PACKAGE = vdr-$(ARCHIVE) - - ### Includes and Defines (add further entries here): - --INCLUDES += -I$(VDRDIR)/include -+INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include - - DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' - -@@ -73,7 +73,11 @@ $(DEPFILE): Makefile - - libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ -- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+ifdef FREEBSD -+ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) -+else -+ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+endif - - dist: clean - @-rm -rf $(TMPDIR)/$(ARCHIVE) ---- PLUGINS/src/svdrpdemo/Makefile.orig -+++ PLUGINS/src/svdrpdemo/Makefile -@@ -43,7 +43,7 @@ PACKAGE = vdr-$(ARCHIVE) - - ### Includes and Defines (add further entries here): - --INCLUDES += -I$(VDRDIR)/include -+INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include - - DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' - -@@ -73,7 +73,11 @@ $(DEPFILE): Makefile - - libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ -- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+ifdef FREEBSD -+ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) -+else -+ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+endif - - dist: clean - @-rm -rf $(TMPDIR)/$(ARCHIVE) Index: multimedia/vdr/files/patch-z-Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr/files/patch-z-Makefile,v retrieving revision 1.3 diff -u -p -r1.3 patch-z-Makefile --- multimedia/vdr/files/patch-z-Makefile 9 Aug 2011 19:29:49 -0000 1.3 +++ multimedia/vdr/files/patch-z-Makefile 2 Jan 2012 18:31:44 -0000 @@ -6,9 +6,9 @@ Index: Makefile - $(MAKE) -C $(LSIDIR) all + $(MAKE) -C $(LSIDIR) all CC=${CC} CXX=${CXX} - # Internationalization (I18N): + # pkg-config file: -@@ -167,7 +167,7 @@ plugins: include-dir +@@ -186,7 +186,7 @@ plugins: include-dir noapiv="$$noapiv $$i";\ continue;\ fi;\ @@ -17,16 +17,16 @@ Index: Makefile done;\ if [ -n "$$noapiv" ] ; then echo; echo "*** plugins without APIVERSION:$$noapiv"; echo; fi;\ if [ -n "$$failed" ] ; then echo; echo "*** failed plugins:$$failed"; echo; exit 1; fi -@@ -176,7 +176,7 @@ clean-plugins: +@@ -197,7 +197,7 @@ clean-plugins: # Install the files: --install: install-bin install-conf install-doc install-plugins install-i18n install-includes -+install: install-bin install-doc install-plugins install-includes +-install: install-bin install-conf install-doc install-plugins install-i18n install-includes install-pc ++install: install-bin install-conf install-doc install-plugins install-includes install-pc # VDR binary: -@@ -191,7 +191,6 @@ endif +@@ -212,7 +212,6 @@ endif # Configuration files: install-conf: @@ -34,7 +34,7 @@ Index: Makefile @if [ ! -d $(DESTDIR)$(CONFDIR) ]; then\ mkdir -p $(DESTDIR)$(CONFDIR);\ cp *.conf $(DESTDIR)$(CONFDIR);\ -@@ -207,7 +206,7 @@ install-doc: +@@ -228,7 +227,7 @@ install-doc: # Plugins: Index: multimedia/vdr/files/vdr-1.7.15-ttxtsubs.patch-1 =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr/files/vdr-1.7.15-ttxtsubs.patch-1,v retrieving revision 1.2 diff -u -p -r1.2 vdr-1.7.15-ttxtsubs.patch-1 --- multimedia/vdr/files/vdr-1.7.15-ttxtsubs.patch-1 25 Jun 2011 19:02:04 -0000 1.2 +++ multimedia/vdr/files/vdr-1.7.15-ttxtsubs.patch-1 2 Jan 2012 18:31:44 -0000 @@ -1,854 +0,0 @@ -diff --git a/MANUAL b/MANUAL -index 7fae53b..6b0ae57 100644 ---- a/MANUAL -+++ b/MANUAL -@@ -730,6 +730,9 @@ Version 1.6 - background transparency. By default the values as broadcast - are used. - -+ Record Teletext Subtitles = no -+ If set to 'yes', teletext subtitles will be recorded. -+ - LNB: - - SLOF = 11700 The switching frequency (in MHz) between low and -diff --git a/Makefile b/Makefile -index d788484..f854b2e 100644 ---- a/Makefile -+++ b/Makefile -@@ -44,6 +44,8 @@ OBJS = audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o d - skinclassic.o skins.o skinsttng.o sourceparams.o sources.o spu.o status.o svdrp.o themes.o thread.o\ - timers.o tools.o transfer.o vdr.o videodir.o - -+OBJS += vdrttxtsubshooks.o -+ - ifndef NO_KBD - DEFINES += -DREMOTE_KBD - endif -diff --git a/channels.h b/channels.h -index b867297..63c8b9c 100644 ---- a/channels.h -+++ b/channels.h -@@ -35,6 +35,7 @@ - #define MAXDPIDS 16 // dolby (AC3 + DTS) - #define MAXSPIDS 32 // subtitles - #define MAXCAIDS 8 // conditional access -+#define MAXTXTPAGES 8 // teletext pages - - #define MAXLANGCODE1 4 // a 3 letter language code, zero terminated - #define MAXLANGCODE2 8 // up to two 3 letter language codes, separated by '+' and zero terminated -@@ -71,6 +72,16 @@ public: - static const tChannelID InvalidID; - }; - -+struct tTeletextSubtitlePage { -+ tTeletextSubtitlePage(void) { ttxtPage = ttxtMagazine = 0; ttxtType = 0x02; strcpy(ttxtLanguage, "und"); } -+ tTeletextSubtitlePage(int page) { ttxtMagazine = (page / 100) & 0x7; ttxtPage = (((page % 100) / 10) << 4) + (page % 10); ttxtType = 0x02; strcpy(ttxtLanguage, "und"); } -+ char ttxtLanguage[MAXLANGCODE1]; -+ uchar ttxtPage; -+ uchar ttxtMagazine; -+ uchar ttxtType; -+ int PageNumber(void) const { return BCDCHARTOINT(ttxtMagazine) * 100 + BCDCHARTOINT(ttxtPage); } -+ }; -+ - class cChannel; - - class cLinkChannel : public cListObject { -@@ -115,6 +126,9 @@ private: - uint16_t compositionPageIds[MAXSPIDS]; - uint16_t ancillaryPageIds[MAXSPIDS]; - int tpid; -+ int fixedTtxtSubtitlePages; -+ int totalTtxtSubtitlePages; -+ tTeletextSubtitlePage teletextSubtitlePages[MAXTXTPAGES]; - int caids[MAXCAIDS + 1]; // list is zero-terminated - int nid; - int tid; -@@ -164,6 +178,8 @@ public: - uint16_t CompositionPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? compositionPageIds[i] : uint16_t(0); } - uint16_t AncillaryPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? ancillaryPageIds[i] : uint16_t(0); } - int Tpid(void) const { return tpid; } -+ const tTeletextSubtitlePage *TeletextSubtitlePages() const { return teletextSubtitlePages; } -+ int TotalTeletextSubtitlePages() const { return totalTtxtSubtitlePages; } - const int *Caids(void) const { return caids; } - int Ca(int Index = 0) const { return Index < MAXCAIDS ? caids[Index] : 0; } - int Nid(void) const { return nid; } -@@ -190,6 +206,7 @@ public: - void SetName(const char *Name, const char *ShortName, const char *Provider); - void SetPortalName(const char *PortalName); - void SetPids(int Vpid, int Ppid, int Vtype, int *Apids, int *Atypes, char ALangs[][MAXLANGCODE2], int *Dpids, int *Dtypes, char DLangs[][MAXLANGCODE2], int *Spids, char SLangs[][MAXLANGCODE2], int Tpid); -+ void SetTeletextSubtitlePages(tTeletextSubtitlePage pages[], int numberOfPages); - void SetCaIds(const int *CaIds); // list must be zero-terminated - void SetCaDescriptors(int Level); - void SetLinkChannels(cLinkChannels *LinkChannels); -diff --git a/config.c b/config.c -index 73b11b1..f2eebe6 100644 ---- a/config.c -+++ b/config.c -@@ -333,6 +333,7 @@ cSetup::cSetup(void) - MarginStop = 10; - AudioLanguages[0] = -1; - DisplaySubtitles = 0; -+ SupportTeletext = 0; - SubtitleLanguages[0] = -1; - SubtitleOffset = 0; - SubtitleFgTransparency = 0; -@@ -524,6 +525,7 @@ bool cSetup::Parse(const char *Name, const char *Value) - else if (!strcasecmp(Name, "MarginStop")) MarginStop = atoi(Value); - else if (!strcasecmp(Name, "AudioLanguages")) return ParseLanguages(Value, AudioLanguages); - else if (!strcasecmp(Name, "DisplaySubtitles")) DisplaySubtitles = atoi(Value); -+ else if (!strcasecmp(Name, "SupportTeletext")) SupportTeletext = atoi(Value); - else if (!strcasecmp(Name, "SubtitleLanguages")) return ParseLanguages(Value, SubtitleLanguages); - else if (!strcasecmp(Name, "SubtitleOffset")) SubtitleOffset = atoi(Value); - else if (!strcasecmp(Name, "SubtitleFgTransparency")) SubtitleFgTransparency = atoi(Value); -@@ -620,6 +622,7 @@ bool cSetup::Save(void) - Store("MarginStop", MarginStop); - StoreLanguages("AudioLanguages", AudioLanguages); - Store("DisplaySubtitles", DisplaySubtitles); -+ Store("SupportTeletext", SupportTeletext); - StoreLanguages("SubtitleLanguages", SubtitleLanguages); - Store("SubtitleOffset", SubtitleOffset); - Store("SubtitleFgTransparency", SubtitleFgTransparency); -diff --git a/config.h b/config.h -index 7041eb7..289d4b6 100644 ---- a/config.h -+++ b/config.h -@@ -235,6 +235,7 @@ public: - int MarginStart, MarginStop; - int AudioLanguages[I18N_MAX_LANGUAGES + 1]; - int DisplaySubtitles; -+ int SupportTeletext; - int SubtitleLanguages[I18N_MAX_LANGUAGES + 1]; - int SubtitleOffset; - int SubtitleFgTransparency, SubtitleBgTransparency; -diff --git a/device.c b/device.c -index 681049b..4dbd920 100644 ---- a/device.c -+++ b/device.c -@@ -18,6 +18,7 @@ - #include "receiver.h" - #include "status.h" - #include "transfer.h" -+#include "vdrttxtsubshooks.h" - - // --- cLiveSubtitle --------------------------------------------------------- - -@@ -1223,6 +1224,13 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly) - } - break; - case 0xBD: { // private stream 1 -+ // EBU Teletext data, ETSI EN 300 472 -+ // if PES data header length = 24 and data_identifier = 0x10..0x1F (EBU Data) -+ if (Data[8] == 0x24 && Data[45] >= 0x10 && Data[45] < 0x20) { -+ cVDRTtxtsubsHookListener::Hook()->PlayerTeletextData((uint8_t*)Data, Length); -+ break; -+ } -+ - int PayloadOffset = Data[8] + 9; - - // Compatibility mode for old subtitles plugin: -@@ -1382,6 +1390,7 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly) - tsToPesVideo.Reset(); - tsToPesAudio.Reset(); - tsToPesSubtitle.Reset(); -+ tsToPesTeletext.Reset(); - } - else if (Length < TS_SIZE) { - esyslog("ERROR: skipped %d bytes of TS fragment", Length); -@@ -1427,6 +1436,17 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly) - if (!VideoOnly || HasIBPTrickSpeed()) - PlayTsSubtitle(Data, TS_SIZE); - } -+ else if (Pid == patPmtParser.Tpid()) { -+ if (!VideoOnly || HasIBPTrickSpeed()) { -+ int l; -+ tsToPesTeletext.PutTs(Data, Length); -+ if (const uchar *p = tsToPesTeletext.GetPes(l)) { -+ if ((l > 45) && (p[0] == 0x00) && (p[1] == 0x00) && (p[2] == 0x01) && (p[3] == 0xbd) && (p[8] == 0x24) && (p[45] >= 0x10) && (p[45] < 0x20)) -+ cVDRTtxtsubsHookListener::Hook()->PlayerTeletextData((uchar *)p, l, false, patPmtParser.TeletextSubtitlePages(), patPmtParser.TotalTeletextSubtitlePages()); -+ tsToPesTeletext.Reset(); -+ } -+ } -+ } - } - } - else if (Pid == patPmtParser.Ppid()) { -diff --git a/device.h b/device.h -index cb3bc2c..f531e70 100644 ---- a/device.h -+++ b/device.h -@@ -522,6 +522,7 @@ private: - cTsToPes tsToPesVideo; - cTsToPes tsToPesAudio; - cTsToPes tsToPesSubtitle; -+ cTsToPes tsToPesTeletext; - bool isPlayingVideo; - protected: - const cPatPmtParser *PatPmtParser(void) const { return &patPmtParser; } -diff --git a/menu.c b/menu.c -index 19cfabb..d2deeb3 100644 ---- a/menu.c -+++ b/menu.c -@@ -2790,6 +2790,7 @@ void cMenuSetupDVB::Setup(void) - Add(new cMenuEditIntItem( tr("Setup.DVB$Subtitle foreground transparency"), &data.SubtitleFgTransparency, 0, 9)); - Add(new cMenuEditIntItem( tr("Setup.DVB$Subtitle background transparency"), &data.SubtitleBgTransparency, 0, 10)); - } -+ Add(new cMenuEditBoolItem(tr("Setup.DVB$Enable teletext support"), &data.SupportTeletext)); - - SetCurrent(Get(current)); - Display(); -diff --git a/po/ca_ES.po b/po/ca_ES.po -index 247113b..aba1ae3 100644 ---- a/po/ca_ES.po -+++ b/po/ca_ES.po -@@ -943,6 +943,9 @@ msgstr "Transpar - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Transparncia fons subttols" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "Configuraci de l'LNB" - -diff --git a/po/cs_CZ.po b/po/cs_CZ.po -index f6313ba..aec6f4e 100644 ---- a/po/cs_CZ.po -+++ b/po/cs_CZ.po -@@ -942,6 +942,9 @@ msgstr "Průhlednost písma titulků" - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Průhlednost pozadí titulků" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/da_DK.po b/po/da_DK.po -index 40cdebd..192173d 100644 ---- a/po/da_DK.po -+++ b/po/da_DK.po -@@ -940,6 +940,9 @@ msgstr "Undertekst forgrundsgennemsigtighed" - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Undertekst baggrundsgennemsigtighed" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/de_DE.po b/po/de_DE.po -index 4d4f3df..a3227a0 100644 ---- a/po/de_DE.po -+++ b/po/de_DE.po -@@ -940,6 +940,9 @@ msgstr "Untertitel-Transparenz Vordergrund" - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Untertitel-Transparenz Hintergrund" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "Videotext-Untersttzung aktivieren" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/el_GR.po b/po/el_GR.po -index 5414ebc..913f39e 100644 ---- a/po/el_GR.po -+++ b/po/el_GR.po -@@ -940,6 +940,9 @@ msgstr "" - msgid "Setup.DVB$Subtitle background transparency" - msgstr "" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/es_ES.po b/po/es_ES.po -index 217f775..78a9491 100644 ---- a/po/es_ES.po -+++ b/po/es_ES.po -@@ -941,6 +941,9 @@ msgstr "Transparencia primer plano subt - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Transparencia fondo subttulos" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/et_EE.po b/po/et_EE.po -index 5010dc4..af2e2d3 100644 ---- a/po/et_EE.po -+++ b/po/et_EE.po -@@ -940,6 +940,9 @@ msgstr "Subtiitri l - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Subtiitri tausta lbipaistvus" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "Teleteksti tugi" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/fi_FI.po b/po/fi_FI.po -index cd57e7c..e6a22bf 100644 ---- a/po/fi_FI.po -+++ b/po/fi_FI.po -@@ -943,6 +943,9 @@ msgstr "Tekstityksen läpinäkyvyys" - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Tekstityksen taustan läpinäkyvyys" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "Salli teksti-TV-tuki" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/fr_FR.po b/po/fr_FR.po -index 0d4cb7c..770038e 100644 ---- a/po/fr_FR.po -+++ b/po/fr_FR.po -@@ -946,6 +946,9 @@ msgstr "Transparence de l'avant-plan" - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Transparence du fond" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/hr_HR.po b/po/hr_HR.po -index 96ee695..51f596c 100644 ---- a/po/hr_HR.po -+++ b/po/hr_HR.po -@@ -942,6 +942,9 @@ msgstr "Transparentnost titla" - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Transparentnost pozadine titla" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/hu_HU.po b/po/hu_HU.po -index a17b209..2f70812 100644 ---- a/po/hu_HU.po -+++ b/po/hu_HU.po -@@ -943,6 +943,9 @@ msgstr "Felirat transzparenci - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Felirat htternek transzparencija" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/it_IT.po b/po/it_IT.po -index 89d4237..5a055b2 100644 ---- a/po/it_IT.po -+++ b/po/it_IT.po -@@ -947,6 +947,9 @@ msgstr "Trasparenza sottotitoli" - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Trasparenza sfondo sottotitoli" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/lt_LT.po b/po/lt_LT.po -index 02465e6..8b5d996 100644 ---- a/po/lt_LT.po -+++ b/po/lt_LT.po -@@ -940,6 +940,9 @@ msgstr "Subtitrų priekinio vaizdo permatomumas" - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Subtitrų fono permatomumas" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "Konverteris (LNB)" - -diff --git a/po/nl_NL.po b/po/nl_NL.po -index f570337..73a02b3 100644 ---- a/po/nl_NL.po -+++ b/po/nl_NL.po -@@ -944,6 +944,9 @@ msgstr "Transparantie voorgrond ondertiteling" - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Transparantie achtergrond ondertiteling" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/nn_NO.po b/po/nn_NO.po -index 2f40cfe..0934c9a 100644 ---- a/po/nn_NO.po -+++ b/po/nn_NO.po -@@ -941,6 +941,9 @@ msgstr "" - msgid "Setup.DVB$Subtitle background transparency" - msgstr "" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/pl_PL.po b/po/pl_PL.po -index 9620e1b..39057fd 100644 ---- a/po/pl_PL.po -+++ b/po/pl_PL.po -@@ -941,6 +941,9 @@ msgstr "Prze - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Przerocze podtytuw: To" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/pt_PT.po b/po/pt_PT.po -index 0510d9d..3bea1f1 100644 ---- a/po/pt_PT.po -+++ b/po/pt_PT.po -@@ -940,6 +940,9 @@ msgstr "Transpar - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Transparncia de background das legendas" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/ro_RO.po b/po/ro_RO.po -index e0a2119..1d4a412 100644 ---- a/po/ro_RO.po -+++ b/po/ro_RO.po -@@ -943,6 +943,9 @@ msgstr "Transparen - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Transparena fundalului subtitrrii" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/ru_RU.po b/po/ru_RU.po -index 889b98b..89029e1 100644 ---- a/po/ru_RU.po -+++ b/po/ru_RU.po -@@ -941,6 +941,9 @@ msgstr " - msgid "Setup.DVB$Subtitle background transparency" - msgstr " " - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "" - -diff --git a/po/sk_SK.po b/po/sk_SK.po -index 129fad3..eff0bd1 100644 ---- a/po/sk_SK.po -+++ b/po/sk_SK.po -@@ -941,6 +941,9 @@ msgstr "Prieh - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Priehadnos pozadia titulkov" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/sl_SI.po b/po/sl_SI.po -index 9f1e806..7f2bdd7 100644 ---- a/po/sl_SI.po -+++ b/po/sl_SI.po -@@ -941,6 +941,9 @@ msgstr "Transparentnost podnapisov" - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Transparentnost ozadja podnapisov" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/sv_SE.po b/po/sv_SE.po -index e9d39dd..9c366d2 100644 ---- a/po/sv_SE.po -+++ b/po/sv_SE.po -@@ -943,6 +943,9 @@ msgstr "Transparent f - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Transparent bakgrund textremsa" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/tr_TR.po b/po/tr_TR.po -index 9acd1c1..50a6295 100644 ---- a/po/tr_TR.po -+++ b/po/tr_TR.po -@@ -940,6 +940,9 @@ msgstr "Altyaz - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Altyaz arka effaflk" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "LNB" - -diff --git a/po/uk_UA.po b/po/uk_UA.po -index b62fca7..25e7095 100644 ---- a/po/uk_UA.po -+++ b/po/uk_UA.po -@@ -940,6 +940,9 @@ msgstr "Прозорість переднього плану субтитрів" - msgid "Setup.DVB$Subtitle background transparency" - msgstr "Прозорість заднього плану субтитрів" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "Конвертер" - -diff --git a/po/zh_CN.po b/po/zh_CN.po -index bffa301..141c362 100644 ---- a/po/zh_CN.po -+++ b/po/zh_CN.po -@@ -943,6 +943,9 @@ msgstr "字幕前景透明度" - msgid "Setup.DVB$Subtitle background transparency" - msgstr "字幕背景透明度" - -+msgid "Setup.DVB$Enable teletext support" -+msgstr "" -+ - msgid "LNB" - msgstr "切换器设置" - -diff --git a/receiver.c b/receiver.c -index 58dda78..ed28f1b 100644 ---- a/receiver.c -+++ b/receiver.c -@@ -82,7 +82,8 @@ bool cReceiver::SetPids(const cChannel *Channel) - (Channel->Ppid() == Channel->Vpid() || AddPid(Channel->Ppid())) && - AddPids(Channel->Apids()) && - AddPids(Channel->Dpids()) && -- AddPids(Channel->Spids()); -+ AddPids(Channel->Spids()) && -+ (!Setup.SupportTeletext || AddPid(Channel->Tpid())); - } - return true; - } -diff --git a/remux.c b/remux.c -index 5206544..eea5c07 100644 ---- a/remux.c -+++ b/remux.c -@@ -215,6 +215,29 @@ int cPatPmtGenerator::MakeSubtitlingDescriptor(uchar *Target, const char *Langua - return i; - } - -+int cPatPmtGenerator::MakeTeletextDescriptor(uchar *Target, const tTeletextSubtitlePage *pages, int pageCount) -+{ -+ int i = 0, j = 0; -+ Target[i++] = SI::TeletextDescriptorTag; -+ int l = i; -+ Target[i++] = 0x00; // length -+ for (int n = 0; n < pageCount; n++) { -+ const char* Language = pages[n].ttxtLanguage; -+ Target[i++] = *Language++; -+ Target[i++] = *Language++; -+ Target[i++] = *Language++; -+ Target[i++] = (pages[n].ttxtType << 3) + pages[n].ttxtMagazine; -+ Target[i++] = pages[n].ttxtPage; -+ j++; -+ } -+ if (j > 0) { -+ Target[l] = j * 5; // update length -+ IncEsInfoLength(i); -+ return i; -+ } -+ return 0; -+} -+ - int cPatPmtGenerator::MakeLanguageDescriptor(uchar *Target, const char *Language) - { - int i = 0; -@@ -302,6 +325,7 @@ void cPatPmtGenerator::GeneratePmt(const cChannel *Channel) - if (Channel) { - int Vpid = Channel->Vpid(); - int Ppid = Channel->Ppid(); -+ int Tpid = Channel->Tpid(); - uchar *p = buf; - int i = 0; - p[i++] = 0x02; // table id -@@ -334,6 +358,10 @@ void cPatPmtGenerator::GeneratePmt(const cChannel *Channel) - i += MakeStream(buf + i, 0x06, Channel->Spid(n)); - i += MakeSubtitlingDescriptor(buf + i, Channel->Slang(n), Channel->SubtitlingType(n), Channel->CompositionPageId(n), Channel->AncillaryPageId(n)); - } -+ if (Tpid) { -+ i += MakeStream(buf + i, 0x06, Tpid); -+ i += MakeTeletextDescriptor(buf + i, Channel->TeletextSubtitlePages(), Channel->TotalTeletextSubtitlePages()); -+ } - - int sl = i - SectionLength - 2 + 4; // -2 = SectionLength storage, +4 = length of CRC - buf[SectionLength] |= (sl >> 8) & 0x0F; -@@ -407,6 +435,7 @@ void cPatPmtParser::Reset(void) - pmtPid = -1; - vpid = vtype = 0; - ppid = 0; -+ tpid = 0; - } - - void cPatPmtParser::ParsePat(const uchar *Data, int Length) -@@ -492,11 +521,13 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length) - int NumSpids = 0; - vpid = vtype = 0; - ppid = 0; -+ tpid = 0; - apids[0] = 0; - dpids[0] = 0; - spids[0] = 0; - atypes[0] = 0; - dtypes[0] = 0; -+ totalTtxtSubtitlePages = 0; - SI::PMT::Stream stream; - for (SI::Loop::Iterator it; Pmt.streamLoop.getNext(stream, it); ) { - dbgpatpmt(" stream type = %02X, pid = %d", stream.getStreamType(), stream.getPid()); -@@ -595,6 +626,28 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length) - spids[NumSpids]= 0; - } - break; -+ case SI::TeletextDescriptorTag: { -+ dbgpatpmt(" teletext"); -+ tpid = stream.getPid(); -+ SI::TeletextDescriptor *sd = (SI::TeletextDescriptor *)d; -+ SI::TeletextDescriptor::Teletext ttxt; -+ if (totalTtxtSubtitlePages < MAXTXTPAGES) { -+ for (SI::Loop::Iterator it; sd->teletextLoop.getNext(ttxt, it); ) { -+ bool isSubtitlePage = (ttxt.getTeletextType() == 0x02) || (ttxt.getTeletextType() == 0x05); -+ if (isSubtitlePage && ttxt.languageCode[0]) { -+ dbgpatpmt(" '%s:%x.%x'", ttxt.languageCode, ttxt.getTeletextMagazineNumber(), ttxt.getTeletextPageNumber()); -+ strn0cpy(teletextSubtitlePages[totalTtxtSubtitlePages].ttxtLanguage, I18nNormalizeLanguageCode(ttxt.languageCode), MAXLANGCODE1); -+ teletextSubtitlePages[totalTtxtSubtitlePages].ttxtPage = ttxt.getTeletextPageNumber(); -+ teletextSubtitlePages[totalTtxtSubtitlePages].ttxtMagazine = ttxt.getTeletextMagazineNumber(); -+ teletextSubtitlePages[totalTtxtSubtitlePages].ttxtType = ttxt.getTeletextType(); -+ totalTtxtSubtitlePages++; -+ if (totalTtxtSubtitlePages >= MAXTXTPAGES) -+ break; -+ } -+ } -+ } -+ } -+ break; - case SI::ISO639LanguageDescriptorTag: { - SI::ISO639LanguageDescriptor *ld = (SI::ISO639LanguageDescriptor *)d; - dbgpatpmt(" '%s'", ld->languageCode); -diff --git a/remux.h b/remux.h -index 7b62187..6f816dc 100644 ---- a/remux.h -+++ b/remux.h -@@ -171,6 +171,7 @@ protected: - int MakeStream(uchar *Target, uchar Type, int Pid); - int MakeAC3Descriptor(uchar *Target, uchar Type); - int MakeSubtitlingDescriptor(uchar *Target, const char *Language, uchar SubtitlingType, uint16_t CompositionPageId, uint16_t AncillaryPageId); -+ int MakeTeletextDescriptor(uchar *Target, const tTeletextSubtitlePage *pages, int pageCount); - int MakeLanguageDescriptor(uchar *Target, const char *Language); - int MakeCRC(uchar *Target, const uchar *Data, int Length); - void GeneratePmtPid(const cChannel *Channel); -@@ -216,6 +217,7 @@ private: - int vpid; - int ppid; - int vtype; -+ int tpid; - int apids[MAXAPIDS + 1]; // list is zero-terminated - int atypes[MAXAPIDS + 1]; // list is zero-terminated - char alangs[MAXAPIDS][MAXLANGCODE2]; -@@ -228,6 +230,8 @@ private: - uint16_t compositionPageIds[MAXSPIDS]; - uint16_t ancillaryPageIds[MAXSPIDS]; - bool updatePrimaryDevice; -+ int totalTtxtSubtitlePages; -+ tTeletextSubtitlePage teletextSubtitlePages[MAXTXTPAGES]; - protected: - int SectionLength(const uchar *Data, int Length) { return (Length >= 3) ? ((int(Data[1]) & 0x0F) << 8)| Data[2] : 0; } - public: -@@ -260,6 +264,9 @@ public: - int Vtype(void) const { return vtype; } - ///< Returns the video stream type as defined by the current PMT, or 0 if no video - ///< stream type has been detected, yet. -+ int Tpid(void) { return tpid; } -+ ///< Returns the teletext pid as defined by the current PMT, or 0 if no teletext -+ ///< pid has been detected, yet. - const int *Apids(void) const { return apids; } - const int *Dpids(void) const { return dpids; } - const int *Spids(void) const { return spids; } -@@ -274,6 +281,8 @@ public: - uchar SubtitlingType(int i) const { return (0 <= i && i < MAXSPIDS) ? subtitlingTypes[i] : uchar(0); } - uint16_t CompositionPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? compositionPageIds[i] : uint16_t(0); } - uint16_t AncillaryPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? ancillaryPageIds[i] : uint16_t(0); } -+ const tTeletextSubtitlePage *TeletextSubtitlePages() const { return teletextSubtitlePages; } -+ int TotalTeletextSubtitlePages() const { return totalTtxtSubtitlePages; } - }; - - // TS to PES converter: -diff --git a/vdr.5 b/vdr.5 -index 68711b5..9b8ed05 100644 ---- a/vdr.5 -+++ b/vdr.5 -@@ -214,6 +214,13 @@ if there is an audio type. - .TP - .B TPID - The teletext PID. -+ -+Fixed teletext subtitling pages can be defined separated by a semicolon. -+The pages (separated by commas) can contain ISO 639 language codes, delimited -+by a '=' sign, as in -+ -+.B ...:2001;150=deu,151=fin:... -+ - .TP - .B Conditional access - A hexadecimal integer defining how this channel can be accessed: -diff --git a/vdrttxtsubshooks.c b/vdrttxtsubshooks.c -new file mode 100644 -index 0000000..2471788 ---- /dev/null -+++ b/vdrttxtsubshooks.c -@@ -0,0 +1,63 @@ -+/* -+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder -+ * Copyright (c) 2003 - 2008 Ragnar Sundblad -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the -+ * Free Software Foundation; either version 2 of the License, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -+ * details. -+ * -+ * You should have received a copy of the GNU General Public License along with -+ * this program; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#include -+#include -+#include -+ -+#include "vdrttxtsubshooks.h" -+ -+// XXX Really should be a list... -+static cVDRTtxtsubsHookListener *gListener; -+ -+// ------ class cVDRTtxtsubsHookProxy ------ -+ -+class cVDRTtxtsubsHookProxy : public cVDRTtxtsubsHookListener -+{ -+ public: -+ virtual void HideOSD(void) { if(gListener) gListener->HideOSD(); }; -+ virtual void ShowOSD(void) { if(gListener) gListener->ShowOSD(); }; -+ virtual void PlayerTeletextData(uint8_t *p, int length, bool IsPesRecording, const struct tTeletextSubtitlePage teletextSubtitlePages[] = NULL, int pageCount = 0) -+ { if(gListener) gListener->PlayerTeletextData(p, length, IsPesRecording, teletextSubtitlePages, pageCount); }; -+ virtual int ManualPageNumber(const cChannel *channel) -+ { if(gListener) return gListener->ManualPageNumber(channel); else return 0; }; -+}; -+ -+ -+// ------ class cVDRTtxtsubsHookListener ------ -+ -+cVDRTtxtsubsHookListener::~cVDRTtxtsubsHookListener() -+{ -+ gListener = 0; -+} -+ -+void cVDRTtxtsubsHookListener::HookAttach(void) -+{ -+ gListener = this; -+ //printf("cVDRTtxtsubsHookListener::HookAttach\n"); -+} -+ -+static cVDRTtxtsubsHookProxy gProxy; -+ -+cVDRTtxtsubsHookListener *cVDRTtxtsubsHookListener::Hook(void) -+{ -+ return &gProxy; -+} -+ -diff --git a/vdrttxtsubshooks.h b/vdrttxtsubshooks.h -new file mode 100644 -index 0000000..2f97969 ---- /dev/null -+++ b/vdrttxtsubshooks.h -@@ -0,0 +1,46 @@ -+/* -+ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder -+ * Copyright (c) 2003 - 2008 Ragnar Sundblad -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the -+ * Free Software Foundation; either version 2 of the License, or (at your option) -+ * any later version. -+ * -+ * This program is distributed in the hope that it will be useful, but -+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -+ * details. -+ * -+ * You should have received a copy of the GNU General Public License along with -+ * this program; if not, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -+ * -+ */ -+ -+#ifndef __VDRTTXTSUBSHOOKS_H -+#define __VDRTTXTSUBSHOOKS_H -+ -+#define TTXTSUBSVERSNUM 2 -+ -+class cDevice; -+class cChannel; -+struct tTeletextSubtitlePage; -+ -+class cVDRTtxtsubsHookListener { -+ public: -+ cVDRTtxtsubsHookListener(void) {}; -+ virtual ~cVDRTtxtsubsHookListener(); -+ -+ void HookAttach(void); -+ -+ virtual void HideOSD(void) {}; -+ virtual void ShowOSD(void) {}; -+ virtual void PlayerTeletextData(uint8_t *p, int length, bool IsPesRecording = true, const struct tTeletextSubtitlePage teletextSubtitlePages[] = NULL, int pageCount = 0) {}; -+ virtual int ManualPageNumber(const cChannel *channel) { return 0; }; -+ -+ // used by VDR to call hook listeners -+ static cVDRTtxtsubsHookListener *Hook(void); -+}; -+ -+#endif Index: multimedia/vdr/files/vdr-1.7.15-ttxtsubs.patch-2 =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr/files/vdr-1.7.15-ttxtsubs.patch-2,v retrieving revision 1.1 diff -u -p -r1.1 vdr-1.7.15-ttxtsubs.patch-2 --- multimedia/vdr/files/vdr-1.7.15-ttxtsubs.patch-2 10 Jun 2011 17:33:00 -0000 1.1 +++ multimedia/vdr/files/vdr-1.7.15-ttxtsubs.patch-2 2 Jan 2012 18:31:44 -0000 @@ -1,179 +0,0 @@ ---- a/channels.c -+++ b/channels.c -@@ -383,6 +383,26 @@ void cChannel::SetSubtitlingDescriptors( - } - } - -+void cChannel::SetTeletextSubtitlePages(tTeletextSubtitlePage pages[], int numberOfPages) -+{ -+ int mod = CHANNELMOD_NONE; -+ if (totalTtxtSubtitlePages != (fixedTtxtSubtitlePages + numberOfPages)) -+ mod |= CHANNELMOD_PIDS; -+ totalTtxtSubtitlePages = fixedTtxtSubtitlePages; -+ for (int i = 0; (i < numberOfPages) && (totalTtxtSubtitlePages < MAXTXTPAGES); i++) { -+ if (teletextSubtitlePages[totalTtxtSubtitlePages].ttxtMagazine != pages[i].ttxtMagazine || -+ teletextSubtitlePages[totalTtxtSubtitlePages].ttxtPage != pages[i].ttxtPage || -+ teletextSubtitlePages[totalTtxtSubtitlePages].ttxtType != pages[i].ttxtType || -+ strcmp(teletextSubtitlePages[totalTtxtSubtitlePages].ttxtLanguage, pages[i].ttxtLanguage)) { -+ mod |= CHANNELMOD_PIDS; -+ teletextSubtitlePages[totalTtxtSubtitlePages] = pages[i]; -+ } -+ totalTtxtSubtitlePages++; -+ } -+ modification |= mod; -+ Channels.SetModified(); -+} -+ - void cChannel::SetCaIds(const int *CaIds) - { - if (caids[0] && caids[0] <= CA_USER_MAX) -@@ -511,11 +531,24 @@ cString cChannel::ToText(const cChannel - q += IntArrayToString(q, Channel->dpids, 10, Channel->dlangs, Channel->dtypes); - } - *q = 0; -+ const int TBufferSize = 5 + 1 + (MAXTXTPAGES * (3 + 1 + MAXLANGCODE1 + 1)) + 10; // '12345;150=deu,151=fin,...', +10: paranoia -+ char tpidbuf[TBufferSize]; -+ q = tpidbuf; -+ q += snprintf(q, sizeof(tpidbuf), "%d", Channel->tpid); -+ if (Channel->fixedTtxtSubtitlePages > 0) { -+ q += snprintf(q, sizeof(tpidbuf) - (q - tpidbuf), ";"); -+ for (int i = 0; i < Channel->fixedTtxtSubtitlePages; ++i) { -+ tTeletextSubtitlePage page = Channel->teletextSubtitlePages[i]; -+ q += snprintf(q, sizeof(tpidbuf) - (q - tpidbuf), -+ i + 1 < Channel->fixedTtxtSubtitlePages ? "%d=%s," : "%d=%s", -+ page.PageNumber(), page.ttxtLanguage); -+ } -+ } - char caidbuf[MAXCAIDS * 5 + 10]; // 5: 4 digits plus delimiting ',', 10: paranoia - q = caidbuf; - q += IntArrayToString(q, Channel->caids, 16); - *q = 0; -- buffer = cString::sprintf("%s:%d:%s:%s:%d:%s:%s:%d:%s:%d:%d:%d:%d\n", FullName, Channel->frequency, *Channel->parameters, *cSource::ToString(Channel->source), Channel->srate, vpidbuf, apidbuf, Channel->tpid, caidbuf, Channel->sid, Channel->nid, Channel->tid, Channel->rid); -+ buffer = cString::sprintf("%s:%d:%s:%s:%d:%s:%s:%s:%s:%d:%d:%d:%d\n", FullName, Channel->frequency, *Channel->parameters, *cSource::ToString(Channel->source), Channel->srate, vpidbuf, apidbuf, tpidbuf, caidbuf, Channel->sid, Channel->nid, Channel->tid, Channel->rid); - } - return buffer; - } -@@ -549,6 +582,7 @@ bool cChannel::Parse(const char *s) - char *parambuf = NULL; - char *vpidbuf = NULL; - char *apidbuf = NULL; -+ char *tpidbuf = NULL; - char *caidbuf = NULL; - #ifdef __FreeBSD__ - namebuf = MALLOC(char, 256); -@@ -556,10 +590,11 @@ bool cChannel::Parse(const char *s) - parambuf = MALLOC(char, 256); - vpidbuf = MALLOC(char, 256); - apidbuf = MALLOC(char, 256); -+ tpidbuf = MALLOC(char, 256); - caidbuf = MALLOC(char, 256); -- int fields = sscanf(s, "%255[^:]:%d :%255[^:]:%9[^:] :%d :%255[^:]:%255[^:]:%d :%255[^:]:%d :%d :%d :%d ", namebuf, &frequency, parambuf, sourcebuf, &srate, vpidbuf, apidbuf, &tpid, caidbuf, &sid, &nid, &tid, &rid); -+ int fields = sscanf(s, "%255[^:]:%d :%255[^:]:%9[^:] :%d :%255[^:]:%255[^:]:%255[^:]:%255[^:]:%d :%d :%d :%d ", namebuf, &frequency, parambuf, sourcebuf, &srate, vpidbuf, apidbuf, tpidbuf, caidbuf, &sid, &nid, &tid, &rid); - #else -- int fields = sscanf(s, "%a[^:]:%d :%a[^:]:%a[^:] :%d :%a[^:]:%a[^:]:%d :%a[^:]:%d :%d :%d :%d ", &namebuf, &frequency, ¶mbuf, &sourcebuf, &srate, &vpidbuf, &apidbuf, &tpid, &caidbuf, &sid, &nid, &tid, &rid); -+ int fields = sscanf(s, "%a[^:]:%d :%a[^:]:%a[^:] :%d :%a[^:]:%a[^:]:%a[^:]:%a[^:]:%d :%d :%d :%d ", &namebuf, &frequency, ¶mbuf, &sourcebuf, &srate, &vpidbuf, &apidbuf, &tpidbuf, &caidbuf, &sid, &nid, &tid, &rid); - #endif - if (fields >= 9) { - if (fields == 9) { -@@ -659,7 +694,37 @@ bool cChannel::Parse(const char *s) - dpids[NumDpids] = 0; - dtypes[NumDpids] = 0; - } -- -+ if (tpidbuf) { -+ char *p; -+ fixedTtxtSubtitlePages = 0; -+ // 2001;150=deu,151=fin -+ if ((p = strchr(tpidbuf, ';')) != NULL) { -+ char *q, *strtok_next; -+ *p++ = 0; -+ while ((q = strtok_r(p, ",", &strtok_next)) != NULL) { -+ if (fixedTtxtSubtitlePages < MAXTXTPAGES) { -+ int page; -+ char *l = strchr(q, '='); -+ if (l) -+ *l++ = 0; -+ if (sscanf(q, "%d", &page) == 1) { -+ teletextSubtitlePages[fixedTtxtSubtitlePages] = tTeletextSubtitlePage(page); -+ if (l) -+ strn0cpy(teletextSubtitlePages[fixedTtxtSubtitlePages].ttxtLanguage, l, MAXLANGCODE1); -+ fixedTtxtSubtitlePages++; -+ } -+ else -+ esyslog("ERROR: invalid Teletext page!"); // no need to set ok to 'false' -+ } -+ else -+ esyslog("ERROR: too many Teletext pages!"); // no need to set ok to 'false' -+ p = NULL; -+ } -+ totalTtxtSubtitlePages = fixedTtxtSubtitlePages; -+ } -+ if (sscanf(tpidbuf, "%d", &tpid) != 1) -+ return false; -+ } - if (caidbuf) { - char *p = caidbuf; - char *q; -@@ -696,6 +761,7 @@ bool cChannel::Parse(const char *s) - free(sourcebuf); - free(vpidbuf); - free(apidbuf); -+ free(tpidbuf); - free(caidbuf); - free(namebuf); - if (!GetChannelID().Valid()) { ---- a/pat.c -+++ b/pat.c -@@ -17,6 +17,7 @@ - #include "libsi/section.h" - #include "libsi/descriptor.h" - #include "thread.h" -+#include "vdrttxtsubshooks.h" - - #define PMT_SCAN_TIMEOUT 10 // seconds - -@@ -347,6 +348,8 @@ void cPatFilter::Process(u_short Pid, u_ - char DLangs[MAXDPIDS][MAXLANGCODE2] = { "" }; - char SLangs[MAXSPIDS][MAXLANGCODE2] = { "" }; - int Tpid = 0; -+ tTeletextSubtitlePage TeletextSubtitlePages[MAXTXTPAGES]; -+ int NumTPages = 0; - int NumApids = 0; - int NumDpids = 0; - int NumSpids = 0; -@@ -438,8 +441,21 @@ void cPatFilter::Process(u_short Pid, u_ - NumSpids++; - } - break; -- case SI::TeletextDescriptorTag: -+ case SI::TeletextDescriptorTag: { - Tpid = esPid; -+ SI::TeletextDescriptor *sd = (SI::TeletextDescriptor *)d; -+ SI::TeletextDescriptor::Teletext ttxt; -+ for (SI::Loop::Iterator it; sd->teletextLoop.getNext(ttxt, it); ) { -+ bool isSubtitlePage = (ttxt.getTeletextType() == 0x02) || (ttxt.getTeletextType() == 0x05); -+ if ((NumTPages < MAXTXTPAGES) && ttxt.languageCode[0] && isSubtitlePage) { -+ strn0cpy(TeletextSubtitlePages[NumTPages].ttxtLanguage, I18nNormalizeLanguageCode(ttxt.languageCode), MAXLANGCODE1); -+ TeletextSubtitlePages[NumTPages].ttxtPage = ttxt.getTeletextPageNumber(); -+ TeletextSubtitlePages[NumTPages].ttxtMagazine = ttxt.getTeletextMagazineNumber(); -+ TeletextSubtitlePages[NumTPages].ttxtType = ttxt.getTeletextType(); -+ NumTPages++; -+ } -+ } -+ } - break; - case SI::ISO639LanguageDescriptorTag: { - SI::ISO639LanguageDescriptor *ld = (SI::ISO639LanguageDescriptor *)d; -@@ -541,6 +557,12 @@ void cPatFilter::Process(u_short Pid, u_ - } - if (Setup.UpdateChannels >= 2) { - Channel->SetPids(Vpid, Ppid, Vtype, Apids, Atypes, ALangs, Dpids, Dtypes, DLangs, Spids, SLangs, Tpid); -+ if (NumTPages < MAXTXTPAGES) { -+ int manualPageNumber = cVDRTtxtsubsHookListener::Hook()->ManualPageNumber(Channel); -+ if (manualPageNumber) -+ TeletextSubtitlePages[NumTPages++] = tTeletextSubtitlePage(manualPageNumber); -+ } -+ Channel->SetTeletextSubtitlePages(TeletextSubtitlePages, NumTPages); - if (!cSource::IsType(Channel->Source(), 'I')) - Channel->SetCaIds(CaDescriptors->CaIds()); - Channel->SetSubtitlingDescriptors(SubtitlingTypes, CompositionPageIds, AncillaryPageIds); Index: multimedia/vdr/files/vdr-1.7.18-1.7.19-tspacketbug.diff =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr/files/vdr-1.7.18-1.7.19-tspacketbug.diff,v retrieving revision 1.1 diff -u -p -r1.1 vdr-1.7.18-1.7.19-tspacketbug.diff --- multimedia/vdr/files/vdr-1.7.18-1.7.19-tspacketbug.diff 25 Jun 2011 19:02:04 -0000 1.1 +++ multimedia/vdr/files/vdr-1.7.18-1.7.19-tspacketbug.diff 2 Jan 2012 18:31:44 -0000 @@ -1,356 +0,0 @@ -diff -ruN vdr-1.7.18/recorder.c vdr-1.7.19/recorder.c ---- vdr-1.7.18/recorder.c 2010-12-27 12:35:46.000000000 +0100 -+++ vdr-1.7.19/recorder.c 2011-06-12 16:16:45.000000000 +0200 -@@ -4,7 +4,7 @@ - * See the main source file 'vdr.c' for copyright information and - * how to reach the author. - * -- * $Id: recorder.c 2.9 2010/12/27 11:35:46 kls Exp $ -+ * $Id: recorder.c 2.11 2011/06/12 14:16:45 kls Exp $ - */ - - #include "recorder.h" -@@ -31,7 +31,7 @@ - - SpinUpDisk(FileName); - -- ringBuffer = new cRingBufferLinear(RECORDERBUFSIZE, MIN_TS_PACKETS_FOR_FRAME_DETECTOR * TS_SIZE, true, "Recorder"); -+ ringBuffer = new cRingBufferLinear(RECORDERBUFSIZE, TS_SIZE, true, "Recorder"); - ringBuffer->SetTimeouts(0, 100); - - int Pid = Channel->Vpid(); -@@ -119,6 +119,8 @@ - time_t t = time(NULL); - bool InfoWritten = false; - bool FirstIframeSeen = false; -+ int FileNumber = 0; -+ off_t FrameOffset = -1; - while (Running()) { - int r; - uchar *b = ringBuffer->Get(r); -@@ -131,7 +133,7 @@ - if (!InfoWritten) { - cRecordingInfo RecordingInfo(recordingName); - if (RecordingInfo.Read()) { -- if (frameDetector->FramesPerSecond() > 0 && !DoubleEqual(RecordingInfo.FramesPerSecond(), frameDetector->FramesPerSecond())) { -+ if (frameDetector->FramesPerSecond() > 0 && DoubleEqual(RecordingInfo.FramesPerSecond(), DEFAULTFRAMESPERSECOND) && !DoubleEqual(RecordingInfo.FramesPerSecond(), frameDetector->FramesPerSecond())) { - RecordingInfo.SetFramesPerSecond(frameDetector->FramesPerSecond()); - RecordingInfo.Write(); - Recordings.UpdateByName(recordingName); -@@ -139,12 +141,16 @@ - } - InfoWritten = true; - } -+ if (frameDetector->NewPayload()) { -+ FileNumber = fileName->Number(); -+ FrameOffset = fileSize; -+ } - if (FirstIframeSeen || frameDetector->IndependentFrame()) { - FirstIframeSeen = true; // start recording with the first I-frame - if (!NextFile()) - break; - if (index && frameDetector->NewFrame()) -- index->Write(frameDetector->IndependentFrame(), fileName->Number(), fileSize); -+ index->Write(frameDetector->IndependentFrame(), FileNumber, FrameOffset); - if (frameDetector->IndependentFrame()) { - recordFile->Write(patPmtGenerator.GetPat(), TS_SIZE); - fileSize += TS_SIZE; -diff -ruN vdr-1.7.18/recording.c vdr-1.7.19/recording.c ---- vdr-1.7.18/recording.c 2011-04-17 15:53:11.000000000 +0200 -+++ vdr-1.7.19/recording.c 2011-06-12 15:04:28.000000000 +0200 -@@ -4,7 +4,7 @@ - * See the main source file 'vdr.c' for copyright information and - * how to reach the author. - * -- * $Id: recording.c 2.30 2011/04/17 13:53:11 kls Exp $ -+ * $Id: recording.c 2.31 2011/06/12 13:04:28 kls Exp $ - */ - - #include "recording.h" -@@ -1403,11 +1403,12 @@ - bool Rewind = false; - cFileName FileName(recordingName, false); - cUnbufferedFile *ReplayFile = FileName.Open(); -- cRingBufferLinear Buffer(IFG_BUFFER_SIZE, MIN_TS_PACKETS_FOR_FRAME_DETECTOR * TS_SIZE); -+ cRingBufferLinear Buffer(IFG_BUFFER_SIZE, TS_SIZE); - cPatPmtParser PatPmtParser; - cFrameDetector FrameDetector; - cIndexFile IndexFile(recordingName, true); - int BufferChunks = KILOBYTE(1); // no need to read a lot at the beginning when parsing PAT/PMT -+ int FileNumber = 0; - off_t FileSize = 0; - off_t FrameOffset = -1; - Skins.QueueMessage(mtInfo, tr("Regenerating index file")); -@@ -1424,12 +1425,18 @@ - if (Data) { - if (FrameDetector.Synced()) { - // Step 3 - generate the index: -- if (TsPid(Data) == PATPID) -+ if (FrameOffset < 0 && TsPid(Data) == PATPID) { -+ FileNumber = FileName.Number(); - FrameOffset = FileSize; // the PAT/PMT is at the beginning of an I-frame -+ } - int Processed = FrameDetector.Analyze(Data, Length); - if (Processed > 0) { -+ if (FrameDetector.NewPayload() && FrameOffset < 0) { -+ FileNumber = FileName.Number(); -+ FrameOffset = FileSize; -+ } - if (FrameDetector.NewFrame()) { -- IndexFile.Write(FrameDetector.IndependentFrame(), FileName.Number(), FrameOffset >= 0 ? FrameOffset : FileSize); -+ IndexFile.Write(FrameDetector.IndependentFrame(), FileNumber, FrameOffset); - FrameOffset = -1; - } - FileSize += Processed; -diff -ruN vdr-1.7.18/remux.c vdr-1.7.19/remux.c ---- vdr-1.7.18/remux.c 2011-03-20 11:21:14.000000000 +0100 -+++ vdr-1.7.19/remux.c 2011-06-12 16:24:09.000000000 +0200 -@@ -4,7 +4,7 @@ - * See the main source file 'vdr.c' for copyright information and - * how to reach the author. - * -- * $Id: remux.c 2.53 2011/03/20 10:21:14 kls Exp $ -+ * $Id: remux.c 2.57 2011/06/12 14:24:09 kls Exp $ - */ - - #include "remux.h" -@@ -12,6 +12,7 @@ - #include "libsi/si.h" - #include "libsi/section.h" - #include "libsi/descriptor.h" -+#include "recording.h" - #include "shutdown.h" - #include "tools.h" - -@@ -781,7 +782,8 @@ - { - SetPid(Pid, Type); - synced = false; -- newFrame = independentFrame = false; -+ newPayload = newFrame = independentFrame = false; -+ frameTypeOffset = -1; - numPtsValues = 0; - numFrames = 0; - numIFrames = 0; -@@ -808,7 +810,8 @@ - - void cFrameDetector::Reset(void) - { -- newFrame = independentFrame = false; -+ newPayload = newFrame = independentFrame = false; -+ frameTypeOffset = -1; - payloadUnitOfFrame = 0; - scanning = false; - scanner = EMPTY_SCANNER; -@@ -816,9 +819,8 @@ - - int cFrameDetector::Analyze(const uchar *Data, int Length) - { -- int SeenPayloadStart = false; - int Processed = 0; -- newFrame = independentFrame = false; -+ newPayload = newFrame = independentFrame = false; - while (Length >= TS_SIZE) { - if (Data[0] != TS_SYNC_BYTE) { - int Skipped = 1; -@@ -831,16 +833,13 @@ - int Pid = TsPid(Data); - if (Pid == pid) { - if (TsPayloadStart(Data)) { -- SeenPayloadStart = true; - if (synced && Processed) -- return Processed; -- if (Length < MIN_TS_PACKETS_FOR_FRAME_DETECTOR * TS_SIZE) -- return Processed; // need more data, in case the frame type is not stored in the first TS packet -+ return Processed; // flush everything before this new payload - if (framesPerSecond <= 0.0) { - // frame rate unknown, so collect a sequence of PTS values: - if (numPtsValues < MaxPtsValues && numIFrames < 2) { // collect a sequence containing at least two I-frames - const uchar *Pes = Data + TsPayloadOffset(Data); -- if (PesHasPts(Pes)) { -+ if (numIFrames && PesHasPts(Pes)) { - ptsValues[numPtsValues] = PesGetPts(Pes); - // check for rollover: - if (numPtsValues && ptsValues[numPtsValues - 1] > 0xF0000000 && ptsValues[numPtsValues] < 0x10000000) { -@@ -885,8 +884,8 @@ - else - framesPerSecond = 60.0 / 1.001; - else { -- framesPerSecond = 25.0; -- dsyslog("unknown frame delta (%d), assuming 25 fps", Delta); -+ framesPerSecond = DEFAULTFRAMESPERSECOND; -+ dsyslog("unknown frame delta (%d), assuming %5.2f fps", Delta, DEFAULTFRAMESPERSECOND); - } - } - else // audio -@@ -900,6 +899,10 @@ - if (scanning) { - int PayloadOffset = TsPayloadOffset(Data); - if (TsPayloadStart(Data)) { -+ if (synced && Processed) -+ return Processed; // flush everything before this new payload -+ newPayload = true; -+ scanner = EMPTY_SCANNER; - PayloadOffset += PesPayloadOffset(Data + PayloadOffset); - if (!framesPerPayloadUnit) - framesPerPayloadUnit = framesInPayloadUnit; -@@ -907,17 +910,30 @@ - dbgframes("/"); - } - for (int i = PayloadOffset; scanning && i < TS_SIZE; i++) { -- scanner <<= 8; -- scanner |= Data[i]; -+ if (frameTypeOffset < 0) { -+ scanner <<= 8; -+ scanner |= Data[i]; -+ } -+ else -+ frameTypeOffset += PayloadOffset; - switch (type) { - case 0x01: // MPEG 1 video - case 0x02: // MPEG 2 video - if (scanner == 0x00000100) { // Picture Start Code -+ if (frameTypeOffset < 0) { -+ frameTypeOffset = i + 2; -+ if (frameTypeOffset >= TS_SIZE) { // the byte to check is in the next TS packet -+ frameTypeOffset -= TS_SIZE; -+ if (!synced) -+ dbgframes("%d>", frameTypeOffset); -+ break; -+ } -+ } - scanner = EMPTY_SCANNER; -- if (synced && !SeenPayloadStart && Processed) -- return Processed; // flush everything before this new frame - newFrame = true; -- independentFrame = ((Data[i + 2] >> 3) & 0x07) == 1; // I-Frame -+ uchar FrameType = (Data[frameTypeOffset] >> 3) & 0x07; -+ frameTypeOffset = -1; -+ independentFrame = FrameType == 1; // I-Frame - if (synced) { - if (framesPerPayloadUnit <= 1) - scanning = false; -@@ -928,7 +944,7 @@ - numIFrames++; - if (numIFrames == 1) - numFrames++; -- dbgframes("%d ", (Data[i + 2] >> 3) & 0x07); -+ dbgframes("%u ", FrameType); - } - if (synced) - return Processed + TS_SIZE; // flag this new frame -@@ -936,11 +952,20 @@ - break; - case 0x1B: // MPEG 4 video - if (scanner == 0x00000109) { // Access Unit Delimiter -+ if (frameTypeOffset < 0) { -+ frameTypeOffset = i + 1; -+ if (frameTypeOffset >= TS_SIZE) { // the byte to check is in the next TS packet -+ frameTypeOffset -= TS_SIZE; -+ if (!synced) -+ dbgframes("%d>", frameTypeOffset); -+ break; -+ } -+ } - scanner = EMPTY_SCANNER; -- if (synced && !SeenPayloadStart && Processed) -- return Processed; // flush everything before this new frame - newFrame = true; -- independentFrame = Data[i + 1] == 0x10; -+ uchar FrameType = Data[frameTypeOffset]; -+ frameTypeOffset = -1; -+ independentFrame = FrameType == 0x10; - if (synced) { - if (framesPerPayloadUnit < 0) { - payloadUnitOfFrame = (payloadUnitOfFrame + 1) % -framesPerPayloadUnit; -@@ -958,7 +983,7 @@ - numIFrames++; - if (numIFrames == 1) - numFrames++; -- dbgframes("%02X ", Data[i + 1]); -+ dbgframes("%02X ", FrameType); - } - if (synced) - return Processed + TS_SIZE; // flag this new frame -diff -ruN vdr-1.7.18/remux.h vdr-1.7.19/remux.h ---- vdr-1.7.18/remux.h 2011-03-19 17:52:46.000000000 +0100 -+++ vdr-1.7.19/remux.h 2011-06-12 14:49:17.000000000 +0200 -@@ -4,7 +4,7 @@ - * See the main source file 'vdr.c' for copyright information and - * how to reach the author. - * -- * $Id: remux.h 2.28 2011/03/19 16:52:46 kls Exp $ -+ * $Id: remux.h 2.30 2011/06/12 12:49:17 kls Exp $ - */ - - #ifndef __REMUX_H -@@ -84,15 +84,18 @@ - - inline int TsPayloadOffset(const uchar *p) - { -- int o = (p[3] & TS_ADAPT_FIELD_EXISTS) ? p[4] + 5 : 4; -+ int o = TsHasAdaptationField(p) ? p[4] + 5 : 4; - return o <= TS_SIZE ? o : TS_SIZE; - } - - inline int TsGetPayload(const uchar **p) - { -- int o = TsPayloadOffset(*p); -- *p += o; -- return TS_SIZE - o; -+ if (TsHasPayload(*p)) { -+ int o = TsPayloadOffset(*p); -+ *p += o; -+ return TS_SIZE - o; -+ } -+ return 0; - } - - inline int TsContinuityCounter(const uchar *p) -@@ -294,7 +297,7 @@ - ~cTsToPes(); - void PutTs(const uchar *Data, int Length); - ///< Puts the payload data of the single TS packet at Data into the converter. -- ///< Length is always 188. -+ ///< Length is always TS_SIZE. - ///< If the given TS packet starts a new PES payload packet, the converter - ///< will be automatically reset. Any packets before the first one that starts - ///< a new PES payload packet will be ignored. -@@ -333,16 +336,16 @@ - - // Frame detector: - --#define MIN_TS_PACKETS_FOR_FRAME_DETECTOR 2 -- - class cFrameDetector { - private: - enum { MaxPtsValues = 150 }; - int pid; - int type; - bool synced; -+ bool newPayload; - bool newFrame; - bool independentFrame; -+ int frameTypeOffset; - uint32_t ptsValues[MaxPtsValues]; // 32 bit is enough - we only need the delta - int numPtsValues; - int numFrames; -@@ -368,12 +371,17 @@ - ///< the frame detector for actual work. - int Analyze(const uchar *Data, int Length); - ///< Analyzes the TS packets pointed to by Data. Length is the number of -- ///< bytes Data points to, and must be a multiple of 188. -+ ///< bytes Data points to, and must be a multiple of TS_SIZE. - ///< Returns the number of bytes that have been analyzed. - ///< If the return value is 0, the data was not sufficient for analyzing and - ///< Analyze() needs to be called again with more actual data. - bool Synced(void) { return synced; } - ///< Returns true if the frame detector has synced on the data stream. -+ bool NewPayload(void) { return newPayload; } -+ ///< Returns true if the data given to the last call to Analyze() started a -+ ///< new payload. The caller should remember the current file offset in -+ ///< order to be able to generate an index entry later, when NewFrame() -+ ///< returns true. - bool NewFrame(void) { return newFrame; } - ///< Returns true if the data given to the last call to Analyze() started a - ///< new frame. Index: multimedia/vdr/files/vdr-1.7.19-ttxtsubs.patch-3 =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr/files/vdr-1.7.19-ttxtsubs.patch-3,v retrieving revision 1.1 diff -u -p -r1.1 vdr-1.7.19-ttxtsubs.patch-3 --- multimedia/vdr/files/vdr-1.7.19-ttxtsubs.patch-3 25 Jun 2011 19:02:04 -0000 1.1 +++ multimedia/vdr/files/vdr-1.7.19-ttxtsubs.patch-3 2 Jan 2012 18:31:44 -0000 @@ -1,21 +0,0 @@ ---- a/ci.c -+++ b/ci.c -@@ -1917,6 +1917,8 @@ void cCamSlot::AddChannel(const cChannel - AddPid(Channel->Sid(), *Dpid, STREAM_TYPE_PRIVATE); - for (const int *Spid = Channel->Spids(); *Spid; Spid++) - AddPid(Channel->Sid(), *Spid, STREAM_TYPE_PRIVATE); -+ if (Channel->Tpid() && Setup.SupportTeletext) -+ AddPid(Channel->Sid(), Channel->Tpid(), STREAM_TYPE_PRIVATE); - } - } - -@@ -1940,6 +1942,9 @@ bool cCamSlot::CanDecrypt(const cChannel - CaPmt.AddPid(*Dpid, STREAM_TYPE_PRIVATE); - for (const int *Spid = Channel->Spids(); *Spid; Spid++) - CaPmt.AddPid(*Spid, STREAM_TYPE_PRIVATE); -+ if (Channel->Tpid() && Setup.SupportTeletext) { -+ CaPmt.AddPid(Channel->Tpid(), STREAM_TYPE_PRIVATE); -+ } - cas->SendPMT(&CaPmt); - cTimeMs Timeout(QUERY_REPLY_TIMEOUT); - do { Index: multimedia/vdr/files/patch-vdr-1.7.22_FreeBSD @@ -0,0 +1,1221 @@ +Index: Make.config.template +@@ -8,6 +8,11 @@ + # + # $Id: Make.config.template 2.4 2011/12/04 14:41:00 kls Exp $ + ++OSTYPE ?= $(shell uname -s) ++ifeq ($(OSTYPE),FreeBSD) ++FREEBSD=1 ++endif ++ + ### The C compiler and options: + + CC = gcc +@@ -23,20 +28,34 @@ endif + + ### The directory environment: + +-#DVBDIR = /usr/src/v4l-dvb/linux +-MANDIR = /usr/local/man +-BINDIR = /usr/local/bin ++PREFIX = /usr/local ++MANDIR = $(PREFIX)/man ++BINDIR = $(PREFIX)/bin + +-LOCDIR = ./locale + PLUGINDIR= ./PLUGINS +-PLUGINLIBDIR= $(PLUGINDIR)/lib + VIDEODIR = /video ++ ++ifdef FREEBSD ++# you have to set DVBDIR to a valid path!!! ++# you will need extra patches for DVBDIR!!! ++DVBDIR = /usr/src/v4l-dvb/linux ++LOCDIR = $(PREFIX)/share/locale ++CONFDIR = $(PREFIX)/etc/vdr ++PLUGINLIBDIR= $(PREFIX)/lib/vdr ++else ++LOCDIR = ./locale ++PLUGINLIBDIR= $(PLUGINDIR)/lib + CONFDIR = $(VIDEODIR) ++endif + + ### The remote control: + + LIRC_DEVICE = /var/run/lirc/lircd ++ifdef FREEBSD ++RCU_DEVICE = /dev/cuau0 ++else + RCU_DEVICE = /dev/ttyS1 ++endif + + ## Define if you want vdr to not run as root + #VDR_USER = vdr +@@ -46,3 +65,7 @@ RCU_DEVICE = /dev/ttyS1 + ifdef DVBDIR + INCLUDES += -I$(DVBDIR)/include + endif ++ ++ifdef FREEBSD ++INCLUDES += -I/usr/local/include ++endif +Index: Makefile +@@ -8,6 +8,11 @@ + + .DELETE_ON_ERROR: + ++OSTYPE ?= $(shell uname -s) ++ifeq ($(OSTYPE),FreeBSD) ++FREEBSD=1 ++endif ++ + CC ?= gcc + CFLAGS ?= -g -O3 -Wall + +@@ -21,7 +26,11 @@ MANDIR = $(PREFIX)/share/man + BINDIR = $(PREFIX)/bin + INCDIR = $(PREFIX)/include + LOCDIR = ./locale ++ifdef FREEBSD ++LIBS = -ljpeg -lpthread -lrt $(shell pkg-config --libs freetype2 fontconfig) -liconv -lintl -lutil ++else + LIBS = -ljpeg -lpthread -ldl -lcap -lrt $(shell pkg-config --libs freetype2 fontconfig) ++endif + INCLUDES ?= $(shell pkg-config --cflags freetype2 fontconfig) + + PLUGINDIR= ./PLUGINS +@@ -151,7 +160,11 @@ i18n: $(I18Nmsgs) + + install-i18n: + @mkdir -p $(DESTDIR)$(LOCDIR) ++ifdef FREEBSD ++ @(cd $(LOCALEDIR); cp -R * $(DESTDIR)$(LOCDIR)) ++else + @(cd $(LOCALEDIR); cp -r --parents * $(DESTDIR)$(LOCDIR)) ++endif + + # The 'include' directory (for plugins): + +@@ -190,7 +203,11 @@ install: install-bin install-conf instal + + install-bin: vdr + @mkdir -p $(DESTDIR)$(BINDIR) ++ifdef FREEBSD ++ @cp -f vdr svdrpsend $(DESTDIR)$(BINDIR) ++else + @cp --remove-destination vdr svdrpsend $(DESTDIR)$(BINDIR) ++endif + + # Configuration files: + +@@ -213,13 +230,18 @@ install-doc: + + install-plugins: plugins + @mkdir -p $(DESTDIR)$(PLUGINLIBDIR) ++ifdef FREEBSD ++ @cp -f $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION) $(DESTDIR)$(PLUGINLIBDIR) ++else + @cp --remove-destination $(PLUGINDIR)/lib/lib*-*.so.$(APIVERSION) $(DESTDIR)$(PLUGINLIBDIR) ++endif + + # Includes: + + install-includes: include-dir + @mkdir -p $(DESTDIR)$(INCDIR) + @cp -pLR include/vdr include/libsi $(DESTDIR)$(INCDIR) ++ @cp Make.config Make.global $(DESTDIR)$(INCDIR)/vdr + + # pkg-config file: + +Index: channels.c +@@ -29,7 +29,12 @@ tChannelID tChannelID::FromString(const + int tid; + int sid; + int rid = 0; ++#ifdef __FreeBSD__ ++ sourcebuf = MALLOC(char, 10); ++ int fields = sscanf(s, "%9[^-]-%d-%d-%d-%d", sourcebuf, &nid, &tid, &sid, &rid); ++#else + int fields = sscanf(s, "%a[^-]-%d-%d-%d-%d", &sourcebuf, &nid, &tid, &sid, &rid); ++#endif + if (fields == 4 || fields == 5) { + int source = cSource::FromString(sourcebuf); + free(sourcebuf); +@@ -554,7 +559,18 @@ bool cChannel::Parse(const char *s) + char *apidbuf = NULL; + char *tpidbuf = NULL; + char *caidbuf = NULL; ++#ifdef __FreeBSD__ ++ namebuf = MALLOC(char, 256); ++ sourcebuf = MALLOC(char, 10); ++ parambuf = MALLOC(char, 256); ++ vpidbuf = MALLOC(char, 256); ++ apidbuf = MALLOC(char, 256); ++ tpidbuf = MALLOC(char, 256); ++ caidbuf = MALLOC(char, 256); ++ int fields = sscanf(s, "%255[^:]:%d :%255[^:]:%255[^:] :%d :%255[^:]:%255[^:]:%255[^:]:%255[^:]:%d :%d :%d :%d ", namebuf, &frequency, parambuf, sourcebuf, &srate, vpidbuf, apidbuf, tpidbuf, caidbuf, &sid, &nid, &tid, &rid); ++#else + int fields = sscanf(s, "%a[^:]:%d :%a[^:]:%a[^:] :%d :%a[^:]:%a[^:]:%a[^:]:%a[^:]:%d :%d :%d :%d ", &namebuf, &frequency, ¶mbuf, &sourcebuf, &srate, &vpidbuf, &apidbuf, &tpidbuf, &caidbuf, &sid, &nid, &tid, &rid); ++#endif + if (fields >= 9) { + if (fields == 9) { + // allow reading of old format +Index: ci.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/ci.c,v +retrieving revision 1.1.1.2 +retrieving revision 1.3 +diff -u -r1.1.1.2 -r1.3 +--- ci.c 2010/02/17 10:14:44 1.1.1.2 ++++ ci.c 2010/02/17 10:46:55 1.3 +@@ -10,7 +10,11 @@ + #include "ci.h" + #include + #include ++#ifdef __FreeBSD__ ++#include ++#else + #include ++#endif + #include + #include + #include +Index: config.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/config.c,v +retrieving revision 1.1.1.4 +retrieving revision 1.4 +diff -u -r1.1.1.4 -r1.4 +--- config.c 2010/06/07 09:07:28 1.1.1.4 ++++ config.c 2010/06/07 09:12:57 1.4 +@@ -10,6 +10,9 @@ + #include "config.h" + #include + #include ++#ifdef __FreeBSD__ ++#include ++#endif + #include "device.h" + #include "i18n.h" + #include "interface.h" +Index: diseqc.c +@@ -114,7 +114,14 @@ bool cDiseqc::Parse(const char *s) + return true; + bool result = false; + char *sourcebuf = NULL; ++#ifdef __FreeBSD__ ++ sourcebuf = MALLOC(char, 10); ++ if (commands == NULL) ++ commands = MALLOC(char, 256); ++ int fields = sscanf(s, "%9[^ ] %d %c %d %255[^\n]", sourcebuf, &slof, &polarization, &lof, commands); ++#else + int fields = sscanf(s, "%a[^ ] %d %c %d %a[^\n]", &sourcebuf, &slof, &polarization, &lof, &commands); ++#endif + if (fields == 4) + commands = NULL; //XXX Apparently sscanf() doesn't work correctly if the last %a argument results in an empty string + if (4 <= fields && fields <= 5) { +Index: eit.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/eit.c,v +retrieving revision 1.1.1.3 +retrieving revision 1.5 +diff -u -r1.1.1.3 -r1.5 +--- eit.c 2010/06/07 09:07:27 1.1.1.3 ++++ eit.c 2010/06/07 09:12:57 1.5 +@@ -339,10 +339,15 @@ + if (diff > 2) { + mutex.Lock(); + if (abs(diff - lastDiff) < 3) { ++#ifdef __FreeBSD__ ++ isyslog("system time would have changed from %s (%ld) to %s (%ld)", *TimeToString(loctim), loctim, *TimeToString(sattim), sattim); ++ esyslog("stime() not available on FreeBSD, maybe use adjtime()?"); ++#else + if (stime(&sattim) == 0) + isyslog("system time changed from %s (%ld) to %s (%ld)", *TimeToString(loctim), loctim, *TimeToString(sattim), sattim); + else + esyslog("ERROR while setting system time: %m"); ++#endif + } + lastDiff = diff; + mutex.Unlock(); +Index: epg.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/epg.c,v +retrieving revision 1.1.1.3 +retrieving revision 1.5 +diff -u -r1.1.1.3 -r1.5 +--- epg.c 2010/03/01 09:42:48 1.1.1.3 ++++ epg.c 2010/03/01 09:58:06 1.5 +@@ -31,7 +31,13 @@ + bool tComponent::FromString(const char *s) + { + unsigned int Stream, Type; ++#ifdef __FreeBSD__ ++ if (description == NULL) ++ description = MALLOC(char, 256); ++ int n = sscanf(s, "%X %02X %7s %255[^\n]", &Stream, &Type, language, description); // 7 = MAXLANGCODE2 - 1 ++#else + int n = sscanf(s, "%X %02X %7s %a[^\n]", &Stream, &Type, language, &description); // 7 = MAXLANGCODE2 - 1 ++#endif + if (n != 4 || isempty(description)) { + free(description); + description = NULL; +Index: font.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/font.c,v +retrieving revision 1.1.1.3 +retrieving revision 1.5 +diff -u -r1.1.1.3 -r1.5 +--- font.c 2010/10/19 20:28:48 1.1.1.3 ++++ font.c 2010/10/19 20:32:58 1.5 +@@ -383,7 +383,11 @@ + { + if (!FontNames->Size()) { + FcInit(); ++#ifdef __FreeBSD__ ++ FcObjectSet *os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, (char *)NULL); ++#else + FcObjectSet *os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, NULL); ++#endif + FcPattern *pat = FcPatternCreate(); + FcPatternAddBool(pat, FC_SCALABLE, FcTrue); + if (Monospaced) +Index: i18n.h +=================================================================== +RCS file: /progs/network/ccvs/vdr/i18n.h,v +retrieving revision 1.1.1.2 +retrieving revision 1.3 +diff -u -r1.1.1.2 -r1.3 +--- i18n.h 2010/02/17 10:14:45 1.1.1.2 ++++ i18n.h 2010/02/17 10:46:55 1.3 +@@ -48,7 +48,11 @@ + ///< have an actual locale installed. The rest are just dummy entries + ///< to allow having three letter language codes for other languages + ///< that have no actual locale on this system. ++#ifdef __FreeBSD__ ++const char *I18nTranslate(const char *s, const char *Plugin = NULL) __format_arg(1); ++#else + const char *I18nTranslate(const char *s, const char *Plugin = NULL) __attribute_format_arg__(1); ++#endif + ///< Translates the given string (with optional Plugin context) into + ///< the current language. If no translation is available, the original + ///< string will be returned. +Index: menu.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/menu.c,v +retrieving revision 1.1.1.6 +retrieving revision 1.7 +diff -u -r1.1.1.6 -r1.7 +Index: menuitems.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/menuitems.c,v +retrieving revision 1.1.1.4 +retrieving revision 1.5 +diff -u -r1.1.1.4 -r1.5 +--- menuitems.c 2010/06/07 09:07:27 1.1.1.4 ++++ menuitems.c 2010/06/07 09:12:57 1.5 +@@ -838,7 +838,11 @@ + struct tm tm_r; + localtime_r(value, &tm_r); + strftime(buf, DATEBUFFERSIZE, "%Y-%m-%d ", &tm_r); ++#ifdef __FreeBSD__ ++ strcat(buf, WeekDayNameReal(tm_r.tm_wday)); ++#else + strcat(buf, WeekDayName(tm_r.tm_wday)); ++#endif + } + else + *buf = 0; +Index: pat.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/pat.c,v +retrieving revision 1.1.1.5 +retrieving revision 1.6 +diff -u -r1.1.1.5 -r1.6 +--- pat.c 2010/10/19 20:28:48 1.1.1.5 ++++ pat.c 2010/10/19 20:32:58 1.6 +@@ -8,7 +8,11 @@ + */ + + #include "pat.h" ++#ifdef __FreeBSD__ ++#include ++#else + #include ++#endif + #include "channels.h" + #include "libsi/section.h" + #include "libsi/descriptor.h" +Index: recording.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/recording.c,v +retrieving revision 1.1.1.3 +retrieving revision 1.5 +diff -u -r1.1.1.3 -r1.5 +--- recording.c 2010/03/16 15:18:58 1.1.1.3 ++++ recording.c 2010/03/16 15:21:05 1.5 +@@ -1825,7 +1829,11 @@ + // Search for a PAT packet from the end of the file: + cPatPmtParser PatPmtParser; + sprintf(pFileNumber, RECORDFILESUFFIXTS, Number); ++#ifdef __FreeBSD__ ++ int fd = open(fileName, O_RDONLY, DEFFILEMODE); ++#else + int fd = open(fileName, O_RDONLY | O_LARGEFILE, DEFFILEMODE); ++#endif + if (fd >= 0) { + off_t pos = lseek(fd, -TS_SIZE, SEEK_END); + while (pos >= 0) { +@@ -1866,14 +1874,22 @@ + int BlockingFlag = blocking ? 0 : O_NONBLOCK; + if (record) { + dsyslog("recording to '%s'", fileName); ++#ifdef __FreeBSD__ ++ file = OpenVideoFile(fileName, O_RDWR | O_CREAT | BlockingFlag); ++#else + file = OpenVideoFile(fileName, O_RDWR | O_CREAT | O_LARGEFILE | BlockingFlag); ++#endif + if (!file) + LOG_ERROR_STR(fileName); + } + else { + if (access(fileName, R_OK) == 0) { + dsyslog("playing '%s'", fileName); ++#ifdef __FreeBSD__ ++ file = cUnbufferedFile::Create(fileName, O_RDONLY | BlockingFlag); ++#else + file = cUnbufferedFile::Create(fileName, O_RDONLY | O_LARGEFILE | BlockingFlag); ++#endif + if (!file) + LOG_ERROR_STR(fileName); + } +Index: skins.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/skins.c,v +retrieving revision 1.1.1.2 +retrieving revision 1.3 +diff -u -r1.1.1.2 -r1.3 +--- skins.c 2010/02/17 10:14:45 1.1.1.2 ++++ skins.c 2010/02/17 10:46:55 1.3 +@@ -11,6 +11,20 @@ + #include "interface.h" + #include "status.h" + ++#ifdef __FreeBSD__ ++/* XXX Implement strchrnul for FreeBSD. */ ++static char * ++strchrnul (const char *s, int c_in) ++{ ++ char c = c_in; ++ while (*s && (*s != c)) ++ s++; ++ ++ return (char *) s; ++} ++#endif ++ ++ + // --- cSkinQueuedMessage ---------------------------------------------------- + + class cSkinQueuedMessage : public cListObject { +Index: sources.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/sources.c,v +retrieving revision 1.1.1.4 +retrieving revision 1.5 +diff -u -r1.1.1.4 -r1.5 +--- sources.c 2010/03/16 15:18:58 1.1.1.4 ++++ sources.c 2010/03/16 15:21:05 1.5 +@@ -31,7 +31,14 @@ + bool cSource::Parse(const char *s) + { + char *codeBuf = NULL; ++#ifdef __FreeBSD__ ++ codeBuf = MALLOC(char, 10); ++ if (description == NULL) ++ description = MALLOC(char, 256); ++ if (2 == sscanf(s, "%9[^ ] %255[^\n]", codeBuf, description)) ++#else + if (2 == sscanf(s, "%a[^ ] %a[^\n]", &codeBuf, &description)) ++#endif + code = FromString(codeBuf); + free(codeBuf); + return code != stNone && description && *description; +Index: svdrp.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/svdrp.c,v +retrieving revision 1.1.1.2 +retrieving revision 1.4 +diff -u -r1.1.1.2 -r1.4 +--- svdrp.c 2010/02/17 10:14:45 1.1.1.2 ++++ svdrp.c 2010/02/17 12:34:54 1.4 +@@ -40,6 +40,12 @@ + #include "tools.h" + #include "videodir.h" + ++/* FreeBSD has it's own version of isnumber(), ++ but VDR's version is incompatible */ ++#ifdef __FreeBSD__ ++#undef isnumber ++#endif ++ + // --- cSocket --------------------------------------------------------------- + + cSocket::cSocket(int Port, int Queue) +Index: themes.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/themes.c,v +retrieving revision 1.1.1.2 +retrieving revision 1.3 +diff -u -r1.1.1.2 -r1.3 +--- themes.c 2010/02/17 10:14:44 1.1.1.2 ++++ themes.c 2010/02/17 10:46:55 1.3 +@@ -47,7 +47,11 @@ + // FileName is ok + if (SetName) { + free(name); ++#ifdef __FreeBSD__ ++ name = (char *)strndup(n, e - n); ++#else + name = strndup(n, e - n); ++#endif + } + } + else +Index: thread.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/thread.c,v +retrieving revision 1.1.1.2 +retrieving revision 1.6 +diff -u -r1.1.1.2 -r1.6 +--- thread.c 2010/02/17 10:14:45 1.1.1.2 ++++ thread.c 2010/02/24 08:41:13 1.6 +@@ -9,15 +9,22 @@ + + #include "thread.h" + #include ++#ifdef __FreeBSD__ ++#include ++#include ++#else + #include + #include ++#endif + #include + #include + #include + #include + #include + #include ++#ifndef __FreeBSD__ + #include ++#endif + #include + #include "tools.h" + +@@ -143,7 +150,9 @@ + { + pthread_rwlockattr_t attr; + pthread_rwlockattr_init(&attr); ++#ifndef __FreeBSD__ + pthread_rwlockattr_setkind_np(&attr, PreferWriter ? PTHREAD_RWLOCK_PREFER_WRITER_NP : PTHREAD_RWLOCK_PREFER_READER_NP); ++#endif + pthread_rwlock_init(&rwlock, &attr); + } + +@@ -179,7 +188,11 @@ + locked = 0; + pthread_mutexattr_t attr; + pthread_mutexattr_init(&attr); ++#ifdef __FreeBSD__ ++ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK); ++#else + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ERRORCHECK_NP); ++#endif + pthread_mutex_init(&mutex, &attr); + } + +@@ -228,8 +241,12 @@ + + void cThread::SetIOPriority(int Priority) + { ++#ifdef __FreeBSD__ ++ esyslog("ERROR: syscall(SYS_ioprio_set ...) unsupported on FreeBSD"); ++#else + if (syscall(SYS_ioprio_set, 1, 0, (Priority & 0xff) | (2 << 13)) < 0) // best effort class + LOG_ERROR; ++#endif + } + + void cThread::SetDescription(const char *Description, ...) +@@ -335,7 +352,11 @@ + + tThreadId cThread::ThreadId(void) + { ++#ifdef __FreeBSD__ ++ return reinterpret_cast(::pthread_self()); ++#else + return syscall(__NR_gettid); ++#endif + } + + void cThread::SetMainThreadId(void) +@@ -461,7 +482,11 @@ + int MaxPossibleFileDescriptors = getdtablesize(); + for (int i = STDERR_FILENO + 1; i < MaxPossibleFileDescriptors; i++) + close(i); //close all dup'ed filedescriptors ++#ifdef __FreeBSD__ ++ if (execl("/bin/sh", "sh", "-c", Command, (char *)NULL) == -1) { ++#else + if (execl("/bin/sh", "sh", "-c", Command, NULL) == -1) { ++#endif + LOG_ERROR_STR(Command); + close(fd[1 - iopipe]); + _exit(-1); +@@ -544,7 +569,11 @@ + int MaxPossibleFileDescriptors = getdtablesize(); + for (int i = STDERR_FILENO + 1; i < MaxPossibleFileDescriptors; i++) + close(i); //close all dup'ed filedescriptors ++#ifdef __FreeBSD__ ++ if (execl("/bin/sh", "sh", "-c", Command, (char *)NULL) == -1) { ++#else + if (execl("/bin/sh", "sh", "-c", Command, NULL) == -1) { ++#endif + LOG_ERROR_STR(Command); + _exit(-1); + } +Index: thread.h +=================================================================== +RCS file: /progs/network/ccvs/vdr/thread.h,v +retrieving revision 1.1.1.2 +retrieving revision 1.3 +diff -u -r1.1.1.2 -r1.3 +--- thread.h 2010/02/17 10:14:44 1.1.1.2 ++++ thread.h 2010/02/17 10:46:55 1.3 +@@ -13,6 +13,9 @@ + #include + #include + #include ++#ifdef __FreeBSD__ ++#include ++#endif + + class cCondWait { + private: +Index: timers.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/timers.c,v +retrieving revision 1.1.1.2 +retrieving revision 1.3 +diff -u -r1.1.1.2 -r1.3 +--- timers.c 2010/02/17 10:14:45 1.1.1.2 ++++ timers.c 2010/02/17 10:46:55 1.3 +@@ -23,6 +23,12 @@ + // format characters in order to allow any number of blanks after a numeric + // value! + ++/* FreeBSD has it's own version of isnumber(), ++ but VDR's version is incompatible */ ++#ifdef __FreeBSD__ ++#undef isnumber ++#endif ++ + // --- cTimer ---------------------------------------------------------------- + + cTimer::cTimer(bool Instant, bool Pause, cChannel *Channel) +@@ -292,7 +298,15 @@ + s = s2; + } + bool result = false; ++#ifdef __FreeBSD__ ++ channelbuffer = MALLOC(char, 256); ++ daybuffer = MALLOC(char, 256); ++ filebuffer = MALLOC(char, 256); ++ aux = MALLOC(char, 256); ++ if (8 <= sscanf(s, "%u :%255[^:]:%255[^:]:%d :%d :%d :%d :%255[^:\n]:%255[^\n]", &flags, channelbuffer, daybuffer, &start, &stop, &priority, &lifetime, filebuffer, aux)) { ++#else + if (8 <= sscanf(s, "%u :%a[^:]:%a[^:]:%d :%d :%d :%d :%a[^:\n]:%a[^\n]", &flags, &channelbuffer, &daybuffer, &start, &stop, &priority, &lifetime, &filebuffer, &aux)) { ++#endif + ClrFlags(tfRecording); + if (aux && !*skipspace(aux)) { + free(aux); +Index: tools.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/tools.c,v +retrieving revision 1.1.1.5 +retrieving revision 1.8 +diff -u -r1.1.1.5 -r1.8 +--- tools.c 2010/10/19 20:28:48 1.1.1.5 ++++ tools.c 2010/10/19 20:32:58 1.8 +@@ -21,13 +21,24 @@ + #include + #include + #include ++#ifdef __FreeBSD__ ++#include ++#include ++#else + #include ++#endif + #include + #include + #include + #include "i18n.h" + #include "thread.h" + ++/* FreeBSD has it's own version of isnumber(), ++ but VDR's version is incompatible */ ++#ifdef __FreeBSD__ ++#undef isnumber ++#endif ++ + int SysLogLevel = 3; + + #define MAXSYSLOGBUF 256 +@@ -493,6 +504,18 @@ + { + if (!FileName) + return NULL; ++#ifdef __FreeBSD__ ++ char *resolved_path = NULL; ++ resolved_path = MALLOC(char, PATH_MAX+1); ++ if (realpath(FileName, resolved_path) == NULL) ++ { ++ if (errno != ENOENT) // some other error occurred ++ LOG_ERROR_STR(FileName); ++ else // file doesn't exist ++ resolved_path = strdup(FileName); ++ } ++ return resolved_path; ++#else + char *TargetName = canonicalize_file_name(FileName); + if (!TargetName) { + if (errno == ENOENT) // file doesn't exist +@@ -501,6 +524,7 @@ + LOG_ERROR_STR(FileName); + } + return TargetName; ++#endif + } + + bool SpinUpDisk(const char *FileName) +@@ -517,7 +541,11 @@ + int f = open(buf, O_WRONLY | O_CREAT, DEFFILEMODE); + // O_SYNC doesn't work on all file systems + if (f >= 0) { ++#ifdef __FreeBSD__ ++ if (fsync(f) < 0) ++#else + if (fdatasync(f) < 0) ++#endif + LOG_ERROR_STR(*buf); + close(f); + remove(buf); +@@ -818,7 +846,11 @@ + const char *cCharSetConv::Convert(const char *From, char *To, size_t ToLength) + { + if (cd != (iconv_t)-1 && From && *From) { ++#ifdef __FreeBSD__ ++ const char *FromPtr = (char *)From; ++#else + char *FromPtr = (char *)From; ++#endif + size_t FromLength = strlen(From); + char *ToPtr = To; + if (!ToPtr) { +@@ -920,7 +952,11 @@ + return cString(buffer, true); + } + ++#ifdef __FreeBSD__ ++cString WeekDayNameReal(int WeekDay) ++#else + cString WeekDayName(int WeekDay) ++#endif + { + char buffer[16]; + WeekDay = WeekDay == 0 ? 6 : WeekDay - 1; // we start with Monday==0! +@@ -938,10 +974,18 @@ + cString WeekDayName(time_t t) + { + struct tm tm_r; ++#ifdef __FreeBSD__ ++ return WeekDayNameReal(localtime_r(&t, &tm_r)->tm_wday); ++#else + return WeekDayName(localtime_r(&t, &tm_r)->tm_wday); ++#endif + } + ++#ifdef __FreeBSD__ ++cString WeekDayNameFullReal(int WeekDay) ++#else + cString WeekDayNameFull(int WeekDay) ++#endif + { + WeekDay = WeekDay == 0 ? 6 : WeekDay - 1; // we start with Monday==0! + switch (WeekDay) { +@@ -959,7 +1003,11 @@ + cString WeekDayNameFull(time_t t) + { + struct tm tm_r; ++#ifdef __FreeBSD__ ++ return WeekDayNameFullReal(localtime_r(&t, &tm_r)->tm_wday); ++#else + return WeekDayNameFull(localtime_r(&t, &tm_r)->tm_wday); ++#endif + } + + cString DayDateTime(time_t t) +@@ -969,7 +1017,11 @@ + time(&t); + struct tm tm_r; + tm *tm = localtime_r(&t, &tm_r); ++#ifdef __FreeBSD__ ++ snprintf(buffer, sizeof(buffer), "%s %02d.%02d. %02d:%02d", *WeekDayNameReal(tm->tm_wday), tm->tm_mday, tm->tm_mon + 1, tm->tm_hour, tm->tm_min); ++#else + snprintf(buffer, sizeof(buffer), "%s %02d.%02d. %02d:%02d", *WeekDayName(tm->tm_wday), tm->tm_mday, tm->tm_mon + 1, tm->tm_hour, tm->tm_min); ++#endif + return buffer; + } + +@@ -988,7 +1040,11 @@ + char buf[32]; + struct tm tm_r; + tm *tm = localtime_r(&t, &tm_r); ++#ifdef __FreeBSD__ ++ char *p = stpcpy(buf, WeekDayNameReal(tm->tm_wday)); ++#else + char *p = stpcpy(buf, WeekDayName(tm->tm_wday)); ++#endif + *p++ = ' '; + strftime(p, sizeof(buf) - (p - buf), "%d.%m.%Y", tm); + return buf; +@@ -1315,7 +1371,11 @@ + if (!IsOpen()) { + f = FileDes; + if (f >= 0) { ++#ifdef __FreeBSD__ ++ if ((uint)f < FD_SETSIZE) { ++#else + if (f < FD_SETSIZE) { ++#endif + if (f >= maxFiles) + maxFiles = f + 1; + if (!files[f]) +@@ -1356,7 +1416,11 @@ + if (files[i]) + FD_SET(i, &set); + } ++#ifdef __FreeBSD__ ++ if (0 <= FileDes && (uint)FileDes < FD_SETSIZE && !files[FileDes]) ++#else + if (0 <= FileDes && FileDes < FD_SETSIZE && !files[FileDes]) ++#endif + FD_SET(FileDes, &set); // in case we come in with an arbitrary descriptor + if (TimeoutMs == 0) + TimeoutMs = 10; // load gets too heavy with 0 +@@ -1451,7 +1515,9 @@ + + // --- cUnbufferedFile ------------------------------------------------------- + ++#ifndef __FreeBSD__ + #define USE_FADVISE ++#endif + + #define WRITE_BUFFER KILOBYTE(800) + +@@ -1512,11 +1578,13 @@ + readahead = ra; + } + ++#ifdef USE_FADVISE + int cUnbufferedFile::FadviseDrop(off_t Offset, off_t Len) + { + // rounding up the window to make sure that not PAGE_SIZE-aligned data gets freed. + return posix_fadvise(fd, Offset - (FADVGRAN - 1), Len + (FADVGRAN - 1) * 2, POSIX_FADV_DONTNEED); + } ++#endif + + off_t cUnbufferedFile::Seek(off_t Offset, int Whence) + { +Index: tools.h +=================================================================== +RCS file: /progs/network/ccvs/vdr/tools.h,v +retrieving revision 1.1.1.2 +retrieving revision 1.3 +diff -u -r1.1.1.2 -r1.3 +--- tools.h 2010/02/17 10:14:44 1.1.1.2 ++++ tools.h 2010/02/17 10:46:55 1.3 +@@ -26,6 +26,12 @@ + #include + #include + ++#ifdef __FreeBSD__ ++#include ++typedef int (*__compar_fn_t) (__const void *, __const void *); ++#undef isnumber ++#endif ++ + typedef unsigned char uchar; + + extern int SysLogLevel; +@@ -216,9 +222,17 @@ + bool SpinUpDisk(const char *FileName); + void TouchFile(const char *FileName); + time_t LastModifiedTime(const char *FileName); ++#ifdef __FreeBSD__ ++cString WeekDayNameReal(int WeekDay); ++#else + cString WeekDayName(int WeekDay); ++#endif + cString WeekDayName(time_t t); ++#ifdef __FreeBSD__ ++cString WeekDayNameFullReal(int WeekDay); ++#else + cString WeekDayNameFull(int WeekDay); ++#endif + cString WeekDayNameFull(time_t t); + cString DayDateTime(time_t t = 0); + cString TimeToString(time_t t); +Index: vdr.c +--- vdr.c ++++ vdr.c +@@ -32,8 +32,13 @@ + #include + #include + #include ++#ifndef __FreeBSD__ + #include + #include ++#else ++#include ++#include ++#endif + #include + #include + #include "audio.h" +@@ -107,12 +112,15 @@ static bool SetUser(const char *UserName + fprintf(stderr, "vdr: cannot set user id %u: %s\n", (unsigned int)user->pw_uid, strerror(errno)); + return false; + } ++#ifndef __FreeBSD__ + if (UserDump && prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) + fprintf(stderr, "vdr: warning - cannot set dumpable: %s\n", strerror(errno)); ++#endif + } + return true; + } + ++#ifndef __FreeBSD__ + static bool DropCaps(void) + { + // drop all capabilities except selected ones +@@ -139,6 +147,7 @@ static bool SetKeepCaps(bool On) + } + return true; + } ++#endif + + static void SignalHandler(int signum) + { +@@ -388,14 +397,18 @@ int main(int argc, char *argv[]) + if (VdrUser && geteuid() == 0) { + StartedAsRoot = true; + if (strcmp(VdrUser, "root")) { ++#ifndef __FreeBSD__ + if (!SetKeepCaps(true)) + return 2; ++#endif + if (!SetUser(VdrUser, UserDump)) + return 2; ++#ifndef __FreeBSD__ + if (!SetKeepCaps(false)) + return 2; + if (!DropCaps()) + return 2; ++#endif + } + } + +@@ -539,6 +552,24 @@ int main(int argc, char *argv[]) + CodeSet++; // skip the dot + } + } ++#ifdef __FreeBSD__ ++ // If we are started without a locale query login.conf(5) for ++ // a lang setting ++ ++ if (!CodeSet || !strcmp(CodeSet, "US-ASCII")) { ++ struct passwd *User = getpwnam(VdrUser); ++ login_cap_t *Lc = login_getuserclass(User); ++ if (!Lc) ++ Lc = login_getpwclass(User); ++ if (Lc) { ++ const char *Lang = login_getcapstr(Lc, "lang", NULL, NULL); ++ if (Lang && setlocale(LC_CTYPE, Lang)) { ++ CodeSet = nl_langinfo(CODESET); ++ } ++ login_close(Lc); ++ } ++ } ++#endif + if (CodeSet) { + bool known = SI::SetSystemCharacterTable(CodeSet); + isyslog("codeset is '%s' - %s", CodeSet, known ? "known" : "unknown"); +Index: PLUGINS/src/svdrpdemo/svdrpdemo.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/PLUGINS/src/svdrpdemo/svdrpdemo.c,v +retrieving revision 1.1.1.2 +retrieving revision 1.4 +diff -u -r1.1.1.2 -r1.4 +Index: libsi/headers.h +=================================================================== +RCS file: /progs/network/ccvs/vdr/libsi/headers.h,v +retrieving revision 1.1.1.2 +retrieving revision 1.3 +diff -u -r1.1.1.2 -r1.3 +--- libsi/headers.h 2010/02/17 10:14:45 1.1.1.2 ++++ libsi/headers.h 2010/02/17 10:46:56 1.3 +@@ -17,7 +17,11 @@ + #ifndef LIBSI_HEADERS_H + #define LIBSI_HEADERS_H + ++#ifdef __FreeBSD__ ++#include ++#else + #include ++#endif + + namespace SI { + +Index: libsi/si.c +=================================================================== +RCS file: /progs/network/ccvs/vdr/libsi/si.c,v +retrieving revision 1.1.1.4 +retrieving revision 1.7 +diff -u -r1.1.1.4 -r1.7 +--- libsi/si.c 2010/03/01 09:42:49 1.1.1.4 ++++ libsi/si.c 2010/03/01 09:58:08 1.7 +@@ -13,7 +13,9 @@ + #include "si.h" + #include + #include ++#ifndef __FreeBSD__ + #include ++#endif + #include // for broadcaster stupidity workaround + #include + #include "descriptor.h" +@@ -381,7 +383,11 @@ + if (SystemCharacterTable) { + iconv_t cd = iconv_open(SystemCharacterTable, fromCode); + if (cd != (iconv_t)-1) { ++#ifdef __FreeBSD__ ++ const char *fromPtr = from; ++#else + char *fromPtr = (char *)from; ++#endif + while (fromLength > 0 && toLength > 1) { + if (iconv(cd, &fromPtr, &fromLength, &to, &toLength) == size_t(-1)) { + if (errno == EILSEQ) { +--- PLUGINS/src/dvbsddevice/Makefile.orig ++++ PLUGINS/src/dvbsddevice/Makefile +@@ -45,7 +45,7 @@ PACKAGE = vdr-$(ARCHIVE) + + ### Includes and Defines (add further entries here): + +-INCLUDES += -I$(VDRDIR)/include ++INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include + + DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' + +@@ -100,7 +100,11 @@ i18n: $(I18Nmsgs) $(I18Npot) + + libvdr-$(PLUGIN).so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ +- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++ifdef FREEBSD ++ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) ++else ++ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++endif + + dist: $(I18Npo) clean + @-rm -rf $(TMPDIR)/$(ARCHIVE) +--- PLUGINS/src/hello/Makefile.orig ++++ PLUGINS/src/hello/Makefile +@@ -45,7 +45,7 @@ PACKAGE = vdr-$(ARCHIVE) + + ### Includes and Defines (add further entries here): + +-INCLUDES += -I$(VDRDIR)/include ++INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include + + DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' + +@@ -100,7 +100,11 @@ i18n: $(I18Nmsgs) + + libvdr-$(PLUGIN).so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ +- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++ifdef FREEBSD ++ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) ++else ++ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++endif + + dist: $(I18Npo) clean + @-rm -rf $(TMPDIR)/$(ARCHIVE) +--- PLUGINS/src/osddemo/Makefile.orig ++++ PLUGINS/src/osddemo/Makefile +@@ -43,7 +43,7 @@ PACKAGE = vdr-$(ARCHIVE) + + ### Includes and Defines (add further entries here): + +-INCLUDES += -I$(VDRDIR)/include ++INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include + + DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' + +@@ -73,7 +73,11 @@ $(DEPFILE): Makefile + + libvdr-$(PLUGIN).so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ +- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++ifdef FREEBSD ++ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) ++else ++ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++endif + + dist: clean + @-rm -rf $(TMPDIR)/$(ARCHIVE) +--- PLUGINS/src/pictures/Makefile.orig ++++ PLUGINS/src/pictures/Makefile +@@ -45,7 +45,7 @@ PACKAGE = vdr-$(ARCHIVE) + + ### Includes and Defines (add further entries here): + +-INCLUDES += -I$(VDRDIR)/include ++INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include + + DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' + +@@ -100,7 +100,11 @@ i18n: $(I18Nmsgs) $(I18Npot) + + libvdr-$(PLUGIN).so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ +- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++ifdef FREEBSD ++ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) ++else ++ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++endif + + dist: $(I18Npo) clean + @-rm -rf $(TMPDIR)/$(ARCHIVE) +--- PLUGINS/src/servicedemo/Makefile.orig ++++ PLUGINS/src/servicedemo/Makefile +@@ -45,7 +45,7 @@ PACKAGE = vdr-$(ARCHIVE) + + ### Includes and Defines (add further entries here): + +-INCLUDES += -I$(VDRDIR)/include ++INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include + + DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' + +@@ -75,11 +75,19 @@ $(DEPFILE): Makefile + + libvdr-$(PLUGIN1).so: $(PLUGIN1).o + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(PLUGIN1).o -o $@ +- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++ifdef FREEBSD ++ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) ++else ++ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++endif + + libvdr-$(PLUGIN2).so: $(PLUGIN2).o + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(PLUGIN2).o -o $@ +- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++ifdef FREEBSD ++ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) ++else ++ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++endif + + dist: clean + @-rm -rf $(TMPDIR)/$(ARCHIVE) +--- PLUGINS/src/skincurses/Makefile.orig ++++ PLUGINS/src/skincurses/Makefile +@@ -45,7 +45,7 @@ PACKAGE = vdr-$(ARCHIVE) + + ### Includes and Defines (add further entries here): + +-INCLUDES += -I$(VDRDIR)/include ++INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include + + DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' + +@@ -100,7 +100,11 @@ i18n: $(I18Nmsgs) $(I18Npot) + + libvdr-$(PLUGIN).so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -lncursesw -o $@ +- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++ifdef FREEBSD ++ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) ++else ++ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++endif + + dist: $(I18Npo) clean + @-rm -rf $(TMPDIR)/$(ARCHIVE) +--- PLUGINS/src/status/Makefile.orig ++++ PLUGINS/src/status/Makefile +@@ -43,7 +43,7 @@ PACKAGE = vdr-$(ARCHIVE) + + ### Includes and Defines (add further entries here): + +-INCLUDES += -I$(VDRDIR)/include ++INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include + + DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' + +@@ -73,7 +73,11 @@ $(DEPFILE): Makefile + + libvdr-$(PLUGIN).so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ +- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++ifdef FREEBSD ++ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) ++else ++ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++endif + + dist: clean + @-rm -rf $(TMPDIR)/$(ARCHIVE) +--- PLUGINS/src/svdrpdemo/Makefile.orig ++++ PLUGINS/src/svdrpdemo/Makefile +@@ -43,7 +43,7 @@ PACKAGE = vdr-$(ARCHIVE) + + ### Includes and Defines (add further entries here): + +-INCLUDES += -I$(VDRDIR)/include ++INCLUDES = -I$(VDRDIR)/include -I${LOCALBASE}/include + + DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"' + +@@ -73,7 +73,11 @@ $(DEPFILE): Makefile + + libvdr-$(PLUGIN).so: $(OBJS) + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ +- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++ifdef FREEBSD ++ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) ++else ++ @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++endif + + dist: clean + @-rm -rf $(TMPDIR)/$(ARCHIVE) Index: multimedia/vdr/files/patch-z-config.c @@ -0,0 +1,10 @@ +--- config.c.orig ++++ config.c +@@ -72,7 +72,6 @@ cSatCableNumbers::cSatCableNumbers(int S + { + size = Size; + array = MALLOC(int, size); +- memset(array, size * sizeof(int), 0); + FromString(s); + } + Index: multimedia/vdr/files/vdr-1.7.21-ttxtsubs.patch-1 @@ -0,0 +1,959 @@ +diff --git a/MANUAL b/MANUAL +index 54e166e..57b687f 100644 +--- a/MANUAL ++++ b/MANUAL +@@ -730,6 +730,9 @@ Version 1.6 + background transparency. By default the values as broadcast + are used. + ++ Record Teletext Subtitles = no ++ If set to 'yes', teletext subtitles will be recorded. ++ + LNB: + + SLOF = 11700 The switching frequency (in MHz) between low and +diff --git a/Makefile b/Makefile +index 18d7eb9..3da4382 100644 +--- a/Makefile ++++ b/Makefile +@@ -45,6 +45,8 @@ OBJS = audio.o channels.o ci.o config.o cutter.o device.o diseqc.o dvbdevice.o d + skinclassic.o skins.o skinsttng.o sourceparams.o sources.o spu.o status.o svdrp.o themes.o thread.o\ + timers.o tools.o transfer.o vdr.o videodir.o + ++OBJS += vdrttxtsubshooks.o ++ + ifndef NO_KBD + DEFINES += -DREMOTE_KBD + endif +diff --git a/channels.c b/channels.c +index b9204f2..44d4be2 100644 +--- a/channels.c ++++ b/channels.c +@@ -378,6 +378,26 @@ void cChannel::SetSubtitlingDescriptors(uchar *SubtitlingTypes, uint16_t *Compos + } + } + ++void cChannel::SetTeletextSubtitlePages(tTeletextSubtitlePage pages[], int numberOfPages) ++{ ++ int mod = CHANNELMOD_NONE; ++ if (totalTtxtSubtitlePages != (fixedTtxtSubtitlePages + numberOfPages)) ++ mod |= CHANNELMOD_PIDS; ++ totalTtxtSubtitlePages = fixedTtxtSubtitlePages; ++ for (int i = 0; (i < numberOfPages) && (totalTtxtSubtitlePages < MAXTXTPAGES); i++) { ++ if (teletextSubtitlePages[totalTtxtSubtitlePages].ttxtMagazine != pages[i].ttxtMagazine || ++ teletextSubtitlePages[totalTtxtSubtitlePages].ttxtPage != pages[i].ttxtPage || ++ teletextSubtitlePages[totalTtxtSubtitlePages].ttxtType != pages[i].ttxtType || ++ strcmp(teletextSubtitlePages[totalTtxtSubtitlePages].ttxtLanguage, pages[i].ttxtLanguage)) { ++ mod |= CHANNELMOD_PIDS; ++ teletextSubtitlePages[totalTtxtSubtitlePages] = pages[i]; ++ } ++ totalTtxtSubtitlePages++; ++ } ++ modification |= mod; ++ Channels.SetModified(); ++} ++ + void cChannel::SetCaIds(const int *CaIds) + { + if (caids[0] && caids[0] <= CA_USER_MAX) +@@ -506,10 +526,17 @@ cString cChannel::ToText(const cChannel *Channel) + q += IntArrayToString(q, Channel->dpids, 10, Channel->dlangs, Channel->dtypes); + } + *q = 0; +- const int TBufferSize = MAXSPIDS * (5 + 1 + MAXLANGCODE2) + 10; // 5 digits plus delimiting ',' or ';' plus optional '=cod+cod', +10: paranoia and tpid ++ const int TBufferSize = (MAXTXTPAGES * MAXSPIDS) * (5 + 1 + MAXLANGCODE2) + 10; // 5 digits plus delimiting ',' or ';' plus optional '=cod+cod', +10: paranoia and tpid + char tpidbuf[TBufferSize]; + q = tpidbuf; + q += snprintf(q, sizeof(tpidbuf), "%d", Channel->tpid); ++ if (Channel->fixedTtxtSubtitlePages > 0) { ++ *q++ = '+'; ++ for (int i = 0; i < Channel->fixedTtxtSubtitlePages; ++i) { ++ tTeletextSubtitlePage page = Channel->teletextSubtitlePages[i]; ++ q += snprintf(q, sizeof(tpidbuf) - (q - tpidbuf), "%d=%s", page.PageNumber(), page.ttxtLanguage); ++ } ++ } + if (Channel->spids[0]) { + *q++ = ';'; + q += IntArrayToString(q, Channel->spids, 10, Channel->slangs); +@@ -678,6 +705,32 @@ bool cChannel::Parse(const char *s) + } + spids[NumSpids] = 0; + } ++ fixedTtxtSubtitlePages = 0; ++ if ((p = strchr(tpidbuf, '+')) != NULL) { ++ *p++ = 0; ++ char *q; ++ char *strtok_next; ++ while ((q = strtok_r(p, ",", &strtok_next)) != NULL) { ++ if (fixedTtxtSubtitlePages < MAXTXTPAGES) { ++ int page; ++ char *l = strchr(q, '='); ++ if (l) ++ *l++ = 0; ++ if (sscanf(q, "%d", &page) == 1) { ++ teletextSubtitlePages[fixedTtxtSubtitlePages] = tTeletextSubtitlePage(page); ++ if (l) ++ strn0cpy(teletextSubtitlePages[fixedTtxtSubtitlePages].ttxtLanguage, l, MAXLANGCODE2); ++ fixedTtxtSubtitlePages++; ++ } ++ else ++ esyslog("ERROR: invalid Teletext page!"); // no need to set ok to 'false' ++ } ++ else ++ esyslog("ERROR: too many Teletext pages!"); // no need to set ok to 'false' ++ p = NULL; ++ } ++ totalTtxtSubtitlePages = fixedTtxtSubtitlePages; ++ } + if (sscanf(tpidbuf, "%d", &tpid) != 1) + return false; + if (caidbuf) { +diff --git a/channels.h b/channels.h +index 51f9830..6e7367f 100644 +--- a/channels.h ++++ b/channels.h +@@ -35,6 +35,7 @@ + #define MAXDPIDS 16 // dolby (AC3 + DTS) + #define MAXSPIDS 32 // subtitles + #define MAXCAIDS 12 // conditional access ++#define MAXTXTPAGES 8 // teletext pages + + #define MAXLANGCODE1 4 // a 3 letter language code, zero terminated + #define MAXLANGCODE2 8 // up to two 3 letter language codes, separated by '+' and zero terminated +@@ -71,6 +72,16 @@ public: + static const tChannelID InvalidID; + }; + ++struct tTeletextSubtitlePage { ++ tTeletextSubtitlePage(void) { ttxtPage = ttxtMagazine = 0; ttxtType = 0x02; strcpy(ttxtLanguage, "und"); } ++ tTeletextSubtitlePage(int page) { ttxtMagazine = (page / 100) & 0x7; ttxtPage = (((page % 100) / 10) << 4) + (page % 10); ttxtType = 0x02; strcpy(ttxtLanguage, "und"); } ++ char ttxtLanguage[MAXLANGCODE1]; ++ uchar ttxtPage; ++ uchar ttxtMagazine; ++ uchar ttxtType; ++ int PageNumber(void) const { return BCDCHARTOINT(ttxtMagazine) * 100 + BCDCHARTOINT(ttxtPage); } ++ }; ++ + class cChannel; + + class cLinkChannel : public cListObject { +@@ -115,6 +126,9 @@ private: + uint16_t compositionPageIds[MAXSPIDS]; + uint16_t ancillaryPageIds[MAXSPIDS]; + int tpid; ++ int fixedTtxtSubtitlePages; ++ int totalTtxtSubtitlePages; ++ tTeletextSubtitlePage teletextSubtitlePages[MAXTXTPAGES]; + int caids[MAXCAIDS + 1]; // list is zero-terminated + int nid; + int tid; +@@ -164,6 +178,8 @@ public: + uint16_t CompositionPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? compositionPageIds[i] : uint16_t(0); } + uint16_t AncillaryPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? ancillaryPageIds[i] : uint16_t(0); } + int Tpid(void) const { return tpid; } ++ const tTeletextSubtitlePage *TeletextSubtitlePages() const { return teletextSubtitlePages; } ++ int TotalTeletextSubtitlePages() const { return totalTtxtSubtitlePages; } + const int *Caids(void) const { return caids; } + int Ca(int Index = 0) const { return Index < MAXCAIDS ? caids[Index] : 0; } + int Nid(void) const { return nid; } +@@ -190,6 +206,7 @@ public: + void SetName(const char *Name, const char *ShortName, const char *Provider); + void SetPortalName(const char *PortalName); + void SetPids(int Vpid, int Ppid, int Vtype, int *Apids, int *Atypes, char ALangs[][MAXLANGCODE2], int *Dpids, int *Dtypes, char DLangs[][MAXLANGCODE2], int *Spids, char SLangs[][MAXLANGCODE2], int Tpid); ++ void SetTeletextSubtitlePages(tTeletextSubtitlePage pages[], int numberOfPages); + void SetCaIds(const int *CaIds); // list must be zero-terminated + void SetCaDescriptors(int Level); + void SetLinkChannels(cLinkChannels *LinkChannels); +diff --git a/ci.c b/ci.c +index 59d62ef..b024f67 100644 +--- a/ci.c ++++ b/ci.c +@@ -1913,6 +1913,8 @@ void cCamSlot::AddChannel(const cChannel *Channel) + AddPid(Channel->Sid(), *Dpid, STREAM_TYPE_PRIVATE); + for (const int *Spid = Channel->Spids(); *Spid; Spid++) + AddPid(Channel->Sid(), *Spid, STREAM_TYPE_PRIVATE); ++ if (Channel->Tpid() && Setup.SupportTeletext) ++ AddPid(Channel->Sid(), Channel->Tpid(), STREAM_TYPE_PRIVATE); + } + } + +@@ -1936,6 +1938,9 @@ bool cCamSlot::CanDecrypt(const cChannel *Channel) + CaPmt.AddPid(*Dpid, STREAM_TYPE_PRIVATE); + for (const int *Spid = Channel->Spids(); *Spid; Spid++) + CaPmt.AddPid(*Spid, STREAM_TYPE_PRIVATE); ++ if (Channel->Tpid() && Setup.SupportTeletext) { ++ CaPmt.AddPid(Channel->Tpid(), STREAM_TYPE_PRIVATE); ++ } + cas->SendPMT(&CaPmt); + cTimeMs Timeout(QUERY_REPLY_TIMEOUT); + do { +diff --git a/config.c b/config.c +index 73bb00d..982bd78 100644 +--- a/config.c ++++ b/config.c +@@ -333,6 +333,7 @@ cSetup::cSetup(void) + MarginStop = 10; + AudioLanguages[0] = -1; + DisplaySubtitles = 0; ++ SupportTeletext = 0; + SubtitleLanguages[0] = -1; + SubtitleOffset = 0; + SubtitleFgTransparency = 0; +@@ -525,6 +526,7 @@ bool cSetup::Parse(const char *Name, const char *Value) + else if (!strcasecmp(Name, "MarginStop")) MarginStop = atoi(Value); + else if (!strcasecmp(Name, "AudioLanguages")) return ParseLanguages(Value, AudioLanguages); + else if (!strcasecmp(Name, "DisplaySubtitles")) DisplaySubtitles = atoi(Value); ++ else if (!strcasecmp(Name, "SupportTeletext")) SupportTeletext = atoi(Value); + else if (!strcasecmp(Name, "SubtitleLanguages")) return ParseLanguages(Value, SubtitleLanguages); + else if (!strcasecmp(Name, "SubtitleOffset")) SubtitleOffset = atoi(Value); + else if (!strcasecmp(Name, "SubtitleFgTransparency")) SubtitleFgTransparency = atoi(Value); +@@ -621,6 +623,7 @@ bool cSetup::Save(void) + Store("MarginStop", MarginStop); + StoreLanguages("AudioLanguages", AudioLanguages); + Store("DisplaySubtitles", DisplaySubtitles); ++ Store("SupportTeletext", SupportTeletext); + StoreLanguages("SubtitleLanguages", SubtitleLanguages); + Store("SubtitleOffset", SubtitleOffset); + Store("SubtitleFgTransparency", SubtitleFgTransparency); +diff --git a/config.h b/config.h +index c51e3df..e46b4bd 100644 +--- a/config.h ++++ b/config.h +@@ -235,6 +235,7 @@ public: + int MarginStart, MarginStop; + int AudioLanguages[I18N_MAX_LANGUAGES + 1]; + int DisplaySubtitles; ++ int SupportTeletext; + int SubtitleLanguages[I18N_MAX_LANGUAGES + 1]; + int SubtitleOffset; + int SubtitleFgTransparency, SubtitleBgTransparency; +diff --git a/device.c b/device.c +index ba098d8..84bdd30 100644 +--- a/device.c ++++ b/device.c +@@ -18,6 +18,7 @@ + #include "receiver.h" + #include "status.h" + #include "transfer.h" ++#include "vdrttxtsubshooks.h" + + // --- cLiveSubtitle --------------------------------------------------------- + +@@ -1250,6 +1251,13 @@ int cDevice::PlayPesPacket(const uchar *Data, int Length, bool VideoOnly) + } + break; + case 0xBD: { // private stream 1 ++ // EBU Teletext data, ETSI EN 300 472 ++ // if PES data header length = 24 and data_identifier = 0x10..0x1F (EBU Data) ++ if (Data[8] == 0x24 && Data[45] >= 0x10 && Data[45] < 0x20) { ++ cVDRTtxtsubsHookListener::Hook()->PlayerTeletextData((uint8_t*)Data, Length); ++ break; ++ } ++ + int PayloadOffset = Data[8] + 9; + + // Compatibility mode for old subtitles plugin: +@@ -1409,6 +1417,7 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly) + tsToPesVideo.Reset(); + tsToPesAudio.Reset(); + tsToPesSubtitle.Reset(); ++ tsToPesTeletext.Reset(); + } + else if (Length < TS_SIZE) { + esyslog("ERROR: skipped %d bytes of TS fragment", Length); +@@ -1454,6 +1463,17 @@ int cDevice::PlayTs(const uchar *Data, int Length, bool VideoOnly) + if (!VideoOnly || HasIBPTrickSpeed()) + PlayTsSubtitle(Data, TS_SIZE); + } ++ else if (Pid == patPmtParser.Tpid()) { ++ if (!VideoOnly || HasIBPTrickSpeed()) { ++ int l; ++ tsToPesTeletext.PutTs(Data, Length); ++ if (const uchar *p = tsToPesTeletext.GetPes(l)) { ++ if ((l > 45) && (p[0] == 0x00) && (p[1] == 0x00) && (p[2] == 0x01) && (p[3] == 0xbd) && (p[8] == 0x24) && (p[45] >= 0x10) && (p[45] < 0x20)) ++ cVDRTtxtsubsHookListener::Hook()->PlayerTeletextData((uchar *)p, l, false, patPmtParser.TeletextSubtitlePages(), patPmtParser.TotalTeletextSubtitlePages()); ++ tsToPesTeletext.Reset(); ++ } ++ } ++ } + } + } + else if (Pid == patPmtParser.Ppid()) { +diff --git a/device.h b/device.h +index fd587a8..078f080 100644 +--- a/device.h ++++ b/device.h +@@ -538,6 +538,7 @@ private: + cTsToPes tsToPesVideo; + cTsToPes tsToPesAudio; + cTsToPes tsToPesSubtitle; ++ cTsToPes tsToPesTeletext; + bool isPlayingVideo; + protected: + const cPatPmtParser *PatPmtParser(void) const { return &patPmtParser; } +diff --git a/menu.c b/menu.c +index ef2bb46..3548ccd 100644 +--- a/menu.c ++++ b/menu.c +@@ -2798,6 +2798,7 @@ void cMenuSetupDVB::Setup(void) + Add(new cMenuEditIntItem( tr("Setup.DVB$Subtitle foreground transparency"), &data.SubtitleFgTransparency, 0, 9)); + Add(new cMenuEditIntItem( tr("Setup.DVB$Subtitle background transparency"), &data.SubtitleBgTransparency, 0, 10)); + } ++ Add(new cMenuEditBoolItem(tr("Setup.DVB$Enable teletext support"), &data.SupportTeletext)); + + SetCurrent(Get(current)); + Display(); +diff --git a/po/ca_ES.po b/po/ca_ES.po +index b104fea..1c09d79 100644 +--- a/po/ca_ES.po ++++ b/po/ca_ES.po +@@ -950,6 +950,9 @@ msgstr "Transpar + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Transparncia fons subttols" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "Configuraci de l'LNB" + +diff --git a/po/cs_CZ.po b/po/cs_CZ.po +index bcafac7..370609f 100644 +--- a/po/cs_CZ.po ++++ b/po/cs_CZ.po +@@ -949,6 +949,9 @@ msgstr "Průhlednost písma titulků" + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Průhlednost pozadí titulků" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/da_DK.po b/po/da_DK.po +index 81b11eb..5daca8d 100644 +--- a/po/da_DK.po ++++ b/po/da_DK.po +@@ -947,6 +947,9 @@ msgstr "Undertekst forgrundsgennemsigtighed" + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Undertekst baggrundsgennemsigtighed" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/de_DE.po b/po/de_DE.po +index 6d5b822..0a00a5a 100644 +--- a/po/de_DE.po ++++ b/po/de_DE.po +@@ -947,6 +947,9 @@ msgstr "Untertitel-Transparenz Vordergrund" + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Untertitel-Transparenz Hintergrund" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "Videotext-Untersttzung aktivieren" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/el_GR.po b/po/el_GR.po +index 9756ea7..5d4d6ea 100644 +--- a/po/el_GR.po ++++ b/po/el_GR.po +@@ -947,6 +947,9 @@ msgstr "" + msgid "Setup.DVB$Subtitle background transparency" + msgstr "" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/es_ES.po b/po/es_ES.po +index 193e75e..1f36b60 100644 +--- a/po/es_ES.po ++++ b/po/es_ES.po +@@ -948,6 +948,9 @@ msgstr "Transparencia primer plano subt + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Transparencia fondo subttulos" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/et_EE.po b/po/et_EE.po +index 49794dd..83ff319 100644 +--- a/po/et_EE.po ++++ b/po/et_EE.po +@@ -947,6 +947,9 @@ msgstr "Subtiitri l + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Subtiitri tausta lbipaistvus" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "Teleteksti tugi" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/fi_FI.po b/po/fi_FI.po +index b093e88..4abf6a8 100644 +--- a/po/fi_FI.po ++++ b/po/fi_FI.po +@@ -950,6 +950,9 @@ msgstr "Tekstityksen läpinäkyvyys" + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Tekstityksen taustan läpinäkyvyys" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "Salli teksti-TV-tuki" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/fr_FR.po b/po/fr_FR.po +index b5c5120..86a961a 100644 +--- a/po/fr_FR.po ++++ b/po/fr_FR.po +@@ -953,6 +953,9 @@ msgstr "Transparence de l'avant-plan" + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Transparence du fond" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/hr_HR.po b/po/hr_HR.po +index ed519a2..43f2ea5 100644 +--- a/po/hr_HR.po ++++ b/po/hr_HR.po +@@ -949,6 +949,9 @@ msgstr "Transparentnost titla" + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Transparentnost pozadine titla" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/hu_HU.po b/po/hu_HU.po +index 17b905f..06f4505 100644 +--- a/po/hu_HU.po ++++ b/po/hu_HU.po +@@ -950,6 +950,9 @@ msgstr "Felirat transzparenci + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Felirat htternek transzparencija" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/it_IT.po b/po/it_IT.po +index 501300e..e0227d3 100644 +--- a/po/it_IT.po ++++ b/po/it_IT.po +@@ -954,6 +954,9 @@ msgstr "Trasparenza sottotitoli" + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Trasparenza sfondo sottotitoli" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/lt_LT.po b/po/lt_LT.po +index 6cb1faa..4efc707 100644 +--- a/po/lt_LT.po ++++ b/po/lt_LT.po +@@ -947,6 +947,9 @@ msgstr "Subtitrų fonto permatomumas" + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Subtitrų fono permatomumas" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "Konverteris (LNB)" + +diff --git a/po/nl_NL.po b/po/nl_NL.po +index ae2b85e..34a71e9 100644 +--- a/po/nl_NL.po ++++ b/po/nl_NL.po +@@ -951,6 +951,9 @@ msgstr "Transparantie voorgrond ondertiteling" + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Transparantie achtergrond ondertiteling" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/nn_NO.po b/po/nn_NO.po +index 8ec8dfb..9c129ee 100644 +--- a/po/nn_NO.po ++++ b/po/nn_NO.po +@@ -948,6 +948,9 @@ msgstr "" + msgid "Setup.DVB$Subtitle background transparency" + msgstr "" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/pl_PL.po b/po/pl_PL.po +index a5c1b47..9645eca 100644 +--- a/po/pl_PL.po ++++ b/po/pl_PL.po +@@ -948,6 +948,9 @@ msgstr "Prze + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Przerocze podtytuw: To" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/pt_PT.po b/po/pt_PT.po +index c443312..3c108ea 100644 +--- a/po/pt_PT.po ++++ b/po/pt_PT.po +@@ -948,6 +948,9 @@ msgstr "Transpar + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Transparncia de fundo das legendas" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/ro_RO.po b/po/ro_RO.po +index f8c5a1e..35ec9ec 100644 +--- a/po/ro_RO.po ++++ b/po/ro_RO.po +@@ -950,6 +950,9 @@ msgstr "Transparen + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Transparena fundalului subtitrrii" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/ru_RU.po b/po/ru_RU.po +index e683b8b..b90e565 100644 +--- a/po/ru_RU.po ++++ b/po/ru_RU.po +@@ -948,6 +948,9 @@ msgstr " + msgid "Setup.DVB$Subtitle background transparency" + msgstr " " + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "" + +diff --git a/po/sk_SK.po b/po/sk_SK.po +index 46edef5..aabb641 100644 +--- a/po/sk_SK.po ++++ b/po/sk_SK.po +@@ -947,6 +947,9 @@ msgstr "Prieh + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Priehadnos pozadia titulkov" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/sl_SI.po b/po/sl_SI.po +index 89c6923..8ef4387 100644 +--- a/po/sl_SI.po ++++ b/po/sl_SI.po +@@ -948,6 +948,9 @@ msgstr "Transparentnost podnapisov" + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Transparentnost ozadja podnapisov" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/sv_SE.po b/po/sv_SE.po +index 150f95e..020c64d 100644 +--- a/po/sv_SE.po ++++ b/po/sv_SE.po +@@ -950,6 +950,9 @@ msgstr "Transparent f + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Transparent bakgrund textremsa" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/tr_TR.po b/po/tr_TR.po +index 194943b..338c649 100644 +--- a/po/tr_TR.po ++++ b/po/tr_TR.po +@@ -947,6 +947,9 @@ msgstr "Altyaz + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Altyaz arka effaflk" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "LNB" + +diff --git a/po/uk_UA.po b/po/uk_UA.po +index 433ec70..c0a7947 100644 +--- a/po/uk_UA.po ++++ b/po/uk_UA.po +@@ -947,6 +947,9 @@ msgstr "Прозорість переднього плану субтитрів" + msgid "Setup.DVB$Subtitle background transparency" + msgstr "Прозорість заднього плану субтитрів" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "Конвертер" + +diff --git a/po/zh_CN.po b/po/zh_CN.po +index c28fe88..8a594e3 100644 +--- a/po/zh_CN.po ++++ b/po/zh_CN.po +@@ -950,6 +950,9 @@ msgstr "字幕前景透明度" + msgid "Setup.DVB$Subtitle background transparency" + msgstr "字幕背景透明度" + ++msgid "Setup.DVB$Enable teletext support" ++msgstr "" ++ + msgid "LNB" + msgstr "切换器设置" + +diff --git a/receiver.c b/receiver.c +index 6a9ba04..a5c8967 100644 +--- a/receiver.c ++++ b/receiver.c +@@ -81,7 +81,8 @@ bool cReceiver::SetPids(const cChannel *Channel) + (Channel->Ppid() == Channel->Vpid() || AddPid(Channel->Ppid())) && + AddPids(Channel->Apids()) && + AddPids(Channel->Dpids()) && +- AddPids(Channel->Spids()); ++ AddPids(Channel->Spids()) && ++ (!Setup.SupportTeletext || AddPid(Channel->Tpid())); + } + return true; + } +diff --git a/remux.c b/remux.c +index 78ab294..4f9950f 100644 +--- a/remux.c ++++ b/remux.c +@@ -219,6 +219,29 @@ int cPatPmtGenerator::MakeSubtitlingDescriptor(uchar *Target, const char *Langua + return i; + } + ++int cPatPmtGenerator::MakeTeletextDescriptor(uchar *Target, const tTeletextSubtitlePage *pages, int pageCount) ++{ ++ int i = 0, j = 0; ++ Target[i++] = SI::TeletextDescriptorTag; ++ int l = i; ++ Target[i++] = 0x00; // length ++ for (int n = 0; n < pageCount; n++) { ++ const char* Language = pages[n].ttxtLanguage; ++ Target[i++] = *Language++; ++ Target[i++] = *Language++; ++ Target[i++] = *Language++; ++ Target[i++] = (pages[n].ttxtType << 3) + pages[n].ttxtMagazine; ++ Target[i++] = pages[n].ttxtPage; ++ j++; ++ } ++ if (j > 0) { ++ Target[l] = j * 5; // update length ++ IncEsInfoLength(i); ++ return i; ++ } ++ return 0; ++} ++ + int cPatPmtGenerator::MakeLanguageDescriptor(uchar *Target, const char *Language) + { + int i = 0; +@@ -306,6 +329,7 @@ void cPatPmtGenerator::GeneratePmt(const cChannel *Channel) + if (Channel) { + int Vpid = Channel->Vpid(); + int Ppid = Channel->Ppid(); ++ int Tpid = Channel->Tpid(); + uchar *p = buf; + int i = 0; + p[i++] = 0x02; // table id +@@ -338,6 +362,10 @@ void cPatPmtGenerator::GeneratePmt(const cChannel *Channel) + i += MakeStream(buf + i, 0x06, Channel->Spid(n)); + i += MakeSubtitlingDescriptor(buf + i, Channel->Slang(n), Channel->SubtitlingType(n), Channel->CompositionPageId(n), Channel->AncillaryPageId(n)); + } ++ if (Tpid) { ++ i += MakeStream(buf + i, 0x06, Tpid); ++ i += MakeTeletextDescriptor(buf + i, Channel->TeletextSubtitlePages(), Channel->TotalTeletextSubtitlePages()); ++ } + + int sl = i - SectionLength - 2 + 4; // -2 = SectionLength storage, +4 = length of CRC + buf[SectionLength] |= (sl >> 8) & 0x0F; +@@ -411,6 +439,7 @@ void cPatPmtParser::Reset(void) + pmtPid = -1; + vpid = vtype = 0; + ppid = 0; ++ tpid = 0; + } + + void cPatPmtParser::ParsePat(const uchar *Data, int Length) +@@ -496,11 +525,13 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length) + int NumSpids = 0; + vpid = vtype = 0; + ppid = 0; ++ tpid = 0; + apids[0] = 0; + dpids[0] = 0; + spids[0] = 0; + atypes[0] = 0; + dtypes[0] = 0; ++ totalTtxtSubtitlePages = 0; + SI::PMT::Stream stream; + for (SI::Loop::Iterator it; Pmt.streamLoop.getNext(stream, it); ) { + dbgpatpmt(" stream type = %02X, pid = %d", stream.getStreamType(), stream.getPid()); +@@ -599,6 +630,28 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length) + spids[NumSpids]= 0; + } + break; ++ case SI::TeletextDescriptorTag: { ++ dbgpatpmt(" teletext"); ++ tpid = stream.getPid(); ++ SI::TeletextDescriptor *sd = (SI::TeletextDescriptor *)d; ++ SI::TeletextDescriptor::Teletext ttxt; ++ if (totalTtxtSubtitlePages < MAXTXTPAGES) { ++ for (SI::Loop::Iterator it; sd->teletextLoop.getNext(ttxt, it); ) { ++ bool isSubtitlePage = (ttxt.getTeletextType() == 0x02) || (ttxt.getTeletextType() == 0x05); ++ if (isSubtitlePage && ttxt.languageCode[0]) { ++ dbgpatpmt(" '%s:%x.%x'", ttxt.languageCode, ttxt.getTeletextMagazineNumber(), ttxt.getTeletextPageNumber()); ++ strn0cpy(teletextSubtitlePages[totalTtxtSubtitlePages].ttxtLanguage, I18nNormalizeLanguageCode(ttxt.languageCode), MAXLANGCODE1); ++ teletextSubtitlePages[totalTtxtSubtitlePages].ttxtPage = ttxt.getTeletextPageNumber(); ++ teletextSubtitlePages[totalTtxtSubtitlePages].ttxtMagazine = ttxt.getTeletextMagazineNumber(); ++ teletextSubtitlePages[totalTtxtSubtitlePages].ttxtType = ttxt.getTeletextType(); ++ totalTtxtSubtitlePages++; ++ if (totalTtxtSubtitlePages >= MAXTXTPAGES) ++ break; ++ } ++ } ++ } ++ } ++ break; + case SI::ISO639LanguageDescriptorTag: { + SI::ISO639LanguageDescriptor *ld = (SI::ISO639LanguageDescriptor *)d; + dbgpatpmt(" '%s'", ld->languageCode); +diff --git a/remux.h b/remux.h +index b882279..4af51e5 100644 +--- a/remux.h ++++ b/remux.h +@@ -174,6 +174,7 @@ protected: + int MakeStream(uchar *Target, uchar Type, int Pid); + int MakeAC3Descriptor(uchar *Target, uchar Type); + int MakeSubtitlingDescriptor(uchar *Target, const char *Language, uchar SubtitlingType, uint16_t CompositionPageId, uint16_t AncillaryPageId); ++ int MakeTeletextDescriptor(uchar *Target, const tTeletextSubtitlePage *pages, int pageCount); + int MakeLanguageDescriptor(uchar *Target, const char *Language); + int MakeCRC(uchar *Target, const uchar *Data, int Length); + void GeneratePmtPid(const cChannel *Channel); +@@ -219,6 +220,7 @@ private: + int vpid; + int ppid; + int vtype; ++ int tpid; + int apids[MAXAPIDS + 1]; // list is zero-terminated + int atypes[MAXAPIDS + 1]; // list is zero-terminated + char alangs[MAXAPIDS][MAXLANGCODE2]; +@@ -231,6 +233,8 @@ private: + uint16_t compositionPageIds[MAXSPIDS]; + uint16_t ancillaryPageIds[MAXSPIDS]; + bool updatePrimaryDevice; ++ int totalTtxtSubtitlePages; ++ tTeletextSubtitlePage teletextSubtitlePages[MAXTXTPAGES]; + protected: + int SectionLength(const uchar *Data, int Length) { return (Length >= 3) ? ((int(Data[1]) & 0x0F) << 8)| Data[2] : 0; } + public: +@@ -263,6 +267,9 @@ public: + int Vtype(void) const { return vtype; } + ///< Returns the video stream type as defined by the current PMT, or 0 if no video + ///< stream type has been detected, yet. ++ int Tpid(void) { return tpid; } ++ ///< Returns the teletext pid as defined by the current PMT, or 0 if no teletext ++ ///< pid has been detected, yet. + const int *Apids(void) const { return apids; } + const int *Dpids(void) const { return dpids; } + const int *Spids(void) const { return spids; } +@@ -277,6 +284,8 @@ public: + uchar SubtitlingType(int i) const { return (0 <= i && i < MAXSPIDS) ? subtitlingTypes[i] : uchar(0); } + uint16_t CompositionPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? compositionPageIds[i] : uint16_t(0); } + uint16_t AncillaryPageId(int i) const { return (0 <= i && i < MAXSPIDS) ? ancillaryPageIds[i] : uint16_t(0); } ++ const tTeletextSubtitlePage *TeletextSubtitlePages() const { return teletextSubtitlePages; } ++ int TotalTeletextSubtitlePages() const { return totalTtxtSubtitlePages; } + }; + + // TS to PES converter: +diff --git a/vdr.5 b/vdr.5 +index c46a2bf..96e142a 100644 +--- a/vdr.5 ++++ b/vdr.5 +@@ -225,6 +225,12 @@ by an '=' sign, as in + + .B ...:201;2001=deu,2002=eng:... + ++Manual teletext subtitling pages can be defined separated by a '+' sign. ++The pages (separated by commas) can contain language codes, delimited by a '=' ++sign, as in ++ ++.B ...:201+150=deu,151=fin;2001,2002:... ++ + .TP + .B Conditional access + A hexadecimal integer defining how this channel can be accessed: +diff --git a/vdrttxtsubshooks.c b/vdrttxtsubshooks.c +new file mode 100644 +index 0000000..2471788 +--- /dev/null ++++ b/vdrttxtsubshooks.c +@@ -0,0 +1,63 @@ ++/* ++ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder ++ * Copyright (c) 2003 - 2008 Ragnar Sundblad ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your option) ++ * any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more ++ * details. ++ * ++ * You should have received a copy of the GNU General Public License along with ++ * this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ * ++ */ ++ ++#include ++#include ++#include ++ ++#include "vdrttxtsubshooks.h" ++ ++// XXX Really should be a list... ++static cVDRTtxtsubsHookListener *gListener; ++ ++// ------ class cVDRTtxtsubsHookProxy ------ ++ ++class cVDRTtxtsubsHookProxy : public cVDRTtxtsubsHookListener ++{ ++ public: ++ virtual void HideOSD(void) { if(gListener) gListener->HideOSD(); }; ++ virtual void ShowOSD(void) { if(gListener) gListener->ShowOSD(); }; ++ virtual void PlayerTeletextData(uint8_t *p, int length, bool IsPesRecording, const struct tTeletextSubtitlePage teletextSubtitlePages[] = NULL, int pageCount = 0) ++ { if(gListener) gListener->PlayerTeletextData(p, length, IsPesRecording, teletextSubtitlePages, pageCount); }; ++ virtual int ManualPageNumber(const cChannel *channel) ++ { if(gListener) return gListener->ManualPageNumber(channel); else return 0; }; ++}; ++ ++ ++// ------ class cVDRTtxtsubsHookListener ------ ++ ++cVDRTtxtsubsHookListener::~cVDRTtxtsubsHookListener() ++{ ++ gListener = 0; ++} ++ ++void cVDRTtxtsubsHookListener::HookAttach(void) ++{ ++ gListener = this; ++ //printf("cVDRTtxtsubsHookListener::HookAttach\n"); ++} ++ ++static cVDRTtxtsubsHookProxy gProxy; ++ ++cVDRTtxtsubsHookListener *cVDRTtxtsubsHookListener::Hook(void) ++{ ++ return &gProxy; ++} ++ +diff --git a/vdrttxtsubshooks.h b/vdrttxtsubshooks.h +new file mode 100644 +index 0000000..2f97969 +--- /dev/null ++++ b/vdrttxtsubshooks.h +@@ -0,0 +1,46 @@ ++/* ++ * vdr-ttxtsubs - A plugin for the Linux Video Disk Recorder ++ * Copyright (c) 2003 - 2008 Ragnar Sundblad ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your option) ++ * any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more ++ * details. ++ * ++ * You should have received a copy of the GNU General Public License along with ++ * this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ * ++ */ ++ ++#ifndef __VDRTTXTSUBSHOOKS_H ++#define __VDRTTXTSUBSHOOKS_H ++ ++#define TTXTSUBSVERSNUM 2 ++ ++class cDevice; ++class cChannel; ++struct tTeletextSubtitlePage; ++ ++class cVDRTtxtsubsHookListener { ++ public: ++ cVDRTtxtsubsHookListener(void) {}; ++ virtual ~cVDRTtxtsubsHookListener(); ++ ++ void HookAttach(void); ++ ++ virtual void HideOSD(void) {}; ++ virtual void ShowOSD(void) {}; ++ virtual void PlayerTeletextData(uint8_t *p, int length, bool IsPesRecording = true, const struct tTeletextSubtitlePage teletextSubtitlePages[] = NULL, int pageCount = 0) {}; ++ virtual int ManualPageNumber(const cChannel *channel) { return 0; }; ++ ++ // used by VDR to call hook listeners ++ static cVDRTtxtsubsHookListener *Hook(void); ++}; ++ ++#endif Index: multimedia/vdr/files/vdr-1.7.21-ttxtsubs.patch-2 @@ -0,0 +1,56 @@ +diff --git a/pat.c b/pat.c +index b7493ec..9262491 100644 +--- a/pat.c ++++ b/pat.c +@@ -17,6 +17,7 @@ + #include "libsi/section.h" + #include "libsi/descriptor.h" + #include "thread.h" ++#include "vdrttxtsubshooks.h" + + #define PMT_SCAN_TIMEOUT 10 // seconds + +@@ -347,6 +348,8 @@ void cPatFilter::Process(u_short Pid, u_ + char DLangs[MAXDPIDS][MAXLANGCODE2] = { "" }; + char SLangs[MAXSPIDS][MAXLANGCODE2] = { "" }; + int Tpid = 0; ++ tTeletextSubtitlePage TeletextSubtitlePages[MAXTXTPAGES]; ++ int NumTPages = 0; + int NumApids = 0; + int NumDpids = 0; + int NumSpids = 0; +@@ -438,8 +441,21 @@ void cPatFilter::Process(u_short Pid, u_ + NumSpids++; + } + break; +- case SI::TeletextDescriptorTag: ++ case SI::TeletextDescriptorTag: { + Tpid = esPid; ++ SI::TeletextDescriptor *sd = (SI::TeletextDescriptor *)d; ++ SI::TeletextDescriptor::Teletext ttxt; ++ for (SI::Loop::Iterator it; sd->teletextLoop.getNext(ttxt, it); ) { ++ bool isSubtitlePage = (ttxt.getTeletextType() == 0x02) || (ttxt.getTeletextType() == 0x05); ++ if ((NumTPages < MAXTXTPAGES) && ttxt.languageCode[0] && isSubtitlePage) { ++ strn0cpy(TeletextSubtitlePages[NumTPages].ttxtLanguage, I18nNormalizeLanguageCode(ttxt.languageCode), MAXLANGCODE1); ++ TeletextSubtitlePages[NumTPages].ttxtPage = ttxt.getTeletextPageNumber(); ++ TeletextSubtitlePages[NumTPages].ttxtMagazine = ttxt.getTeletextMagazineNumber(); ++ TeletextSubtitlePages[NumTPages].ttxtType = ttxt.getTeletextType(); ++ NumTPages++; ++ } ++ } ++ } + break; + case SI::ISO639LanguageDescriptorTag: { + SI::ISO639LanguageDescriptor *ld = (SI::ISO639LanguageDescriptor *)d; +@@ -541,6 +557,11 @@ void cPatFilter::Process(u_short Pid, u_ + } + if (Setup.UpdateChannels >= 2) { + Channel->SetPids(Vpid, Ppid, Vtype, Apids, Atypes, ALangs, Dpids, Dtypes, DLangs, Spids, SLangs, Tpid); ++ if (NumTPages < MAXTXTPAGES) { ++ int manualPageNumber = cVDRTtxtsubsHookListener::Hook()->ManualPageNumber(Channel); ++ if (manualPageNumber) ++ TeletextSubtitlePages[NumTPages++] = tTeletextSubtitlePage(manualPageNumber); ++ } + if (!cSource::IsType(Channel->Source(), 'I')) + Channel->SetCaIds(CaDescriptors->CaIds()); + Channel->SetSubtitlingDescriptors(SubtitlingTypes, CompositionPageIds, AncillaryPageIds); Index: multimedia/vdr-plugin-control/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-control/Makefile,v retrieving revision 1.4 diff -u -p -r1.4 Makefile --- multimedia/vdr-plugin-control/Makefile 25 Jun 2011 19:02:05 -0000 1.4 +++ multimedia/vdr-plugin-control/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-control PORTVERSION= 0.0.2a45 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= multimedia MASTER_SITES= http://ricomp.de/vdr/ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION:S/a45/a/}${DISTVERSIONSUFFIX} Index: multimedia/vdr-plugin-control/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-control/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-control/pkg-plist 25 Jun 2011 19:02:05 -0000 1.3 +++ multimedia/vdr-plugin-control/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1 +1 @@ -lib/vdr/libvdr-control.so.1.7.19 +lib/vdr/libvdr-control.so.1.7.22 Index: multimedia/vdr-plugin-eepg/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-eepg/Makefile,v retrieving revision 1.2 diff -u -p -r1.2 Makefile --- multimedia/vdr-plugin-eepg/Makefile 31 Dec 2011 20:49:27 -0000 1.2 +++ multimedia/vdr-plugin-eepg/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-eepg PORTVERSION= 0.0.6p2011071921 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= multimedia MASTER_SITES= LOCAL/nox/ DISTNAME= ${PORTNAME}-${PORTVERSION:C/p.*/pre/}-0-g${GITHASH} Index: multimedia/vdr-plugin-eepg/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-eepg/pkg-plist,v retrieving revision 1.2 diff -u -p -r1.2 pkg-plist --- multimedia/vdr-plugin-eepg/pkg-plist 31 Dec 2011 20:49:27 -0000 1.2 +++ multimedia/vdr-plugin-eepg/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-eepg.so.1.7.19 +lib/vdr/libvdr-eepg.so.1.7.22 @exec /usr/bin/install -o %%VDR_USER%% -g %%VDR_GROUP%% -d %D/etc/vdr/plugins/eepg etc/vdr/plugins/eepg/eepg.equiv.IT @unexec if cmp -s %D/etc/vdr/plugins/eepg/eepg.equiv.sample %D/etc/vdr/plugins/eepg/eepg.equiv; then rm -f %D/etc/vdr/plugins/eepg/eepg.equiv; fi Index: multimedia/vdr-plugin-epgsearch/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-epgsearch/Makefile,v retrieving revision 1.4 diff -u -p -r1.4 Makefile --- multimedia/vdr-plugin-epgsearch/Makefile 25 Jun 2011 19:02:05 -0000 1.4 +++ multimedia/vdr-plugin-epgsearch/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-epgsearch PORTVERSION= 0.9.25b20s20110221 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= multimedia MASTER_SITES= http://winni.vdr-developer.org/epgsearch/downloads/beta/:beta \ LOCAL/nox/:snapshot Index: multimedia/vdr-plugin-epgsearch/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-epgsearch/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-epgsearch/pkg-plist 25 Jun 2011 19:02:05 -0000 1.3 +++ multimedia/vdr-plugin-epgsearch/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,7 +1,7 @@ -lib/vdr/libvdr-epgsearch.so.1.7.19 -lib/vdr/libvdr-epgsearchonly.so.1.7.19 -lib/vdr/libvdr-conflictcheckonly.so.1.7.19 -lib/vdr/libvdr-quickepgsearch.so.1.7.19 +lib/vdr/libvdr-epgsearch.so.1.7.22 +lib/vdr/libvdr-epgsearchonly.so.1.7.22 +lib/vdr/libvdr-conflictcheckonly.so.1.7.22 +lib/vdr/libvdr-quickepgsearch.so.1.7.22 %%NLS%%share/locale/ca_ES/LC_MESSAGES/vdr-epgsearch.mo %%NLS%%share/locale/cs_CZ/LC_MESSAGES/vdr-epgsearch.mo %%NLS%%share/locale/da_DK/LC_MESSAGES/vdr-epgsearch.mo Index: multimedia/vdr-plugin-femon/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-femon/Makefile,v retrieving revision 1.6 diff -u -p -r1.6 Makefile --- multimedia/vdr-plugin-femon/Makefile 25 Jun 2011 19:02:05 -0000 1.6 +++ multimedia/vdr-plugin-femon/Makefile 2 Jan 2012 18:31:44 -0000 @@ -6,8 +6,7 @@ # PORTNAME= vdr-plugin-femon -PORTVERSION= 1.7.10 -PORTREVISION= 1 +PORTVERSION= 1.7.11 CATEGORIES= multimedia MASTER_SITES= http://www.saunalahti.fi/~rahrenbe/vdr/femon/files/ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} Index: multimedia/vdr-plugin-femon/distinfo =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-femon/distinfo,v retrieving revision 1.3 diff -u -p -r1.3 distinfo --- multimedia/vdr-plugin-femon/distinfo 10 Jun 2011 18:01:41 -0000 1.3 +++ multimedia/vdr-plugin-femon/distinfo 2 Jan 2012 18:31:44 -0000 @@ -1,2 +1,2 @@ -SHA256 (vdr/vdr-femon-1.7.10.tgz) = bca0eb719c04ba2d6fac0925f11fed372d420c6492b1b82ad0ba27b4b847d558 -SIZE (vdr/vdr-femon-1.7.10.tgz) = 74051 +SHA256 (vdr/vdr-femon-1.7.11.tgz) = 7ec2802a81d37f5914f2b964769c459b7cbcd2c42cd4151a854707fc999b6a96 +SIZE (vdr/vdr-femon-1.7.11.tgz) = 75044 Index: multimedia/vdr-plugin-femon/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-femon/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-femon/pkg-plist 25 Jun 2011 19:02:05 -0000 1.3 +++ multimedia/vdr-plugin-femon/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-femon.so.1.7.19 +lib/vdr/libvdr-femon.so.1.7.22 %%NLS%%share/locale/de_DE/LC_MESSAGES/vdr-femon.mo %%NLS%%share/locale/es_ES/LC_MESSAGES/vdr-femon.mo %%NLS%%share/locale/et_EE/LC_MESSAGES/vdr-femon.mo Index: multimedia/vdr-plugin-infosatepg/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-infosatepg/Makefile,v retrieving revision 1.5 diff -u -p -r1.5 Makefile --- multimedia/vdr-plugin-infosatepg/Makefile 25 Jun 2011 19:02:05 -0000 1.5 +++ multimedia/vdr-plugin-infosatepg/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-infosatepg PORTVERSION= 0.0.11 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= multimedia MASTER_SITES= http://projects.vdr-developer.org/attachments/download/342/ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} Index: multimedia/vdr-plugin-infosatepg/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-infosatepg/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-infosatepg/pkg-plist 25 Jun 2011 19:02:05 -0000 1.3 +++ multimedia/vdr-plugin-infosatepg/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-infosatepg.so.1.7.19 +lib/vdr/libvdr-infosatepg.so.1.7.22 @exec /usr/bin/install -o %%VDR_USER%% -g %%VDR_GROUP%% -d /var/cache/vdr/infosatepg %%NLS%%share/locale/de_DE/LC_MESSAGES/vdr-infosatepg.mo %%NLS%%share/locale/it_IT/LC_MESSAGES/vdr-infosatepg.mo Index: multimedia/vdr-plugin-iptv/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-iptv/Makefile,v retrieving revision 1.4 diff -u -p -r1.4 Makefile --- multimedia/vdr-plugin-iptv/Makefile 25 Jun 2011 19:02:05 -0000 1.4 +++ multimedia/vdr-plugin-iptv/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-iptv PORTVERSION= 0.4.2 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= multimedia MASTER_SITES= http://www.saunalahti.fi/~rahrenbe/vdr/iptv/files/ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} Index: multimedia/vdr-plugin-iptv/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-iptv/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-iptv/pkg-plist 25 Jun 2011 19:02:05 -0000 1.3 +++ multimedia/vdr-plugin-iptv/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-iptv.so.1.7.19 +lib/vdr/libvdr-iptv.so.1.7.22 @unexec if cmp -s %D/etc/vdr/plugins/iptv/image.sh.sample %D/etc/vdr/plugins/iptv/image.sh; then rm -f %D/etc/vdr/plugins/iptv/image.sh; fi etc/vdr/plugins/iptv/image.sh.sample @exec if [ ! -f %D/etc/vdr/plugins/iptv/image.sh ] ; then cp -p %D/%F %B/image.sh; fi Index: multimedia/vdr-plugin-markad/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-markad/Makefile,v retrieving revision 1.8 diff -u -p -r1.8 Makefile --- multimedia/vdr-plugin-markad/Makefile 2 Dec 2011 19:29:40 -0000 1.8 +++ multimedia/vdr-plugin-markad/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-markad PORTVERSION= 0.1.2 -PORTREVISION= 7 +PORTREVISION= 8 CATEGORIES= multimedia MASTER_SITES= http://projects.vdr-developer.org/attachments/download/578/ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} Index: multimedia/vdr-plugin-markad/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-markad/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-markad/pkg-plist 25 Jun 2011 19:02:05 -0000 1.3 +++ multimedia/vdr-plugin-markad/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,5 +1,5 @@ bin/markad -lib/vdr/libvdr-markad.so.1.7.19 +lib/vdr/libvdr-markad.so.1.7.22 %%NLS%%share/locale/de_DE/LC_MESSAGES/vdr-markad.mo %%NLS%%share/locale/es_ES/LC_MESSAGES/vdr-markad.mo %%NLS%%share/locale/fi_FI/LC_MESSAGES/vdr-markad.mo Index: multimedia/vdr-plugin-osdpip/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-osdpip/Makefile,v retrieving revision 1.4 diff -u -p -r1.4 Makefile --- multimedia/vdr-plugin-osdpip/Makefile 24 Jun 2011 22:39:00 -0000 1.4 +++ multimedia/vdr-plugin-osdpip/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-osdpip PORTVERSION= 0.1.0 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= multimedia MASTER_SITES= http://projects.vdr-developer.org/attachments/download/267/ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} Index: multimedia/vdr-plugin-osdpip/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-osdpip/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-osdpip/pkg-plist 25 Jun 2011 19:02:06 -0000 1.3 +++ multimedia/vdr-plugin-osdpip/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-osdpip.so.1.7.19 +lib/vdr/libvdr-osdpip.so.1.7.22 %%NLS%%share/locale/ca_ES/LC_MESSAGES/vdr-osdpip.mo %%NLS%%share/locale/cs_CZ/LC_MESSAGES/vdr-osdpip.mo %%NLS%%share/locale/da_DK/LC_MESSAGES/vdr-osdpip.mo Index: multimedia/vdr-plugin-osdteletext/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-osdteletext/Makefile,v retrieving revision 1.4 diff -u -p -r1.4 Makefile --- multimedia/vdr-plugin-osdteletext/Makefile 25 Jun 2011 19:02:06 -0000 1.4 +++ multimedia/vdr-plugin-osdteletext/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-osdteletext PORTVERSION= 0.9.0 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= multimedia MASTER_SITES= http://projects.vdr-developer.org/attachments/download/416/ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} Index: multimedia/vdr-plugin-osdteletext/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-osdteletext/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-osdteletext/pkg-plist 25 Jun 2011 19:02:06 -0000 1.3 +++ multimedia/vdr-plugin-osdteletext/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-osdteletext.so.1.7.19 +lib/vdr/libvdr-osdteletext.so.1.7.22 @exec /usr/bin/install -o %%VDR_USER%% -g %%VDR_GROUP%% -d /var/cache/vdr/vtx %%NLS%%share/locale/ca_ES/LC_MESSAGES/vdr-osdteletext.mo %%NLS%%share/locale/de_DE/LC_MESSAGES/vdr-osdteletext.mo Index: multimedia/vdr-plugin-reelchannelscan/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-reelchannelscan/Makefile,v retrieving revision 1.7 diff -u -p -r1.7 Makefile --- multimedia/vdr-plugin-reelchannelscan/Makefile 14 Jul 2011 17:58:19 -0000 1.7 +++ multimedia/vdr-plugin-reelchannelscan/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-reelchannelscan PORTVERSION= 0.6.1b1.7.15 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= multimedia MASTER_SITES= LOCAL/nox \ http://ppa.launchpad.net/yavdr/stable-vdr/ubuntu/pool/main/v/vdr-plugin-reelchannelscan/ Index: multimedia/vdr-plugin-reelchannelscan/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-reelchannelscan/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-reelchannelscan/pkg-plist 25 Jun 2011 19:02:06 -0000 1.3 +++ multimedia/vdr-plugin-reelchannelscan/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-reelchannelscan.so.1.7.19 +lib/vdr/libvdr-reelchannelscan.so.1.7.22 etc/vdr/plugins/transponders/S0.8W.tpl etc/vdr/plugins/transponders/S10.0E.tpl etc/vdr/plugins/transponders/S100.5E.tpl Index: multimedia/vdr-plugin-remote/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-remote/Makefile,v retrieving revision 1.4 diff -u -p -r1.4 Makefile --- multimedia/vdr-plugin-remote/Makefile 25 Jun 2011 19:02:06 -0000 1.4 +++ multimedia/vdr-plugin-remote/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-remote PORTVERSION= 0.4.0 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= multimedia MASTER_SITES= http://www.escape-edv.de/endriss/vdr/ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} Index: multimedia/vdr-plugin-remote/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-remote/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-remote/pkg-plist 25 Jun 2011 19:02:06 -0000 1.3 +++ multimedia/vdr-plugin-remote/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1 +1 @@ -lib/vdr/libvdr-remote.so.1.7.19 +lib/vdr/libvdr-remote.so.1.7.22 Index: multimedia/vdr-plugin-skinenigmang/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-skinenigmang/Makefile,v retrieving revision 1.4 diff -u -p -r1.4 Makefile --- multimedia/vdr-plugin-skinenigmang/Makefile 25 Jun 2011 19:02:06 -0000 1.4 +++ multimedia/vdr-plugin-skinenigmang/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-skinenigmang PORTVERSION= 0.1.1 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= multimedia MASTER_SITES= http://andreas.vdr-developer.org/enigmang/download/ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} Index: multimedia/vdr-plugin-skinenigmang/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-skinenigmang/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-skinenigmang/pkg-plist 25 Jun 2011 19:02:06 -0000 1.3 +++ multimedia/vdr-plugin-skinenigmang/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-skinenigmang.so.1.7.19 +lib/vdr/libvdr-skinenigmang.so.1.7.22 etc/vdr/plugins/skinenigmang/HISTORY etc/vdr/plugins/skinenigmang/README etc/vdr/plugins/skinenigmang/flags/deu.xpm Index: multimedia/vdr-plugin-sleeptimer/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-sleeptimer/Makefile,v retrieving revision 1.2 diff -u -p -r1.2 Makefile --- multimedia/vdr-plugin-sleeptimer/Makefile 5 Aug 2011 22:27:42 -0000 1.2 +++ multimedia/vdr-plugin-sleeptimer/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-sleeptimer PORTVERSION= 0.8.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= multimedia MASTER_SITES= http://projects.vdr-developer.org/attachments/download/652/ EXTRACT_SUFX= .tgz Index: multimedia/vdr-plugin-sleeptimer/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-sleeptimer/pkg-plist,v retrieving revision 1.1 diff -u -p -r1.1 pkg-plist --- multimedia/vdr-plugin-sleeptimer/pkg-plist 5 Aug 2011 20:16:27 -0000 1.1 +++ multimedia/vdr-plugin-sleeptimer/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-sleeptimer.so.1.7.19 +lib/vdr/libvdr-sleeptimer.so.1.7.22 %%NLS%%share/locale/ca_ES/LC_MESSAGES/vdr-sleeptimer.mo %%NLS%%share/locale/cs_CZ/LC_MESSAGES/vdr-sleeptimer.mo %%NLS%%share/locale/da_DK/LC_MESSAGES/vdr-sleeptimer.mo Index: multimedia/vdr-plugin-softdevice/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-softdevice/Makefile,v retrieving revision 1.4 diff -u -p -r1.4 Makefile --- multimedia/vdr-plugin-softdevice/Makefile 24 Jun 2011 22:39:01 -0000 1.4 +++ multimedia/vdr-plugin-softdevice/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-softdevice PORTVERSION= 0.5.0p20100414 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= multimedia MASTER_SITES= LOCAL MASTER_SITE_SUBDIR= nox/ Index: multimedia/vdr-plugin-softdevice/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-softdevice/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-softdevice/pkg-plist 25 Jun 2011 19:02:06 -0000 1.3 +++ multimedia/vdr-plugin-softdevice/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,7 +1,7 @@ bin/ShmClient -lib/vdr/libvdr-softdevice.so.1.7.19 -lib/vdr/libsoftdevice-xv.so.1.7.19 -lib/vdr/libsoftdevice-shm.so.1.7.19 +lib/vdr/libvdr-softdevice.so.1.7.22 +lib/vdr/libsoftdevice-xv.so.1.7.22 +lib/vdr/libsoftdevice-shm.so.1.7.22 %%NLS%%share/locale/ca_ES/LC_MESSAGES/vdr-softdevice.mo %%NLS%%share/locale/cs_CZ/LC_MESSAGES/vdr-softdevice.mo %%NLS%%share/locale/da_DK/LC_MESSAGES/vdr-softdevice.mo Index: multimedia/vdr-plugin-streamdev/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-streamdev/Makefile,v retrieving revision 1.5 diff -u -p -r1.5 Makefile --- multimedia/vdr-plugin-streamdev/Makefile 11 Dec 2011 18:21:29 -0000 1.5 +++ multimedia/vdr-plugin-streamdev/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-streamdev PORTVERSION= 0.5.1 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= multimedia MASTER_SITES= http://projects.vdr-developer.org/attachments/download/497/:release \ LOCAL:snapshot Index: multimedia/vdr-plugin-streamdev/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-streamdev/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-streamdev/pkg-plist 25 Jun 2011 19:02:07 -0000 1.3 +++ multimedia/vdr-plugin-streamdev/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,5 +1,5 @@ -lib/vdr/libvdr-streamdev-client.so.1.7.19 -lib/vdr/libvdr-streamdev-server.so.1.7.19 +lib/vdr/libvdr-streamdev-client.so.1.7.22 +lib/vdr/libvdr-streamdev-server.so.1.7.22 @unexec if cmp -s %D/etc/vdr/plugins/streamdev-server/externremux.sh.sample %D/etc/vdr/plugins/streamdev-server/externremux.sh; then rm -f %D/etc/vdr/plugins/streamdev-server/externremux.sh; fi etc/vdr/plugins/streamdev-server/externremux.sh.sample @exec if [ ! -f %D/etc/vdr/plugins/streamdev-server/externremux.sh ] ; then cp -p %D/%F %B/externremux.sh; fi Index: multimedia/vdr-plugin-ttxtsubs/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-ttxtsubs/Makefile,v retrieving revision 1.3 diff -u -p -r1.3 Makefile --- multimedia/vdr-plugin-ttxtsubs/Makefile 25 Jun 2011 19:02:07 -0000 1.3 +++ multimedia/vdr-plugin-ttxtsubs/Makefile 2 Jan 2012 18:40:21 -0000 @@ -6,8 +6,7 @@ # PORTNAME= vdr-plugin-ttxtsubs -PORTVERSION= 0.2.2 -PORTREVISION= 2 +PORTVERSION= 0.2.4 CATEGORIES= multimedia MASTER_SITES= http://projects.vdr-developer.org/attachments/download/309/ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} @@ -17,7 +16,7 @@ COMMENT= Video Disk Recorder - teletext PATCH_STRIP= -p1 HAVE_CONFIGURE= yes -PORTDOCS= COPYING README +PORTDOCS= COPYING README HISTORY MAKE_JOBS_SAFE= yes WRKSRC= ${WRKDIR}/${PLUGIN}-${DISTVERSION} Index: multimedia/vdr-plugin-ttxtsubs/distinfo =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-ttxtsubs/distinfo,v retrieving revision 1.1 diff -u -p -r1.1 distinfo --- multimedia/vdr-plugin-ttxtsubs/distinfo 10 Jun 2011 17:43:49 -0000 1.1 +++ multimedia/vdr-plugin-ttxtsubs/distinfo 2 Jan 2012 18:31:44 -0000 @@ -1,2 +1,2 @@ -SHA256 (vdr/vdr-ttxtsubs-0.2.2.tar.gz) = 2e685d177bf547385de62fa043272976566dd46e7504de4a5352bb36949ec724 -SIZE (vdr/vdr-ttxtsubs-0.2.2.tar.gz) = 60833 +SHA256 (vdr/vdr-ttxtsubs-0.2.4.tar.gz) = 6d038f9f48ca6bb844934e15ab47d0aca8cbf650d24c5b31930802d0ac57f4ef +SIZE (vdr/vdr-ttxtsubs-0.2.4.tar.gz) = 60378 Index: multimedia/vdr-plugin-ttxtsubs/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-ttxtsubs/pkg-plist,v retrieving revision 1.2 diff -u -p -r1.2 pkg-plist --- multimedia/vdr-plugin-ttxtsubs/pkg-plist 25 Jun 2011 19:02:07 -0000 1.2 +++ multimedia/vdr-plugin-ttxtsubs/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-ttxtsubs.so.1.7.19 +lib/vdr/libvdr-ttxtsubs.so.1.7.22 %%NLS%%share/locale/fr_FR/LC_MESSAGES/vdr-ttxtsubs.mo %%NLS%%share/locale/ru_RU/LC_MESSAGES/vdr-ttxtsubs.mo %%NLS%%share/locale/uk_UA/LC_MESSAGES/vdr-ttxtsubs.mo Index: multimedia/vdr-plugin-ttxtsubs/files/patch-Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-ttxtsubs/files/patch-Makefile,v retrieving revision 1.1 diff -u -p -r1.1 patch-Makefile --- multimedia/vdr-plugin-ttxtsubs/files/patch-Makefile 10 Jun 2011 17:43:49 -0000 1.1 +++ multimedia/vdr-plugin-ttxtsubs/files/patch-Makefile 2 Jan 2012 18:31:44 -0000 @@ -3,16 +3,16 @@ @@ -101,7 +101,11 @@ all: libvdr-$(PLUGIN).so i18n libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ + $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@ +ifdef FREEBSD + @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) +else @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) +endif - dist: clean + dist: $(I18Npo) clean @-rm -rf $(TMPDIR)/$(ARCHIVE) -@@ -114,3 +118,6 @@ dist: clean +@@ -114,3 +118,6 @@ dist: $(I18Npo) clean clean: @-rm -f $(PODIR)/*.mo $(PODIR)/*.pot @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ Index: multimedia/vdr-plugin-ttxtsubs/files/patch-ttxtsubs.c =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-ttxtsubs/files/patch-ttxtsubs.c,v retrieving revision 1.1 diff -u -p -r1.1 patch-ttxtsubs.c --- multimedia/vdr-plugin-ttxtsubs/files/patch-ttxtsubs.c 10 Jun 2011 17:43:49 -0000 1.1 +++ multimedia/vdr-plugin-ttxtsubs/files/patch-ttxtsubs.c 2 Jan 2012 18:31:44 -0000 @@ -1,21 +0,0 @@ ---- a/ttxtsubs.c -+++ b/ttxtsubs.c -@@ -119,6 +119,7 @@ class cPluginTtxtsubs : public cPlugin, - public: - cPluginTtxtsubs(void); - virtual ~cPluginTtxtsubs(); -+ void Reload(void) { StopTtxt(); StartTtxtPlay(0x000); } - - // -- cPlugin - virtual const char *Version(void) { return VERSION; } -@@ -566,7 +567,9 @@ cMenuSetupTtxtsubs::cMenuSetupTtxtsubs(c - - cMenuSetupTtxtsubs::~cMenuSetupTtxtsubs(void) - { -- -+ if(mTtxtsubs) { -+ mTtxtsubs->Reload(); -+ } - if(mDoStore) { - Store(); - // Setup.Save(); // Can't get it to write to conf file, menu item disabled. Index: multimedia/vdr-plugin-upnp/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-upnp/Makefile,v retrieving revision 1.4 diff -u -p -r1.4 Makefile --- multimedia/vdr-plugin-upnp/Makefile 24 Jun 2011 22:39:01 -0000 1.4 +++ multimedia/vdr-plugin-upnp/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-upnp PORTVERSION= 0.0.2a2 -PORTREVISION= 11 +PORTREVISION= 12 CATEGORIES= multimedia MASTER_SITES= http://projects.vdr-developer.org/attachments/download/177/ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION:S/a/-alpha/}${DISTVERSIONSUFFIX} Index: multimedia/vdr-plugin-upnp/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-upnp/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-upnp/pkg-plist 25 Jun 2011 19:02:07 -0000 1.3 +++ multimedia/vdr-plugin-upnp/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-upnp.so.1.7.19 +lib/vdr/libvdr-upnp.so.1.7.22 etc/vdr/plugins/upnp/http/icons/upnpIconLrg.jpeg etc/vdr/plugins/upnp/http/icons/upnpIconLrg.png etc/vdr/plugins/upnp/http/icons/upnpIconSm.jpeg Index: multimedia/vdr-plugin-vnsiserver/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-vnsiserver/Makefile,v retrieving revision 1.5 diff -u -p -r1.5 Makefile --- multimedia/vdr-plugin-vnsiserver/Makefile 25 Jun 2011 19:02:07 -0000 1.5 +++ multimedia/vdr-plugin-vnsiserver/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-vnsiserver PORTVERSION= 0.0.2s20100808.0952 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= multimedia MASTER_SITES= http://ppa.launchpad.net/yavdr/testing-vdr/ubuntu/pool/main/v/vdr-plugin-vnsiserver/ \ LOCAL/nox/ Index: multimedia/vdr-plugin-vnsiserver/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-vnsiserver/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-vnsiserver/pkg-plist 25 Jun 2011 19:02:07 -0000 1.3 +++ multimedia/vdr-plugin-vnsiserver/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-vnsiserver.so.1.7.19 +lib/vdr/libvdr-vnsiserver.so.1.7.22 @unexec if cmp -s %D/etc/vdr/plugins/vnsiserver/allowed_hosts.conf.sample %D/etc/vdr/plugins/vnsiserver/allowed_hosts.conf; then rm -f %D/etc/vdr/plugins/vnsiserver/allowed_hosts.conf; fi etc/vdr/plugins/vnsiserver/allowed_hosts.conf.sample @exec if [ ! -f %D/etc/vdr/plugins/vnsiserver/allowed_hosts.conf ] ; then cp -p %D/%F %B/allowed_hosts.conf; fi Index: multimedia/vdr-plugin-wirbelscan/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-wirbelscan/Makefile,v retrieving revision 1.3 diff -u -p -r1.3 Makefile --- multimedia/vdr-plugin-wirbelscan/Makefile 25 Jun 2011 19:02:08 -0000 1.3 +++ multimedia/vdr-plugin-wirbelscan/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-wirbelscan PORTVERSION= 0.0.7 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia MASTER_SITES= http://wirbel.htpc-forum.de/wirbelscan/ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} Index: multimedia/vdr-plugin-wirbelscan/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-wirbelscan/pkg-plist,v retrieving revision 1.2 diff -u -p -r1.2 pkg-plist --- multimedia/vdr-plugin-wirbelscan/pkg-plist 25 Jun 2011 19:02:08 -0000 1.2 +++ multimedia/vdr-plugin-wirbelscan/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-wirbelscan.so.1.7.19 +lib/vdr/libvdr-wirbelscan.so.1.7.22 %%NLS%%share/locale/fr_FR/LC_MESSAGES/vdr-wirbelscan.mo %%NLS%%share/locale/sl_SI/LC_MESSAGES/vdr-wirbelscan.mo %%NLS%%share/locale/ru_RU/LC_MESSAGES/vdr-wirbelscan.mo Index: multimedia/vdr-plugin-xineliboutput/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-xineliboutput/Makefile,v retrieving revision 1.8 diff -u -p -r1.8 Makefile --- multimedia/vdr-plugin-xineliboutput/Makefile 10 Dec 2011 17:43:26 -0000 1.8 +++ multimedia/vdr-plugin-xineliboutput/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,6 +7,7 @@ PORTNAME= vdr-plugin-xineliboutput PORTVERSION= 1.0.90s20111129.1002 +PORTREVISION= 1 CATEGORIES= multimedia MASTER_SITES= SF:release \ LOCAL:snapshot Index: multimedia/vdr-plugin-xineliboutput/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-xineliboutput/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- multimedia/vdr-plugin-xineliboutput/pkg-plist 25 Jun 2011 19:02:08 -0000 1.3 +++ multimedia/vdr-plugin-xineliboutput/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -4,7 +4,7 @@ lib/xine/plugins/1.29/xineplug_inp_xvdr. lib/xine/plugins/1.29/post/xineplug_post_autocrop.so lib/xine/plugins/1.29/post/xineplug_post_swscale.so lib/xine/plugins/1.29/post/xineplug_post_audiochannel.so -lib/vdr/libvdr-xineliboutput.so.1.7.19 +lib/vdr/libvdr-xineliboutput.so.1.7.22 lib/vdr/libxineliboutput-sxfe.so.1.0.90-cvs @unexec if cmp -s %D/etc/vdr/plugins/xineliboutput/allowed_hosts.conf.sample %D/etc/vdr/plugins/xineliboutput/allowed_hosts.conf; then rm -f %D/etc/vdr/plugins/xineliboutput/allowed_hosts.conf; fi etc/vdr/plugins/xineliboutput/allowed_hosts.conf.sample Index: multimedia/vdr-plugin-xvdr/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-xvdr/Makefile,v retrieving revision 1.2 diff -u -p -r1.2 Makefile --- multimedia/vdr-plugin-xvdr/Makefile 19 Dec 2011 19:27:52 -0000 1.2 +++ multimedia/vdr-plugin-xvdr/Makefile 2 Jan 2012 18:31:44 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-xvdr PORTVERSION= 0.9.5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= multimedia MASTER_SITES= LOCAL/nox/ DISTNAME= pipelka-${PORTNAME}-xvdr-${PORTVERSION}-0-g${GITHASH} Index: multimedia/vdr-plugin-xvdr/pkg-plist =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugin-xvdr/pkg-plist,v retrieving revision 1.1 diff -u -p -r1.1 pkg-plist --- multimedia/vdr-plugin-xvdr/pkg-plist 18 Dec 2011 17:23:38 -0000 1.1 +++ multimedia/vdr-plugin-xvdr/pkg-plist 2 Jan 2012 18:31:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-xvdr.so.1.7.19 +lib/vdr/libvdr-xvdr.so.1.7.22 @unexec if cmp -s %D/etc/vdr/plugins/xvdr/allowed_hosts.conf.sample %D/etc/vdr/plugins/xvdr/allowed_hosts.conf; then rm -f %D/etc/vdr/plugins/xvdr/allowed_hosts.conf; fi etc/vdr/plugins/xvdr/allowed_hosts.conf.sample @exec if [ ! -f %D/etc/vdr/plugins/xvdr/allowed_hosts.conf ] ; then cp -p %D/%F %B/allowed_hosts.conf; fi Index: multimedia/vdr-plugins/Makefile =================================================================== RCS file: /home/pcvs/ports/multimedia/vdr-plugins/Makefile,v retrieving revision 1.9 diff -u -p -r1.9 Makefile --- multimedia/vdr-plugins/Makefile 30 Dec 2011 21:26:23 -0000 1.9 +++ multimedia/vdr-plugins/Makefile 2 Jan 2012 18:39:39 -0000 @@ -6,8 +6,8 @@ # PORTNAME= vdr-plugins -PORTVERSION= 1.7.19 -PORTREVISION= 3 +PORTVERSION= 1.7.22 +PORTREVISION= 4 CATEGORIES= multimedia MASTER_SITES= # none DISTFILES= # none Index: www/vdr-plugin-live/Makefile =================================================================== RCS file: /home/pcvs/ports/www/vdr-plugin-live/Makefile,v retrieving revision 1.4 diff -u -p -r1.4 Makefile --- www/vdr-plugin-live/Makefile 25 Jun 2011 19:02:08 -0000 1.4 +++ www/vdr-plugin-live/Makefile 2 Jan 2012 00:09:39 -0000 @@ -7,7 +7,7 @@ PORTNAME= vdr-plugin-live PORTVERSION= 0.2.0s20110303 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= www multimedia MASTER_SITES= http://live.vdr-developer.org/downloads/:release \ LOCAL/nox/:snapshot Index: www/vdr-plugin-live/pkg-plist =================================================================== RCS file: /home/pcvs/ports/www/vdr-plugin-live/pkg-plist,v retrieving revision 1.3 diff -u -p -r1.3 pkg-plist --- www/vdr-plugin-live/pkg-plist 25 Jun 2011 19:02:08 -0000 1.3 +++ www/vdr-plugin-live/pkg-plist 2 Jan 2012 00:09:44 -0000 @@ -1,4 +1,4 @@ -lib/vdr/libvdr-live.so.1.7.19 +lib/vdr/libvdr-live.so.1.7.22 etc/vdr/plugins/live/css/DatePicker.css etc/vdr/plugins/live/css/siteprefs.css etc/vdr/plugins/live/img/active.png Index: www/vdradmin-am/Makefile =================================================================== RCS file: /home/pcvs/ports/www/vdradmin-am/Makefile,v retrieving revision 1.3 diff -u -p -r1.3 Makefile --- www/vdradmin-am/Makefile 10 Jun 2011 18:38:54 -0000 1.3 +++ www/vdradmin-am/Makefile 2 Jan 2012 00:53:35 -0000 @@ -6,8 +6,7 @@ # PORTNAME= vdradmin-am -PORTVERSION= 3.6.8 -PORTREVISION= 1 +PORTVERSION= 3.6.9 CATEGORIES= www MASTER_SITES= http://andreas.vdr-developer.org/vdradmin-am/download/ Index: www/vdradmin-am/distinfo =================================================================== RCS file: /home/pcvs/ports/www/vdradmin-am/distinfo,v retrieving revision 1.2 diff -u -p -r1.2 distinfo --- www/vdradmin-am/distinfo 10 Jun 2011 18:32:26 -0000 1.2 +++ www/vdradmin-am/distinfo 2 Jan 2012 00:54:10 -0000 @@ -1,2 +1,2 @@ -SHA256 (vdr/vdradmin-am-3.6.8.tar.bz2) = 71f365019741c3e7192f3342d30e550e0f52c77fa687691b0c239ce5859b3aaf -SIZE (vdr/vdradmin-am-3.6.8.tar.bz2) = 556528 +SHA256 (vdr/vdradmin-am-3.6.9.tar.bz2) = 5f0421ca0ea2b4c7669d5332d43b04af8b0c40d2964dd152a265c18f4d7f2715 +SIZE (vdr/vdradmin-am-3.6.9.tar.bz2) = 562006