From 1439b016b3e85d3d1ffdbd243bc7902c39e6c851 Mon Sep 17 00:00:00 2001 From: Frank Schmirler Date: Sun, 17 Nov 2013 10:52:12 +0100 Subject: The patches intcamdevices and ignore_missing_cam are no longer required on VDR >= 1.7.30. The localchannelprovide patch became obsolete with VDR 1.7.21. --- patches/vdr-1.4.x-localchannelprovide.diff | 102 ----------------------- patches/vdr-1.6.0-1.7.29-ignore_missing_cam.diff | 13 +++ patches/vdr-1.6.0-1.7.29-intcamdevices.patch | 78 +++++++++++++++++ patches/vdr-1.6.0-ignore_missing_cam.diff | 13 --- patches/vdr-1.6.0-intcamdevices.patch | 78 ----------------- 5 files changed, 91 insertions(+), 193 deletions(-) delete mode 100644 patches/vdr-1.4.x-localchannelprovide.diff create mode 100644 patches/vdr-1.6.0-1.7.29-ignore_missing_cam.diff create mode 100644 patches/vdr-1.6.0-1.7.29-intcamdevices.patch delete mode 100644 patches/vdr-1.6.0-ignore_missing_cam.diff delete mode 100644 patches/vdr-1.6.0-intcamdevices.patch (limited to 'patches') diff --git a/patches/vdr-1.4.x-localchannelprovide.diff b/patches/vdr-1.4.x-localchannelprovide.diff deleted file mode 100644 index 857c1a2..0000000 --- a/patches/vdr-1.4.x-localchannelprovide.diff +++ /dev/null @@ -1,102 +0,0 @@ -# Apply this patch to VDR if you want to use a fullfeatured DVB card -# as pure output device. Infact the patch will keep VDR from using the -# tuner of any local DVB card (also budget cards). It will not affect -# other input devices like e.g. streamdev-client or DVB cards provided -# by plugins (e.g. Hauppauge PVR). -# -# By default the patch is DISABLED. There will be a new OSD menu entry -# in Setup->DVB which allows you to enable or disable the patch at any -# time. -diff -ru vdr-1.4.3.orig/config.c vdr-1.4.3/config.c ---- vdr-1.4.3.orig/config.c 2006-07-22 13:57:51.000000000 +0200 -+++ vdr-1.4.3/config.c 2006-11-16 08:16:37.000000000 +0100 -@@ -273,6 +273,7 @@ - CurrentChannel = -1; - CurrentVolume = MAXVOLUME; - CurrentDolby = 0; -+ LocalChannelProvide = 1; - InitialChannel = 0; - InitialVolume = -1; - } -@@ -434,6 +435,7 @@ - else if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value); - else if (!strcasecmp(Name, "CurrentVolume")) CurrentVolume = atoi(Value); - else if (!strcasecmp(Name, "CurrentDolby")) CurrentDolby = atoi(Value); -+ else if (!strcasecmp(Name, "LocalChannelProvide")) LocalChannelProvide = atoi(Value); - else if (!strcasecmp(Name, "InitialChannel")) InitialChannel = atoi(Value); - else if (!strcasecmp(Name, "InitialVolume")) InitialVolume = atoi(Value); - else -@@ -502,6 +504,7 @@ - Store("CurrentChannel", CurrentChannel); - Store("CurrentVolume", CurrentVolume); - Store("CurrentDolby", CurrentDolby); -+ Store("LocalChannelProvide",LocalChannelProvide); - Store("InitialChannel", InitialChannel); - Store("InitialVolume", InitialVolume); - -diff -ru vdr-1.4.3.orig/config.h vdr-1.4.3/config.h ---- vdr-1.4.3.orig/config.h 2006-09-23 15:56:08.000000000 +0200 -+++ vdr-1.4.3/config.h 2006-11-16 08:16:57.000000000 +0100 -@@ -250,6 +250,7 @@ - int CurrentChannel; - int CurrentVolume; - int CurrentDolby; -+ int LocalChannelProvide; - int InitialChannel; - int InitialVolume; - int __EndData__; -diff -ru vdr-1.4.3.orig/dvbdevice.c vdr-1.4.3/dvbdevice.c ---- vdr-1.4.3.orig/dvbdevice.c 2006-08-14 11:38:32.000000000 +0200 -+++ vdr-1.4.3/dvbdevice.c 2006-11-16 08:17:58.000000000 +0100 -@@ -766,6 +766,8 @@ - - bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const - { -+ if (Setup.LocalChannelProvide != 1) -+ return false; - bool result = false; - bool hasPriority = Priority < 0 || Priority > this->Priority(); - bool needsDetachReceivers = false; -diff -ru vdr-1.4.3.orig/i18n.c vdr-1.4.3/i18n.c ---- vdr-1.4.3.orig/i18n.c 2006-09-16 11:08:30.000000000 +0200 -+++ vdr-1.4.3/i18n.c 2006-11-16 08:36:53.000000000 +0100 -@@ -3546,6 +3546,28 @@ - "Foretrukket sprog", - "Preferovaný jazyk", - }, -+ { "Setup.DVB$Use DVB receivers", -+ "DVB Empfangsteile benutzen", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+ "", -+ }, - { "Setup.DVB$Primary DVB interface", - "Primäres DVB-Interface", - "Primarna naprava", -diff -ru vdr-1.4.3.orig/menu.c vdr-1.4.3/menu.c ---- vdr-1.4.3.orig/menu.c 2006-07-23 11:23:11.000000000 +0200 -+++ vdr-1.4.3/menu.c 2006-11-16 08:37:27.000000000 +0100 -@@ -2354,6 +2354,7 @@ - - Clear(); - -+ Add(new cMenuEditBoolItem(tr("Setup.DVB$Use DVB receivers"), &data.LocalChannelProvide)); - Add(new cMenuEditIntItem( tr("Setup.DVB$Primary DVB interface"), &data.PrimaryDVB, 1, cDevice::NumDevices())); - Add(new cMenuEditBoolItem(tr("Setup.DVB$Video format"), &data.VideoFormat, "4:3", "16:9")); - if (data.VideoFormat == 0) diff --git a/patches/vdr-1.6.0-1.7.29-ignore_missing_cam.diff b/patches/vdr-1.6.0-1.7.29-ignore_missing_cam.diff new file mode 100644 index 0000000..60d93bd --- /dev/null +++ b/patches/vdr-1.6.0-1.7.29-ignore_missing_cam.diff @@ -0,0 +1,13 @@ +--- device.c.orig 2008-03-28 11:47:25.000000000 +0100 ++++ device.c 2008-03-28 11:47:09.000000000 +0100 +@@ -375,8 +375,8 @@ + } + } + } +- if (!NumUsableSlots) +- return NULL; // no CAM is able to decrypt this channel ++// if (!NumUsableSlots) ++// return NULL; // no CAM is able to decrypt this channel + } + + bool NeedsDetachReceivers = false; diff --git a/patches/vdr-1.6.0-1.7.29-intcamdevices.patch b/patches/vdr-1.6.0-1.7.29-intcamdevices.patch new file mode 100644 index 0000000..aab1fb4 --- /dev/null +++ b/patches/vdr-1.6.0-1.7.29-intcamdevices.patch @@ -0,0 +1,78 @@ +Index: vdr-1.6.0-nocamdevices/device.c +=================================================================== +--- vdr-1.6.0-nocamdevices/device.c ++++ vdr-1.6.0-nocamdevices/device.c 2008-04-27 18:55:37.000000000 +0300 +@@ -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); + } + } +Index: vdr-1.6.0-nocamdevices/device.h +=================================================================== +--- vdr-1.6.0-nocamdevices/device.h ++++ vdr-1.6.0-nocamdevices/device.h 2008-04-27 18:55:49.000000000 +0300 +@@ -335,6 +335,12 @@ + public: + virtual bool HasCi(void); + ///< Returns true if this device has a Common Interface. ++ 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/patches/vdr-1.6.0-ignore_missing_cam.diff b/patches/vdr-1.6.0-ignore_missing_cam.diff deleted file mode 100644 index 60d93bd..0000000 --- a/patches/vdr-1.6.0-ignore_missing_cam.diff +++ /dev/null @@ -1,13 +0,0 @@ ---- device.c.orig 2008-03-28 11:47:25.000000000 +0100 -+++ device.c 2008-03-28 11:47:09.000000000 +0100 -@@ -375,8 +375,8 @@ - } - } - } -- if (!NumUsableSlots) -- return NULL; // no CAM is able to decrypt this channel -+// if (!NumUsableSlots) -+// return NULL; // no CAM is able to decrypt this channel - } - - bool NeedsDetachReceivers = false; diff --git a/patches/vdr-1.6.0-intcamdevices.patch b/patches/vdr-1.6.0-intcamdevices.patch deleted file mode 100644 index aab1fb4..0000000 --- a/patches/vdr-1.6.0-intcamdevices.patch +++ /dev/null @@ -1,78 +0,0 @@ -Index: vdr-1.6.0-nocamdevices/device.c -=================================================================== ---- vdr-1.6.0-nocamdevices/device.c -+++ vdr-1.6.0-nocamdevices/device.c 2008-04-27 18:55:37.000000000 +0300 -@@ -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); - } - } -Index: vdr-1.6.0-nocamdevices/device.h -=================================================================== ---- vdr-1.6.0-nocamdevices/device.h -+++ vdr-1.6.0-nocamdevices/device.h 2008-04-27 18:55:49.000000000 +0300 -@@ -335,6 +335,12 @@ - public: - virtual bool HasCi(void); - ///< Returns true if this device has a Common Interface. -+ 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; } - -- cgit v1.2.3