[SCM] vdr packaging repository branch, e-tobi, updated. debian/1.7.21-1_ctvdr3-19-g0495185
etobi
git at e-tobi.net
Mon Dec 12 21:27:23 UTC 2011
The following commit has been merged in the e-tobi branch:
commit ea9c3deda1080e4fc1f5f438c2d85640ff6e62ac
Author: etobi <git at e-tobi.net>
Date: Sat Dec 10 21:54:21 2011 +0100
Dropped multipatch patches - these are available in the etobi-branch of the Git repository
diff --git a/debian/.vdr-patches.multipatch b/debian/.vdr-patches.multipatch
deleted file mode 100644
index 0b18f36..0000000
--- a/debian/.vdr-patches.multipatch
+++ /dev/null
@@ -1,24 +0,0 @@
-debian/patches/opt-43-x_recordshowfree.dpatch:66152f345b03259d28e89135cda42310
-debian/patches/12_osdbase-maxitems.dpatch:e45d1b62f7d66c3e5d279e3561034107
-debian/patches/11_sortrecordings.dpatch:9ed4cd1e144ee59dab34d4df4aa9af51
-debian/patches/opt-31-x_reelchannelscan.dpatch:f8c06ac51888248f68badcab8533c2be
-debian/patches/opt-50_graphtft.dpatch:f77f3d81b37e89c448dbb15c9e4f475d
-debian/patches/16_channels.conf.terr-fix.dpatch:72595733d0b46aa4093a640708d19226
-debian/patches/06_default_svdrp_port_0.dpatch:653e14e8ab093c456f9bbd8faa5e1ff7
-debian/patches/82_valgrind.dpatch:503ddba49c243fff798a36a1c12bb5ae
-debian/patches/opt-42-x_MainMenuHooks.dpatch:1c4c782b5c88c4f0408890a5f50b217b
-debian/patches/opt-44_rotor.dpatch:2dd7870c8fe357700ee962f68a1594c2
-debian/patches/opt-20_liemikuutio.dpatch:b1d074dc381527e29db4a5ad48c8fa07
-debian/patches/opt-21_internal-cam-devices.dpatch:7bbaad57abb1ae2995b85d9f1a1fd23f
-debian/patches/opt-41-x_timer-info.dpatch:04511ae02243eb1bab94f3f45b59e574
-debian/patches/opt-24_jumpplay.dpatch:f23cbe88f71917a25683b6f6c255fb2c
-debian/patches/opt-50_graphtft-liemikuutio.dpatch:f82320b9c64e17d06b5d0dbbddf50e8f
-debian/patches/99_dvbc-unitiymedia-fix.dpatch:cbfee0d9a95c619ecc77f4249efd5c84
-debian/patches/81_Make_config.dpatch:da281b9af48273bcbd19f3052ee993fd
-debian/patches/opt-37-x_menuorg.dpatch:9fb02cc8bd848add50b3866b6f476644
-debian/patches/opt-45_yaepg.dpatch:77fdabd83bdf4187d7040faaf1c758c7
-debian/patches/99_ncursesw-include.dpatch:90810d58108ff8d9afd768fec67be904
-debian/patches/opt-39_noepg.dpatch:9f154a51a570bce2189056ea85b5ad91
-debian/patches/04_newplugin.dpatch:e99f8d21734a19b3eb93d9e3f11b680a
-debian/patches/opt-38_disableDoubleEpgEntrys.dpatch:7a09fa581f95613497b718b5c4a4a875
-debian/patches/opt-22-x_edit_marks.dpatch:9d604944f17114e3ac830aa80eff73ed
diff --git a/debian/abi-version.multipatch b/debian/abi-version.multipatch
deleted file mode 100644
index 3bba480..0000000
--- a/debian/abi-version.multipatch
+++ /dev/null
@@ -1 +0,0 @@
-vdr-abi-1.7.21-multipatch
diff --git a/debian/changelog b/debian/changelog
index 27b4110..02a02c5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,8 @@ vdr (1.7.22-1) unstable; urgency=low
* New upstream release
* Dropped 99_dvbc-unitiymedia-fix.dpatch - fixed upstream
+ * Dropped multipatch patches - these are available in the etobi-branch
+ of the Git repository
-- Tobias Grimm <etobi at debian.org> Sat, 10 Dec 2011 21:51:31 +0100
diff --git a/debian/patches/00list.multipatch b/debian/patches/00list.multipatch
deleted file mode 100644
index f90af26..0000000
--- a/debian/patches/00list.multipatch
+++ /dev/null
@@ -1,65 +0,0 @@
-04_newplugin
-06_default_svdrp_port_0
-11_sortrecordings
-12_osdbase-maxitems
-16_channels.conf.terr-fix
-
-81_Make_config
-82_valgrind
-
-99_ncursesw-include
-
-# Patch collection (replaces enAIO).
-opt-20_liemikuutio
-
-# Allows to tune to non-FTA channels provided by internal devices,
-# like streamdev
-opt-21_internal-cam-devices
-
-# Easy editing of cutting marks
-# (Requires opt-20_liemikuutio!)
-opt-22-x_edit_marks
-
-# The Jump patch allows automatic jumping over cutting marks.
-opt-24_jumpplay
-
-# Speed up zapping channels.
-# opt-29_syncearly
-
-# Makes VDR aware of the reelchannelscan plugin
-opt-31-x_reelchannelscan
-
-# Patch that shows if there is a valid setup value left or right with < and >.
-# opt-35_setup-show-valid
-
-# Patch needed for the menuorg plugin.
-opt-37-x_menuorg
-
-# Patch that suppresses double EPG entries.
-opt-38_disableDoubleEpgEntrys
-
-# Patch to disable normal epg update for specified channels.
-opt-39_noepg
-
-# Patch to show an info, if it is possible to record an event in the timer-info.
-opt-41-x_timer-info
-
-# Patch to allow plugins to replace the VDR mainmenus
-opt-42-x_MainMenuHooks
-
-# Shows remaining recording capacity in recordings menu.
-# (Requires opt-41-x_timer-info !)
-opt-43-x_recordshowfree
-
-# Patch needed for the rotor plugin.
-opt-44_rotor
-
-# Patch needed for the yaepg plugin.
-opt-45_yaepg
-
-# Patch required for the GraphTFT plugin
-opt-50_graphtft
-opt-50_graphtft-liemikuutio
-
-# Setup for AC3 transfer, QAM_256, disable primary tuner
-# opt-53_dvbsetup
diff --git a/debian/patches/09_sort_options.dpatch b/debian/patches/09_sort_options.dpatch
deleted file mode 100644
index 9dffba8..0000000
--- a/debian/patches/09_sort_options.dpatch
+++ /dev/null
@@ -1,104 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-
-## 11_sort_options.dpatch by Darren Salt and Luca Olivetti <luca at ventoso.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: [LO] Add sort-by-source options.
-## DP: [DS] Add sort-by-provider-then-channel-number options.
-
- at DPATCH@
-diff -urNad vdr-1.5.15~/menu.c vdr-1.5.15/menu.c
---- vdr-1.5.15~/menu.c 2008-02-17 21:05:46.000000000 +0100
-+++ vdr-1.5.15/menu.c 2008-02-17 21:09:06.000000000 +0100
-@@ -359,14 +359,18 @@
-
- class cMenuChannelItem : public cOsdItem {
- public:
-- enum eChannelSortMode { csmNumber, csmName, csmProvider };
-+ enum eChannelSortMode {
-+ csmNumber, csmName, csmProvider, csmProviderNumber,
-+ csmSourceNumber, csmSourceName, csmSourceProvider, csmSourceProviderNumber,
-+ csmLAST
-+ };
- private:
- static eChannelSortMode sortMode;
- cChannel *channel;
- public:
- cMenuChannelItem(cChannel *Channel);
- static void SetSortMode(eChannelSortMode SortMode) { sortMode = SortMode; }
-- static void IncSortMode(void) { sortMode = eChannelSortMode((sortMode == csmProvider) ? csmNumber : sortMode + 1); }
-+ static void IncSortMode(void) { sortMode = eChannelSortMode(sortMode + 1); if (sortMode == csmLAST) sortMode = csmNumber; }
- static eChannelSortMode SortMode(void) { return sortMode; }
- virtual int Compare(const cListObject &ListObject) const;
- virtual void Set(void);
-@@ -383,13 +387,46 @@
- Set();
- }
-
-+static int snum(int source)
-+{
-+ int stype = (source & cSource::st_Mask);
-+ // arbitrary order: sat, cable, terrestrial, none
-+ int r;
-+ switch(stype) {
-+ case cSource::stCable:
-+ r=0x7FF0;
-+ break;
-+ case cSource::stTerr:
-+ r=0x7FF2;
-+ break;
-+ case cSource::stSat:
-+ r=source & cSource::st_Pos;
-+ if (source & cSource::st_Neg) r*=-1;
-+ break;
-+ default: //stNone or unknown
-+ r=0x7FFF;
-+ }
-+ return r;
-+}
-+
- int cMenuChannelItem::Compare(const cListObject &ListObject) const
- {
- cMenuChannelItem *p = (cMenuChannelItem *)&ListObject;
- int r = -1;
-- if (sortMode == csmProvider)
-+ if (sortMode >= csmSourceNumber) {
-+ int rsource = snum(channel->Source()) - snum(p->channel->Source());
-+ if (sortMode == csmSourceProvider && rsource == 0)
-+ r = strcoll(channel->Provider(), p->channel->Provider());
-+ if ((sortMode == csmSourceName ||
-+ (r == 0 && sortMode != csmSourceProviderNumber)) && rsource == 0)
-+ r = strcoll(channel->Name(), p->channel->Name());
-+ if ((sortMode == csmSourceNumber || r == 0) && rsource == 0)
-+ r = channel->Number() - p->channel->Number();
-+ return ((rsource == 0) ? r : rsource);
-+ }
-+ if (sortMode == csmProvider || sortMode == csmProviderNumber)
- r = strcoll(channel->Provider(), p->channel->Provider());
-- if (sortMode == csmName || r == 0)
-+ if (sortMode == csmName || (r == 0 && sortMode != csmProviderNumber))
- r = strcoll(channel->Name(), p->channel->Name());
- if (sortMode == csmNumber || r == 0)
- r = channel->Number() - p->channel->Number();
-@@ -400,10 +437,17 @@
- {
- cString buffer;
- if (!channel->GroupSep()) {
-- if (sortMode == csmProvider)
-- buffer = cString::sprintf("%d\t%s - %s", channel->Number(), channel->Provider(), channel->Name());
-- else
-- buffer = cString::sprintf("%d\t%s", channel->Number(), channel->Name());
-+ if (sortMode >= csmSourceNumber) {
-+ if (sortMode == csmSourceProvider || sortMode == csmSourceProviderNumber)
-+ buffer = cString::sprintf("%d\t%s - %s - %s", channel->Number(), *cSource::ToString(channel->Source()), channel->Provider(), channel->Name());
-+ else
-+ buffer = cString::sprintf("%d\t%s - %s", channel->Number(), *cSource::ToString(channel->Source()), channel->Name());
-+ } else {
-+ if (sortMode == csmProvider || sortMode == csmProviderNumber)
-+ buffer = cString::sprintf("%d\t%s - %s", channel->Number(), channel->Provider(), channel->Name());
-+ else
-+ buffer = cString::sprintf("%d\t%s", channel->Number(), channel->Name());
-+ }
- }
- else
- buffer = cString::sprintf("---\t%s ----------------------------------------------------------------", channel->Name());
diff --git a/debian/patches/XX_patchtest-compile-error.dpatch b/debian/patches/XX_patchtest-compile-error.dpatch
deleted file mode 100644
index 97252c0..0000000
--- a/debian/patches/XX_patchtest-compile-error.dpatch
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh /usr/share/dpatch/dpatch-run
-
-## XX_patchtest-compile-error
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch to check patchtest against compile error
-
- at DPATCH@
-diff -Nur vdr.orig/vdr.c vdr/vdr.c
---- vdr.orig/vdr.c 2004-03-12 21:37:17.000000000 +0100
-+++ vdr/vdr.c 2004-03-13 14:22:01.000000000 +0100
-@@ -79,6 +79,8 @@
-
- int main(int argc, char *argv[])
- {
-+ RaiseCompilerError();
-+
- // Save terminal settings:
-
- struct termios savedTm;
diff --git a/debian/patches/XX_patchtest-patch-error.dpatch b/debian/patches/XX_patchtest-patch-error.dpatch
deleted file mode 100644
index 6946121..0000000
--- a/debian/patches/XX_patchtest-patch-error.dpatch
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh /usr/share/dpatch/dpatch-run
-
-## XX_patchtest-patch-error
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch to check patchtest against patch error
-
- at DPATCH@
-diff -Nur vdr.orig/vdr.c vdr/vdr.c
---- vdr.orig/vdr.c 2004-03-12 21:37:17.000000000 +0100
-+++ vdr/vdr.c 2004-03-13 14:22:01.000000000 +0100
-@@ -79,6 +79,8 @@
-
- int main(int argc, char *argv[])
- ***PATCH-BUG***
-+ RaiseCompilerError();
-+
- // Save terminal settings:
-
- struct termios savedTm;
diff --git a/debian/patches/list_uncritical_patches b/debian/patches/list_uncritical_patches
deleted file mode 100644
index 6cac722..0000000
--- a/debian/patches/list_uncritical_patches
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-# find all patches that don't modify any header files
-
-patches=`find ./ -name "*.dpatch"`
-
-for patch in $patches ; do
- grep -q -e "^---.*\.h" $patch
- if [ $? -ne 0 ] ; then
- basename $patch
- fi
-done
diff --git a/debian/patches/opt-20_liemikuutio.dpatch b/debian/patches/opt-20_liemikuutio.dpatch
deleted file mode 100644
index 65f444b..0000000
--- a/debian/patches/opt-20_liemikuutio.dpatch
+++ /dev/null
@@ -1,1087 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-20_liemikuutio.dpatch by Rolf Ahrenberg <Rolf.Ahrenberg AT sci.fi>
-## http://www.saunalahti.fi/~rahrenbe/vdr/patches/vdr-1.7.21-liemikuutio-1.31.patch.gz
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch collection - see HISTORY-liemikuutio for details.
-
- at DPATCH@
-diff -Nru vdr-1.7.21-vanilla/config.h vdr-1.7.21-liemikuutio/config.h
---- vdr-1.7.21-vanilla/config.h 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/config.h 2011-09-04 16:54:42.000000000 +0300
-@@ -36,6 +36,8 @@
- // plugins to work with newer versions of the core VDR as long as no
- // VDR header files have changed.
-
-+#define LIEMIKUUTIO 131
-+
- #define MAXPRIORITY 99
- #define MAXLIFETIME 99
-
-diff -Nru vdr-1.7.21-vanilla/device.c vdr-1.7.21-liemikuutio/device.c
---- vdr-1.7.21-vanilla/device.c 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/device.c 2011-09-04 16:54:42.000000000 +0300
-@@ -1027,7 +1027,8 @@
- int LanguagePreference = INT_MAX; // higher than the maximum possible value
- for (int i = ttSubtitleFirst; i <= ttSubtitleLast; i++) {
- const tTrackId *TrackId = GetTrack(eTrackType(i));
-- if (TrackId && TrackId->id && I18nIsPreferredLanguage(Setup.SubtitleLanguages, TrackId->language, LanguagePreference))
-+ if (TrackId && TrackId->id && (I18nIsPreferredLanguage(Setup.SubtitleLanguages, TrackId->language, LanguagePreference) ||
-+ ((i == ttSubtitleFirst + 8) && !(*TrackId->language) && (LanguagePreference == INT_MAX))))
- PreferredTrack = eTrackType(i);
- }
- // Make sure we're set to an available subtitle track:
-diff -Nru vdr-1.7.21-vanilla/HISTORY-liemikuutio vdr-1.7.21-liemikuutio/HISTORY-liemikuutio
---- vdr-1.7.21-vanilla/HISTORY-liemikuutio 1970-01-01 02:00:00.000000000 +0200
-+++ vdr-1.7.21-liemikuutio/HISTORY-liemikuutio 2011-09-04 17:15:08.000000000 +0300
-@@ -0,0 +1,151 @@
-+-----------------------------------
-+Liemikuutio for Video Disc Recorder
-+
-+Maintainer: Rolf Ahrenberg
-+-----------------------------------
-+
-+2006-01-08: Version 1.0
-+
-+- Based on enAIO with these original patches:
-+ Simple recordings sorting by Walter at VDRPortal
-+ Alternate rename recordings by Ralf MÃÅller
-+ Menu selection by Peter Dittmann
-+ Recording length by Tobias Faust
-+
-+2006-01-15: Version 1.1
-+
-+- Removed patches already found in vdr-1.3.39.
-+
-+2006-01-25: Version 1.2
-+
-+- Added "Main menu command position" feature.
-+
-+2006-02-05: Version 1.3
-+
-+- Improved menu selection response.
-+
-+2006-04-18: Version 1.4
-+
-+- Added Estonian translation (Thanks to Arthur Konovalov).
-+
-+2006-04-30: Version 1.5
-+
-+- Added progress bar view into "What's on now?" menu.
-+
-+2006-06-06: Version 1.6
-+
-+- Added French translation (Thanks to ECLiPSE).
-+
-+2006-06-14: Version 1.7
-+
-+- Fixed RENR crash.
-+
-+2006-07-14: Version 1.8
-+
-+- Fixed RENR/OSD bug.
-+
-+2006-08-27: Version 1.9
-+
-+- Some modifications to the recording length and rename recordings
-+ patches (Thanks to Firefly).
-+- Added k1_k3_jumps_20s patch by Petri Hintukainen.
-+
-+2006-08-29: Version 1.10
-+
-+- The cRecording:Title() method now defaults to original formatting.
-+
-+2006-09-04: Version 1.11
-+
-+- Removed unused variable from cRecording::Title() method (Thanks to
-+ C.Y.M.).
-+- Some modifications to the rename recordings patch (Thanks to Firefly).
-+
-+2006-09-13: Version 1.12
-+
-+- More modifications to the rename recordings patch (Thanks to Firefly).
-+
-+2006-10-01: Version 1.13
-+
-+- Removed unnecessary syslog printing (Thanks to Firefly).
-+
-+2007-08-14: Version 1.14
-+
-+- Updated for vdr-1.5.7.
-+
-+2007-10-16: Version 1.15
-+
-+- Added recmenu play patch (Thanks to Ville Skyttä).
-+- Updated French translation (Thanks to ECLiPSE).
-+
-+2007-11-04: Version 1.16
-+
-+- Updated for vdr-1.5.11.
-+
-+2007-12-08: Version 1.17
-+
-+- Added binary skip patch.
-+- Removed k1_k3_jumps_20s patch.
-+
-+2008-02-17: Version 1.18
-+
-+- Updated for vdr-1.5.15.
-+
-+2008-03-02: Version 1.19
-+
-+- Modified binary skip to use kPrev and kNext keys and the skip is now
-+ always shortened after a direction change (Thanks to Timo Eskola).
-+- Readded k1_k3_jumps_20s patch.
-+
-+2008-04-04: Version 1.20
-+
-+- Added bitrate information into rename menu.
-+- Readded the path editing support of rename recordings patch (Thanks
-+ to Firefly).
-+
-+2008-05-08: Version 1.21
-+
-+- Fixed rename recordings (Thanks to Firefly).
-+- Added a DVB subtitles hack for old recordings (Thanks to Anssi Hannula).
-+
-+2009-01-08: Version 1.22
-+
-+- Updated for vdr-1.7.3.
-+
-+2009-01-25: Version 1.23
-+
-+- Updated for vdr-1.7.4.
-+
-+2009-02-27: Version 1.24
-+
-+- Fixed compilation under gcc-4.4.
-+
-+2009-04-05: Version 1.25
-+
-+- Fixed the length detection of recordings (Thanks to Thomas Günther).
-+
-+2009-04-17: Version 1.26
-+
-+- Fixed the length detection of audio recordings (Thanks to Thomas Günther).
-+
-+2009-04-26: Version 1.27
-+
-+- Fixed the length detection of empty recordings (Thanks to Thomas Günther).
-+
-+2009-07-12: Version 1.28
-+
-+- Fixed the TS/PES detection of recording marks.
-+
-+2009-11-23: Version 1.29
-+
-+- Updated Estonian translation (Thanks to Arthur Konovalov).
-+
-+2010-02-01: Version 1.30
-+
-+- Updated for vdr-1.7.12.
-+
-+2011-09-04: Version 1.31
-+
-+- Updated for vdr-1.7.21.
-+- Removed progress bar view form "What's on now?" menu.
-+- Removed "Main menu command position" and recordings length/sorting features.
-+- Changed renaming functionality to support different filesystems and binded it to key '0'.
-diff -Nru vdr-1.7.21-vanilla/menu.c vdr-1.7.21-liemikuutio/menu.c
---- vdr-1.7.21-vanilla/menu.c 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/menu.c 2011-09-04 17:04:53.000000000 +0300
-@@ -2196,6 +2196,153 @@
- SetText(cString::sprintf("%d\t\t%d\t%s", totalEntries, newEntries, name));
- }
-
-+// --- cMenuRenameRecording --------------------------------------------------
-+
-+class cMenuRenameRecording : public cOsdMenu {
-+private:
-+ char name[MaxFileName];
-+ cMenuEditStrItem *file;
-+ cOsdItem *marksItem, *resumeItem;
-+ bool isResume, isMarks;
-+ cRecording *recording;
-+ void SetHelpKeys(void);
-+ eOSState SetFolder(void);
-+public:
-+ cMenuRenameRecording(cRecording *Recording);
-+ virtual eOSState ProcessKey(eKeys Key);
-+};
-+
-+cMenuRenameRecording::cMenuRenameRecording(cRecording *Recording)
-+:cOsdMenu(tr("Rename recording"), 12)
-+{
-+ cMarks marks;
-+
-+ file = NULL;
-+ recording = Recording;
-+
-+ if (recording) {
-+ Utf8Strn0Cpy(name, recording->Name(), sizeof(name));
-+ Add(file = new cMenuEditStrItem(tr("File"), name, sizeof(name)));
-+
-+ Add(new cOsdItem("", osUnknown, false));
-+
-+ Add(new cOsdItem(cString::sprintf("%s:\t%s", tr("Date"), *DayDateTime(recording->start)), osUnknown, false));
-+
-+ cChannel *channel = Channels.GetByChannelID(((cRecordingInfo *)recording->Info())->ChannelID());
-+ if (channel)
-+ Add(new cOsdItem(cString::sprintf("%s:\t%s", tr("Channel"), *ChannelString(channel, 0)), osUnknown, false));
-+
-+ int recLen = recording->LengthInSeconds();
-+ if (recLen >= 0)
-+ Add(new cOsdItem(cString::sprintf("%s:\t%d:%02d:%02d", tr("Length"), recLen / 3600, recLen / 60 % 60, recLen % 60), osUnknown, false));
-+ else
-+ recLen = 0;
-+
-+ int dirSize = DirSizeMB(recording->FileName());
-+ cString bitRate = recLen ? cString::sprintf(" (%.2f MBit/s)", 8.0 * dirSize / recLen) : cString("");
-+ Add(new cOsdItem(cString::sprintf("%s:\t%s", tr("Format"), recording->IsPesRecording() ? tr("PES") : tr("TS")), osUnknown, false));
-+ Add(new cOsdItem((dirSize > 9999) ? cString::sprintf("%s:\t%.2f GB%s", tr("Size"), dirSize / 1024.0, *bitRate) : cString::sprintf("%s:\t%d MB%s", tr("Size"), dirSize, *bitRate), osUnknown, false));
-+
-+ Add(new cOsdItem("", osUnknown, false));
-+
-+ isMarks = marks.Load(recording->FileName(), recording->FramesPerSecond(), recording->IsPesRecording()) && marks.Count();
-+ marksItem = new cOsdItem(tr("Delete marks information?"), osUser1, isMarks);
-+ Add(marksItem);
-+
-+ cResumeFile ResumeFile(recording->FileName(), recording->IsPesRecording());
-+ isResume = (ResumeFile.Read() != -1);
-+ resumeItem = new cOsdItem(tr("Delete resume information?"), osUser2, isResume);
-+ Add(resumeItem);
-+ }
-+
-+ SetHelpKeys();
-+}
-+
-+void cMenuRenameRecording::SetHelpKeys(void)
-+{
-+ SetHelp(tr("Button$Folder"));
-+}
-+
-+eOSState cMenuRenameRecording::SetFolder(void)
-+{
-+ cMenuFolder *mf = (cMenuFolder *)SubMenu();
-+ if (mf) {
-+ cString Folder = mf->GetFolder();
-+ char *p = strrchr(name, FOLDERDELIMCHAR);
-+ if (p)
-+ p++;
-+ else
-+ p = name;
-+ if (!isempty(*Folder))
-+ strn0cpy(name, cString::sprintf("%s%c%s", *Folder, FOLDERDELIMCHAR, p), sizeof(name));
-+ else if (p != name)
-+ memmove(name, p, strlen(p) + 1);
-+ SetCurrent(file);
-+ Display();
-+ }
-+ return CloseSubMenu();
-+}
-+
-+eOSState cMenuRenameRecording::ProcessKey(eKeys Key)
-+{
-+ eOSState state = cOsdMenu::ProcessKey(Key);
-+
-+ if (state == osUnknown) {
-+ switch (Key) {
-+ case kOk:
-+ if (recording->Rename(name)) {
-+ Recordings.ChangeState();
-+ Recordings.TouchUpdate();
-+ return osRecordings;
-+ }
-+ else
-+ Skins.Message(mtError, tr("Error while accessing recording!"));
-+ break;
-+ case kRed:
-+ return AddSubMenu(new cMenuFolder(tr("Select folder"), &Folders, name));
-+ break;
-+ default:
-+ break;
-+ }
-+ if (Key != kNone)
-+ SetHelpKeys();
-+ return osContinue;
-+ }
-+ else if (state == osEnd && HasSubMenu())
-+ state = SetFolder();
-+ else if (state == osUser1) {
-+ if (isMarks && Interface->Confirm(tr("Delete marks information?"))) {
-+ cMarks marks;
-+ marks.Load(recording->FileName(), recording->FramesPerSecond(), recording->IsPesRecording());
-+ cMark *mark = marks.First();
-+ while (mark) {
-+ cMark *nextmark = marks.Next(mark);
-+ marks.Del(mark);
-+ mark = nextmark;
-+ }
-+ marks.Save();
-+ isMarks = false;
-+ marksItem->SetSelectable(isMarks);
-+ SetCurrent(First());
-+ Display();
-+ }
-+ return osContinue;
-+ }
-+ else if (state == osUser2) {
-+ if (isResume && Interface->Confirm(tr("Delete resume information?"))) {
-+ cResumeFile ResumeFile(recording->FileName(), recording->IsPesRecording());
-+ ResumeFile.Delete();
-+ isResume = false;
-+ resumeItem->SetSelectable(isResume);
-+ SetCurrent(First());
-+ Display();
-+ }
-+ return osContinue;
-+ }
-+
-+ return state;
-+}
-+
- // --- cMenuRecordings -------------------------------------------------------
-
- cMenuRecordings::cMenuRecordings(const char *Base, int Level, bool OpenSubMenus)
-@@ -2434,6 +2581,19 @@
- return osContinue;
- }
-
-+eOSState cMenuRecordings::Rename(void)
-+{
-+ if (HasSubMenu() || Count() == 0)
-+ return osContinue;
-+ cMenuRecordingItem *ri = (cMenuRecordingItem *)Get(Current());
-+ if (ri && !ri->IsDirectory()) {
-+ cRecording *recording = GetRecording(ri);
-+ if (recording)
-+ return AddSubMenu(new cMenuRenameRecording(recording));
-+ }
-+ return osContinue;
-+}
-+
- eOSState cMenuRecordings::ProcessKey(eKeys Key)
- {
- bool HadSubMenu = HasSubMenu();
-@@ -2448,6 +2608,7 @@
- case kYellow: return Delete();
- case kInfo:
- case kBlue: return Info();
-+ case k0: return Rename();
- case k1...k9: return Commands(Key);
- case kNone: if (Recordings.StateChanged(recordingsState))
- Set(true);
-@@ -3363,7 +3524,7 @@
- // Replay control:
- if (replaying && !stopReplayItem)
- // TRANSLATORS: note the leading blank!
-- Add(stopReplayItem = new cOsdItem(tr(" Stop replaying"), osStopReplay));
-+ Ins(stopReplayItem = new cOsdItem(tr(" Stop replaying"), osStopReplay));
- else if (stopReplayItem && !replaying) {
- Del(stopReplayItem->Index());
- stopReplayItem = NULL;
-@@ -3377,7 +3538,7 @@
- bool CutterActive = cCutter::Active();
- if (CutterActive && !cancelEditingItem) {
- // TRANSLATORS: note the leading blank!
-- Add(cancelEditingItem = new cOsdItem(tr(" Cancel editing"), osCancelEdit));
-+ Ins(cancelEditingItem = new cOsdItem(tr(" Cancel editing"), osCancelEdit));
- result = true;
- }
- else if (cancelEditingItem && !CutterActive) {
-@@ -3397,7 +3558,7 @@
- while ((s = cRecordControls::GetInstantId(s)) != NULL) {
- cOsdItem *item = new cOsdItem(osStopRecord);
- item->SetText(cString::sprintf("%s%s", tr(STOP_RECORDING), s));
-- Add(item);
-+ Ins(item);
- if (!stopRecordingItem)
- stopRecordingItem = item;
- }
-@@ -4387,6 +4548,10 @@
-
- // --- cReplayControl --------------------------------------------------------
-
-+#define REPLAYCONTROLSKIPLIMIT 9 // s
-+#define REPLAYCONTROLSKIPSECONDS 90 // s
-+#define REPLAYCONTROLSKIPTIMEOUT 5000 // ms
-+
- cReplayControl *cReplayControl::currentReplayControl = NULL;
- char *cReplayControl::fileName = NULL;
- char *cReplayControl::title = NULL;
-@@ -4400,6 +4565,9 @@
- lastCurrent = lastTotal = -1;
- lastPlay = lastForward = false;
- lastSpeed = -2; // an invalid value
-+ lastSkipKey = kNone;
-+ lastSkipSeconds = REPLAYCONTROLSKIPSECONDS;
-+ lastSkipTimeout.Set(0);
- timeoutShow = 0;
- timeSearchActive = false;
- cRecording Recording(fileName);
-@@ -4798,6 +4966,32 @@
- case kGreen: SkipSeconds(-60); break;
- case kYellow|k_Repeat:
- case kYellow: SkipSeconds( 60); break;
-+ case k1|k_Repeat:
-+ case k1: SkipSeconds(-20); break;
-+ case k3|k_Repeat:
-+ case k3: SkipSeconds( 20); break;
-+ case kPrev|k_Repeat:
-+ case kPrev: if (lastSkipTimeout.TimedOut()) {
-+ lastSkipSeconds = REPLAYCONTROLSKIPSECONDS;
-+ lastSkipKey = kPrev;
-+ }
-+ else if (RAWKEY(lastSkipKey) != kPrev && lastSkipSeconds > (2 * REPLAYCONTROLSKIPLIMIT)) {
-+ lastSkipSeconds /= 2;
-+ lastSkipKey = kNone;
-+ }
-+ lastSkipTimeout.Set(REPLAYCONTROLSKIPTIMEOUT);
-+ SkipSeconds(-lastSkipSeconds); break;
-+ case kNext|k_Repeat:
-+ case kNext: if (lastSkipTimeout.TimedOut()) {
-+ lastSkipSeconds = REPLAYCONTROLSKIPSECONDS;
-+ lastSkipKey = kNext;
-+ }
-+ else if (RAWKEY(lastSkipKey) != kNext && lastSkipSeconds > (2 * REPLAYCONTROLSKIPLIMIT)) {
-+ lastSkipSeconds /= 2;
-+ lastSkipKey = kNone;
-+ }
-+ lastSkipTimeout.Set(REPLAYCONTROLSKIPTIMEOUT);
-+ SkipSeconds(lastSkipSeconds); break;
- case kStop:
- case kBlue: Hide();
- Stop();
-@@ -4807,12 +5001,8 @@
- switch (int(Key)) {
- // Editing:
- case kMarkToggle: MarkToggle(); break;
-- case kPrev|k_Repeat:
-- case kPrev:
- case kMarkJumpBack|k_Repeat:
- case kMarkJumpBack: MarkJump(false); break;
-- case kNext|k_Repeat:
-- case kNext:
- case kMarkJumpForward|k_Repeat:
- case kMarkJumpForward: MarkJump(true); break;
- case kMarkMoveBack|k_Repeat:
-diff -Nru vdr-1.7.21-vanilla/menu.h vdr-1.7.21-liemikuutio/menu.h
---- vdr-1.7.21-vanilla/menu.h 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/menu.h 2011-09-04 16:54:42.000000000 +0300
-@@ -204,6 +204,7 @@
- eOSState Delete(void);
- eOSState Info(void);
- eOSState Commands(eKeys Key = kNone);
-+ eOSState Rename(void);
- protected:
- cRecording *GetRecording(cMenuRecordingItem *Item);
- public:
-@@ -258,6 +259,9 @@
- int lastCurrent, lastTotal;
- bool lastPlay, lastForward;
- int lastSpeed;
-+ int lastSkipSeconds;
-+ eKeys lastSkipKey;
-+ cTimeMs lastSkipTimeout;
- time_t timeoutShow;
- bool timeSearchActive, timeSearchHide;
- int timeSearchTime, timeSearchPos;
-diff -Nru vdr-1.7.21-vanilla/osdbase.c vdr-1.7.21-liemikuutio/osdbase.c
---- vdr-1.7.21-vanilla/osdbase.c 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/osdbase.c 2011-09-04 16:54:42.000000000 +0300
-@@ -77,6 +77,7 @@
- {
- isMenu = true;
- digit = 0;
-+ key_nr = -1;
- hasHotkeys = false;
- title = NULL;
- SetTitle(Title);
-@@ -119,7 +120,7 @@
- digit = -1; // prevents automatic hotkeys - input already has them
- if (digit >= 0) {
- digit++;
-- buffer = cString::sprintf(" %c %s", (digit < 10) ? '0' + digit : ' ' , s);
-+ buffer = cString::sprintf(" %2d%s %s", digit, (digit > 9) ? "" : " ", s);
- s = buffer;
- }
- }
-@@ -449,20 +450,62 @@
- }
- }
-
-+#define MENUKEY_TIMEOUT 1500
-+
- eOSState cOsdMenu::HotKey(eKeys Key)
- {
-- for (cOsdItem *item = First(); item; item = Next(item)) {
-+ bool match = false;
-+ bool highlight = false;
-+ int item_nr;
-+ int i;
-+
-+ if (Key == kNone) {
-+ if (lastActivity.TimedOut())
-+ Key = kOk;
-+ else
-+ return osContinue;
-+ }
-+ else {
-+ lastActivity.Set(MENUKEY_TIMEOUT);
-+ }
-+ for (cOsdItem *item = Last(); item; item = Prev(item)) {
- const char *s = item->Text();
-- if (s && (s = skipspace(s)) != NULL) {
-- if (*s == Key - k1 + '1') {
-+ i = 0;
-+ item_nr = 0;
-+ if (s && (s = skipspace(s)) != '\0' && '0' <= s[i] && s[i] <= '9') {
-+ do {
-+ item_nr = item_nr * 10 + (s[i] - '0');
-+ }
-+ while ( !((s[++i] == '\t')||(s[i] == ' ')) && (s[i] != '\0') && ('0' <= s[i]) && (s[i] <= '9'));
-+ if ((Key == kOk) && (item_nr == key_nr)) {
- current = item->Index();
- RefreshCurrent();
- Display();
- cRemote::Put(kOk, true);
-+ key_nr = -1;
- break;
- }
-+ else if (Key != kOk) {
-+ if (!highlight && (item_nr == (Key - k0))) {
-+ highlight = true;
-+ current = item->Index();
-+ }
-+ if (!match && (key_nr == -1) && ((item_nr / 10) == (Key - k0))) {
-+ match = true;
-+ key_nr = (Key - k0);
-+ }
-+ else if (((key_nr == -1) && (item_nr == (Key - k0))) || (!match && (key_nr >= 0) && (item_nr == (10 * key_nr + Key - k0)))) {
-+ current = item->Index();
-+ cRemote::Put(kOk, true);
-+ key_nr = -1;
-+ break;
-+ }
-+ }
- }
- }
-+ if ((!match) && (Key != kNone)) {
-+ key_nr = -1;
-+ }
- return osContinue;
- }
-
-@@ -501,8 +544,8 @@
- }
- }
- switch (int(Key)) {
-- case k0: return osUnknown;
-- case k1...k9: return hasHotkeys ? HotKey(Key) : osUnknown;
-+ case kNone:
-+ case k0...k9: return hasHotkeys ? HotKey(Key) : osUnknown;
- case kUp|k_Repeat:
- case kUp: CursorUp(); break;
- case kDown|k_Repeat:
-diff -Nru vdr-1.7.21-vanilla/osdbase.h vdr-1.7.21-liemikuutio/osdbase.h
---- vdr-1.7.21-vanilla/osdbase.h 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/osdbase.h 2011-09-04 16:54:42.000000000 +0300
-@@ -95,6 +95,8 @@
- char *status;
- int digit;
- bool hasHotkeys;
-+ int key_nr;
-+ cTimeMs lastActivity;
- protected:
- void SetDisplayMenu(void);
- cSkinDisplayMenu *DisplayMenu(void) { return displayMenu; }
-diff -Nru vdr-1.7.21-vanilla/po/de_DE.po vdr-1.7.21-liemikuutio/po/de_DE.po
---- vdr-1.7.21-vanilla/po/de_DE.po 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/po/de_DE.po 2011-09-04 16:54:42.000000000 +0300
-@@ -1322,3 +1322,30 @@
- #, c-format
- msgid "VDR will shut down in %s minutes"
- msgstr "VDR wird in %s Minuten ausschalten"
-+
-+msgid "Rename recording"
-+msgstr "Aufzeichnung umbenennen"
-+
-+msgid "Date"
-+msgstr "Datum"
-+
-+msgid "Length"
-+msgstr "Länge"
-+
-+msgid "Size"
-+msgstr "Größe"
-+
-+msgid "Format"
-+msgstr "Format"
-+
-+msgid "PES"
-+msgstr "PES"
-+
-+msgid "TS"
-+msgstr "TS"
-+
-+msgid "Delete marks information?"
-+msgstr "Marks löschen?"
-+
-+msgid "Delete resume information?"
-+msgstr "Resume löschen?"
-diff -Nru vdr-1.7.21-vanilla/po/et_EE.po vdr-1.7.21-liemikuutio/po/et_EE.po
---- vdr-1.7.21-vanilla/po/et_EE.po 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/po/et_EE.po 2011-09-04 16:54:42.000000000 +0300
-@@ -1322,3 +1322,30 @@
- #, c-format
- msgid "VDR will shut down in %s minutes"
- msgstr "VDR lülitub välja %s minuti pärast"
-+
-+msgid "Rename recording"
-+msgstr "Ümbernimetamine"
-+
-+msgid "Date"
-+msgstr "Kuupäev"
-+
-+msgid "Length"
-+msgstr "Kestus"
-+
-+msgid "Size"
-+msgstr "Suurus"
-+
-+msgid "Format"
-+msgstr "Formaat"
-+
-+msgid "PES"
-+msgstr "PES"
-+
-+msgid "TS"
-+msgstr "TS"
-+
-+msgid "Delete marks information?"
-+msgstr "Kustutada märkide info?"
-+
-+msgid "Delete resume information?"
-+msgstr "Kustutada jätkamise info?"
-diff -Nru vdr-1.7.21-vanilla/po/fi_FI.po vdr-1.7.21-liemikuutio/po/fi_FI.po
---- vdr-1.7.21-vanilla/po/fi_FI.po 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/po/fi_FI.po 2011-09-04 16:54:42.000000000 +0300
-@@ -1325,3 +1325,30 @@
- #, c-format
- msgid "VDR will shut down in %s minutes"
- msgstr "VDR sammuu %s minuutin kuluttua"
-+
-+msgid "Rename recording"
-+msgstr "Nimeä tallenne"
-+
-+msgid "Date"
-+msgstr "Päiväys"
-+
-+msgid "Length"
-+msgstr "Pituus"
-+
-+msgid "Size"
-+msgstr "Koko"
-+
-+msgid "Format"
-+msgstr "Tiedostomuoto"
-+
-+msgid "PES"
-+msgstr "PES"
-+
-+msgid "TS"
-+msgstr "TS"
-+
-+msgid "Delete marks information?"
-+msgstr "Poista tallenteen merkinnät?"
-+
-+msgid "Delete resume information?"
-+msgstr "Poista tallenteen paluutiedot?"
-diff -Nru vdr-1.7.21-vanilla/po/fr_FR.po vdr-1.7.21-liemikuutio/po/fr_FR.po
---- vdr-1.7.21-vanilla/po/fr_FR.po 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/po/fr_FR.po 2011-09-04 16:54:42.000000000 +0300
-@@ -1328,3 +1328,30 @@
- #, c-format
- msgid "VDR will shut down in %s minutes"
- msgstr "VDR s'arrêtera dans %s minutes"
-+
-+msgid "Rename recording"
-+msgstr "Renommer l'enregistrement"
-+
-+msgid "Date"
-+msgstr "Date"
-+
-+msgid "Length"
-+msgstr "Longueur"
-+
-+msgid "Size"
-+msgstr "Taille"
-+
-+msgid "Format"
-+msgstr "Format"
-+
-+msgid "PES"
-+msgstr "PES"
-+
-+msgid "TS"
-+msgstr "TS"
-+
-+msgid "Delete marks information?"
-+msgstr "Effacer les informations de marquage"
-+
-+msgid "Delete resume information?"
-+msgstr "Effacer les informations de reprise"
-diff -Nru vdr-1.7.21-vanilla/po/ru_RU.po vdr-1.7.21-liemikuutio/po/ru_RU.po
---- vdr-1.7.21-vanilla/po/ru_RU.po 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/po/ru_RU.po 2011-09-04 16:54:42.000000000 +0300
-@@ -1323,3 +1323,30 @@
- #, c-format
- msgid "VDR will shut down in %s minutes"
- msgstr "VDR ÒëÚÛîçØâáï çÕàÕ× %s ÜØÝãâ"
-+
-+msgid "Rename recording"
-+msgstr "¿ÕàÕØÜÕÝÞÒÐâì ×ÐßØáì"
-+
-+msgid "Date"
-+msgstr ""
-+
-+msgid "Length"
-+msgstr ""
-+
-+msgid "Size"
-+msgstr ""
-+
-+msgid "Format"
-+msgstr ""
-+
-+msgid "PES"
-+msgstr ""
-+
-+msgid "TS"
-+msgstr ""
-+
-+msgid "Delete marks information?"
-+msgstr ""
-+
-+msgid "Delete resume information?"
-+msgstr ""
-diff -Nru vdr-1.7.21-vanilla/recording.c vdr-1.7.21-liemikuutio/recording.c
---- vdr-1.7.21-vanilla/recording.c 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/recording.c 2011-09-04 17:06:59.000000000 +0300
-@@ -1056,6 +1056,40 @@
- return -1;
- }
-
-+bool cRecording::Rename(const char *newName)
-+{
-+ bool result = false;
-+ struct tm tm_r;
-+ struct tm *t = localtime_r(&start, &tm_r);
-+ char *localNewName = ExchangeChars(strdup(newName), true);
-+ const char *fmt = isPesRecording ? NAMEFORMATPES : NAMEFORMATTS;
-+ int ch = isPesRecording ? priority : channel;
-+ int ri = isPesRecording ? lifetime : instanceId;
-+ char *newFileName = strdup(cString::sprintf(fmt, VideoDirectory, localNewName, t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, ch, ri));
-+ free(localNewName);
-+ if (strcmp(FileName(), newFileName)) {
-+ if (access(newFileName, F_OK) == 0) {
-+ esyslog("recording %s already exists", newFileName);
-+ }
-+ else {
-+ isyslog("renaming recording %s to %s", FileName(), newFileName);
-+ result = MoveVideoFile(FileName(), newFileName);
-+ if (result) {
-+ free(fileName);
-+ fileName = strdup(newFileName);
-+ free(name);
-+ name = strdup(newName);
-+ free(sortBuffer);
-+ sortBuffer = NULL;
-+ free(titleBuffer);
-+ titleBuffer = NULL;
-+ }
-+ }
-+ }
-+ free(newFileName);
-+ return result;
-+}
-+
- // --- cRecordings -----------------------------------------------------------
-
- cRecordings Recordings;
-diff -Nru vdr-1.7.21-vanilla/recording.h vdr-1.7.21-liemikuutio/recording.h
---- vdr-1.7.21-vanilla/recording.h 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/recording.h 2011-09-04 16:57:00.000000000 +0300
-@@ -152,6 +152,9 @@
- ///< Changes the file name so that it will be visible in the "Recordings" menu again and
- ///< not processed by cRemoveDeletedRecordingsThread.
- ///< Returns false in case of error
-+ bool Rename(const char *newName);
-+ ///< Changes the file name
-+ ///< Returns false in case of error
- };
-
- class cRecordings : public cList<cRecording>, public cThread {
-diff -Nru vdr-1.7.21-vanilla/svdrp.c vdr-1.7.21-liemikuutio/svdrp.c
---- vdr-1.7.21-vanilla/svdrp.c 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/svdrp.c 2011-09-04 17:09:02.000000000 +0300
-@@ -306,6 +306,11 @@
- "REMO [ on | off ]\n"
- " Turns the remote control on or off. Without a parameter, the current\n"
- " status of the remote control is reported.",
-+ "RENR <number> <new name>\n"
-+ " Rename the recording with the given number. Before a recording can be\n"
-+ " renamed, an LSTR command must have been executed in order to retrieve\n"
-+ " the recording numbers. The numbers don't change during subsequent RENR\n"
-+ " commands.\n"
- "SCAN\n"
- " Forces an EPG scan. If this is a single DVB device system, the scan\n"
- " will be done on the primary device unless it is currently recording.",
-@@ -1510,6 +1515,31 @@
- Reply(250, "EPG scan triggered");
- }
-
-+void cSVDRP::CmdRENR(const char *Option)
-+{
-+ if (*Option) {
-+ char *tail;
-+ int n = strtol(Option, &tail, 10);
-+ cRecording *recording = Recordings.Get(n - 1);
-+ if (recording && tail && tail != Option) {
-+ char *oldName = strdup(recording->Name());
-+ tail = skipspace(tail);
-+ if (recording->Rename(tail)) {
-+ Reply(250, "Recording \"%s\" renamed to \"%s\"", oldName, recording->Name());
-+ ::Recordings.ChangeState();
-+ ::Recordings.TouchUpdate();
-+ }
-+ else
-+ Reply(554, "Error while renaming recording \"%s\" to \"%s\"!", oldName, tail);
-+ free(oldName);
-+ }
-+ else
-+ Reply(550, "Recording \"%d\" not found%s", n, Recordings.Count() ? "" : " (use LSTR before renaming)");
-+ }
-+ else
-+ Reply(501, "Invalid Option \"%s\"", Option);
-+}
-+
- void cSVDRP::CmdSTAT(const char *Option)
- {
- if (*Option) {
-@@ -1625,6 +1655,7 @@
- else if (CMD("PLUG")) CmdPLUG(s);
- else if (CMD("PUTE")) CmdPUTE(s);
- else if (CMD("REMO")) CmdREMO(s);
-+ else if (CMD("RENR")) CmdRENR(s);
- else if (CMD("SCAN")) CmdSCAN(s);
- else if (CMD("STAT")) CmdSTAT(s);
- else if (CMD("UPDT")) CmdUPDT(s);
-diff -Nru vdr-1.7.21-vanilla/svdrp.h vdr-1.7.21-liemikuutio/svdrp.h
---- vdr-1.7.21-vanilla/svdrp.h 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/svdrp.h 2011-09-04 16:54:42.000000000 +0300
-@@ -79,6 +79,7 @@
- void CmdPLUG(const char *Option);
- void CmdPUTE(const char *Option);
- void CmdREMO(const char *Option);
-+ void CmdRENR(const char *Option);
- void CmdSCAN(const char *Option);
- void CmdSTAT(const char *Option);
- void CmdUPDT(const char *Option);
-diff -Nru vdr-1.7.21-vanilla/tools.c vdr-1.7.21-liemikuutio/tools.c
---- vdr-1.7.21-vanilla/tools.c 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/tools.c 2011-09-04 17:09:44.000000000 +0300
-@@ -285,6 +285,24 @@
- return n;
- }
-
-+cString StripLastDirectory(const char *DirName)
-+{
-+ if (DirName && *DirName) {
-+ cString s(DirName);
-+ int l = strlen(*s);
-+ const char *p = *s + l;
-+ while (l > 0) {
-+ if (*p-- == '/')
-+ break;
-+ l--;
-+ }
-+ if (l)
-+ s = s.Truncate(l);
-+ return s;
-+ }
-+ return NULL;
-+}
-+
- cString AddDirectory(const char *DirName, const char *FileName)
- {
- return cString::sprintf("%s/%s", DirName && *DirName ? DirName : ".", FileName);
-diff -Nru vdr-1.7.21-vanilla/tools.h vdr-1.7.21-liemikuutio/tools.h
---- vdr-1.7.21-vanilla/tools.h 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/tools.h 2011-09-04 17:10:11.000000000 +0300
-@@ -212,6 +212,7 @@
- ///< (based on 1024). Everything after the first non-numeric character is
- ///< silently ignored, as are any characters other than the ones mentionend here.
- cString itoa(int n);
-+cString StripLastDirectory(const char *DirName);
- cString AddDirectory(const char *DirName, const char *FileName);
- bool EntriesOnSameFileSystem(const char *File1, const char *File2);
- int FreeDiskSpaceMB(const char *Directory, int *UsedMB = NULL);
-diff -Nru vdr-1.7.21-vanilla/videodir.c vdr-1.7.21-liemikuutio/videodir.c
---- vdr-1.7.21-vanilla/videodir.c 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/videodir.c 2011-09-04 17:10:44.000000000 +0300
-@@ -163,6 +163,143 @@
- return true;
- }
-
-+bool MoveVideoFile(const char *SourceName, const char *TargetName, bool MakeCopy)
-+{
-+ const char* delim = "/";
-+ cString source = SourceName;
-+ cString target = TargetName;
-+
-+ // add missing directory delimiters
-+ if (!endswith(*source, delim))
-+ source = cString::sprintf("%s%s", *source, delim);
-+ if (!endswith(*target, delim))
-+ target = cString::sprintf("%s%s", *target, delim);
-+
-+ if (strcmp(*source, *target)) {
-+ // validate target directory
-+ if (strstr(*target, *source)) {
-+ esyslog("ERROR: cannot move directory under its' sub-directory!\n");
-+ return false;
-+ }
-+
-+ RemoveFileOrDir(*target);
-+ if (!MakeDirs(*target, true)) {
-+ esyslog("ERROR: cannot create directory %s", *target);
-+ return false;
-+ }
-+
-+ if (!MakeCopy && EntriesOnSameFileSystem(*source, *target)) {
-+ if (rename(*source, *target) == -1) {
-+ LOG_ERROR_STR(*source);
-+ return false;
-+ }
-+ }
-+ else {
-+ int required = DirSizeMB(*source);
-+ int available = FreeDiskSpaceMB(*target);
-+
-+ // validate free space
-+ if (required < available) {
-+ cReadDir d(*source);
-+ struct dirent *e;
-+ bool success = true;
-+
-+ // allocate copying buffer
-+ const int len = 1024 * 1024;
-+ char *buffer = MALLOC(char, len);
-+ if (!buffer) {
-+ esyslog("ERROR: cannot allocate renaming buffer");
-+ return false;
-+ }
-+
-+ // loop through all files, but skip all sub-directories
-+ while ((e = d.Next()) != NULL) {
-+ // skip generic entries
-+ if (strcmp(e->d_name, ".") && strcmp(e->d_name, "..") && strcmp(e->d_name, "lost+found")) {
-+ cString sourceFile = cString::sprintf("%s%s", *source, e->d_name);
-+ cString targetFile = cString::sprintf("%s%s", *target, e->d_name);
-+
-+ // copy only regular files
-+ struct stat sts;
-+ if (!stat(*sourceFile, &sts) && S_ISREG(sts.st_mode)) {
-+ int r = -1, w = -1;
-+ cUnbufferedFile *inputFile = cUnbufferedFile::Create(*sourceFile, O_RDONLY | O_LARGEFILE);
-+ cUnbufferedFile *outputFile = cUnbufferedFile::Create(*targetFile, O_RDWR | O_CREAT | O_LARGEFILE);
-+
-+ // validate files
-+ if (!inputFile || !outputFile) {
-+ esyslog("ERROR: cannot open file %s or %s", *sourceFile, *targetFile);
-+ success = false;
-+ break;
-+ }
-+
-+ // do actual copy
-+ dsyslog("copying %s to %s", *sourceFile, *targetFile);
-+ do {
-+ r = inputFile->Read(buffer, len);
-+ if (r > 0)
-+ w = outputFile->Write(buffer, r);
-+ else
-+ w = 0;
-+ } while (r > 0 && w > 0);
-+ DELETENULL(inputFile);
-+ DELETENULL(outputFile);
-+
-+ // validate result
-+ if (r < 0 || w < 0) {
-+ success = false;
-+ break;
-+ }
-+ }
-+ }
-+ }
-+
-+ // release allocated buffer
-+ free(buffer);
-+
-+ // delete all created target files and directories
-+ if (!success) {
-+ target = StripLastDirectory(*target);
-+ if (!RemoveFileOrDir(*target, true))
-+ esyslog("ERROR: cannot remove target %s", *target);
-+ target = StripLastDirectory(*target);
-+ if (!RemoveEmptyDirectories(*target, true))
-+ esyslog("ERROR: cannot remove target directory %s", *target);
-+ esyslog("ERROR: copying failed");
-+ return false;
-+ }
-+ else if (!MakeCopy && !RemoveFileOrDir(*source, true)) { // delete source files
-+ esyslog("ERROR: cannot remove source directory %s", *source);
-+ return false;
-+ }
-+
-+ // delete all empty source directories
-+ if (!MakeCopy) {
-+ source = StripLastDirectory(*source);
-+ while (!strcmp(*source, VideoDirectory)) {
-+ source = StripLastDirectory(*source);
-+ if (!RemoveEmptyDirectories(*source, true))
-+ break;
-+ }
-+ }
-+ }
-+ else {
-+ esyslog("ERROR: %sing requires %dMB - only %dMB available", MakeCopy ? "copy" : "mov", required, available);
-+ // delete all created empty target directories
-+ target = StripLastDirectory(*target);
-+ while (!strcmp(*target, VideoDirectory)) {
-+ target = StripLastDirectory(*target);
-+ if (!RemoveEmptyDirectories(*target, true))
-+ break;
-+ }
-+ return false;
-+ }
-+ }
-+ }
-+
-+ return true;
-+}
-+
- bool RemoveVideoFile(const char *FileName)
- {
- return RemoveFileOrDir(FileName, true);
-diff -Nru vdr-1.7.21-vanilla/videodir.h vdr-1.7.21-liemikuutio/videodir.h
---- vdr-1.7.21-vanilla/videodir.h 2011-09-04 16:52:40.000000000 +0300
-+++ vdr-1.7.21-liemikuutio/videodir.h 2011-09-04 17:10:59.000000000 +0300
-@@ -18,6 +18,7 @@
- cUnbufferedFile *OpenVideoFile(const char *FileName, int Flags);
- int CloseVideoFile(cUnbufferedFile *File);
- bool RenameVideoFile(const char *OldName, const char *NewName);
-+bool MoveVideoFile(const char *SourceName, const char *TargetName, bool MakeCopy = false);
- bool RemoveVideoFile(const char *FileName);
- bool VideoFileSpaceAvailable(int SizeMB);
- int VideoDiskSpace(int *FreeMB = NULL, int *UsedMB = NULL); // returns the used disk space in percent
diff --git a/debian/patches/opt-21_internal-cam-devices.dpatch b/debian/patches/opt-21_internal-cam-devices.dpatch
deleted file mode 100644
index ed35e30..0000000
--- a/debian/patches/opt-21_internal-cam-devices.dpatch
+++ /dev/null
@@ -1,87 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-21_internal-cam-devices.dpatch by Tobias Grimm <tg at e-tobi.net>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: This patch allows tuning to encrypted channels which are
-## DP: provided by a stremdev client device and therefore already are
-## DP: decrypted on the streamdev server side.
-## DP: See also: http://www.vdr-developer.org/mantisbt/view.php?id=429
-
- at DPATCH@
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr-1.7.19~/device.c vdr-1.7.19/device.c
---- vdr-1.7.19~/device.c 2011-06-19 19:44:13.000000000 +0200
-+++ vdr-1.7.19/device.c 2011-06-19 19:53:00.000000000 +0200
-@@ -236,6 +236,7 @@
- int NumCamSlots = CamSlots.Count();
- int SlotPriority[NumCamSlots];
- int NumUsableSlots = 0;
-+ bool InternalCamNeeded = false;
- if (Channel->Ca() >= CA_ENCRYPTED_MIN) {
- for (cCamSlot *CamSlot = CamSlots.First(); CamSlot; CamSlot = CamSlots.Next(CamSlot)) {
- SlotPriority[CamSlot->Index()] = MAXPRIORITY + 1; // assumes it can't be used
-@@ -249,7 +250,7 @@
- }
- }
- if (!NumUsableSlots)
-- return NULL; // no CAM is able to decrypt this channel
-+ InternalCamNeeded = true; // no CAM is able to decrypt this channel
- }
-
- bool NeedsDetachReceivers = false;
-@@ -265,11 +266,13 @@
- continue; // this device shall be temporarily avoided
- if (Channel->Ca() && Channel->Ca() <= CA_DVB_MAX && Channel->Ca() != device[i]->CardIndex() + 1)
- continue; // a specific card was requested, but not this one
-- if (NumUsableSlots && !CamSlots.Get(j)->Assign(device[i], true))
-+ if (InternalCamNeeded && !device[i]->HasInternalCam())
-+ continue; // no CAM is able to decrypt this channel and the device uses vdr handled CAMs
-+ if (NumUsableSlots && !device[i]->HasInternalCam() && !CamSlots.Get(j)->Assign(device[i], true))
- continue; // CAM slot can't be used with this device
- bool ndr;
- if (device[i]->ProvidesChannel(Channel, Priority, &ndr)) { // this device is basicly able to do the job
-- if (NumUsableSlots && device[i]->CamSlot() && device[i]->CamSlot() != CamSlots.Get(j))
-+ if (NumUsableSlots && !device[i]->HasInternalCam() && device[i]->CamSlot() && device[i]->CamSlot() != CamSlots.Get(j))
- ndr = true; // using a different CAM slot requires detaching receivers
- // Put together an integer number that reflects the "impact" using
- // this device would have on the overall system. Each condition is represented
-@@ -283,19 +286,19 @@
- imp <<= 1; imp |= device[i]->Receiving(); // avoid devices that are receiving
- imp <<= 4; imp |= GetClippedNumProvidedSystems(4, device[i]) - 1; // avoid cards which support multiple delivery systems
- imp <<= 1; imp |= device[i] == cTransferControl::ReceiverDevice(); // avoid the Transfer Mode receiver device
-- imp <<= 8; imp |= min(max(device[i]->Priority() + MAXPRIORITY, 0), 0xFF); // use the device with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used)
- imp <<= 8; imp |= min(max((NumUsableSlots ? SlotPriority[j] : 0) + MAXPRIORITY, 0), 0xFF); // use the CAM slot with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used)
-+ imp <<= 8; imp |= min(max(((NumUsableSlots && !device[i]->HasInternalCam()) ? SlotPriority[j] : 0) + MAXPRIORITY, 0), 0xFF); // use the CAM slot with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used)
- imp <<= 1; imp |= ndr; // avoid devices if we need to detach existing receivers
-- imp <<= 1; imp |= NumUsableSlots ? 0 : device[i]->HasCi(); // avoid cards with Common Interface for FTA channels
-+ imp <<= 1; imp |= (NumUsableSlots || InternalCamNeeded) ? 0 : device[i]->HasCi(); // avoid cards with Common Interface for FTA channels
- imp <<= 1; imp |= device[i]->AvoidRecording(); // avoid SD full featured cards
-- imp <<= 1; imp |= NumUsableSlots ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel
-+ imp <<= 1; imp |= (NumUsableSlots && !device[i]->HasInternalCam()) ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel
- imp <<= 1; imp |= device[i]->IsPrimaryDevice(); // avoid the primary device
- if (imp < Impact) {
- // This device has less impact than any previous one, so we take it.
- Impact = imp;
- d = device[i];
- NeedsDetachReceivers = ndr;
-- if (NumUsableSlots)
-+ if (NumUsableSlots && !device[i]->HasInternalCam())
- s = CamSlots.Get(j);
- }
- }
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr-1.7.19~/device.h vdr-1.7.19/device.h
---- vdr-1.7.19~/device.h 2011-06-02 15:15:31.000000000 +0200
-+++ vdr-1.7.19/device.h 2011-06-19 19:44:13.000000000 +0200
-@@ -376,6 +376,13 @@
- public:
- virtual bool HasCi(void);
- ///< Returns true if this device has a Common Interface.
-+#define INTERNAL_CAM_DEVICES_PATCH 1
-+ virtual bool HasInternalCam(void) { return false; }
-+ ///< Returns true if this device handles encrypted channels itself
-+ ///< without VDR assistance. This can be e.g. when the device is a
-+ ///< client that gets the stream from another VDR instance that has
-+ ///< already decrypted the stream. In this case ProvidesChannel()
-+ ///< shall check whether the channel can be decrypted.
- void SetCamSlot(cCamSlot *CamSlot);
- ///< Sets the given CamSlot to be used with this device.
- cCamSlot *CamSlot(void) const { return camSlot; }
diff --git a/debian/patches/opt-22-x_edit_marks.dpatch b/debian/patches/opt-22-x_edit_marks.dpatch
deleted file mode 100644
index cd168b4..0000000
--- a/debian/patches/opt-22-x_edit_marks.dpatch
+++ /dev/null
@@ -1,75 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-22-x_edit_marks.dpatch by FrankJepsen at vdrportal.de
-## http://vdrportal.de/board/thread.php?postid=718583#post718583
-##
-## Thomas Günther <tom at toms-cafe.de>:
-## - adapted to VDR-1.7.12
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch adds keys '1', '3' in replay mode to move marks by +/-5secs.
-## DP: When in replay mode key '0' sets a mark and stops there.
-## DP: 'Green' and 'Yellow' act as 'Prev' and 'Next'.
-
- at DPATCH@
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/menu.c vdr/menu.c
---- vdr~/menu.c 2011-03-19 22:45:57.000000000 +0100
-+++ vdr/menu.c 2011-03-19 22:50:08.000000000 +0100
-@@ -4999,10 +4999,6 @@
- case kGreen: SkipSeconds(-60); break;
- case kYellow|k_Repeat:
- case kYellow: SkipSeconds( 60); break;
-- case k1|k_Repeat:
-- case k1: SkipSeconds(-20); break;
-- case k3|k_Repeat:
-- case k3: SkipSeconds( 20); break;
- case kPrev|k_Repeat:
- case kPrev: if (lastSkipTimeout.TimedOut()) {
- lastSkipSeconds = REPLAYCONTROLSKIPSECONDS;
-@@ -5030,10 +5026,46 @@
- Stop();
- return osEnd;
- default: {
-+ bool play, forward;
-+ int speed;
-+ int Current, Total;
-+ cMark *m;
-+
- DoShowMode = false;
- switch (int(Key)) {
- // Editing:
-- case kMarkToggle: MarkToggle(); break;
-+ case k1|k_Repeat:
-+ case k1: if (GetReplayMode(play, forward, speed) && !play && GetIndex(Current, Total) && (m = marks.Get(Current)) != NULL) {
-+ displayFrames = true;
-+ int p = SkipFrames(-SecondsToFrames(5, FramesPerSecond()));
-+ cMark *m2;
-+ if ((m2 = marks.Prev(m)) != NULL && m2->position >= p)
-+ break;
-+ Goto(m->position = p, true);
-+ marks.Save();
-+ }
-+ else
-+ SkipSeconds(-20);
-+ break;
-+ case k3|k_Repeat:
-+ case k3: if (GetReplayMode(play, forward, speed) && !play && GetIndex(Current, Total) && (m = marks.Get(Current)) != NULL) {
-+ displayFrames = true;
-+ int p = SkipFrames(SecondsToFrames(5, FramesPerSecond()));
-+ cMark *m2;
-+ if ((m2 = marks.Next(m)) != NULL && m2->position <= p)
-+ break;
-+ Goto(m->position = p, true);
-+ marks.Save();
-+ }
-+ else
-+ SkipSeconds(20);
-+ break;
-+ case kMarkToggle: if (GetReplayMode(play, forward, speed) && play) {
-+ displayFrames = true;
-+ Pause();
-+ }
-+ MarkToggle();
-+ break;
- case kMarkJumpBack|k_Repeat:
- case kMarkJumpBack: MarkJump(false); break;
- case kMarkJumpForward|k_Repeat:
diff --git a/debian/patches/opt-24_jumpplay.dpatch b/debian/patches/opt-24_jumpplay.dpatch
deleted file mode 100644
index 7285617..0000000
--- a/debian/patches/opt-24_jumpplay.dpatch
+++ /dev/null
@@ -1,422 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-24_jumpplay.dpatch by Torsten Kunkel <vdr at tkunkel.de>, Thomas Günther <tom at toms-cafe.de>
-## http://toms-cafe.de/vdr/download/vdr-jumpplay-1.0-1.7.6.diff
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Play after jump to next mark. Automatically jump over commercial breaks.
-## DP: See README.jumpplay and MANUAL for details.
-## DP: 2011-03-19: Remove marks reloading for VDR-1.7.17, by Udo Richter <udo_richter at gmx.de>
-
- at DPATCH@
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/MANUAL vdr/MANUAL
---- vdr~/MANUAL 2011-09-18 13:27:07.000000000 +0200
-+++ vdr/MANUAL 2011-09-18 13:27:31.000000000 +0200
-@@ -856,6 +856,25 @@
- 0 resulting in a file named 'resume', and any other
- value resulting in 'resume.n'.
-
-+ Jump&Play = no Turns playing on or off after jumping forward to the
-+ next editing mark with the '9' key.
-+
-+ Play&Jump = no Turns automatic jumping over commercial breaks on or
-+ off. This includes jumping to the first mark, if the
-+ replay starts at the beginning of a recording - and
-+ stopping the replay at the last mark.
-+ With this setting enabled, the behaviour of the '8'
-+ key during replay is changed too. It moves the actual
-+ replay position not only three seconds before the
-+ next "start" mark, but also before the next "end"
-+ mark. This can be used to test, if the editing marks
-+ are correctly positioned for a "smooth" jump over a
-+ commercial break.
-+
-+ Pause at last mark = no
-+ Turns pausing of replay at the last editing mark on or
-+ off.
-+
- Miscellaneous:
-
- Min. event timeout = 30
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/README.jumpplay vdr/README.jumpplay
---- vdr~/README.jumpplay 1970-01-01 01:00:00.000000000 +0100
-+++ vdr/README.jumpplay 2011-09-18 13:27:31.000000000 +0200
-@@ -0,0 +1,92 @@
-+JumpPlay patch for VDR
-+----------------------
-+
-+This patch changes the replay behaviour for recordings that contain editing
-+marks. It allows to immediately continue the replay after jumping forward to
-+the next mark, and to automatically jump over the commercial break to the next
-+"start" mark, if an "end" mark is reached.
-+
-+The features of this patch can be turned on or off with parameters in the replay
-+setup. See MANUAL for description of this parameters: "Jump&Play", "Play&Jump",
-+"Pause at last mark" and "Reload marks".
-+
-+
-+* History
-+
-+ 2003-07-04: jumpandrun.diff - the Noad <theNoad at SoftHome.net>
-+ Jump&Play
-+
-+ 2003-12-06: Version 0.0 - Torsten Kunkel <vdr at tkunkel.de>
-+ Play&Jump (only if progressbar is visible)
-+ Setup parameters Jump&Play and Play&Jump in the replay setup
-+
-+ 2004-01-20: Version 0.1 - Thomas Günther <tom at toms-cafe.de>
-+ Jump&Play:
-+ - fixed speed after jump
-+ - fixed removing of marks
-+ Play&Jump:
-+ - jump only on "end" marks
-+
-+ 2004-01-27: Version 0.2 - Thomas Günther <tom at toms-cafe.de>
-+ Jump&Play:
-+ - fixed double jump
-+ Play&Jump:
-+ - fixed mark detection: fuzzy detection (until 3 seconds after mark)
-+ - jump without progressbar
-+ - mode "progressbar only" for old behaviour
-+
-+ 2004-01-31: Version 0.3 - Thomas Günther <tom at toms-cafe.de>
-+ Jump&Play:
-+ - fixed display frames
-+ Play&Jump:
-+ - fixed end of playing at last mark
-+
-+ 2004-07-11: Version 0.4 - Thomas Günther <tom at toms-cafe.de>
-+ Jump&Play:
-+ - don't play after jump to end
-+ Play&Jump:
-+ - don't prevent jumping after hide or show
-+ Less conflicts with other patches (Elchi/AutoPID)
-+
-+ 2004-08-21: Version 0.5 - Thomas Günther <tom at toms-cafe.de>
-+ Play&Jump:
-+ - exact jumps, replay like edited recording (no fuzzy mark detection)
-+ - jump to first mark if replay starts at the beginning
-+ - check jump marks with '8' key
-+ - mode "progressbar only" removed
-+ Description in README.jumpplay
-+
-+ 2004-12-28: Version 0.6 - Thomas Günther <tom at toms-cafe.de>
-+ Adapted noad extensions (from the Noad <theNoad at SoftHome.net>) to
-+ jumpplay-0.5:
-+ - cyclic reloading of marks found by noad online-scan
-+ - don't stop after the last mark in case of live-recordings
-+ New setup parameter "Load marks interval (s)"
-+ Updated description in README.jumpplay
-+
-+ 2006-04-14: Version 0.7 - Thomas Günther <tom at toms-cafe.de>
-+ Fixed jump to first mark (crashed with plugin extrecmenu-0.9)
-+ Added version define JUMPPLAYVERSNUM
-+ Added placeholders for Czech language texts
-+ Cleaned up i18n entries (support only VDR >= 1.3.29)
-+ Improved description of i18n placeholders - hoping for real language texts
-+
-+ 2006-05-12: Version 0.8 - Thomas Günther <tom at toms-cafe.de>
-+ Fixed segfault in dvbplayer thread while the replaycontrol thread is
-+ reloading the marks (thanks to horchi at vdrportal.de for reporting this -
-+ see http://vdrportal.de/board/thread.php?postid=450463#post450463):
-+ New class cMarksReload checks the timestamp of marks.vdr in 10 seconds
-+ intervals, so the marks in the threads dvbplayer and replaycontrol can be
-+ reloaded independently
-+ Changed setup parameter "Load marks interval (s)" to "Reload marks"
-+ Updated description in README.jumpplay
-+
-+ 2006-05-28: Version 0.9 - Thomas Günther <tom at toms-cafe.de>
-+ New setup parameter "Pause at last mark"
-+ Updated description in README.jumpplay
-+ Moved parameters description to MANUAL
-+
-+ 2009-03-31: Version 1.0 - Thomas Günther <tom at toms-cafe.de>
-+ Play&Jump:
-+ - set resume position to 0 if replay stops at the first mark
-+ Added French language texts (thanks to Michaël Nival)
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/config.c vdr/config.c
---- vdr~/config.c 2011-09-18 13:27:07.000000000 +0200
-+++ vdr/config.c 2011-09-18 13:27:31.000000000 +0200
-@@ -392,6 +392,9 @@
- MultiSpeedMode = 0;
- ShowReplayMode = 0;
- ResumeID = 0;
-+ JumpPlay = 0;
-+ PlayJump = 0;
-+ PauseLastMark = 0;
- CurrentChannel = -1;
- CurrentVolume = MAXVOLUME;
- CurrentDolby = 0;
-@@ -584,6 +587,9 @@
- else if (!strcasecmp(Name, "MultiSpeedMode")) MultiSpeedMode = atoi(Value);
- else if (!strcasecmp(Name, "ShowReplayMode")) ShowReplayMode = atoi(Value);
- else if (!strcasecmp(Name, "ResumeID")) ResumeID = atoi(Value);
-+ else if (!strcasecmp(Name, "JumpPlay")) JumpPlay = atoi(Value);
-+ else if (!strcasecmp(Name, "PlayJump")) PlayJump = atoi(Value);
-+ else if (!strcasecmp(Name, "PauseLastMark")) PauseLastMark = atoi(Value);
- else if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value);
- else if (!strcasecmp(Name, "CurrentVolume")) CurrentVolume = atoi(Value);
- else if (!strcasecmp(Name, "CurrentDolby")) CurrentDolby = atoi(Value);
-@@ -680,6 +686,9 @@
- Store("MultiSpeedMode", MultiSpeedMode);
- Store("ShowReplayMode", ShowReplayMode);
- Store("ResumeID", ResumeID);
-+ Store("JumpPlay", JumpPlay);
-+ Store("PlayJump", PlayJump);
-+ Store("PauseLastMark", PauseLastMark);
- Store("CurrentChannel", CurrentChannel);
- Store("CurrentVolume", CurrentVolume);
- Store("CurrentDolby", CurrentDolby);
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/config.h vdr/config.h
---- vdr~/config.h 2011-09-18 13:27:31.000000000 +0200
-+++ vdr/config.h 2011-09-18 13:27:31.000000000 +0200
-@@ -38,6 +38,8 @@
-
- #define LIEMIKUUTIO 131
-
-+#define JUMPPLAYVERSNUM 100
-+
- #define MAXPRIORITY 99
- #define MAXLIFETIME 99
-
-@@ -286,6 +288,9 @@
- int MultiSpeedMode;
- int ShowReplayMode;
- int ResumeID;
-+ int JumpPlay;
-+ int PlayJump;
-+ int PauseLastMark;
- int CurrentChannel;
- int CurrentVolume;
- int CurrentDolby;
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/dvbplayer.c vdr/dvbplayer.c
---- vdr~/dvbplayer.c 2011-09-18 13:27:07.000000000 +0200
-+++ vdr/dvbplayer.c 2011-09-18 13:27:31.000000000 +0200
-@@ -204,6 +204,7 @@
- cNonBlockingFileReader *nonBlockingFileReader;
- cRingBufferFrame *ringBuffer;
- cPtsIndex ptsIndex;
-+ cMarks marks;
- cFileName *fileName;
- cIndexFile *index;
- cUnbufferedFile *replayFile;
-@@ -282,6 +283,7 @@
- delete index;
- index = NULL;
- }
-+ marks.Load(FileName, framesPerSecond, isPesRecording);
- }
-
- cDvbPlayer::~cDvbPlayer()
-@@ -360,6 +362,10 @@
- if (index) {
- int Index = ptsIndex.FindIndex(DeviceGetSTC());
- if (Index >= 0) {
-+ // set resume position to 0 if replay stops at the first mark
-+ if (Setup.PlayJump && marks.First() &&
-+ abs(Index - marks.First()->position) <= int(round(RESUMEBACKUP * framesPerSecond)))
-+ Index = 0;
- Index -= int(round(RESUMEBACKUP * framesPerSecond));
- if (Index > 0)
- Index = index->GetNextIFrame(Index, false);
-@@ -386,11 +392,26 @@
- {
- uchar *p = NULL;
- int pc = 0;
-+ bool cutIn = false;
-+ int total = -1;
-
- readIndex = Resume();
- if (readIndex >= 0)
- isyslog("resuming replay at index %d (%s)", readIndex, *IndexToHMSF(readIndex, true, framesPerSecond));
-
-+ if (Setup.PlayJump && readIndex <= 0 && marks.First() && index) {
-+ int Index = marks.First()->position;
-+ uint16_t FileNumber;
-+ off_t FileOffset;
-+ if (index->Get(Index, &FileNumber, &FileOffset) &&
-+ NextFile(FileNumber, FileOffset)) {
-+ isyslog("PlayJump: start replay at first mark %d (%s)",
-+ Index, *IndexToHMSF(Index, true, framesPerSecond));
-+ readIndex = Index;
-+ }
-+ }
-+
-+ bool LastMarkPause = false;
- nonBlockingFileReader = new cNonBlockingFileReader;
- int Length = 0;
- bool Sleep = false;
-@@ -415,7 +436,7 @@
-
- // Read the next frame from the file:
-
-- if (playMode != pmStill && playMode != pmPause) {
-+ if (playMode != pmStill && playMode != pmPause && !LastMarkPause) {
- if (!readFrame && (replayFile || readIndex >= 0)) {
- if (!nonBlockingFileReader->Reading()) {
- if (!SwitchToPlayFrame && (playMode == pmFast || (playMode == pmSlow && playDir == pdBackward))) {
-@@ -452,6 +473,44 @@
- else if (index) {
- uint16_t FileNumber;
- off_t FileOffset;
-+ if (Setup.PlayJump || Setup.PauseLastMark) {
-+ // check for end mark - jump to next mark or pause
-+ readIndex++;
-+ marks.Update();
-+ cMark *m = marks.Get(readIndex);
-+ if (m && (m->Index() & 0x01) != 0) {
-+ m = marks.Next(m);
-+ int Index;
-+ if (m)
-+ Index = m->position;
-+ else if (Setup.PauseLastMark) {
-+ // pause at last mark
-+ isyslog("PauseLastMark: pause at position %d (%s)",
-+ readIndex, *IndexToHMSF(readIndex, true, framesPerSecond));
-+ LastMarkPause = true;
-+ Index = -1;
-+ }
-+ else if (total == index->Last())
-+ // at last mark jump to end of recording
-+ Index = index->Last() - 1;
-+ else
-+ // jump but stay off end of live-recordings
-+ Index = index->GetNextIFrame(index->Last() - int(round(MAXSTUCKATEOF * framesPerSecond)), true);
-+ // don't jump in edited recordings
-+ if (Setup.PlayJump && Index > readIndex &&
-+ Index > index->GetNextIFrame(readIndex, true)) {
-+ isyslog("PlayJump: %d frames to %d (%s)",
-+ Index - readIndex, Index,
-+ *IndexToHMSF(Index, true, framesPerSecond));
-+ readIndex = Index;
-+ cutIn = true;
-+ }
-+ }
-+ readIndex--;
-+ }
-+ // for detecting growing length of live-recordings
-+ if (index->Get(readIndex + 1, &FileNumber, &FileOffset, &readIndependent) && readIndependent)
-+ total = index->Last();
- if (index->Get(readIndex + 1, &FileNumber, &FileOffset, &readIndependent, &Length) && NextFile(FileNumber, FileOffset))
- readIndex++;
- else
-@@ -496,6 +555,13 @@
- // Store the frame in the buffer:
-
- if (readFrame) {
-+ if (cutIn) {
-+ if (isPesRecording)
-+ cRemux::SetBrokenLink(readFrame->Data(), readFrame->Count());
-+ else
-+ TsSetTeiOnBrokenPackets(readFrame->Data(), readFrame->Count());
-+ cutIn = false;
-+ }
- if (ringBuffer->Put(readFrame))
- readFrame = NULL;
- else
-@@ -561,8 +627,13 @@
- p = NULL;
- }
- }
-- else
-+ else {
-+ if (LastMarkPause) {
-+ LastMarkPause = false;
-+ playMode = pmPause;
-+ }
- Sleep = true;
-+ }
-
- // Handle hitting begin/end of recording:
-
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/menu.c vdr/menu.c
---- vdr~/menu.c 2011-09-18 13:27:31.000000000 +0200
-+++ vdr/menu.c 2011-09-18 13:31:37.000000000 +0200
-@@ -3253,6 +3253,9 @@
- Add(new cMenuEditBoolItem(tr("Setup.Replay$Multi speed mode"), &data.MultiSpeedMode));
- Add(new cMenuEditBoolItem(tr("Setup.Replay$Show replay mode"), &data.ShowReplayMode));
- Add(new cMenuEditIntItem(tr("Setup.Replay$Resume ID"), &data.ResumeID, 0, 99));
-+ Add(new cMenuEditBoolItem(tr("Setup.Replay$Jump&Play"), &data.JumpPlay));
-+ Add(new cMenuEditBoolItem(tr("Setup.Replay$Play&Jump"), &data.PlayJump));
-+ Add(new cMenuEditBoolItem(tr("Setup.Replay$Pause at last mark"), &data.PauseLastMark));
- }
-
- void cMenuSetupReplay::Store(void)
-@@ -4832,8 +4835,10 @@
- ShowTimed(2);
- bool Play, Forward;
- int Speed;
-- if (GetReplayMode(Play, Forward, Speed) && !Play)
-+ if (GetReplayMode(Play, Forward, Speed) && !Play) {
- Goto(Current, true);
-+ displayFrames = true;
-+ }
- }
- marks.Save();
- }
-@@ -4846,8 +4851,17 @@
- if (GetIndex(Current, Total)) {
- cMark *m = Forward ? marks.GetNext(Current) : marks.GetPrev(Current);
- if (m) {
-- Goto(m->Position(), true);
-- displayFrames = true;
-+ bool Play2, Forward2;
-+ int Speed;
-+ if (Setup.JumpPlay && GetReplayMode(Play2, Forward2, Speed) &&
-+ Play2 && Forward && m->position < Total - SecondsToFrames(3, FramesPerSecond())) {
-+ Goto(m->position);
-+ Play();
-+ }
-+ else {
-+ Goto(m->position, true);
-+ displayFrames = true;
-+ }
- }
- }
- }
-@@ -4903,7 +4917,7 @@
- if (!m)
- m = marks.GetNext(Current);
- if (m) {
-- if ((m->Index() & 0x01) != 0)
-+ if ((m->Index() & 0x01) != 0 && !Setup.PlayJump)
- m = marks.Next(m);
- if (m) {
- Goto(m->Position() - SecondsToFrames(3, FramesPerSecond()));
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/po/de_DE.po vdr/po/de_DE.po
---- vdr~/po/de_DE.po 2011-09-18 13:27:31.000000000 +0200
-+++ vdr/po/de_DE.po 2011-09-18 13:27:31.000000000 +0200
-@@ -1064,6 +1064,15 @@
- msgid "Replay"
- msgstr "Wiedergabe"
-
-+msgid "Setup.Replay$Jump&Play"
-+msgstr "Wiedergabe nach Sprung"
-+
-+msgid "Setup.Replay$Play&Jump"
-+msgstr "Sprung bei Schnittmarke"
-+
-+msgid "Setup.Replay$Pause at last mark"
-+msgstr "Pause bei letzter Marke"
-+
- msgid "Setup.Replay$Multi speed mode"
- msgstr "Mehrstufiger Vor-/Rücklauf"
-
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/po/fr_FR.po vdr/po/fr_FR.po
---- vdr~/po/fr_FR.po 2011-09-18 13:27:31.000000000 +0200
-+++ vdr/po/fr_FR.po 2011-09-18 13:27:31.000000000 +0200
-@@ -1070,6 +1070,15 @@
- msgid "Replay"
- msgstr "Lecture"
-
-+msgid "Setup.Replay$Jump&Play"
-+msgstr "Lecture après saut"
-+
-+msgid "Setup.Replay$Play&Jump"
-+msgstr "Saut sur les marques de découpes"
-+
-+msgid "Setup.Replay$Pause at last mark"
-+msgstr "Pause après la dernière marque"
-+
- msgid "Setup.Replay$Multi speed mode"
- msgstr "Mode multi-vitesses"
-
diff --git a/debian/patches/opt-29_syncearly.dpatch b/debian/patches/opt-29_syncearly.dpatch
deleted file mode 100644
index 7f4953c..0000000
--- a/debian/patches/opt-29_syncearly.dpatch
+++ /dev/null
@@ -1,165 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-29_syncearly.dpatch by Reinhard Nissl <rnissl at gmx.de>
-##
-## vdr-freak at vdrportal.de:
-## - extracted from extensions patch
-## http://vdrportal.de/board/thread.php?postid=668434#post668434
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Speed up zapping channels.
-
- at DPATCH@
-diff -ruN vdr-1.5.11/config.c vdr-1.5.11-syncearly/config.c
---- vdr-1.5.11/config.c 2007-10-06 16:28:58.000000000 +0200
-+++ vdr-1.5.11-syncearly/config.c 2007-11-11 19:44:35.000000000 +0100
-@@ -261,6 +261,7 @@
- VideoFormat = 0;
- UpdateChannels = 5;
- UseDolbyDigital = 1;
-+ UseSyncEarlyPatch = 0;
- ChannelInfoPos = 0;
- ChannelInfoTime = 5;
- OSDLeft = 54;
-@@ -436,6 +437,7 @@
- else if (!strcasecmp(Name, "VideoFormat")) VideoFormat = atoi(Value);
- else if (!strcasecmp(Name, "UpdateChannels")) UpdateChannels = atoi(Value);
- else if (!strcasecmp(Name, "UseDolbyDigital")) UseDolbyDigital = atoi(Value);
-+ else if (!strcasecmp(Name, "UseSyncEarlyPatch")) UseSyncEarlyPatch = atoi(Value);
- else if (!strcasecmp(Name, "ChannelInfoPos")) ChannelInfoPos = atoi(Value);
- else if (!strcasecmp(Name, "ChannelInfoTime")) ChannelInfoTime = atoi(Value);
- else if (!strcasecmp(Name, "OSDLeft")) OSDLeft = atoi(Value);
-@@ -518,6 +520,7 @@
- Store("VideoFormat", VideoFormat);
- Store("UpdateChannels", UpdateChannels);
- Store("UseDolbyDigital", UseDolbyDigital);
-+ Store("UseSyncEarlyPatch", UseSyncEarlyPatch);
- Store("ChannelInfoPos", ChannelInfoPos);
- Store("ChannelInfoTime", ChannelInfoTime);
- Store("OSDLeft", OSDLeft);
-diff -ruN vdr-1.5.11/config.h vdr-1.5.11-syncearly/config.h
---- vdr-1.5.11/config.h 2007-10-17 20:34:17.000000000 +0200
-+++ vdr-1.5.11-syncearly/config.h 2007-11-11 19:44:21.000000000 +0100
-@@ -242,6 +242,7 @@
- int VideoFormat;
- int UpdateChannels;
- int UseDolbyDigital;
-+ int UseSyncEarlyPatch;
- int ChannelInfoPos;
- int ChannelInfoTime;
- int OSDLeft, OSDTop, OSDWidth, OSDHeight;
-diff -ruN vdr-1.5.11/device.c vdr-1.5.11-syncearly/device.c
---- vdr-1.5.11/device.c 2007-11-03 14:30:09.000000000 +0100
-+++ vdr-1.5.11-syncearly/device.c 2007-11-11 19:44:55.000000000 +0100
-@@ -824,7 +824,7 @@
- }
- for (int i = 0; i < MAXSPIDS; i++)
- SetAvailableTrack(ttSubtitle, i, Channel->Spid(i), Channel->Slang(i));
-- if (!NeedsTransferMode)
-+ if ((Setup.UseSyncEarlyPatch && (!NeedsTransferMode || GetCurrentAudioTrack() == ttNone)) || (!Setup.UseSyncEarlyPatch && !NeedsTransferMode))
- EnsureAudioTrack(true);
- EnsureSubtitleTrack();
- }
-diff -ruN vdr-1.5.11/menu.c vdr-1.5.11-syncearly/menu.c
---- vdr-1.5.11/menu.c 2007-11-03 16:02:00.000000000 +0100
-+++ vdr-1.5.11-syncearly/menu.c 2007-11-11 19:46:07.000000000 +0100
-@@ -2461,6 +2461,7 @@
- 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$Use Sync Early Patch"), &data.UseSyncEarlyPatch));
-
- SetCurrent(Get(current));
- Display();
-diff -ruN vdr-1.5.11/remux.c vdr-1.5.11-syncearly/remux.c
---- vdr-1.5.11/remux.c 2007-11-03 15:18:07.000000000 +0100
-+++ vdr-1.5.11-syncearly/remux.c 2007-11-11 19:45:54.000000000 +0100
-@@ -1874,12 +1874,13 @@
-
- #define RESULTBUFFERSIZE KILOBYTE(256)
-
--cRemux::cRemux(int VPid, const int *APids, const int *DPids, const int *SPids, bool ExitOnFailure)
-+cRemux::cRemux(int VPid, const int *APids, const int *DPids, const int *SPids, bool ExitOnFailure, bool SyncEarly)
- {
- exitOnFailure = ExitOnFailure;
- noVideo = VPid == 0 || VPid == 1 || VPid == 0x1FFF;
- numUPTerrors = 0;
- synced = false;
-+ syncEarly = SyncEarly;
- skipped = 0;
- numTracks = 0;
- resultSkipped = 0;
-@@ -2081,12 +2082,18 @@
- ShutdownHandler.RequestEmergencyExit();
- }
- else if (!synced) {
-- if (pt == I_FRAME) {
-+ if (pt == I_FRAME || syncEarly) {
- if (PictureType)
- *PictureType = pt;
- resultSkipped = i; // will drop everything before this position
-+ if (!syncEarly)
- SetBrokenLink(data + i, l);
- synced = true;
-+ if (syncEarly) {
-+ if (pt == I_FRAME) // syncEarly: it's ok but there is no need to call SetBrokenLink()
-+ SetBrokenLink(data + i, l);
-+ else fprintf(stderr, "video: synced early\n");
-+ }
- }
- }
- else if (Count)
-@@ -2099,12 +2106,13 @@
- l = GetPacketLength(data, resultCount, i);
- if (l < 0)
- return resultData;
-- if (noVideo) {
-+ if (noVideo || !synced && syncEarly) {
- if (!synced) {
-- if (PictureType)
-+ if (PictureType && noVideo)
- *PictureType = I_FRAME;
- resultSkipped = i; // will drop everything before this position
- synced = true;
-+ if (!noVideo && syncEarly) fprintf(stderr, "audio: synced early\n");
- }
- else if (Count)
- return resultData;
-diff -ruN vdr-1.5.11/remux.h vdr-1.5.11-syncearly/remux.h
---- vdr-1.5.11/remux.h 2007-09-02 12:19:06.000000000 +0200
-+++ vdr-1.5.11-syncearly/remux.h 2007-11-11 19:47:24.000000000 +0100
-@@ -40,6 +40,7 @@
- bool noVideo;
- int numUPTerrors;
- bool synced;
-+ bool syncEarly;
- int skipped;
- cTS2PES *ts2pes[MAXTRACKS];
- int numTracks;
-@@ -47,12 +48,14 @@
- int resultSkipped;
- int GetPid(const uchar *Data);
- public:
-- cRemux(int VPid, const int *APids, const int *DPids, const int *SPids, bool ExitOnFailure = false);
-+ cRemux(int VPid, const int *APids, const int *DPids, const int *SPids, bool ExitOnFailure = false, bool SyncEarly = false);
- ///< Creates a new remuxer for the given PIDs. VPid is the video PID, while
- ///< APids, DPids and SPids are pointers to zero terminated lists of audio,
- ///< dolby and subtitle PIDs (the pointers may be NULL if there is no such
- ///< PID). If ExitOnFailure is true, the remuxer will initiate an "emergency
- ///< exit" in case of problems with the data stream.
-+ ///< SyncEarly causes cRemux to sync as soon as a video or audio frame is seen.
-+
- ~cRemux();
- void SetTimeouts(int PutTimeout, int GetTimeout) { resultBuffer->SetTimeouts(PutTimeout, GetTimeout); }
- ///< By default cRemux assumes that Put() and Get() are called from different
-diff -ruN vdr-1.5.11/transfer.c vdr-1.5.11-syncearly/transfer.c
---- vdr-1.5.11/transfer.c 2007-01-05 11:45:28.000000000 +0100
-+++ vdr-1.5.11-syncearly/transfer.c 2007-11-11 19:45:08.000000000 +0100
-@@ -19,7 +19,7 @@
- ,cThread("transfer")
- {
- ringBuffer = new cRingBufferLinear(TRANSFERBUFSIZE, TS_SIZE * 2, true, "Transfer");
-- remux = new cRemux(VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids);
-+ remux = new cRemux(VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids, false, Setup.UseSyncEarlyPatch);
- }
-
- cTransfer::~cTransfer()
diff --git a/debian/patches/opt-31-x_reelchannelscan.dpatch b/debian/patches/opt-31-x_reelchannelscan.dpatch
deleted file mode 100644
index 07c1a23..0000000
--- a/debian/patches/opt-31-x_reelchannelscan.dpatch
+++ /dev/null
@@ -1,32 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-31_reelchannelscan.dpatch by Tobias Grimm <tg at e-tobi.net>
-##
-## Thomas Günther <tom at toms-cafe.de>:
-## - adapted to VDR-1.5.8
-## Tobias Grimm <tg at e-tobi.net>:
-## - adapted to VDR-1.5.16
-## - adapted to VDR-1.5.18
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Makes VDR aware of the reelchannelscan plugin.
-
- at DPATCH@
-diff -urNad vdr-1.5.18~/vdr.c vdr-1.5.18/vdr.c
---- vdr-1.5.18~/vdr.c 2008-03-14 14:22:39.000000000 +0100
-+++ vdr-1.5.18/vdr.c 2008-03-16 15:59:55.000000000 +0100
-@@ -731,7 +731,14 @@
- // Make sure we have a visible programme in case device usage has changed:
- if (!EITScanner.Active() && cDevice::PrimaryDevice()->HasDecoder() && !cDevice::PrimaryDevice()->HasProgramme()) {
- static time_t lastTime = 0;
-- if ((!Menu || CheckHasProgramme) && Now - lastTime > MINCHANNELWAIT) { // !Menu to avoid interfering with the CAM if a CAM menu is open
-+
-+ bool reelChannelscanIsScanningOnReceivingDevice;
-+ if (!cPluginManager::CallFirstService("ReelChannelscan::IsScanningOnReceivingDevice", &reelChannelscanIsScanningOnReceivingDevice))
-+ {
-+ reelChannelscanIsScanningOnReceivingDevice = false;
-+ }
-+
-+ if (!reelChannelscanIsScanningOnReceivingDevice && (!Menu || CheckHasProgramme) && Now - lastTime > MINCHANNELWAIT) { // !Menu to avoid interfering with the CAM if a CAM menu is open
- cChannel *Channel = Channels.GetByNumber(cDevice::CurrentChannel());
- if (Channel && (Channel->Vpid() || Channel->Apid(0))) {
- if (!Channels.SwitchTo(cDevice::CurrentChannel()) // try to switch to the original channel...
diff --git a/debian/patches/opt-35_setup-show-valid.dpatch b/debian/patches/opt-35_setup-show-valid.dpatch
deleted file mode 100644
index 61f4c3f..0000000
--- a/debian/patches/opt-35_setup-show-valid.dpatch
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh /usr/share/dpatch/dpatch-run
-
-## opt-35_setup-show-valid.dpatch by ravemax at vdrportal.de
-##
-## downloaded from http://vdrportal.de/board/thread.php?threadid=25984
-## original file: setup_option-show_valid_input.patch.bz2
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Show if there is a valid setup value left or right with < and >.
-
- at DPATCH@
-diff -ur vdr_orig/menuitems.c vdr_patched/menuitems.c
---- vdr_orig/menuitems.c 2004-12-05 17:59:12.452421104 +0100
-+++ vdr_patched/menuitems.c 2004-12-05 18:01:54.726751656 +0100
-@@ -31,12 +31,18 @@
- free(value);
- }
-
--void cMenuEditItem::SetValue(const char *Value)
-+void cMenuEditItem::SetValue(const char *Value, bool HasPre, bool HasSucc)
- {
- free(value);
- value = strdup(Value);
- char *buffer = NULL;
-- asprintf(&buffer, "%s:\t%s", name, value);
-+ const char* fmt;
-+ if (HasPre)
-+ fmt = HasSucc ? "%s:\t<%s>" : "%s\t<%s";
-+ else
-+ fmt = HasSucc ? "%s\t%s>" : "%s\t%s";
-+
-+ asprintf(&buffer, fmt, name, value);
- SetText(buffer, false);
- cStatus::MsgOsdCurrentItem(buffer);
- }
-@@ -56,7 +62,7 @@
- {
- char buf[16];
- snprintf(buf, sizeof(buf), "%d", *value);
-- SetValue(buf);
-+ SetValue(buf, (*value > min), (*value < max));
- }
-
- eOSState cMenuEditIntItem::ProcessKey(eKeys Key)
-@@ -111,7 +117,7 @@
- {
- char buf[16];
- snprintf(buf, sizeof(buf), "%s", *value ? trueString : falseString);
-- SetValue(buf);
-+ SetValue(buf, *value, !*value);
- }
-
- // --- cMenuEditBitItem ------------------------------------------------------
-@@ -459,7 +465,7 @@
-
- void cMenuEditStraItem::Set(void)
- {
-- SetValue(strings[*value]);
-+ SetValue(strings[*value], (*value > min), (*value < max));
- }
-
- // --- cMenuEditChanItem -----------------------------------------------------
-@@ -475,7 +481,7 @@
- char buf[255];
- cChannel *channel = Channels.GetByNumber(*value);
- snprintf(buf, sizeof(buf), "%d %s", *value, channel ? channel->Name() : "");
-- SetValue(buf);
-+ SetValue(buf, (*value > 1), (*value < Channels.MaxNumber()));
- }
-
- eOSState cMenuEditChanItem::ProcessKey(eKeys Key)
-diff -ur vdr_orig/menuitems.h vdr_patched/menuitems.h
---- vdr_orig/menuitems.h 2004-12-05 17:59:24.719556216 +0100
-+++ vdr_patched/menuitems.h 2004-12-05 18:04:29.681195000 +0100
-@@ -21,7 +21,7 @@
- public:
- cMenuEditItem(const char *Name);
- ~cMenuEditItem();
-- void SetValue(const char *Value);
-+ void cMenuEditItem::SetValue(const char *Value, bool HasPre=false, bool HasSucc=false);
- };
-
- class cMenuEditIntItem : public cMenuEditItem {
diff --git a/debian/patches/opt-37-x_menuorg.dpatch b/debian/patches/opt-37-x_menuorg.dpatch
deleted file mode 100644
index a91c426..0000000
--- a/debian/patches/opt-37-x_menuorg.dpatch
+++ /dev/null
@@ -1,281 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-37-x_menuorg.dpatch by Tobias Grimm <tg at e-tobi.net>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: This patch is required by the MenuOrg plugin. It adds a service
-## DP: interface, that can be implemented by plugins to reorganize
-## DP: VDR's main menu entries with the ability to create custom sub
-## DP: menus.
-## DP: This is version 0.4.s of the patch
-
- at DPATCH@
-diff -Nur vdr-1.5.18.orig/mainmenuitemsprovider.h vdr-1.5.18/mainmenuitemsprovider.h
---- vdr-1.5.18.orig/mainmenuitemsprovider.h 1970-01-01 01:00:00.000000000 +0100
-+++ vdr-1.5.18/mainmenuitemsprovider.h 2008-03-25 21:17:28.000000000 +0100
-@@ -0,0 +1,60 @@
-+/*
-+ * vdr-menuorg - A plugin for the Linux Video Disk Recorder
-+ * Copyright (c) 2007 - 2008 Tobias Grimm <vdr at e-tobi.net>
-+ *
-+ * 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
-+ *
-+ * $Id$
-+ *
-+ */
-+
-+#ifndef __MAINMENUITEMSPROVIDER_H
-+#define __MAINMENUITEMSPROVIDER_H
-+
-+#include <vector>
-+
-+class cOsdItem;
-+class cOsdMenu;
-+
-+class IMenuItemDefinition
-+{
-+ public:
-+ virtual ~IMenuItemDefinition() {};
-+ virtual bool IsCustomOsdItem() = 0;
-+ virtual bool IsPluginItem() = 0;
-+ virtual bool IsSeparatorItem() = 0;
-+ virtual cOsdItem* CustomOsdItem() = 0;
-+ virtual const char* PluginMenuEntry() = 0;
-+ virtual bool IsSelected() = 0;
-+ virtual int PluginIndex() = 0;
-+};
-+
-+typedef std::vector<IMenuItemDefinition*> MenuItemDefinitions;
-+
-+#define MENU_ITEMS_PROVIDER_SERVICE_ID "MenuOrgPatch-v0.4.2::MainMenuItemsProvider"
-+
-+class IMainMenuItemsProvider
-+{
-+ public:
-+ virtual ~IMainMenuItemsProvider() {};
-+ virtual bool IsCustomMenuAvailable() = 0;
-+ virtual MenuItemDefinitions* MainMenuItems() = 0;
-+ virtual void EnterRootMenu() = 0;
-+ virtual void EnterSubMenu(cOsdItem* item) = 0;
-+ virtual bool LeaveSubMenu() = 0;
-+ virtual cOsdMenu* Execute(cOsdItem* item) = 0;
-+};
-+
-+#endif //__MAINMENUITEMSPROVIDER_H
-diff -Nur vdr-1.5.18.orig/menu.c vdr-1.5.18/menu.c
---- vdr-1.5.18.orig/menu.c 2008-03-16 12:15:28.000000000 +0100
-+++ vdr-1.5.18/menu.c 2008-03-25 21:17:28.000000000 +0100
-@@ -29,6 +29,7 @@
- #include "timers.h"
- #include "transfer.h"
- #include "videodir.h"
-+#include "menuorgpatch.h"
-
- #define MAXWAIT4EPGINFO 3 // seconds
- #define MODETIMEOUT 3 // seconds
-@@ -2969,6 +2970,9 @@
- cancelEditingItem = NULL;
- stopRecordingItem = NULL;
- recordControlsState = 0;
-+
-+ MenuOrgPatch::EnterRootMenu();
-+
- Set();
-
- // Initial submenus:
-@@ -2997,6 +3001,29 @@
- SetTitle("VDR");
- SetHasHotkeys();
-
-+ if (MenuOrgPatch::IsCustomMenuAvailable()) {
-+ MenuItemDefinitions* menuItems = MenuOrgPatch::MainMenuItems();
-+ for (MenuItemDefinitions::iterator i = menuItems->begin(); i != menuItems->end(); i++) {
-+ cOsdItem* osdItem = NULL;
-+ if ((*i)->IsCustomOsdItem()) {
-+ osdItem = (*i)->CustomOsdItem();
-+ if (osdItem && !(*i)->IsSeparatorItem())
-+ osdItem->SetText(hk(osdItem->Text()));
-+ }
-+ else if ((*i)->IsPluginItem()) {
-+ const char *item = (*i)->PluginMenuEntry();
-+ if (item)
-+ osdItem = new cMenuPluginItem(hk(item), (*i)->PluginIndex());
-+ }
-+ if (osdItem) {
-+ Add(osdItem);
-+ if ((*i)->IsSelected())
-+ SetCurrent(osdItem);
-+ }
-+ }
-+ }
-+ else {
-+
- // Basic menu items:
-
- Add(new cOsdItem(hk(tr("Schedule")), osSchedule));
-@@ -3023,6 +3050,8 @@
- if (Commands.Count())
- Add(new cOsdItem(hk(tr("Commands")), osCommands));
-
-+ }
-+
- Update(true);
-
- Display();
-@@ -3135,6 +3164,41 @@
- state = osEnd;
- }
- break;
-+ case osBack: {
-+ if (MenuOrgPatch::IsCustomMenuAvailable())
-+ {
-+ bool leavingMenuSucceeded = MenuOrgPatch::LeaveSubMenu();
-+ Set();
-+ stopReplayItem = NULL;
-+ cancelEditingItem = NULL;
-+ stopRecordingItem = NULL;
-+ recordControlsState = 0;
-+ Update(true);
-+ Display();
-+ if (leavingMenuSucceeded)
-+ return osContinue;
-+ else
-+ return osEnd;
-+ }
-+ }
-+ break;
-+ case osUser1: {
-+ if (MenuOrgPatch::IsCustomMenuAvailable()) {
-+ MenuOrgPatch::EnterSubMenu(Get(Current()));
-+ Set();
-+ return osContinue;
-+ }
-+ }
-+ break;
-+ case osUser2: {
-+ if (MenuOrgPatch::IsCustomMenuAvailable()) {
-+ cOsdMenu* osdMenu = MenuOrgPatch::Execute(Get(Current()));
-+ if (osdMenu)
-+ return AddSubMenu(osdMenu);
-+ return osEnd;
-+ }
-+ }
-+ break;
- default: switch (Key) {
- case kRecord:
- case kRed: if (!HadSubMenu)
-diff -Nur vdr-1.5.18.orig/menuorgpatch.h vdr-1.5.18/menuorgpatch.h
---- vdr-1.5.18.orig/menuorgpatch.h 1970-01-01 01:00:00.000000000 +0100
-+++ vdr-1.5.18/menuorgpatch.h 2008-03-25 21:17:28.000000000 +0100
-@@ -0,0 +1,100 @@
-+/*
-+ * vdr-menuorg - A plugin for the Linux Video Disk Recorder
-+ * Copyright (c) 2007 - 2008 Tobias Grimm <vdr at e-tobi.net>
-+ *
-+ * 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
-+ *
-+ * $Id$
-+ *
-+ */
-+
-+#ifndef __MENUORGPATCH_H
-+#define __MENUORGPATCH_H
-+
-+#include "mainmenuitemsprovider.h"
-+
-+class MenuOrgPatch
-+{
-+ private:
-+ static IMainMenuItemsProvider* _mainMenuItemsProvider;
-+
-+ private:
-+ static IMainMenuItemsProvider* MainMenuItemsProvider()
-+ {
-+ if (!_mainMenuItemsProvider)
-+ {
-+ IMainMenuItemsProvider* mainMenuItemsProvider;
-+
-+ if (cPluginManager::CallFirstService(MENU_ITEMS_PROVIDER_SERVICE_ID, &mainMenuItemsProvider))
-+ {
-+ _mainMenuItemsProvider = mainMenuItemsProvider;
-+ }
-+ }
-+ return _mainMenuItemsProvider;
-+ }
-+
-+ public:
-+ static bool IsCustomMenuAvailable()
-+ {
-+ return (MainMenuItemsProvider() != NULL) && (MainMenuItemsProvider()->IsCustomMenuAvailable());
-+ }
-+
-+ static void EnterRootMenu()
-+ {
-+ if (MainMenuItemsProvider())
-+ {
-+ MainMenuItemsProvider()->EnterRootMenu();
-+ }
-+ }
-+
-+ static bool LeaveSubMenu()
-+ {
-+ if (MainMenuItemsProvider())
-+ {
-+ return MainMenuItemsProvider()->LeaveSubMenu();
-+ }
-+ return false;
-+ }
-+
-+ static void EnterSubMenu(cOsdItem* item)
-+ {
-+ if (MainMenuItemsProvider())
-+ {
-+ MainMenuItemsProvider()->EnterSubMenu(item);
-+ }
-+ }
-+
-+ static MenuItemDefinitions* MainMenuItems()
-+ {
-+ if (MainMenuItemsProvider())
-+ {
-+ return MainMenuItemsProvider()->MainMenuItems();
-+ }
-+ return NULL;
-+ }
-+
-+ static cOsdMenu* Execute(cOsdItem* item)
-+ {
-+ if (MainMenuItemsProvider())
-+ {
-+ return MainMenuItemsProvider()->Execute(item);
-+ }
-+ return NULL;
-+ }
-+};
-+
-+IMainMenuItemsProvider* MenuOrgPatch::_mainMenuItemsProvider = NULL;
-+
-+#endif //__MENUORGPATCH_H
diff --git a/debian/patches/opt-38_disableDoubleEpgEntrys.dpatch b/debian/patches/opt-38_disableDoubleEpgEntrys.dpatch
deleted file mode 100644
index a96fdfa..0000000
--- a/debian/patches/opt-38_disableDoubleEpgEntrys.dpatch
+++ /dev/null
@@ -1,349 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-38_disableDoubleEpgEntrys.dpatch by Emanuel Wontorra <hoerzu2vdr at wontorra.net>
-## http://vdrportal.de/board/thread.php?postid=317214#post317214
-##
-## Thomas Günther <tom at toms-cafe.de>:
-## - adapted to VDR-1.5.1
-## - adapted to VDR-1.5.7
-## http://toms-cafe.de/vdr/download/vdr-disableDoubleEpgEntrys_0.7.3b-1.5.7.diff
-## Tobias Grimm <tg at e-tobi.net>:
-## - added buffer overflow fix from:
-## http://vdrportal.de/board/thread.php?postid=683477#post683477
-## Thomas Günther <tom at toms-cafe.de>:
-## - added French language texts (thanks to Michaël Nival)
-## http://toms-cafe.de/vdr/download/vdr-disableDoubleEpgEntrys_0.7.3b-1.6.0.diff
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: This patch suppresses double EPG entries.
-
- at DPATCH@
-diff -Naurp vdr-1.6.0/config.c vdr-1.6.0-disableDoubleEpgEntrys/config.c
---- vdr-1.6.0/config.c 2008-02-17 13:39:00.000000000 +0000
-+++ vdr-1.6.0-disableDoubleEpgEntrys/config.c 2009-03-29 23:25:00.000000000 +0000
-@@ -241,6 +241,10 @@ cSetup::cSetup(void)
- SubtitleFgTransparency = 0;
- SubtitleBgTransparency = 0;
- EPGLanguages[0] = -1;
-+ DoubleEpgTimeDelta = 15;
-+ DoubleEpgAction = 0;
-+ MixEpgAction = 0;
-+ DisableVPS = 0;
- EPGScanTimeout = 5;
- EPGBugfixLevel = 3;
- EPGLinger = 0;
-@@ -414,6 +418,10 @@ bool cSetup::Parse(const char *Name, con
- else if (!strcasecmp(Name, "SubtitleFgTransparency")) SubtitleFgTransparency = atoi(Value);
- else if (!strcasecmp(Name, "SubtitleBgTransparency")) SubtitleBgTransparency = atoi(Value);
- else if (!strcasecmp(Name, "EPGLanguages")) return ParseLanguages(Value, EPGLanguages);
-+ else if (!strcasecmp(Name, "DoubleEpgTimeDelta")) DoubleEpgTimeDelta = atoi(Value);
-+ else if (!strcasecmp(Name, "DoubleEpgAction")) DoubleEpgAction = atoi(Value);
-+ else if (!strcasecmp(Name, "MixEpgAction")) MixEpgAction = atoi(Value);
-+ else if (!strcasecmp(Name, "DisableVPS")) DisableVPS = atoi(Value);
- else if (!strcasecmp(Name, "EPGScanTimeout")) EPGScanTimeout = atoi(Value);
- else if (!strcasecmp(Name, "EPGBugfixLevel")) EPGBugfixLevel = atoi(Value);
- else if (!strcasecmp(Name, "EPGLinger")) EPGLinger = atoi(Value);
-@@ -497,6 +505,10 @@ bool cSetup::Save(void)
- Store("SubtitleFgTransparency", SubtitleFgTransparency);
- Store("SubtitleBgTransparency", SubtitleBgTransparency);
- StoreLanguages("EPGLanguages", EPGLanguages);
-+ Store("DoubleEpgTimeDelta", DoubleEpgTimeDelta);
-+ Store("DoubleEpgAction", DoubleEpgAction);
-+ Store("MixEpgAction", MixEpgAction);
-+ Store("DisableVPS", DisableVPS);
- Store("EPGScanTimeout", EPGScanTimeout);
- Store("EPGBugfixLevel", EPGBugfixLevel);
- Store("EPGLinger", EPGLinger);
-diff -Naurp vdr-1.6.0/config.h vdr-1.6.0-disableDoubleEpgEntrys/config.h
---- vdr-1.6.0/config.h 2008-03-23 10:26:10.000000000 +0000
-+++ vdr-1.6.0-disableDoubleEpgEntrys/config.h 2009-03-29 23:25:00.000000000 +0000
-@@ -225,6 +225,10 @@ public:
- int SubtitleOffset;
- int SubtitleFgTransparency, SubtitleBgTransparency;
- int EPGLanguages[I18N_MAX_LANGUAGES + 1];
-+ int DoubleEpgTimeDelta;
-+ int DoubleEpgAction;
-+ int MixEpgAction;
-+ int DisableVPS;
- int EPGScanTimeout;
- int EPGBugfixLevel;
- int EPGLinger;
-diff -Naurp vdr-1.6.0/eit.c vdr-1.6.0-disableDoubleEpgEntrys/eit.c
---- vdr-1.6.0/eit.c 2007-08-26 10:56:33.000000000 +0000
-+++ vdr-1.6.0-disableDoubleEpgEntrys/eit.c 2009-03-29 23:25:00.000000000 +0000
-@@ -72,7 +72,83 @@ cEIT::cEIT(cSchedules *Schedules, int So
- // not be overwritten.
- if (pEvent->TableID() == 0x00) {
- if (pEvent->Version() == getVersionNumber())
-- continue;
-+ {
-+ if(Setup.MixEpgAction == 0)
-+ continue;
-+
-+ //printf("in");
-+ //printf("%s", pEvent->GetTimeString());
-+ // to use the info of the original epg, update the extern one,
-+ // if it has less info
-+ SI::Descriptor *d;
-+ SI::ExtendedEventDescriptors *ExtendedEventDescriptors = NULL;
-+ //SI::ExtendedEventDescriptor *eed = NULL;
-+ SI::ShortEventDescriptor *ShortEventDescriptor = NULL;
-+ //SI::ShortEventDescriptor *sed = NULL;
-+ //SI::TimeShiftedEventDescriptor *tsed = NULL;
-+ //cLinkChannels *LinkChannels = NULL;
-+ for (SI::Loop::Iterator it2; (d = SiEitEvent.eventDescriptors.getNext(it2));)
-+ {
-+ if(d->getDescriptorTag() == SI::ShortEventDescriptorTag)
-+ {
-+ int LanguagePreferenceShort = -1;
-+ SI::ShortEventDescriptor *sed = (SI::ShortEventDescriptor *)d;
-+ if (I18nIsPreferredLanguage(Setup.EPGLanguages, sed->languageCode, LanguagePreferenceShort) || !ShortEventDescriptor)
-+ {
-+ delete ShortEventDescriptor;
-+ ShortEventDescriptor = sed;
-+ d = NULL; // so that it is not deleted
-+ }
-+ }
-+ else if(d->getDescriptorTag() == SI::ExtendedEventDescriptorTag)
-+ {
-+ int LanguagePreferenceExt = -1;
-+ bool UseExtendedEventDescriptor = false;
-+ SI::ExtendedEventDescriptor *eed = (SI::ExtendedEventDescriptor *)d;
-+ if (I18nIsPreferredLanguage(Setup.EPGLanguages, eed->languageCode, LanguagePreferenceExt) || !ExtendedEventDescriptors)
-+ {
-+ delete ExtendedEventDescriptors;
-+ ExtendedEventDescriptors = new SI::ExtendedEventDescriptors;
-+ UseExtendedEventDescriptor = true;
-+ }
-+ if (UseExtendedEventDescriptor)
-+ {
-+ ExtendedEventDescriptors->Add(eed);
-+ d = NULL; // so that it is not deleted
-+ }
-+ if (eed->getDescriptorNumber() == eed->getLastDescriptorNumber())
-+ UseExtendedEventDescriptor = false;
-+ }
-+ delete d;
-+ }
-+ if(pEvent)
-+ {
-+
-+ if(ShortEventDescriptor)
-+ {
-+ char buffer[256];
-+ if(ShortEventDescriptor->text.getText(buffer, sizeof(buffer)) && pEvent->ShortText() && (strlen(ShortEventDescriptor->text.getText(buffer, sizeof(buffer))) > strlen(pEvent->ShortText())))
-+ {
-+ pEvent->SetShortText(ShortEventDescriptor->text.getText(buffer, sizeof(buffer)));
-+ pEvent->FixEpgBugs();
-+ }
-+ }
-+ if(ExtendedEventDescriptors)
-+ {
-+ char buffer[ExtendedEventDescriptors->getMaximumTextLength(": ") + 1];
-+ //pEvent->SetDescription(ExtendedEventDescriptors->getText(buffer, sizeof(buffer), ": "));
-+
-+ if(ExtendedEventDescriptors->getText(buffer, sizeof(buffer), ": ") && pEvent->Description() && (strlen(ExtendedEventDescriptors->getText(buffer, sizeof(buffer), ": ")) > strlen(pEvent->Description())))
-+ {
-+ pEvent->SetDescription(ExtendedEventDescriptors->getText(buffer, sizeof(buffer), ": "));
-+ pEvent->FixEpgBugs();
-+ }
-+ }
-+ }
-+ delete ExtendedEventDescriptors;
-+ delete ShortEventDescriptor;
-+ continue;
-+ }
- HasExternalData = ExternalData = true;
- }
- // If the new event has a higher table ID, let's skip it.
-@@ -97,7 +173,7 @@ cEIT::cEIT(cSchedules *Schedules, int So
- if (newEvent)
- pSchedule->AddEvent(newEvent);
- if (Tid == 0x4E) { // we trust only the present/following info on the actual TS
-- if (SiEitEvent.getRunningStatus() >= SI::RunningStatusNotRunning)
-+ if (Setup.DisableVPS == 0 && SiEitEvent.getRunningStatus() >= SI::RunningStatusNotRunning)
- pSchedule->SetRunningStatus(pEvent, SiEitEvent.getRunningStatus(), channel);
- }
- if (OnlyRunningStatus)
-@@ -259,6 +335,80 @@ cEIT::cEIT(cSchedules *Schedules, int So
- if (LinkChannels)
- channel->SetLinkChannels(LinkChannels);
- Modified = true;
-+
-+ //to avoid double epg-entrys from ext and int epg sources :EW
-+ if (pEvent && pEvent->TableID() != 0x00)
-+ {
-+ cEvent *pPreviousEvent = (cEvent *)pSchedule->GetPreviousEvent(pEvent);
-+
-+ if (pPreviousEvent)
-+ {
-+ if(Setup.DoubleEpgAction == 0)
-+ {
-+ pPreviousEvent->SetStartTime(pEvent->StartTime());
-+ pPreviousEvent->SetDuration(pEvent->Duration());
-+
-+ if(Setup.DisableVPS == 0)
-+ {
-+ if(channel)
-+ pPreviousEvent->SetRunningStatus(pEvent->RunningStatus(), channel);
-+ else
-+ pPreviousEvent->SetRunningStatus(pEvent->RunningStatus());
-+ }
-+
-+ // to use the info of the original epg, update the extern one,
-+ // if it has less info
-+ char buffer_short_intern[256];
-+ char buffer_short_extern[256];
-+ int len_short_intern = 0;
-+ int len_short_extern = 0;
-+
-+ if (pEvent->ShortText())
-+ len_short_intern = snprintf (buffer_short_intern, sizeof(buffer_short_intern), "%s", pEvent->ShortText());
-+
-+ if (pPreviousEvent->ShortText())
-+ len_short_extern = snprintf (buffer_short_extern, sizeof(buffer_short_extern), "%s",pPreviousEvent->ShortText());
-+
-+ if(len_short_intern > 0)
-+ {
-+ if(len_short_extern < 1)
-+ pPreviousEvent->SetShortText(buffer_short_intern);
-+ else if (len_short_intern > len_short_extern)
-+ pPreviousEvent->SetShortText(buffer_short_intern);
-+ }
-+
-+ if(pEvent->Description())
-+ {
-+ char buffer_title_intern[4096];
-+ char buffer_title_extern[4096];
-+ int len_title_intern = 0;
-+ int len_title_extern = 0;
-+
-+ if (pEvent->Description())
-+ len_title_intern = snprintf (buffer_title_intern, sizeof(buffer_title_intern), "%s", pEvent->Description());
-+
-+ if (pPreviousEvent->Description())
-+ len_title_extern = snprintf (buffer_title_extern, sizeof(buffer_title_extern), "%s", pPreviousEvent->Description());
-+
-+ if(len_title_intern > 0)
-+ {
-+ if(len_title_extern < 1)
-+ pPreviousEvent->SetDescription(buffer_title_intern);
-+ else if (len_title_intern > len_title_extern)
-+ pPreviousEvent->SetDescription(buffer_title_intern);
-+ }
-+ }
-+
-+ if(pPreviousEvent->Vps() == 0 && pEvent->Vps() != 0)
-+ pPreviousEvent->SetVps(pEvent->Vps());
-+
-+ pSchedule->DelEvent(pEvent);
-+ pPreviousEvent->FixEpgBugs();
-+ }
-+ else
-+ pSchedule->DelEvent(pPreviousEvent);
-+ }
-+ }
- }
- if (Empty && Tid == 0x4E && getSectionNumber() == 0)
- // ETR 211: an empty entry in section 0 of table 0x4E means there is currently no event running
-diff -Naurp vdr-1.6.0/epg.c vdr-1.6.0-disableDoubleEpgEntrys/epg.c
---- vdr-1.6.0/epg.c 2008-02-16 16:09:12.000000000 +0000
-+++ vdr-1.6.0-disableDoubleEpgEntrys/epg.c 2009-03-29 23:25:00.000000000 +0000
-@@ -742,6 +742,29 @@ const cEvent *cSchedule::GetEventAround(
- return pe;
- }
-
-+const cEvent *cSchedule::GetPreviousEvent(cEvent *Event) const
-+{
-+
-+ if(!Event || Event->Duration() == 0 || Event->StartTime() == 0)
-+ return NULL;
-+ // Returns either the event info to the previous/following event to the given EventID or, if that one can't be found NULL :EW
-+ cEvent *pt = NULL;
-+ int epgTimeDelta = Setup.DoubleEpgTimeDelta * 60 + 1;
-+ for (pt = events.First(); pt; pt = events.Next(pt))
-+ if(pt && pt->TableID() == 0x00)
-+ if ((Event->StartTime() - pt->StartTime()) > - epgTimeDelta && (Event->StartTime() - pt->StartTime()) < epgTimeDelta)
-+ {
-+ if((pt->Duration() + (pt->Duration()/ 5) + 1) > Event->Duration() && (pt->Duration() - (pt->Duration()/ 5) - 1) < Event->Duration())
-+ return pt;
-+ else if (pt->Title() && Event->Title() && (strcmp(pt->Title(), ".") != 0 && strcmp(Event->Title(), ".") != 0))
-+ {
-+ if (strstr(pt->Title(), Event->Title()) != NULL || strstr(Event->Title(), pt->Title()) != NULL)
-+ return pt;
-+ }
-+ }
-+ return NULL;
-+}
-+
- void cSchedule::SetRunningStatus(cEvent *Event, int RunningStatus, cChannel *Channel)
- {
- hasRunning = false;
-diff -Naurp vdr-1.6.0/epg.h vdr-1.6.0-disableDoubleEpgEntrys/epg.h
---- vdr-1.6.0/epg.h 2006-10-07 13:47:19.000000000 +0000
-+++ vdr-1.6.0-disableDoubleEpgEntrys/epg.h 2009-03-29 23:25:00.000000000 +0000
-@@ -137,6 +137,7 @@ public:
- void DropOutdated(time_t SegmentStart, time_t SegmentEnd, uchar TableID, uchar Version);
- void Cleanup(time_t Time);
- void Cleanup(void);
-+ const cEvent *GetPreviousEvent(cEvent *Event) const; //:EW
- cEvent *AddEvent(cEvent *Event);
- void DelEvent(cEvent *Event);
- void HashEvent(cEvent *Event);
-diff -Naurp vdr-1.6.0/menu.c vdr-1.6.0-disableDoubleEpgEntrys/menu.c
---- vdr-1.6.0/menu.c 2008-03-16 11:15:28.000000000 +0000
-+++ vdr-1.6.0-disableDoubleEpgEntrys/menu.c 2009-03-29 23:25:00.000000000 +0000
-@@ -2388,6 +2388,10 @@ void cMenuSetupEPG::Setup(void)
- for (int i = 0; i < numLanguages; i++)
- // TRANSLATORS: note the singular!
- Add(new cMenuEditStraItem(tr("Setup.EPG$Preferred language"), &data.EPGLanguages[i], I18nLanguages()->Size(), &I18nLanguages()->At(0)));
-+ Add(new cMenuEditIntItem(tr("Setup.EPG$Period for double EPG search(min)"), &data.DoubleEpgTimeDelta));
-+ Add(new cMenuEditBoolItem(tr("Setup.EPG$extern double Epg entry"), &data.DoubleEpgAction, "adjust", "delete"));
-+ Add(new cMenuEditBoolItem(tr("Setup.EPG$Mix intern and extern EPG"), &data.MixEpgAction));
-+ Add(new cMenuEditBoolItem(tr("Setup.EPG$Disable running VPS event"), &data.DisableVPS));
-
- SetCurrent(Get(current));
- Display();
-diff -Naurp vdr-1.6.0/po/de_DE.po vdr-1.6.0-disableDoubleEpgEntrys/po/de_DE.po
---- vdr-1.6.0/po/de_DE.po 2008-03-23 10:31:29.000000000 +0000
-+++ vdr-1.6.0-disableDoubleEpgEntrys/po/de_DE.po 2009-03-29 23:25:00.000000000 +0000
-@@ -558,6 +558,18 @@ msgstr "EPG"
- msgid "Button$Scan"
- msgstr "Scan"
-
-+msgid "Setup.EPG$Period for double EPG search(min)"
-+msgstr "Zeitspanne für dop. EPG-Suche(min)"
-+
-+msgid "Setup.EPG$extern double Epg entry"
-+msgstr "Doppelten externen EPG-Eintrag"
-+
-+msgid "Setup.EPG$Mix intern and extern EPG"
-+msgstr "Internen und externen EPG mischen"
-+
-+msgid "Setup.EPG$Disable running VPS event"
-+msgstr "Erk. des lauf. VPS-Events abschalten"
-+
- msgid "Setup.EPG$EPG scan timeout (h)"
- msgstr "Zeit bis zur EPG-Aktualisierung (h)"
-
-diff -Naurp vdr-1.6.0/po/fr_FR.po vdr-1.6.0-disableDoubleEpgEntrys/po/fr_FR.po
---- vdr-1.6.0/po/fr_FR.po 2008-03-23 10:31:29.000000000 +0000
-+++ vdr-1.6.0-disableDoubleEpgEntrys/po/fr_FR.po 2009-03-29 23:25:58.000000000 +0000
-@@ -564,6 +564,18 @@ msgstr "Guide des programmes"
- msgid "Button$Scan"
- msgstr "Scan"
-
-+msgid "Setup.EPG$Period for double EPG search(min)"
-+msgstr "Intervalle de recherche du double EPG(min)"
-+
-+msgid "Setup.EPG$extern double Epg entry"
-+msgstr "Entrée EPG externe en double"
-+
-+msgid "Setup.EPG$Mix intern and extern EPG"
-+msgstr "Mixer EPG interne et externe"
-+
-+msgid "Setup.EPG$Disable running VPS event"
-+msgstr "Désactiver événement VPS"
-+
- msgid "Setup.EPG$EPG scan timeout (h)"
- msgstr "Inactivité avant rech. EPG (h)"
-
diff --git a/debian/patches/opt-39_noepg.dpatch b/debian/patches/opt-39_noepg.dpatch
deleted file mode 100644
index 9ab4afc..0000000
--- a/debian/patches/opt-39_noepg.dpatch
+++ /dev/null
@@ -1,159 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-39_noepg.dpatch from version the vdr-noepgmenu plugin 0.0.6.beta3
-## http://winni.vdr-developer.org/noepgmenu/downloads/beta
-##
-## Thomas Günther <tom at toms-cafe.de>:
-## - adapted to VDR-1.7.8
-## - solved conflicts with other patches
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: The patch allows to disable normal epg update for specified channels.
-## DP: This is useful if you get epg data of the channels from external sources.
-
- at DPATCH@
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/config.c vdr/config.c
---- vdr~/config.c 2011-08-19 23:01:19.000000000 +0200
-+++ vdr/config.c 2011-08-19 23:03:55.000000000 +0200
-@@ -329,6 +329,8 @@
- SetSystemTime = 0;
- TimeSource = 0;
- TimeTransponder = 0;
-+ noEPGMode=0;
-+ noEPGList=strdup("");
- MarginStart = 2;
- MarginStop = 10;
- AudioLanguages[0] = -1;
-@@ -414,10 +416,17 @@
- MenuCmdPosition = 0;
- }
-
-+cSetup::~cSetup()
-+{
-+ free(noEPGList);
-+}
-+
- cSetup& cSetup::operator= (const cSetup &s)
- {
- memcpy(&__BeginData__, &s.__BeginData__, (char *)&s.__EndData__ - (char *)&s.__BeginData__);
- InitialChannel = s.InitialChannel;
-+ free(noEPGList);
-+ noEPGList = strdup(s.noEPGList);
- return *this;
- }
-
-@@ -534,6 +543,11 @@
- else if (!strcasecmp(Name, "SetSystemTime")) SetSystemTime = atoi(Value);
- else if (!strcasecmp(Name, "TimeSource")) TimeSource = cSource::FromString(Value);
- else if (!strcasecmp(Name, "TimeTransponder")) TimeTransponder = atoi(Value);
-+ else if (!strcasecmp(Name, "noEPGMode")) noEPGMode = atoi(Value);
-+ else if (!strcasecmp(Name, "noEPGList")) {
-+ free(noEPGList);
-+ noEPGList=strdup(Value ? Value : "");
-+ }
- else if (!strcasecmp(Name, "MarginStart")) MarginStart = atoi(Value);
- else if (!strcasecmp(Name, "MarginStop")) MarginStop = atoi(Value);
- else if (!strcasecmp(Name, "AudioLanguages")) return ParseLanguages(Value, AudioLanguages);
-@@ -643,6 +657,8 @@
- Store("SetSystemTime", SetSystemTime);
- Store("TimeSource", cSource::ToString(TimeSource));
- Store("TimeTransponder", TimeTransponder);
-+ Store("noEPGMode", noEPGMode);
-+ Store("noEPGList", noEPGList);
- Store("MarginStart", MarginStart);
- Store("MarginStop", MarginStop);
- StoreLanguages("AudioLanguages", AudioLanguages);
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/config.h vdr/config.h
---- vdr~/config.h 2011-08-19 23:01:19.000000000 +0200
-+++ vdr/config.h 2011-08-19 23:02:39.000000000 +0200
-@@ -236,6 +236,7 @@
- int SetSystemTime;
- int TimeSource;
- int TimeTransponder;
-+ int noEPGMode;
- int MarginStart, MarginStop;
- int AudioLanguages[I18N_MAX_LANGUAGES + 1];
- int DisplaySubtitles;
-@@ -305,7 +306,9 @@
- int ShowRecDate, ShowRecTime, ShowRecLength, ShowProgressBar, MenuCmdPosition;
- int __EndData__;
- cString InitialChannel;
-+ char *noEPGList; // pointer not to be flat-copied
- cSetup(void);
-+ ~cSetup();
- cSetup& operator= (const cSetup &s);
- bool Load(const char *FileName);
- bool Save(void);
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/eit.c vdr/eit.c
---- vdr~/eit.c 2011-08-19 23:01:19.000000000 +0200
-+++ vdr/eit.c 2011-08-19 23:01:20.000000000 +0200
-@@ -24,8 +24,28 @@
- class cEIT : public SI::EIT {
- public:
- cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bool OnlyRunningStatus = false);
-+
-+private:
-+ bool allowedEPG(tChannelID kanalID);
- };
-
-+bool cEIT::allowedEPG(tChannelID kanalID) {
-+ bool rc;
-+
-+ if (Setup.noEPGMode == 1) {
-+ rc=false;
-+ if (strstr(::Setup.noEPGList,kanalID.ToString())!=NULL)
-+ rc=true;
-+ }
-+ else {
-+ rc=true;
-+ if (strstr(::Setup.noEPGList,kanalID.ToString())!=NULL)
-+ rc=false;
-+ }
-+
-+ return rc;
-+}
-+
- cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bool OnlyRunningStatus)
- :SI::EIT(Data, false)
- {
-@@ -37,6 +57,12 @@
- if (!channel)
- return; // only collect data for known channels
-
-+ // only use epg from channels not blocked by noEPG-patch
-+ tChannelID kanalID;
-+ kanalID=channel->GetChannelID();
-+ if (!allowedEPG(kanalID))
-+ return;
-+
- cSchedule *pSchedule = (cSchedule *)Schedules->GetSchedule(channel, true);
-
- bool Empty = true;
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/menu.c vdr/menu.c
---- vdr~/menu.c 2011-08-19 23:01:19.000000000 +0200
-+++ vdr/menu.c 2011-08-19 23:01:20.000000000 +0200
-@@ -2851,6 +2851,7 @@
-
- class cMenuSetupEPG : public cMenuSetupBase {
- private:
-+ const char *noEPGModes[2];
- int originalNumLanguages;
- int numLanguages;
- void Setup(void);
-@@ -2873,6 +2874,9 @@
- {
- int current = Current();
-
-+ noEPGModes[0]=tr("Blacklist");
-+ noEPGModes[1]=tr("Whitelist");
-+
- Clear();
-
- Add(new cMenuEditIntItem( tr("Setup.EPG$EPG scan timeout (h)"), &data.EPGScanTimeout));
-@@ -2882,6 +2886,7 @@
- Add(new cMenuEditBoolItem(tr("Setup.EPG$Set system time"), &data.SetSystemTime));
- if (data.SetSystemTime)
- Add(new cMenuEditTranItem(tr("Setup.EPG$Use time from transponder"), &data.TimeTransponder, &data.TimeSource));
-+ Add(new cMenuEditStraItem(tr("Setup.EPG$Mode noEPG-Patch"), &data.noEPGMode, 2, noEPGModes));
- // TRANSLATORS: note the plural!
- Add(new cMenuEditIntItem( tr("Setup.EPG$Preferred languages"), &numLanguages, 0, I18nLanguages()->Size()));
- for (int i = 0; i < numLanguages; i++)
diff --git a/debian/patches/opt-41-x_timer-info.dpatch b/debian/patches/opt-41-x_timer-info.dpatch
deleted file mode 100644
index a0e8adb..0000000
--- a/debian/patches/opt-41-x_timer-info.dpatch
+++ /dev/null
@@ -1,306 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-41-x_timer-info.dpatch by Andreas Brugger <brougs78 at gmx.net>, Thomas Günther <tom at toms-cafe.de>
-## http://toms-cafe.de/vdr/download/vdr-timer-info-0.5-1.7.13.diff
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Shows info, if it is possible to record an event in the timer-info of
-## DP: vdr - see README.timer-info for details.
-
- at DPATCH@
-diff -Naurp vdr-1.7.13/README.timer-info vdr-1.7.13-timer-info-0.5/README.timer-info
---- vdr-1.7.13/README.timer-info 1970-01-01 00:00:00.000000000 +0000
-+++ vdr-1.7.13-timer-info-0.5/README.timer-info 2010-02-28 18:26:31.000000000 +0000
-@@ -0,0 +1,69 @@
-++------------------------------------------------------------------------------+
-+| Info about the timer-info-patch by Brougs78 |
-+| brougs78 at gmx.net / home.pages.at/brougs78 |
-++------------------------------------------------------------------------------+
-+
-+
-+README timer-info:
-+------------------
-+
-+Features:
-+ - Shows info, if it is possible to record an event in the timer menu of vdr.
-+ For calculations the free space incl. the deleted recordings is used,
-+ considering an average consumtion of 25.75 MB/min (also used by vdr itself).
-+ The first column in the timer-list shows:
-+ ( + ) recording will be most probably possible (enough space)
-+ (+/-) recording may be possible
-+ ( - ) recording will most probably fail (to less space)
-+ The calculations also consider repeating timers.
-+ - It is possible to deactivate the patch in the OSD-menu of VDR.
-+
-+
-+HISTORY timer-info:
-+-------------------
-+
-+25.11.2004: v0.1
-+ - Initial release
-+
-+11.01.2005: v0.1b
-+ - Bugfixes for vdr-1.3.18
-+ - In the menu the free recording-time no longer includes the space of the
-+ deleted recordings, because this slowed the vdr down to much.
-+
-+08.07.2005: v0.1c
-+ - Made the patch configurable
-+
-+29.01.2006: v0.2 - Thomas Günther <tom at toms-cafe.de>
-+ - Rewritten great parts for vdr-1.3.38+
-+ http://toms-cafe.de/vdr/download/vdr-timer-info-0.2-1.3.38+.diff
-+
-+05.02.2006: v0.3 - Thomas Günther <tom at toms-cafe.de>
-+ - Fixed refresh of timer menu in cMenuTimers::OnOff
-+ - Fixed check of repeating timers
-+ - Syslog debug messages can be enabled with Define DEBUG_TIMER_INFO
-+ http://toms-cafe.de/vdr/download/vdr-timer-info-0.3-1.3.38+.diff
-+
-+03.03.2006: v0.4 - Thomas Günther <tom at toms-cafe.de>
-+ - Adapted to vdr-1.3.44
-+ - Removed setup parameter "Show timer-info"
-+ http://toms-cafe.de/vdr/download/vdr-timer-info-0.4-1.3.44.diff
-+
-+26.03.2006: - Tobias Grimm <tg at e-tobi.net>
-+ - Adapted to vdr-1.3.45
-+ http://toms-cafe.de/vdr/download/vdr-timer-info-0.4-1.3.45.diff
-+
-+14.01.2008: - Thomas Günther <tom at toms-cafe.de>
-+ - Adapted to vdr-1.5.13
-+ http://toms-cafe.de/vdr/download/vdr-timer-info-0.4-1.5.13.diff
-+
-+17.02.2008: - Tobias Grimm <tg at e-tobi.net>
-+ - Adapted to vdr-1.5.15
-+ http://toms-cafe.de/vdr/download/vdr-timer-info-0.4-1.5.15.diff
-+
-+12.04.2008: v0.5 - Thomas Günther <tom at toms-cafe.de>
-+ - Fixed display of +/- sign with UTF-8
-+ http://toms-cafe.de/vdr/download/vdr-timer-info-0.5-1.5.15.diff
-+
-+28.02.2010: - Thomas Günther <tom at toms-cafe.de>
-+ - Adapted to vdr-1.7.13
-+ http://toms-cafe.de/vdr/download/vdr-timer-info-0.5-1.7.13.diff
-diff -Naurp vdr-1.7.13/menu.c vdr-1.7.13-timer-info-0.5/menu.c
---- vdr-1.7.13/menu.c 2010-02-21 14:09:19.000000000 +0000
-+++ vdr-1.7.13-timer-info-0.5/menu.c 2010-02-28 18:24:26.000000000 +0000
-@@ -1010,8 +1010,10 @@ eOSState cMenuEditTimer::ProcessKey(eKey
- class cMenuTimerItem : public cOsdItem {
- private:
- cTimer *timer;
-+ char diskStatus;
- public:
- cMenuTimerItem(cTimer *Timer);
-+ void SetDiskStatus(char DiskStatus);
- virtual int Compare(const cListObject &ListObject) const;
- virtual void Set(void);
- cTimer *Timer(void) { return timer; }
-@@ -1020,6 +1022,7 @@ public:
- cMenuTimerItem::cMenuTimerItem(cTimer *Timer)
- {
- timer = Timer;
-+ diskStatus = ' ';
- Set();
- }
-
-@@ -1050,7 +1053,10 @@ void cMenuTimerItem::Set(void)
- File++;
- else
- File = timer->File();
-- SetText(cString::sprintf("%c\t%d\t%s%s%s\t%02d:%02d\t%02d:%02d\t%s",
-+ cCharSetConv csc("ISO-8859-1", cCharSetConv::SystemCharacterTable());
-+ char diskStatusString[2] = { diskStatus, 0 };
-+ SetText(cString::sprintf("%s%c\t%d\t%s%s%s\t%02d:%02d\t%02d:%02d\t%s",
-+ csc.Convert(diskStatusString),
- !(timer->HasFlags(tfActive)) ? ' ' : timer->FirstDay() ? '!' : timer->Recording() ? '#' : '>',
- timer->Channel()->Number(),
- *name,
-@@ -1063,6 +1069,57 @@ void cMenuTimerItem::Set(void)
- File));
- }
-
-+void cMenuTimerItem::SetDiskStatus(char DiskStatus)
-+{
-+ diskStatus = DiskStatus;
-+ Set();
-+}
-+
-+// --- cTimerEntry -----------------------------------------------------------
-+
-+class cTimerEntry : public cListObject {
-+private:
-+ cMenuTimerItem *item;
-+ const cTimer *timer;
-+ time_t start;
-+public:
-+ cTimerEntry(cMenuTimerItem *item) : item(item), timer(item->Timer()), start(timer->StartTime()) {}
-+ cTimerEntry(const cTimer *timer, time_t start) : item(NULL), timer(timer), start(start) {}
-+ virtual int Compare(const cListObject &ListObject) const;
-+ bool active(void) const { return timer->HasFlags(tfActive); }
-+ time_t startTime(void) const { return start; }
-+ int priority(void) const { return timer->Priority(); }
-+ int duration(void) const;
-+ bool repTimer(void) const { return !timer->IsSingleEvent(); }
-+ bool isDummy(void) const { return item == NULL; }
-+ const cTimer *Timer(void) const { return timer; }
-+ void SetDiskStatus(char DiskStatus);
-+ };
-+
-+int cTimerEntry::Compare(const cListObject &ListObject) const
-+{
-+ cTimerEntry *entry = (cTimerEntry *)&ListObject;
-+ int r = startTime() - entry->startTime();
-+ if (r == 0)
-+ r = entry->priority() - priority();
-+ return r;
-+}
-+
-+int cTimerEntry::duration(void) const
-+{
-+ int dur = (timer->Stop() / 100 * 60 + timer->Stop() % 100) -
-+ (timer->Start() / 100 * 60 + timer->Start() % 100);
-+ if (dur < 0)
-+ dur += 24 * 60;
-+ return dur;
-+}
-+
-+void cTimerEntry::SetDiskStatus(char DiskStatus)
-+{
-+ if (item)
-+ item->SetDiskStatus(DiskStatus);
-+}
-+
- // --- cMenuTimers -----------------------------------------------------------
-
- class cMenuTimers : public cOsdMenu {
-@@ -1075,14 +1132,17 @@ private:
- eOSState Info(void);
- cTimer *CurrentTimer(void);
- void SetHelpKeys(void);
-+ void ActualiseDiskStatus(void);
-+ bool actualiseDiskStatus;
- public:
- cMenuTimers(void);
- virtual ~cMenuTimers();
-+ virtual void Display(void);
- virtual eOSState ProcessKey(eKeys Key);
- };
-
- cMenuTimers::cMenuTimers(void)
--:cOsdMenu(tr("Timers"), 2, CHNUMWIDTH, 10, 6, 6)
-+:cOsdMenu(tr("Timers"), 3, CHNUMWIDTH, 10, 6, 6)
- {
- helpKeys = -1;
- for (cTimer *timer = Timers.First(); timer; timer = Timers.Next(timer)) {
-@@ -1093,6 +1153,7 @@ cMenuTimers::cMenuTimers(void)
- SetCurrent(First());
- SetHelpKeys();
- Timers.IncBeingEdited();
-+ actualiseDiskStatus = true;
- }
-
- cMenuTimers::~cMenuTimers()
-@@ -1131,7 +1192,7 @@ eOSState cMenuTimers::OnOff(void)
- timer->OnOff();
- timer->SetEventFromSchedule();
- RefreshCurrent();
-- DisplayCurrent(true);
-+ Display();
- if (timer->FirstDay())
- isyslog("timer %s first day set to %s", *timer->ToDescr(), *timer->PrintFirstDay());
- else
-@@ -1190,6 +1251,67 @@ eOSState cMenuTimers::Info(void)
- return osContinue;
- }
-
-+void cMenuTimers::ActualiseDiskStatus(void)
-+{
-+ if (!actualiseDiskStatus || !Count())
-+ return;
-+
-+ // compute free disk space
-+ int freeMB, freeMinutes, runshortMinutes;
-+ VideoDiskSpace(&freeMB);
-+ freeMinutes = int(double(freeMB) * 1.1 / MB_PER_MINUTE); // overestimate by 10 percent
-+ runshortMinutes = freeMinutes / 5; // 20 Percent
-+
-+ // fill entries list
-+ cTimerEntry *entry;
-+ cList<cTimerEntry> entries;
-+ for (cOsdItem *item = First(); item; item = Next(item))
-+ entries.Add(new cTimerEntry((cMenuTimerItem *)item));
-+
-+ // search last start time
-+ time_t last = 0;
-+ for (entry = entries.First(); entry; entry = entries.Next(entry))
-+ last = max(entry->startTime(), last);
-+
-+ // add entries for repeating timers
-+ for (entry = entries.First(); entry; entry = entries.Next(entry))
-+ if (entry->repTimer() && !entry->isDummy())
-+ for (time_t start = cTimer::IncDay(entry->startTime(), 1);
-+ start <= last;
-+ start = cTimer::IncDay(start, 1))
-+ if (entry->Timer()->DayMatches(start))
-+ entries.Add(new cTimerEntry(entry->Timer(), start));
-+
-+ // set the disk-status
-+ entries.Sort();
-+ for (entry = entries.First(); entry; entry = entries.Next(entry)) {
-+ char status = ' ';
-+ if (entry->active()) {
-+ freeMinutes -= entry->duration();
-+ status = freeMinutes > runshortMinutes ? '+' : freeMinutes > 0 ? 177 /* +/- */ : '-';
-+ }
-+ entry->SetDiskStatus(status);
-+#ifdef DEBUG_TIMER_INFO
-+ dsyslog("timer-info: %c | %d | %s | %s | %3d | %+5d -> %+5d",
-+ status,
-+ entry->startTime(),
-+ entry->active() ? "aktiv " : "n.akt.",
-+ entry->repTimer() ? entry->isDummy() ? " dummy " : "mehrmalig" : "einmalig ",
-+ entry->duration(),
-+ entry->active() ? freeMinutes + entry->duration() : freeMinutes,
-+ freeMinutes);
-+#endif
-+ }
-+
-+ actualiseDiskStatus = false;
-+}
-+
-+void cMenuTimers::Display(void)
-+{
-+ ActualiseDiskStatus();
-+ cOsdMenu::Display();
-+}
-+
- eOSState cMenuTimers::ProcessKey(eKeys Key)
- {
- int TimerNumber = HasSubMenu() ? Count() : -1;
-@@ -1198,18 +1320,22 @@ eOSState cMenuTimers::ProcessKey(eKeys K
- if (state == osUnknown) {
- switch (Key) {
- case kOk: return Edit();
-- case kRed: state = OnOff(); break; // must go through SetHelpKeys()!
-+ case kRed: actualiseDiskStatus = true;
-+ state = OnOff(); break; // must go through SetHelpKeys()!
- case kGreen: return New();
-- case kYellow: state = Delete(); break;
-+ case kYellow: actualiseDiskStatus = true;
-+ state = Delete(); break;
- case kInfo:
- case kBlue: return Info();
- break;
- default: break;
- }
- }
-- if (TimerNumber >= 0 && !HasSubMenu() && Timers.Get(TimerNumber)) {
-- // a newly created timer was confirmed with Ok
-- Add(new cMenuTimerItem(Timers.Get(TimerNumber)), true);
-+ if (TimerNumber >= 0 && !HasSubMenu()) {
-+ if (Timers.Get(TimerNumber)) // a newly created timer was confirmed with Ok
-+ Add(new cMenuTimerItem(Timers.Get(TimerNumber)), true);
-+ Sort();
-+ actualiseDiskStatus = true;
- Display();
- }
- if (Key != kNone)
diff --git a/debian/patches/opt-42-x_MainMenuHooks.dpatch b/debian/patches/opt-42-x_MainMenuHooks.dpatch
deleted file mode 100644
index 519bd4d..0000000
--- a/debian/patches/opt-42-x_MainMenuHooks.dpatch
+++ /dev/null
@@ -1,163 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-42-x_MainMenuHooks.dpatch by Frank Schmirler <vdrdev at schmirler.de>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: This patch allows plugins to replace the VDR mainmenus "Schedule",
-## DP: "Channels", "Timers" and "Recordings" by a different implementation.
-
- at DPATCH@
-This is a "patch" for the Video Disk Recorder (VDR).
-
-* Authors:
-Tobias Grimm <vdr at e-tobi.net>
-Martin Prochnow <nordlicht at martins-kabuff.de>
-Frank Schmirler <vdrdev at schmirler.de>
-Christian Wieninger <cwieninger at gmx.de>
-
-* Description:
-This patch allows plugins to replace the VDR mainmenus "Schedule",
-"Channels", "Timers" and "Recordings" by a different implementation.
-
-The patch is based on a suggestion of Christian Wieninger back in 2006
-(http://www.linuxtv.org/pipermail/vdr/2006-March/008234.html). It is
-meant to be an interim solution for VDR 1.4 until (maybe) VDR 1.5
-introduces an official API for this purpose.
-
-* Installation
-Change into the VDR source directory, then issue
- patch -p1 < path/to/MainMenuHooks-v1_0.patch
-and recompile.
-
-* Notes for plugin authors
-The following code sample shows the required plugin code for replacing
-the original Schedule menu:
-
-bool cMyPlugin::Service(const char *Id, void *Data)
-{
- cOsdMenu **menu = (cOsdMenu**) Data;
- if (MySetup.replaceSchedule &&
- strcmp(Id, "MainMenuHooksPatch-v1.0::osSchedule") == 0) {
- if (menu)
- *menu = (cOsdMenu*) MainMenuAction();
- return true;
- }
- return false;
-}
-
-A plugin can replace more than one menu at a time. Simply replace the
-call to MainMenuAction() in the sample above by appropriate code.
-
-Note that a plugin *should* offer a setup option which allows the user
-to enable or disable the replacement. "Disabled" would be a reasonable
-default setting. By testing for define MAINMENUHOOKSVERSNUM, a plugin
-can leave the setup option out at compiletime.
-
-In case there is an internal problem when trying to open the replacement
-menu, it is safe to return true even though Data is NULL. However an
-OSD message should indicate the problem to the user.
-
-Feel free to ship this patch along with your plugin. However if you
-think you need to modify the patch, we'd encourage you to contact the
-authors first or at least use a service id which differs in more than
-just the version number.
-
---- vdr-1.4.5/menu.c.orig 2007-02-07 08:23:49.000000000 +0100
-+++ vdr-1.4.5/menu.c 2007-02-20 11:05:34.000000000 +0100
-@@ -2792,15 +2792,30 @@
-
- // Initial submenus:
-
-+ cOsdMenu *menu = NULL;
- switch (State) {
-- case osSchedule: AddSubMenu(new cMenuSchedule); break;
-- case osChannels: AddSubMenu(new cMenuChannels); break;
-- case osTimers: AddSubMenu(new cMenuTimers); break;
-- case osRecordings: AddSubMenu(new cMenuRecordings(NULL, 0, true)); break;
-- case osSetup: AddSubMenu(new cMenuSetup); break;
-- case osCommands: AddSubMenu(new cMenuCommands(tr("Commands"), &Commands)); break;
-+ case osSchedule:
-+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osSchedule", &menu))
-+ menu = new cMenuSchedule;
-+ break;
-+ case osChannels:
-+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osChannels", &menu))
-+ menu = new cMenuChannels;
-+ break;
-+ case osTimers:
-+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osTimers", &menu))
-+ menu = new cMenuTimers;
-+ break;
-+ case osRecordings:
-+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osRecordings", &menu))
-+ menu = new cMenuRecordings(NULL, 0, true);
-+ break;
-+ case osSetup: menu = new cMenuSetup; break;
-+ case osCommands: menu = new cMenuCommands(tr("Commands"), &Commands); break;
- default: break;
- }
-+ if (menu)
-+ AddSubMenu(menu);
- }
-
- cOsdObject *cMenuMain::PluginOsdObject(void)
-@@ -2927,13 +2942,34 @@
- eOSState state = cOsdMenu::ProcessKey(Key);
- HadSubMenu |= HasSubMenu();
-
-+ cOsdMenu *menu = NULL;
- switch (state) {
-- case osSchedule: return AddSubMenu(new cMenuSchedule);
-- case osChannels: return AddSubMenu(new cMenuChannels);
-- case osTimers: return AddSubMenu(new cMenuTimers);
-- case osRecordings: return AddSubMenu(new cMenuRecordings);
-- case osSetup: return AddSubMenu(new cMenuSetup);
-- case osCommands: return AddSubMenu(new cMenuCommands(tr("Commands"), &Commands));
-+ case osSchedule:
-+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osSchedule", &menu))
-+ menu = new cMenuSchedule;
-+ else
-+ state = osContinue;
-+ break;
-+ case osChannels:
-+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osChannels", &menu))
-+ menu = new cMenuChannels;
-+ else
-+ state = osContinue;
-+ break;
-+ case osTimers:
-+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osTimers", &menu))
-+ menu = new cMenuTimers;
-+ else
-+ state = osContinue;
-+ break;
-+ case osRecordings:
-+ if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osRecordings", &menu))
-+ menu = new cMenuRecordings;
-+ else
-+ state = osContinue;
-+ break;
-+ case osSetup: menu = new cMenuSetup; break;
-+ case osCommands: menu = new cMenuCommands(tr("Commands"), &Commands); break;
- case osStopRecord: if (Interface->Confirm(tr("Stop recording?"))) {
- cOsdItem *item = Get(Current());
- if (item) {
-@@ -2985,6 +3021,8 @@
- default: break;
- }
- }
-+ if (menu)
-+ return AddSubMenu(menu);
- if (!HasSubMenu() && Update(HadSubMenu))
- Display();
- if (Key != kNone) {
---- vdr-1.4.5/config.h.orig 2007-02-20 11:55:40.000000000 +0100
-+++ vdr-1.4.5/config.h 2007-02-20 11:56:43.000000000 +0100
-@@ -35,6 +35,8 @@
- // plugins to work with newer versions of the core VDR as long as no
- // VDR header files have changed.
-
-+#define MAINMENUHOOKSVERSNUM 1.0
-+
- #define MAXPRIORITY 99
- #define MAXLIFETIME 99
-
diff --git a/debian/patches/opt-43-x_recordshowfree.dpatch b/debian/patches/opt-43-x_recordshowfree.dpatch
deleted file mode 100644
index daadbbd..0000000
--- a/debian/patches/opt-43-x_recordshowfree.dpatch
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-32-x_recordshowfree.dpatch by Walter Koch <koch at u32.de>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Shows remaining recording capacity in recordings menu.
-## DP: (Requires timer-info patch)
-
- at DPATCH@
-diff -urNad vdr-1.5.15~/menu.c vdr-1.5.15/menu.c
---- vdr-1.5.15~/menu.c 2008-02-17 22:09:26.000000000 +0100
-+++ vdr-1.5.15/menu.c 2008-02-17 22:10:29.000000000 +0100
-@@ -2317,6 +2317,19 @@
- }
- }
- free(LastItemText);
-+
-+//kw
-+ char *buffer = NULL;
-+ int FreeMB;
-+ int Percent = VideoDiskSpace(&FreeMB);
-+ int Minutes = int(double(FreeMB) / MB_PER_MINUTE);
-+ int Hours = Minutes / 60;
-+ Minutes %= 60;
-+ asprintf(&buffer, "%s %d%% %2d:%02d %s (%.1f GB)", tr("Disk"), Percent, Hours, Minutes, tr("free"), FreeMB / 1024.0 );
-+ SetTitle(buffer);
-+ free(buffer);
-+//kw
-+
- Refresh |= SetFreeDiskDisplay(Refresh);
- if (Refresh)
- Display();
diff --git a/debian/patches/opt-44_rotor.dpatch b/debian/patches/opt-44_rotor.dpatch
deleted file mode 100644
index 5105025..0000000
--- a/debian/patches/opt-44_rotor.dpatch
+++ /dev/null
@@ -1,120 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-44_rotor.dpatch by Thomas Bergwinkl <Bergwinkl.Thomas at vr-web.de>
-## extracted from the rotor plugin 0.1.4-vdr1.5
-## original filename: vdr-1.5.5-rotor.diff
-##
-## Thomas Günther <tom at toms-cafe.de>:
-## - made compatible to VDR-1.4.7
-## - adapted to VDR-1.7.8
-## - adapted to VDR-1.7.11
-## - adapted to VDR-1.7.13
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: This patch is needed for the rotor plugin.
-
- at DPATCH@
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/device.h vdr/device.h
---- vdr~/device.h 2011-08-19 23:05:56.000000000 +0200
-+++ vdr/device.h 2011-08-19 23:05:56.000000000 +0200
-@@ -24,6 +24,8 @@
- #include "spu.h"
- #include "thread.h"
- #include "tools.h"
-+#include <asm/types.h>
-+#include <linux/dvb/frontend.h>
-
- #define MAXDEVICES 16 // the maximum number of devices in the system
- #define MAXPIDHANDLES 64 // the maximum number of different PIDs per device
-@@ -305,6 +307,7 @@
- virtual bool HasProgramme(void);
- ///< Returns true if the device is currently showing any programme to
- ///< the user, either through replaying or live.
-+ virtual bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd) {return false;}
-
- // PID handle facilities
-
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/dvbdevice.c vdr/dvbdevice.c
---- vdr~/dvbdevice.c 2011-06-19 19:27:39.000000000 +0200
-+++ vdr/dvbdevice.c 2011-08-19 23:08:31.000000000 +0200
-@@ -258,6 +258,7 @@
- class cDvbTuner : public cThread {
- private:
- enum eTunerStatus { tsIdle, tsSet, tsTuned, tsLocked };
-+ bool SendDiseqc;
- int device;
- int fd_frontend;
- int adapter, frontend;
-@@ -272,6 +273,7 @@
- cMutex mutex;
- cCondVar locked;
- cCondVar newSet;
-+ dvb_diseqc_master_cmd diseqc_cmd;
- void ClearEventQueue(void) const;
- bool GetFrontendStatus(fe_status_t &Status) const;
- bool SetFrontend(void);
-@@ -286,10 +288,12 @@
- bool Locked(int TimeoutMs = 0);
- int GetSignalStrength(void) const;
- int GetSignalQuality(void) const;
-+ bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd);
- };
-
- cDvbTuner::cDvbTuner(int Device, int Fd_Frontend, int Adapter, int Frontend, fe_delivery_system FrontendType)
- {
-+ SendDiseqc=false;
- device = Device;
- fd_frontend = Fd_Frontend;
- adapter = Adapter;
-@@ -475,6 +479,18 @@
- return -1;
- }
-
-+bool cDvbTuner::SendDiseqcCmd(dvb_diseqc_master_cmd cmd)
-+{
-+ cMutexLock MutexLock(&mutex);
-+ if ((frontendType != SYS_DVBS && frontendType != SYS_DVBS2) || SendDiseqc)
-+ return false;
-+ diseqc_cmd=cmd;
-+ SendDiseqc=true;
-+ newSet.Broadcast();
-+ return true;
-+}
-+
-+
- static unsigned int FrequencyToHz(unsigned int f)
- {
- while (f && f < 1000000)
-@@ -647,6 +663,10 @@
- if (GetFrontendStatus(NewStatus))
- Status = NewStatus;
- cMutexLock MutexLock(&mutex);
-+ if (SendDiseqc) {
-+ CHECK(ioctl(fd_frontend, FE_DISEQC_SEND_MASTER_CMD, &diseqc_cmd));
-+ SendDiseqc=false;
-+ }
- switch (tunerStatus) {
- case tsIdle:
- break;
-@@ -1118,6 +1138,11 @@
- return dvbTuner ? dvbTuner->Locked(TimeoutMs) : false;
- }
-
-+bool cDvbDevice::SendDiseqcCmd(dvb_diseqc_master_cmd cmd)
-+{
-+ return dvbTuner->SendDiseqcCmd(cmd);
-+}
-+
- void cDvbDevice::SetTransferModeForDolbyDigital(int Mode)
- {
- setTransferModeForDolbyDigital = Mode;
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/dvbdevice.h vdr/dvbdevice.h
---- vdr~/dvbdevice.h 2011-06-19 19:27:39.000000000 +0200
-+++ vdr/dvbdevice.h 2011-08-19 23:05:56.000000000 +0200
-@@ -149,6 +149,7 @@
- virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
- public:
- virtual bool HasLock(int TimeoutMs = 0);
-+ virtual bool SendDiseqcCmd(dvb_diseqc_master_cmd cmd);
-
- // PID handle facilities
-
diff --git a/debian/patches/opt-45_yaepg.dpatch b/debian/patches/opt-45_yaepg.dpatch
deleted file mode 100644
index 999334f..0000000
--- a/debian/patches/opt-45_yaepg.dpatch
+++ /dev/null
@@ -1,95 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-45_yaepg.dpatch by bball950 at yahoo.com
-## http://www.hoochvdr.info/yaepg/vdr-1.3.19-core-yaepg.diff
-##
-## Thomas Günther <tom at toms-cafe.de>:
-## - adapted to VDR-1.3.25
-## - adapted to VDR-1.3.42
-## - adapted to VDR-1.5.2
-## - adapted to VDR-1.5.3 (removed special yaepg font)
-## - adapted to VDR-1.5.9
-## - adapted to VDR-1.7.11
-## Tobias Grimm <tg at e-tobi.net>:
-## - applied modification from Michaël Nival that fixes a small bug
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: This patch is needed for the yaepg plugin.
-
- at DPATCH@
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/PLUGINS/src/dvbsddevice/dvbsdffosd.c vdr/PLUGINS/src/dvbsddevice/dvbsdffosd.c
---- vdr~/PLUGINS/src/dvbsddevice/dvbsdffosd.c 2011-01-27 23:35:24.000000000 +0100
-+++ vdr/PLUGINS/src/dvbsddevice/dvbsdffosd.c 2011-03-19 22:55:53.000000000 +0100
-@@ -78,6 +78,10 @@
- Cmd(OSD_SetWindow, 0, i + 1);
- Cmd(OSD_Close);
- }
-+ if (vidWin.bpp != 0) {
-+ Cmd(OSD_SetWindow, 0, MAXNUMWINDOWS);
-+ Cmd(OSD_Close);
-+ }
- shown = false;
- }
- }
-@@ -113,6 +117,10 @@
- Cmd(OSD_SetWindow, 0, i + 1);
- Cmd(OSD_Close);
- }
-+ if (vidWin.bpp != 0) {
-+ Cmd(OSD_SetWindow, 0, MAXNUMWINDOWS);
-+ Cmd(OSD_Close);
-+ }
- shown = false;
- }
- return cOsd::SetAreas(Areas, NumAreas);
-@@ -196,6 +204,11 @@
- Cmd(OSD_SetWindow, 0, i + 1);
- Cmd(OSD_MoveWindow, 0, Left() + Bitmap->X0(), Top() + Bitmap->Y0());
- }
-+ if (vidWin.bpp != 0) {
-+ Cmd(OSD_SetWindow, 0, MAXNUMWINDOWS);
-+ Cmd(OSD_OpenRaw, vidWin.bpp, vidWin.x1, vidWin.y1,
-+ vidWin.x2, vidWin.y2, (void *)0);
-+ }
- shown = true;
- }
- }
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/device.h vdr/device.h
---- vdr~/device.h 2011-03-19 22:55:53.000000000 +0100
-+++ vdr/device.h 2011-03-19 22:55:53.000000000 +0100
-@@ -271,12 +271,12 @@
- ///< Direction (only the sign of Direction is evaluated, positive values
- ///< switch to higher channel numbers).
- private:
-- eSetChannelResult SetChannel(const cChannel *Channel, bool LiveView);
-- ///< Sets the device to the given channel (general setup).
- protected:
- virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
- ///< Sets the device to the given channel (actual physical setup).
- public:
-+ eSetChannelResult SetChannel(const cChannel *Channel, bool LiveView);
-+ ///< Sets the device to the given channel (general setup).
- static int CurrentChannel(void) { return primaryDevice ? currentChannel : 0; }
- ///< Returns the number of the current channel on the primary device.
- static void SetCurrentChannel(const cChannel *Channel) { currentChannel = Channel ? Channel->Number() : 0; }
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/osd.c vdr/osd.c
---- vdr~/osd.c 2011-03-19 21:07:09.000000000 +0100
-+++ vdr/osd.c 2011-03-19 22:55:53.000000000 +0100
-@@ -1596,6 +1596,7 @@
- }
- }
- Osds.Append(this);
-+ vidWin.bpp = 0;
- }
-
- cOsd::~cOsd()
-diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' vdr~/osd.h vdr/osd.h
---- vdr~/osd.h 2011-03-19 21:07:09.000000000 +0100
-+++ vdr/osd.h 2011-03-19 22:56:45.000000000 +0100
-@@ -917,6 +917,7 @@
- ///< MyOsdDrawPixmap(Left() + pm->ViewPort().X(), Top() + pm->ViewPort().Y(), pm->Data(), w, h, h * d);
- ///< delete pm;
- ///< }
-+ tArea vidWin;
- };
-
- #define MAXOSDIMAGES 64
diff --git a/debian/patches/opt-50_graphtft-liemikuutio.dpatch b/debian/patches/opt-50_graphtft-liemikuutio.dpatch
deleted file mode 100644
index b276c47..0000000
--- a/debian/patches/opt-50_graphtft-liemikuutio.dpatch
+++ /dev/null
@@ -1,20 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-50_graphtft-liemikuutio.dpatch by Jörg Wendel (Horchi)
-## from vdr-graphtft svn repository (20090728.2153):
-## https://vdr-graphtft.svn.sourceforge.net/svnroot/vdr-graphtft
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch required for the GraphTFT plugin with liemikuutio patch.
-
- at DPATCH@
-diff -ruN vdr-1.5.18-liemikuutio-1.19-plain/menu.c vdr-1.5.18-liemikuutio-1.19-graphtft/menu.c
---- vdr-1.5.18-liemikuutio-1.19-plain/menu.c 2008-03-17 18:29:09.000000000 +0100
-+++ vdr-1.5.18-liemikuutio-1.19-graphtft/menu.c 2008-03-17 18:27:23.000000000 +0100
-@@ -1960,6 +1960,7 @@
- public:
- cMenuRenameRecording(cRecording *Recording);
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuRenameRecording"; }
- };
-
- cMenuRenameRecording::cMenuRenameRecording(cRecording *Recording)
diff --git a/debian/patches/opt-50_graphtft.dpatch b/debian/patches/opt-50_graphtft.dpatch
deleted file mode 100644
index 0c68700..0000000
--- a/debian/patches/opt-50_graphtft.dpatch
+++ /dev/null
@@ -1,355 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-50_graphtft.dpatch by Jörg Wendel (Horchi)
-## from vdr-graphtft svn repository (20090728.2153):
-## https://vdr-graphtft.svn.sourceforge.net/svnroot/vdr-graphtft
-##
-## Thomas Günther <tom at toms-cafe.de>:
-## - adapted to VDR-1.7.13
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch required for the GraphTFT plugin.
-
- at DPATCH@
-diff -Naurp vdr-1.7.13/menu.c vdr-1.7.13-graphtft/menu.c
---- vdr-1.7.13/menu.c 2010-02-21 14:09:19.000000000 +0000
-+++ vdr-1.7.13-graphtft/menu.c 2010-02-28 20:28:03.000000000 +0000
-@@ -196,6 +196,7 @@ private:
- public:
- cMenuEditChannel(cChannel *Channel, bool New = false);
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuEditChannel"; }
- };
-
- cMenuEditChannel::cMenuEditChannel(cChannel *Channel, bool New)
-@@ -372,6 +373,7 @@ public:
- cMenuChannels(void);
- ~cMenuChannels();
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuChannels"; }
- };
-
- cMenuChannels::cMenuChannels(void)
-@@ -1079,6 +1081,7 @@ public:
- cMenuTimers(void);
- virtual ~cMenuTimers();
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuTimers"; }
- };
-
- cMenuTimers::cMenuTimers(void)
-@@ -1239,6 +1242,7 @@ void cMenuEvent::Display(void)
- {
- cOsdMenu::Display();
- DisplayMenu()->SetEvent(event);
-+ cStatus::MsgOsdSetEvent(event);
- if (event->Description())
- cStatus::MsgOsdTextItem(event->Description());
- }
-@@ -1361,6 +1365,8 @@ public:
- static void SetCurrentChannel(int ChannelNr) { currentChannel = ChannelNr; }
- static const cEvent *ScheduleEvent(void);
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return now ? "MenuWhatsOnNow" : "MenuWhatsOnNext"; }
-+ virtual void Display(void);
- };
-
- int cMenuWhatsOn::currentChannel = 0;
-@@ -1388,6 +1394,18 @@ cMenuWhatsOn::cMenuWhatsOn(const cSchedu
- SetHelpKeys();
- }
-
-+void cMenuWhatsOn::Display(void)
-+{
-+ cOsdMenu::Display();
-+
-+ if (Count() > 0) {
-+ int ni = 0;
-+ for (cOsdItem *item = First(); item; item = Next(item)) {
-+ cStatus::MsgOsdEventItem(((cMenuScheduleItem*)item)->event, item->Text(), ni++, Count());
-+ }
-+ }
-+}
-+
- bool cMenuWhatsOn::Update(void)
- {
- bool result = false;
-@@ -1528,6 +1546,8 @@ public:
- cMenuSchedule(void);
- virtual ~cMenuSchedule();
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuSchedule"; }
-+ virtual void Display(void);
- };
-
- cMenuSchedule::cMenuSchedule(void)
-@@ -1553,6 +1573,18 @@ cMenuSchedule::~cMenuSchedule()
- cMenuWhatsOn::ScheduleEvent(); // makes sure any posted data is cleared
- }
-
-+void cMenuSchedule::Display(void)
-+{
-+ cOsdMenu::Display();
-+
-+ if (Count() > 0) {
-+ int ni = 0;
-+ for (cOsdItem *item = First(); item; item = Next(item)) {
-+ cStatus::MsgOsdEventItem(((cMenuScheduleItem*)item)->event, item->Text(), ni++, Count());
-+ }
-+ }
-+}
-+
- void cMenuSchedule::PrepareScheduleAllThis(const cEvent *Event, const cChannel *Channel)
- {
- Clear();
-@@ -1908,6 +1940,7 @@ public:
- cMenuCam(cCamSlot *CamSlot);
- virtual ~cMenuCam();
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuCam"; }
- };
-
- cMenuCam::cMenuCam(cCamSlot *CamSlot)
-@@ -2087,6 +2120,7 @@ public:
- cMenuRecording(const cRecording *Recording, bool WithButtons = false);
- virtual void Display(void);
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuRecording"; }
- };
-
- cMenuRecording::cMenuRecording(const cRecording *Recording, bool WithButtons)
-@@ -2102,6 +2136,7 @@ void cMenuRecording::Display(void)
- {
- cOsdMenu::Display();
- DisplayMenu()->SetRecording(recording);
-+ cStatus::MsgOsdSetRecording(recording);
- if (recording->Info()->Description())
- cStatus::MsgOsdTextItem(recording->Info()->Description());
- }
-@@ -2498,6 +2533,7 @@ public:
- cMenuSetupOSD(void);
- virtual ~cMenuSetupOSD();
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuSetupOsd"; }
- };
-
- cMenuSetupOSD::cMenuSetupOSD(void)
-@@ -2637,6 +2673,7 @@ private:
- public:
- cMenuSetupEPG(void);
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuSetupEpg"; }
- };
-
- cMenuSetupEPG::cMenuSetupEPG(void)
-@@ -2732,6 +2769,7 @@ private:
- public:
- cMenuSetupDVB(void);
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuSetupDvb"; }
- };
-
- cMenuSetupDVB::cMenuSetupDVB(void)
-@@ -2861,6 +2899,7 @@ private:
- public:
- cMenuSetupLNB(void);
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuSetupLnb"; }
- };
-
- cMenuSetupLNB::cMenuSetupLNB(void)
-@@ -2941,6 +2980,7 @@ private:
- public:
- cMenuSetupCAM(void);
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuSetupCam"; }
- };
-
- cMenuSetupCAM::cMenuSetupCAM(void)
-@@ -3111,6 +3151,7 @@ class cMenuSetupPlugins : public cMenuSe
- public:
- cMenuSetupPlugins(void);
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuSetupPlugins"; }
- };
-
- cMenuSetupPlugins::cMenuSetupPlugins(void)
-@@ -3160,6 +3201,7 @@ private:
- public:
- cMenuSetup(void);
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuSetup"; }
- };
-
- cMenuSetup::cMenuSetup(void)
-diff -Naurp vdr-1.7.13/menu.h vdr-1.7.13-graphtft/menu.h
---- vdr-1.7.13/menu.h 2010-02-06 10:17:24.000000000 +0000
-+++ vdr-1.7.13-graphtft/menu.h 2010-02-28 20:27:52.000000000 +0000
-@@ -29,6 +29,7 @@ public:
- void SetText(const char *Text);
- virtual void Display(void);
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuText"; }
- };
-
- class cMenuFolder : public cOsdMenu {
-@@ -67,6 +68,7 @@ public:
- cMenuCommands(const char *Title, cList<cNestedItem> *Commands, const char *Parameters = NULL);
- virtual ~cMenuCommands();
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuCommands"; }
- };
-
- class cMenuEditTimer : public cOsdMenu {
-@@ -84,6 +86,7 @@ public:
- cMenuEditTimer(cTimer *Timer, bool New = false);
- virtual ~cMenuEditTimer();
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuTimerEdit"; }
- };
-
- class cMenuEvent : public cOsdMenu {
-@@ -93,6 +96,7 @@ public:
- cMenuEvent(const cEvent *Event, bool CanSwitch = false, bool Buttons = false);
- virtual void Display(void);
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuEvent"; }
- };
-
- class cMenuMain : public cOsdMenu {
-@@ -109,6 +113,7 @@ public:
- cMenuMain(eOSState State = osUnknown);
- virtual eOSState ProcessKey(eKeys Key);
- static cOsdObject *PluginOsdObject(void);
-+ virtual const char* MenuKind() { return "MenuMain"; }
- };
-
- class cDisplayChannel : public cOsdObject {
-@@ -210,6 +215,7 @@ public:
- cMenuRecordings(const char *Base = NULL, int Level = 0, bool OpenSubMenus = false);
- ~cMenuRecordings();
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuRecordings"; }
- };
-
- class cRecordControl {
-diff -Naurp vdr-1.7.13/menuitems.h vdr-1.7.13-graphtft/menuitems.h
---- vdr-1.7.13/menuitems.h 2010-02-21 13:58:21.000000000 +0000
-+++ vdr-1.7.13-graphtft/menuitems.h 2010-02-28 20:20:08.000000000 +0000
-@@ -198,6 +198,7 @@ public:
- cMenuSetupPage(void);
- virtual eOSState ProcessKey(eKeys Key);
- void SetPlugin(cPlugin *Plugin);
-+ const char* MenuKind() { return "MenuSetupPage"; }
- };
-
- #endif //__MENUITEMS_H
-diff -Naurp vdr-1.7.13/osdbase.c vdr-1.7.13-graphtft/osdbase.c
---- vdr-1.7.13/osdbase.c 2010-01-17 11:36:12.000000000 +0000
-+++ vdr-1.7.13-graphtft/osdbase.c 2010-02-28 20:20:07.000000000 +0000
-@@ -97,6 +97,7 @@ cOsdMenu::~cOsdMenu()
- free(status);
- displayMenu->Clear();
- cStatus::MsgOsdClear();
-+ cStatus::MsgOsdMenuDestroy();
- if (!--displayMenuCount)
- DELETENULL(displayMenu);
- }
-@@ -202,6 +203,7 @@ void cOsdMenu::Display(void)
- displayMenu->SetMessage(mtStatus, NULL);
- displayMenu->Clear();
- cStatus::MsgOsdClear();
-+ cStatus::MsgOsdMenuDisplay(MenuKind());
- displayMenu->SetTabs(cols[0], cols[1], cols[2], cols[3], cols[4]);//XXX
- displayMenu->SetTitle(title);
- cStatus::MsgOsdTitle(title);
-diff -Naurp vdr-1.7.13/osdbase.h vdr-1.7.13-graphtft/osdbase.h
---- vdr-1.7.13/osdbase.h 2010-01-16 14:25:31.000000000 +0000
-+++ vdr-1.7.13-graphtft/osdbase.h 2010-02-28 20:20:08.000000000 +0000
-@@ -131,6 +131,7 @@ public:
- void Ins(cOsdItem *Item, bool Current = false, cOsdItem *Before = NULL);
- virtual void Display(void);
- virtual eOSState ProcessKey(eKeys Key);
-+ virtual const char* MenuKind() { return "MenuUnknown"; }
- };
-
- #endif //__OSDBASE_H
-diff -Naurp vdr-1.7.13/recording.h vdr-1.7.13-graphtft/recording.h
---- vdr-1.7.13/recording.h 2010-01-16 11:16:20.000000000 +0000
-+++ vdr-1.7.13-graphtft/recording.h 2010-02-28 20:20:08.000000000 +0000
-@@ -65,6 +65,7 @@ public:
- const cEvent *GetEvent(void) const { return event; }
- const char *Title(void) const { return event->Title(); }
- const char *ShortText(void) const { return event->ShortText(); }
-+ tEventID EventID(void) const { return event->EventID(); }
- const char *Description(void) const { return event->Description(); }
- const cComponents *Components(void) const { return event->Components(); }
- const char *Aux(void) const { return aux; }
-diff -Naurp vdr-1.7.13/status.c vdr-1.7.13-graphtft/status.c
---- vdr-1.7.13/status.c 2008-02-16 14:46:31.000000000 +0000
-+++ vdr-1.7.13-graphtft/status.c 2010-02-28 20:20:08.000000000 +0000
-@@ -124,3 +124,32 @@ void cStatus::MsgOsdProgramme(time_t Pre
- for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
- sm->OsdProgramme(PresentTime, PresentTitle, PresentSubtitle, FollowingTime, FollowingTitle, FollowingSubtitle);
- }
-+
-+void cStatus::MsgOsdSetEvent(const cEvent* event)
-+{
-+ for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
-+ sm->OsdSetEvent(event);
-+}
-+
-+void cStatus::MsgOsdSetRecording(const cRecording* recording)
-+{
-+ for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
-+ sm->OsdSetRecording(recording);
-+}
-+
-+void cStatus::MsgOsdMenuDisplay(const char* kind)
-+{
-+ for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
-+ sm->OsdMenuDisplay(kind);
-+}
-+
-+void cStatus::MsgOsdMenuDestroy()
-+{
-+ for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
-+ sm->OsdMenuDestroy();
-+}
-+void cStatus::MsgOsdEventItem(const cEvent* Event, const char *Text, int Index, int Count)
-+{
-+ for (cStatus *sm = statusMonitors.First(); sm; sm = statusMonitors.Next(sm))
-+ sm->OsdEventItem(Event, Text, Index, Count);
-+}
-diff -Naurp vdr-1.7.13/status.h vdr-1.7.13-graphtft/status.h
---- vdr-1.7.13/status.h 2008-02-16 15:00:33.000000000 +0000
-+++ vdr-1.7.13-graphtft/status.h 2010-02-28 20:20:08.000000000 +0000
-@@ -80,6 +80,17 @@ protected:
- // The OSD displays the single line Text with the current channel information.
- virtual void OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle) {}
- // The OSD displays the given programme information.
-+ virtual void OsdSetRecording(const cRecording* recording) {}
-+ // The OSD displays the recording information.
-+ virtual void OsdSetEvent(const cEvent* event) {}
-+ // The OSD displays the event information.
-+ virtual void OsdMenuDisplay(const char* kind) {}
-+ // report menu creation
-+ virtual void OsdMenuDestroy() {}
-+ // report menu destruvtion
-+ virtual void OsdEventItem(const cEvent* Event, const char *Text, int Index, int Count) {}
-+ // The OSD displays the given single line Event as menu item at Index.
-+
- public:
- cStatus(void);
- virtual ~cStatus();
-@@ -101,6 +112,11 @@ public:
- static void MsgOsdTextItem(const char *Text, bool Scroll = false);
- static void MsgOsdChannel(const char *Text);
- static void MsgOsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle);
-+ static void MsgOsdSetEvent(const cEvent* event);
-+ static void MsgOsdSetRecording(const cRecording* recording);
-+ static void MsgOsdMenuDisplay(const char* kind);
-+ static void MsgOsdMenuDestroy();
-+ static void MsgOsdEventItem(const cEvent* Event, const char *Text, int Index, int Count);
- };
-
- #endif //__STATUS_H
diff --git a/debian/patches/opt-53_dvbsetup.dpatch b/debian/patches/opt-53_dvbsetup.dpatch
deleted file mode 100644
index 2ce8b95..0000000
--- a/debian/patches/opt-53_dvbsetup.dpatch
+++ /dev/null
@@ -1,207 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## opt-53_dvbsetup.dpatch by Tobias Grimm <tg at e-tobi.net>
-##
-## Thomas Günther <tom at toms-cafe.de>:
-## - updated to version of extensions patch 72
-## - adapted to VDR-1.7.8 with noepg patch
-## - solved conflicts with other patches
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Setup for AC3 transfer and Channel Blocker
-## DP: Taken from the Zulu extensions patch 72
-## DP: See http://www.zulu-entertainment.de/download.php?group=VDR
-
- at DPATCH@
-diff -Naurp vdr-1.7.8-noepg/config.c vdr-1.7.8-noepg-dvbsetup/config.c
---- vdr-1.7.8-noepg/config.c 2009-06-15 21:04:42.000000000 +0000
-+++ vdr-1.7.8-noepg-dvbsetup/config.c 2009-06-15 21:52:59.000000000 +0000
-@@ -234,6 +234,10 @@ cSetup::cSetup(void)
- SetSystemTime = 0;
- TimeSource = 0;
- TimeTransponder = 0;
-+ DolbyTransferFix = 1;
-+ ChannelBlocker = 0;
-+ ChannelBlockerMode = 0;
-+ ChannelBlockerList = strdup("");
- noEPGMode=0;
- noEPGList=strdup("");
- MarginStart = 2;
-@@ -306,12 +310,15 @@ cSetup::cSetup(void)
-
- cSetup::~cSetup()
- {
-+ free(ChannelBlockerList);
- free(noEPGList);
- }
-
- cSetup& cSetup::operator= (const cSetup &s)
- {
- memcpy(&__BeginData__, &s.__BeginData__, (char *)&s.__EndData__ - (char *)&s.__BeginData__);
-+ free(ChannelBlockerList);
-+ ChannelBlockerList = strdup(s.ChannelBlockerList);
- free(noEPGList);
- noEPGList = strdup(s.noEPGList);
- return *this;
-@@ -430,6 +437,13 @@ bool cSetup::Parse(const char *Name, con
- else if (!strcasecmp(Name, "SetSystemTime")) SetSystemTime = atoi(Value);
- else if (!strcasecmp(Name, "TimeSource")) TimeSource = cSource::FromString(Value);
- else if (!strcasecmp(Name, "TimeTransponder")) TimeTransponder = atoi(Value);
-+ else if (!strcasecmp(Name, "DolbyTransferFix")) DolbyTransferFix = atoi(Value);
-+ else if (!strcasecmp(Name, "ChannelBlocker")) ChannelBlocker = atoi(Value);
-+ else if (!strcasecmp(Name, "ChannelBlockerMode")) ChannelBlockerMode = atoi(Value);
-+ else if (!strcasecmp(Name, "ChannelBlockerList")) {
-+ free(ChannelBlockerList);
-+ ChannelBlockerList = strdup(Value ? Value : "");
-+ }
- else if (!strcasecmp(Name, "noEPGMode")) noEPGMode = atoi(Value);
- else if (!strcasecmp(Name, "noEPGList")) {
- free(noEPGList);
-@@ -527,6 +541,10 @@ bool cSetup::Save(void)
- Store("SetSystemTime", SetSystemTime);
- Store("TimeSource", cSource::ToString(TimeSource));
- Store("TimeTransponder", TimeTransponder);
-+ Store("DolbyTransferFix", DolbyTransferFix);
-+ Store("ChannelBlocker", ChannelBlocker);
-+ Store("ChannelBlockerMode", ChannelBlockerMode);
-+ Store("ChannelBlockerList", ChannelBlockerList);
- Store("noEPGMode", noEPGMode);
- Store("noEPGList", noEPGList);
- Store("MarginStart", MarginStart);
-diff -Naurp vdr-1.7.8-noepg/config.h vdr-1.7.8-noepg-dvbsetup/config.h
---- vdr-1.7.8-noepg/config.h 2009-06-15 21:02:48.000000000 +0000
-+++ vdr-1.7.8-noepg-dvbsetup/config.h 2009-06-15 21:28:57.000000000 +0000
-@@ -218,6 +218,9 @@ public:
- int SetSystemTime;
- int TimeSource;
- int TimeTransponder;
-+ int DolbyTransferFix;
-+ int ChannelBlocker;
-+ int ChannelBlockerMode;
- int noEPGMode;
- int MarginStart, MarginStop;
- int AudioLanguages[I18N_MAX_LANGUAGES + 1];
-@@ -275,6 +278,7 @@ public:
- int InitialVolume;
- int EmergencyExit;
- int __EndData__;
-+ char *ChannelBlockerList; // pointer not to be flat-copied
- char *noEPGList; // pointer not to be flat-copied
- cSetup(void);
- ~cSetup();
-diff -Naurp vdr-1.7.8-noepg/dvbdevice.c vdr-1.7.8-noepg-dvbsetup/dvbdevice.c
---- vdr-1.7.8-noepg/dvbdevice.c 2009-06-06 11:17:20.000000000 +0000
-+++ vdr-1.7.8-noepg-dvbsetup/dvbdevice.c 2009-06-15 21:54:49.000000000 +0000
-@@ -241,6 +241,7 @@ bool cDvbTuner::SetFrontend(void)
- }
- }
- diseqcCommands = diseqc->Commands();
-+ isyslog("Sent DISEQC command: %s", diseqcCommands);
- }
- frequency -= diseqc->Lof();
- }
-@@ -483,6 +484,9 @@ cDvbDevice::cDvbDevice(int n)
-
- if (fd_frontend >= 0) {
- if (ioctl(fd_frontend, FE_GET_INFO, &frontendInfo) >= 0) {
-+ if (Setup.ChannelBlockerMode == 4)
-+ frontendType = (n == Setup.PrimaryDVB - 1) ? SYS_UNDEFINED : frontendType;
-+ else
- switch (frontendInfo.type) {
- case FE_QPSK: frontendType = (frontendInfo.caps & FE_CAN_2G_MODULATION) ? SYS_DVBS2 : SYS_DVBS; break;
- case FE_OFDM: frontendType = SYS_DVBT; break;
-@@ -796,6 +800,11 @@ void cDvbDevice::GetOsdSize(int &Width,
-
- bool cDvbDevice::SetAudioBypass(bool On)
- {
-+ if (Setup.DolbyTransferFix && On) {
-+ cChannel *c=Channels.GetByNumber(cDevice::CurrentChannel());
-+ if (c->Ca(0) != 0)
-+ return false;
-+ }
- if (setTransferModeForDolbyDigital != 1)
- return false;
- return ioctl(fd_audio, AUDIO_SET_BYPASS_MODE, On) == 0;
-@@ -909,6 +918,20 @@ bool cDvbDevice::ProvidesSource(int Sour
-
- bool cDvbDevice::ProvidesTransponder(const cChannel *Channel) const
- {
-+ if (Setup.ChannelBlocker != 0) {
-+ if ((Setup.ChannelBlockerMode == 0) ||
-+ (Setup.ChannelBlockerMode == 1 && HasDecoder()) ||
-+ (Setup.ChannelBlockerMode == 2 && IsPrimaryDevice()) ||
-+ (Setup.ChannelBlockerMode == 3 && IsPrimaryDevice() && HasDecoder())) {
-+ if ((Setup.ChannelBlocker == 1 && cSource::IsCable(Channel->Source()) && Channel->Modulation() == QAM_256) ||
-+ (Setup.ChannelBlocker == 2 && cSource::IsCable(Channel->Source())) ||
-+ (Setup.ChannelBlocker == 3 && cSource::IsSat(Channel->Source())) ||
-+ (Setup.ChannelBlocker == 4 && strstr(::Setup.ChannelBlockerList, Channel->GetChannelID().ToString()) != NULL) || // blacklist
-+ (Setup.ChannelBlocker == 5 && strstr(::Setup.ChannelBlockerList, Channel->GetChannelID().ToString()) == NULL) || // whitelist
-+ (Setup.ChannelBlocker == 6))
-+ return false;
-+ }
-+ }
- if (!ProvidesSource(Channel->Source()))
- return false; // doesn't provide source
- if (!cSource::IsSat(Channel->Source()))
-@@ -920,6 +943,20 @@ bool cDvbDevice::ProvidesTransponder(con
-
- bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const
- {
-+ if (Setup.ChannelBlocker != 0) {
-+ if ((Setup.ChannelBlockerMode == 0) ||
-+ (Setup.ChannelBlockerMode == 1 && HasDecoder()) ||
-+ (Setup.ChannelBlockerMode == 2 && IsPrimaryDevice()) ||
-+ (Setup.ChannelBlockerMode == 3 && IsPrimaryDevice() && HasDecoder())) {
-+ if ((Setup.ChannelBlocker == 1 && cSource::IsCable(Channel->Source()) && Channel->Modulation() == QAM_256) ||
-+ (Setup.ChannelBlocker == 2 && cSource::IsCable(Channel->Source())) ||
-+ (Setup.ChannelBlocker == 3 && cSource::IsSat(Channel->Source())) ||
-+ (Setup.ChannelBlocker == 4 && strstr(::Setup.ChannelBlockerList, Channel->GetChannelID().ToString()) != NULL) || // blacklist
-+ (Setup.ChannelBlocker == 5 && strstr(::Setup.ChannelBlockerList, Channel->GetChannelID().ToString()) == NULL) || // whitelist
-+ (Setup.ChannelBlocker == 6))
-+ return false;
-+ }
-+ }
- bool result = false;
- bool hasPriority = Priority < 0 || Priority > this->Priority();
- bool needsDetachReceivers = false;
-diff -Naurp vdr-1.7.8-noepg/menu.c vdr-1.7.8-noepg-dvbsetup/menu.c
---- vdr-1.7.8-noepg/menu.c 2009-06-15 21:06:02.000000000 +0000
-+++ vdr-1.7.8-noepg-dvbsetup/menu.c 2009-06-15 21:58:36.000000000 +0000
-@@ -2385,6 +2385,8 @@ eOSState cMenuSetupEPG::ProcessKey(eKeys
-
- class cMenuSetupDVB : public cMenuSetupBase {
- private:
-+ const char *ChannelBlockers[7];
-+ const char *ChannelBlockerModes[4];
- int originalNumAudioLanguages;
- int numAudioLanguages;
- int originalNumSubtitleLanguages;
-@@ -2423,6 +2425,19 @@ void cMenuSetupDVB::Setup(void)
- {
- int current = Current();
-
-+ ChannelBlockers[0] = tr("none");
-+ ChannelBlockers[1] = tr("qam256");
-+ ChannelBlockers[2] = tr("dvb-c");
-+ ChannelBlockers[3] = tr("dvb-s");
-+ ChannelBlockers[4] = tr("blacklist");
-+ ChannelBlockers[5] = tr("whitelist");
-+ ChannelBlockers[6] = tr("all");
-+
-+ ChannelBlockerModes[0] = tr("none");
-+ ChannelBlockerModes[1] = tr("has decoder");
-+ ChannelBlockerModes[2] = tr("is primary");
-+ ChannelBlockerModes[3] = tr("has decoder + is primary");
-+
- Clear();
-
- Add(new cMenuEditIntItem( tr("Setup.DVB$Primary DVB interface"), &data.PrimaryDVB, 1, cDevice::NumDevices()));
-@@ -2443,6 +2458,9 @@ 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$Use AC3-Transfer Fix"), &data.DolbyTransferFix));
-+ Add(new cMenuEditStraItem(tr("Setup.DVB$Channel Blocker"), &data.ChannelBlocker, 7, ChannelBlockers));
-+ Add(new cMenuEditStraItem(tr("Setup.DVB$Channel Blocker Filter Mode"), &data.ChannelBlockerMode, 4, ChannelBlockerModes));
-
- SetCurrent(Get(current));
- Display();
diff --git a/debian/patches/patchtest b/debian/patches/patchtest
deleted file mode 100644
index ac2b8ca..0000000
--- a/debian/patches/patchtest
+++ /dev/null
@@ -1,187 +0,0 @@
-#!/bin/bash
-
-# Define some patch levels here: foo="patch1 patch2 ..."
-#
-standard="\
- 04_newplugin \
- 06_default_svdrp_port_0 \
- 11_sortrecordings \
- 12_osdbase-maxitems \
- 16_channels.conf.terr-fix \
- 81_Make_config \
- 82_valgrind \
- 99_ncursesw-include \
- 99_vdr-workaround-broken-sys-capability"
-multipatch="$standard \
- opt-20_liemikuutio \
- opt-21_internal-cam-devices \
- opt-22-x_edit_marks \
- opt-24_jumpplay \
- opt-27_ttxtsubs \
- opt-31-x_reelchannelscan \
- opt-37-x_menuorg \
- opt-38_disableDoubleEpgEntrys \
- opt-39_noepg \
- opt-41-x_timer-info \
- opt-42-x_MainMenuHooks \
- opt-43-x_recordshowfree \
- opt-44_rotor \
- opt-45_yaepg \
- opt-48-x_pin \
- opt-50_graphtft \
- opt-50_graphtft-liemikuutio \
- opt-91_ext-graphtft \
- opt-51_cuttime \
- opt-52_hard_link_cutter"
-testpatch="$standard \
- opt-20_liemikuutio \
- opt-21_internal-cam-devices \
- opt-24_jumpplay \
- opt-27_ttxtsubs \
- opt-29_syncearly \
- opt-31-x_reelchannelscan \
- opt-37-x_menuorg \
- opt-38_disableDoubleEpgEntrys \
- opt-39_noepg \
- opt-41-x_timer-info \
- opt-42-x_MainMenuHooks \
- opt-44_rotor \
- opt-45_yaepg \
- opt-48-x_pin \
- opt-50_graphtft \
- opt-51_cuttime \
- opt-52_hard_link_cutter"
-mustfail_patch="XX_patchtest-patch-error"
-mustfail_compile="XX_patchtest-compile-error"
-
-# List the patch levels to be tested:
-#
-patchLevels=(\
- "standard $standard"\
- "multipatch $multipatch"\
- "testpatch $testpatch"\
- "mustfail_patch $mustfail_patch"\
- "mustfail_compile $mustfail_compile")
-
-currentDir=`pwd`
-
-testPatchLevel ()
-{
- patchLevelName=$1
- tempDir=/tmp/vdr.$$.tmp
- mkdir -p $tempDir
- cp -r . $tempDir/vdr
- cd $tempDir/vdr
- # don't use dpatch:
- touch patch-stamp
- Failed="false"
- shift
- while [ "$1" ]
- do
- if [ $SOLVE = "true" ] ; then
- rm -rf ../vdr.orig
- cp -r . ../vdr.orig
- fi
- chmod a+x debian/patches/$1.dpatch
- debian/patches/$1.dpatch -patch >/tmp/patchtest_patch.log 2>&1
- if [ $? -ne 0 ] ; then
- echo "FAILED $patchLevelName at $1"
- Failed="true"
- break
- fi
- shift
- done
-
- if [ $Failed = "false" ] ; then
- if [ $QUICK = "true" ] ; then
- echo " OK $patchLevelName"
- else
- fakeroot debian/rules binary >/tmp/patchtest_build.log 2>&1
- if [ $? -ne 0 ] ; then
- Failed="true"
- echo "FAILED $patchLevelName - Build Error"
- else
- echo " OK $patchLevelName"
- fi
- fi
- fi
- if [ $Failed = "true" -a $SOLVE = "true" ] ; then
- cd ..
- exit 1
- fi
- cd $currentDir
- rm -rf $tempDir
-}
-
-listPatchLevels ()
-{
- len=${#patchLevels[*]}
- i=0
- while [ $i -lt $len ]
- do
- patchset=${patchLevels[$i]}
- isPatchLevelName="true"
- for patch in $patchset
- do
- if [ "$isPatchLevelName" = "true" ] ; then
- echo "[$patch] contains these patches:"
- else
- echo -n "$patch, "
- fi
- isPatchLevelName="false"
- done
- let i++
- echo
- echo
- done
-}
-
-
-testPatchLevels ()
-{
- len=${#patchLevels[*]}
- i=0
- while [ $i -lt $len ]
- do
- patchset=${patchLevels[$i]}
- testPatchLevel $patchset
- let i++
- done
-}
-
-echo
-echo "Patch-Level-Test"
-echo "----------------"
-echo
-
-QUICK='false'
-SOLVE='false'
-
-case $1 in
- --help)
- echo "Usage: debian/patches/patchtest [ --help | --quick | --solve ]"
- echo
- echo "With the --quick option no compilation will be performed."
- echo "Using the --solve option will stop the test on failure and open"
- echo "a new shell where you can solve any problems."
- echo
- exit 0
- ;;
- --quick)
- QUICK="true"
- ;;
- --solve)
- QUICK="true"
- SOLVE="true"
- ;;
-esac
-
-if [ -d debian/patches ] ; then
- listPatchLevels
- echo
- testPatchLevels
-else
- echo "Could not find debian/patches"
-fi
-
-echo
--
vdr packaging repository
More information about the pkg-vdr-dvb-changes
mailing list