r7365 - in /vdr/vdr/trunk/debian: .vdr-patches.multipatch changelog patches/00list patches/00list.multipatch patches/opt-21_internal-cam-devices.dpatch patches/opt-53_dvbsetup.dpatch patches/opt-54_deltimeshiftrec.dpatch patches/patchtest
tiber-guest at users.alioth.debian.org
tiber-guest at users.alioth.debian.org
Fri Aug 1 22:03:18 UTC 2008
Author: tiber-guest
Date: Fri Aug 1 22:03:18 2008
New Revision: 7365
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/?sc=1&rev=7365
Log:
* Added opt-21_internal-cam-devices.dpatch
* Added opt-53_dvbsetup.dpatch
* Added opt-54_deltimeshiftrec.dpatch
Added:
vdr/vdr/trunk/debian/patches/opt-21_internal-cam-devices.dpatch
vdr/vdr/trunk/debian/patches/opt-53_dvbsetup.dpatch
vdr/vdr/trunk/debian/patches/opt-54_deltimeshiftrec.dpatch
Modified:
vdr/vdr/trunk/debian/.vdr-patches.multipatch
vdr/vdr/trunk/debian/changelog
vdr/vdr/trunk/debian/patches/00list
vdr/vdr/trunk/debian/patches/00list.multipatch
vdr/vdr/trunk/debian/patches/patchtest
Modified: vdr/vdr/trunk/debian/.vdr-patches.multipatch
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/.vdr-patches.multipatch?rev=7365&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/.vdr-patches.multipatch (original)
+++ vdr/vdr/trunk/debian/.vdr-patches.multipatch Fri Aug 1 22:03:18 2008
@@ -2,6 +2,7 @@
debian/patches/opt-43-x_recordshowfree.dpatch:66152f345b03259d28e89135cda42310
debian/patches/12_osdbase-maxitems.dpatch:e45d1b62f7d66c3e5d279e3561034107
debian/patches/11_sortrecordings.dpatch:9ed4cd1e144ee59dab34d4df4aa9af51
+debian/patches/opt-53_dvbsetup.dpatch:dbb3417b0b33548728b43fd8613f7c73
debian/patches/opt-50_graphtft.dpatch:aeba283cc500591fa0b6d112c063fadf
debian/patches/16_channels.conf.terr-fix.dpatch:72595733d0b46aa4093a640708d19226
debian/patches/06_default_svdrp_port_0.dpatch:b49237a9ee246acfa01ee7ec92ad0a52
@@ -10,6 +11,7 @@
debian/patches/opt-44_rotor.dpatch:bbcc27512e0a0b610efadcde8fa67d02
debian/patches/opt-20_liemikuutio.dpatch:bb8bb6b250b8b2ee24dad87a7c4490f8
debian/patches/10_dd-record-option.dpatch:56f2327b5930da8d40873b0140f5e051
+debian/patches/opt-21_internal-cam-devices.dpatch:a883c0b09e67b679436b7df1e9807fc8
debian/patches/09_sort_options.dpatch:3b561fcd7645b216b4dab989d7786fda
debian/patches/opt-41-x_timer-info.dpatch:92ee6cdf60b795d9fbcf4fdcafe401b4
debian/patches/opt-24_jumpplay.dpatch:31906df69c18642ddd0996fa0b82a527
@@ -22,6 +24,7 @@
debian/patches/opt-51_cuttime.dpatch:cfbf0a7934f109148fef4e385c3eb465
debian/patches/opt-40_iptv.dpatch:2cca9430e7f83eaf9d25b1e8ca9e5fa7
debian/patches/14_cap-memsize.dpatch:7beb9bcecb1bdce4a03c1729acfbbdb3
+debian/patches/18_signalhandler-fix.dpatch:ee4ed6015a0a0a2122ca76db6ff05e44
debian/patches/opt-48-x_pin.dpatch:5e8f7e1b1ad5ed8ac51736d2aed02f9c
debian/patches/opt-47_sourcecaps.dpatch:626ed6d141802b9cae8c4b6cab97311e
debian/patches/opt-37-x_menuorg.dpatch:9fb02cc8bd848add50b3866b6f476644
@@ -29,6 +32,7 @@
debian/patches/opt-27_ttxtsubs.dpatch:c0b18cf05be89d87b0dff02ddeb14f05
debian/patches/opt-29_syncearly-audioindexer.dpatch:4093d09329d441bd25703a4892633efb
debian/patches/opt-39_noepg.dpatch:424391fa1176800ec3a13ec608fafcd7
+debian/patches/opt-54_deltimeshiftrec.dpatch:5ed1505172adbdb45a583a69dfe19763
debian/patches/opt-49-x_pvrinput.dpatch:213c07a003000b6b93f1a8d004787220
debian/patches/04_newplugin.dpatch:e99f8d21734a19b3eb93d9e3f11b680a
debian/patches/opt-38_disableDoubleEpgEntrys.dpatch:7899100c3c242d7bcd35f1d3cee9ef9d
Modified: vdr/vdr/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/changelog?rev=7365&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/changelog (original)
+++ vdr/vdr/trunk/debian/changelog Fri Aug 1 22:03:18 2008
@@ -5,8 +5,11 @@
[ Tobias Grimm ]
* Added 18_signalhandler-fix.dpatch
-
- -- Tobias Grimm <tg at e-tobi.net> Thu, 24 Jul 2008 00:46:15 +0200
+ * Added opt-21_internal-cam-devices.dpatch
+ * Added opt-53_dvbsetup.dpatch
+ * Added opt-54_deltimeshiftrec.dpatch
+
+ -- Tobias Grimm <tg at e-tobi.net> Fri, 01 Aug 2008 23:59:53 +0200
vdr (1.6.0-5) unstable; urgency=low
Modified: vdr/vdr/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/patches/00list?rev=7365&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/patches/00list (original)
+++ vdr/vdr/trunk/debian/patches/00list Fri Aug 1 22:03:18 2008
@@ -18,6 +18,10 @@
# 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
# The Jump patch allows automatic jumping over cutting marks.
# opt-24_jumpplay
@@ -87,3 +91,9 @@
# Records into smaller files and uses hardlinks to speed up cutting
# opt-52_hard_link_cutter
+
+# Setup for AC3 transfer, QAM_256, disable primary tuner
+# opt-53_dvbsetup
+
+# Offers the choice to delete timeshift recordings
+# opt-54_deltimeshiftrec
Modified: vdr/vdr/trunk/debian/patches/00list.multipatch
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/patches/00list.multipatch?rev=7365&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/patches/00list.multipatch (original)
+++ vdr/vdr/trunk/debian/patches/00list.multipatch Fri Aug 1 22:03:18 2008
@@ -18,6 +18,10 @@
# 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
# The Jump patch allows automatic jumping over cutting marks.
opt-24_jumpplay
@@ -87,3 +91,9 @@
# Records into smaller files and uses hardlinks to speed up cutting
opt-52_hard_link_cutter
+
+# Setup for AC3 transfer, QAM_256, disable primary tuner
+opt-53_dvbsetup
+
+# Offers the choice to delete timeshift recordings
+opt-54_deltimeshiftrec
Added: vdr/vdr/trunk/debian/patches/opt-21_internal-cam-devices.dpatch
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/patches/opt-21_internal-cam-devices.dpatch?rev=7365&op=file
==============================================================================
--- vdr/vdr/trunk/debian/patches/opt-21_internal-cam-devices.dpatch (added)
+++ vdr/vdr/trunk/debian/patches/opt-21_internal-cam-devices.dpatch Fri Aug 1 22:03:18 2008
@@ -1,0 +1,86 @@
+#! /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 vdr-1.6.0~/device.c vdr-1.6.0/device.c
+--- vdr-1.6.0~/device.c 2008-03-09 11:03:34.000000000 +0100
++++ vdr-1.6.0/device.c 2008-07-24 16:34:52.000000000 +0200
+@@ -363,6 +363,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
+@@ -376,7 +377,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;
+@@ -392,11 +393,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
+@@ -410,18 +413,18 @@
+ imp <<= 1; imp |= device[i]->Receiving(); // avoid devices that are receiving
+ 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 |= device[i]->IsPrimaryDevice(); // avoid the primary device
+- 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]->HasDecoder(); // avoid 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
+ 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 vdr-1.6.0~/device.h vdr-1.6.0/device.h
+--- vdr-1.6.0~/device.h 2008-02-23 14:13:04.000000000 +0100
++++ vdr-1.6.0/device.h 2008-07-24 16:36:12.000000000 +0200
+@@ -335,6 +335,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; }
Added: vdr/vdr/trunk/debian/patches/opt-53_dvbsetup.dpatch
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/patches/opt-53_dvbsetup.dpatch?rev=7365&op=file
==============================================================================
--- vdr/vdr/trunk/debian/patches/opt-53_dvbsetup.dpatch (added)
+++ vdr/vdr/trunk/debian/patches/opt-53_dvbsetup.dpatch Fri Aug 1 22:03:18 2008
@@ -1,0 +1,150 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## opt-53_dvbsetup.dpatch by Tobias Grimm <tg at e-tobi.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Setup for AC3 transfer, QAM_256, disable primary tuner
+## DP: Taken from the Zulu extensions patch
+## DP: See http://www.zulu-entertainment.de/download.php?group=VDR
+
+ at DPATCH@
+diff -urNad vdr-1.6.0~/config.c vdr-1.6.0/config.c
+--- vdr-1.6.0~/config.c 2008-07-25 23:53:03.000000000 +0200
++++ vdr-1.6.0/config.c 2008-07-25 23:53:52.000000000 +0200
+@@ -253,6 +253,9 @@
+ strcpy(OSDLanguage, ""); // default is taken from environment
+ strcpy(OSDSkin, "sttng");
+ strcpy(OSDTheme, "default");
++ DolbyTransferFix = 1;
++ NoQamOnDecoder = 0;
++ TurnOffPrimary = 0;
+ PrimaryDVB = 1;
+ ShowInfoOnChSwitch = 1;
+ TimeoutRequChInfo = 1;
+@@ -497,6 +500,9 @@
+ if (!strcasecmp(Name, "OSDLanguage")) { strn0cpy(OSDLanguage, Value, sizeof(OSDLanguage)); I18nSetLocale(OSDLanguage); }
+ else if (!strcasecmp(Name, "OSDSkin")) Utf8Strn0Cpy(OSDSkin, Value, MaxSkinName);
+ else if (!strcasecmp(Name, "OSDTheme")) Utf8Strn0Cpy(OSDTheme, Value, MaxThemeName);
++ else if (!strcasecmp(Name, "DolbyTransferFix")) DolbyTransferFix = atoi(Value);
++ else if (!strcasecmp(Name, "NoQamOnDecoder")) NoQamOnDecoder = atoi(Value);
++ else if (!strcasecmp(Name, "TurnOffPrimary")) TurnOffPrimary = atoi(Value);
+ else if (!strcasecmp(Name, "PrimaryDVB")) PrimaryDVB = atoi(Value);
+ else if (!strcasecmp(Name, "ShowInfoOnChSwitch")) ShowInfoOnChSwitch = atoi(Value);
+ else if (!strcasecmp(Name, "TimeoutRequChInfo")) TimeoutRequChInfo = atoi(Value);
+@@ -601,6 +607,9 @@
+
+ bool cSetup::Save(void)
+ {
++ Store("DolbyTransferFix", DolbyTransferFix);
++ Store("NoQamOnDecoder", NoQamOnDecoder);
++ Store("TurnOffPrimary", TurnOffPrimary);
+ Store("OSDLanguage", OSDLanguage);
+ Store("OSDSkin", OSDSkin);
+ Store("OSDTheme", OSDTheme);
+diff -urNad vdr-1.6.0~/config.h vdr-1.6.0/config.h
+--- vdr-1.6.0~/config.h 2008-07-25 23:53:03.000000000 +0200
++++ vdr-1.6.0/config.h 2008-07-25 23:53:03.000000000 +0200
+@@ -228,6 +228,9 @@
+ public:
+ // Also adjust cMenuSetup (menu.c) when adding parameters here!
+ int __BeginData__;
++ int DolbyTransferFix;
++ int NoQamOnDecoder;
++ int TurnOffPrimary;
+ char OSDLanguage[I18N_MAX_LOCALE_LEN];
+ char OSDSkin[MaxSkinName];
+ char OSDTheme[MaxThemeName];
+diff -urNad vdr-1.6.0~/dvbdevice.c vdr-1.6.0/dvbdevice.c
+--- vdr-1.6.0~/dvbdevice.c 2008-07-25 23:53:03.000000000 +0200
++++ vdr-1.6.0/dvbdevice.c 2008-07-25 23:53:03.000000000 +0200
+@@ -438,7 +438,10 @@
+ if (fd_frontend >= 0) {
+ dvb_frontend_info feinfo;
+ if (ioctl(fd_frontend, FE_GET_INFO, &feinfo) >= 0) {
+- frontendType = feinfo.type;
++ if (Setup.TurnOffPrimary)
++ frontendType = n == Setup.PrimaryDVB - 1 ? frontendType : feinfo.type;
++ else
++ frontendType = feinfo.type;
+ dvbTuner = new cDvbTuner(fd_frontend, CardIndex(), frontendType);
+ }
+ else
+@@ -657,6 +660,11 @@
+
+ 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;
+@@ -776,11 +784,21 @@
+
+ bool cDvbDevice::ProvidesTransponder(const cChannel *Channel) const
+ {
++ if (Setup.NoQamOnDecoder) {
++ if (HasDecoder() && (cSource::IsCable(Channel->Source())) && (fe_modulation_t(Channel->Modulation()) == QAM_256))
++ return false;
++ }
++
+ return ProvidesSource(Channel->Source()) && (!cSource::IsSat(Channel->Source()) || !Setup.DiSEqC || Diseqcs.Get(Channel->Source(), Channel->Frequency(), Channel->Polarization()));
+ }
+
+ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const
+ {
++ if (Setup.NoQamOnDecoder) {
++ if (HasDecoder() && (cSource::IsCable(Channel->Source())) && (fe_modulation_t(Channel->Modulation()) == QAM_256))
++ return false;
++ }
++
+ bool result = false;
+ bool hasPriority = Priority < 0 || Priority > this->Priority();
+ bool needsDetachReceivers = false;
+diff -urNad vdr-1.6.0~/menu.c vdr-1.6.0/menu.c
+--- vdr-1.6.0~/menu.c 2008-07-25 23:53:03.000000000 +0200
++++ vdr-1.6.0/menu.c 2008-07-25 23:53:03.000000000 +0200
+@@ -3033,6 +3033,10 @@
+ Add(new cMenuEditIntItem( tr("Setup.LNB$High LNB frequency (MHz)"), &data.LnbFrequHi));
+ }
+
++ Add(new cMenuEditBoolItem(tr("Setup.DVB$Use AC3-Transfer Fix"), &data.DolbyTransferFix));
++ Add(new cMenuEditBoolItem(tr("Setup.DVB$No Qam256 on Cards with Decoder"), &data.NoQamOnDecoder));
++ Add(new cMenuEditBoolItem(tr("Setup.DVB$Turn off Primary Tuner"), &data.TurnOffPrimary));
++
+ SetCurrent(Get(current));
+ Display();
+ }
+diff -urNad vdr-1.6.0~/remux.c vdr-1.6.0/remux.c
+--- vdr-1.6.0~/remux.c 2008-07-25 23:53:03.000000000 +0200
++++ vdr-1.6.0/remux.c 2008-07-25 23:53:03.000000000 +0200
+@@ -1879,8 +1879,10 @@
+ if (Buf[1] & TS_ERROR)
+ tsErrors++;
+
+- if (!(Buf[3] & (ADAPT_FIELD | PAY_LOAD)))
++ if (!(Buf[3] & (ADAPT_FIELD | PAY_LOAD))) {
++ dsyslog("TS packet discarded due to invalid adaption_field_control");
+ return; // discard TS packet with adaption_field_control set to '00'.
++ }
+
+ if ((Buf[3] & PAY_LOAD) && ((Buf[3] ^ ccCounter) & CONT_CNT_MASK)) {
+ // This should check duplicates and packets which do not increase the counter.
+@@ -1892,6 +1894,7 @@
+ // These are the errors I used to get with Nova-T when antenna
+ // was not positioned correcly (not transport errors). //tvr
+ //dsyslog("TS continuity error (%d)", ccCounter);
++ dsyslog("TS continuity error (%d)", ccCounter);
+ }
+ ccCounter = Buf[3] & CONT_CNT_MASK;
+ }
+@@ -1917,6 +1920,8 @@
+
+ if (Buf[3] & PAY_LOAD)
+ instant_repack(Buf + 4 + off, TS_SIZE - 4 - off);
++ else if (off + 4 < 188)
++ dsyslog("adaption_field zu short or PAY_LOAD not set");
+ }
+
+ // --- cRingBufferLinearPes --------------------------------------------------
Added: vdr/vdr/trunk/debian/patches/opt-54_deltimeshiftrec.dpatch
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/patches/opt-54_deltimeshiftrec.dpatch?rev=7365&op=file
==============================================================================
--- vdr/vdr/trunk/debian/patches/opt-54_deltimeshiftrec.dpatch (added)
+++ vdr/vdr/trunk/debian/patches/opt-54_deltimeshiftrec.dpatch Fri Aug 1 22:03:18 2008
@@ -1,0 +1,169 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## opt-54_deltimeshiftrec.dpatch by Tobias Grimm <tg at e-tobi.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Offers the choice to delete timeshift recordings
+## DP: Taken from the Zulu extensions patch
+## DP: See http://www.zulu-entertainment.de/download.php?group=VDR
+
+ at DPATCH@
+diff -urNad vdr-1.6.0~/config.c vdr-1.6.0/config.c
+--- vdr-1.6.0~/config.c 2008-07-25 23:55:15.000000000 +0200
++++ vdr-1.6.0/config.c 2008-07-25 23:57:18.000000000 +0200
+@@ -276,6 +276,7 @@
+ TimeTransponder = 0;
+ MarginStart = 2;
+ MarginStop = 10;
++ DelTimeshiftRec = 0;
+ AudioLanguages[0] = -1;
+ DisplaySubtitles = 0;
+ SubtitleLanguages[0] = -1;
+@@ -522,6 +523,7 @@
+ else if (!strcasecmp(Name, "TimeTransponder")) TimeTransponder = atoi(Value);
+ else if (!strcasecmp(Name, "MarginStart")) MarginStart = atoi(Value);
+ else if (!strcasecmp(Name, "MarginStop")) MarginStop = atoi(Value);
++ else if (!strcasecmp(Name, "DelTimeshiftRec")) DelTimeshiftRec = atoi(Value);
+ else if (!strcasecmp(Name, "AudioLanguages")) return ParseLanguages(Value, AudioLanguages);
+ else if (!strcasecmp(Name, "DisplaySubtitles")) DisplaySubtitles = atoi(Value);
+ else if (!strcasecmp(Name, "SubtitleLanguages")) return ParseLanguages(Value, SubtitleLanguages);
+@@ -632,6 +634,7 @@
+ Store("TimeTransponder", TimeTransponder);
+ Store("MarginStart", MarginStart);
+ Store("MarginStop", MarginStop);
++ Store("DelTimeshiftRec", DelTimeshiftRec);
+ StoreLanguages("AudioLanguages", AudioLanguages);
+ Store("DisplaySubtitles", DisplaySubtitles);
+ StoreLanguages("SubtitleLanguages", SubtitleLanguages);
+diff -urNad vdr-1.6.0~/config.h vdr-1.6.0/config.h
+--- vdr-1.6.0~/config.h 2008-07-25 23:55:15.000000000 +0200
++++ vdr-1.6.0/config.h 2008-07-25 23:57:56.000000000 +0200
+@@ -253,6 +253,7 @@
+ int TimeSource;
+ int TimeTransponder;
+ int MarginStart, MarginStop;
++ int DelTimeshiftRec;
+ int AudioLanguages[I18N_MAX_LANGUAGES + 1];
+ int DisplaySubtitles;
+ int SubtitleLanguages[I18N_MAX_LANGUAGES + 1];
+diff -urNad vdr-1.6.0~/menu.c vdr-1.6.0/menu.c
+--- vdr-1.6.0~/menu.c 2008-07-25 23:55:15.000000000 +0200
++++ vdr-1.6.0/menu.c 2008-07-25 23:58:27.000000000 +0200
+@@ -3170,12 +3170,17 @@
+ // --- cMenuSetupRecord ------------------------------------------------------
+
+ class cMenuSetupRecord : public cMenuSetupBase {
++private:
++ const char *DelTimeshiftRecValues[3];
+ public:
+ cMenuSetupRecord(void);
+ };
+
+ cMenuSetupRecord::cMenuSetupRecord(void)
+ {
++ DelTimeshiftRecValues[0] = tr("request");
++ DelTimeshiftRecValues[1] = tr("no");
++ DelTimeshiftRecValues[2] = tr("yes");
+ SetSection(tr("Recording"));
+ Add(new cMenuEditIntItem( tr("Setup.Recording$Margin at start (min)"), &data.MarginStart));
+ Add(new cMenuEditIntItem( tr("Setup.Recording$Margin at stop (min)"), &data.MarginStop));
+@@ -3198,6 +3203,7 @@
+ Add(new cMenuEditBoolItem(tr("Setup.Recording$Show time"), &data.ShowRecTime));
+ Add(new cMenuEditBoolItem(tr("Setup.Recording$Show length"), &data.ShowRecLength));
+ Add(new cMenuEditBoolItem(tr("Setup.CutTimePatch$Adapt start time to cutting marks"), &data.CutTimePatchEnabled));
++ Add(new cMenuEditStraItem(tr("Setup.Recording$Delete timeshift recording"), &data.DelTimeshiftRec, 3, DelTimeshiftRecValues));
+ }
+
+ // --- cMenuSetupReplay ------------------------------------------------------
+@@ -4666,6 +4672,56 @@
+ currentReplayControl = NULL;
+ }
+
++void cReplayControl::Stop(void)
++{
++ int dummy;
++ bool playing = GetIndex(dummy, dummy, false);
++ cRecordControl* rc = cRecordControls::GetRecordControl(fileName);
++
++ if (playing && rc && rc->InstantId()) {
++ isyslog("found Timeshiftrecording");
++
++ if ((Setup.DelTimeshiftRec != 0 ) || (Interface->Confirm(tr("Delete recording?")))) {
++ cRecordControl *rc = cRecordControls::GetRecordControl(fileName);
++ if (rc) {
++ cTimer *timer = rc->Timer();
++ if (timer) {
++ const char* reccmd_backup = cRecordingUserCommand::GetCommand();
++ cRecordingUserCommand::SetCommand(NULL);
++
++ timer->Skip();
++ cRecordControls::Process(time(NULL));
++ if (timer->IsSingleEvent()) {
++ isyslog("deleting timer %s", *timer->ToDescr());
++ Timers.Del(timer);
++ }
++ Timers.SetModified();
++
++ // restore reccmd
++ cRecordingUserCommand::SetCommand(reccmd_backup);
++ }
++ }
++ isyslog("stop replaying %s", fileName);
++ cDvbPlayerControl::Stop();
++
++ if (Setup.DelTimeshiftRec != 1) {
++ cRecording *recording = Recordings.GetByName(fileName);;
++ if (recording) {
++ if (recording->Delete()) {
++ Recordings.DelByName(fileName);
++ ClearLastReplayed(fileName);
++ return;
++ }
++ else
++ Skins.Message(mtError, tr("Error while deleting recording!"));
++ }
++ }
++ }
++ else
++ cDvbPlayerControl::Stop();
++ }
++}
++
+ void cReplayControl::SetRecording(const char *FileName, const char *Title)
+ {
+ free(fileName);
+@@ -5080,7 +5136,12 @@
+ else
+ Show();
+ break;
+- case kBack: return osRecordings;
++ case kBack: { cRecordControl* rc = cRecordControls::GetRecordControl(fileName);
++ if (rc && rc->InstantId())
++ return osEnd;
++ else
++ return osRecordings;
++ }
+ default: return osUnknown;
+ }
+ }
+diff -urNad vdr-1.6.0~/menu.h vdr-1.6.0/menu.h
+--- vdr-1.6.0~/menu.h 2008-07-25 23:55:15.000000000 +0200
++++ vdr-1.6.0/menu.h 2008-07-25 23:55:15.000000000 +0200
+@@ -248,6 +248,7 @@
+ public:
+ cReplayControl(void);
+ virtual ~cReplayControl();
++ void Stop(void);
+ virtual cOsdObject *GetInfo(void);
+ virtual eOSState ProcessKey(eKeys Key);
+ virtual void Show(void);
+diff -urNad vdr-1.6.0~/recording.h vdr-1.6.0/recording.h
+--- vdr-1.6.0~/recording.h 2008-07-25 23:55:15.000000000 +0200
++++ vdr-1.6.0/recording.h 2008-07-25 23:55:15.000000000 +0200
+@@ -196,6 +196,7 @@
+ private:
+ static const char *command;
+ public:
++ static const char *GetCommand(void) { return command; }
+ static void SetCommand(const char *Command) { command = Command; }
+ static void InvokeCommand(const char *State, const char *RecordingFileName);
+ };
Modified: vdr/vdr/trunk/debian/patches/patchtest
URL: http://svn.debian.org/wsvn/pkg-vdr-dvb/vdr/vdr/trunk/debian/patches/patchtest?rev=7365&op=diff
==============================================================================
--- vdr/vdr/trunk/debian/patches/patchtest (original)
+++ vdr/vdr/trunk/debian/patches/patchtest Fri Aug 1 22:03:18 2008
@@ -15,6 +15,7 @@
16_channels.conf.terr-fix \
17_vdr-maintenance-1.6.0-1 \
18_signalhandler-fix \
+ 81_Make_config \
82_valgrind \
99_ncursesw-include"
multipatch="$standard \
@@ -39,7 +40,9 @@
opt-49-x_pvrinput \
opt-50_graphtft \
opt-51_cuttime \
- opt-52_hard_link_cutter"
+ opt-52_hard_link_cutter \
+ opt-53_dvbsetup \
+ opt-54_deltimeshiftrec"
testpatch="$standard \
opt-20_liemikuutio \
opt-24_jumpplay \
More information about the pkg-vdr-dvb-changes
mailing list