From 8cb8e6333a4663c90ab55015bbf7ad1ebe04def9 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 21 May 2011 13:40:47 +0200 Subject: The primary device is now only avoided for recording if it is an old SD full featured card --- CONTRIBUTORS | 2 ++ HISTORY | 2 ++ PLUGINS/src/dvbsddevice/dvbsdffdevice.c | 7 ++++++- PLUGINS/src/dvbsddevice/dvbsdffdevice.h | 3 ++- device.c | 6 +++--- device.h | 5 ++++- 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 44c3de3b..d51508a6 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2141,6 +2141,8 @@ Philippe Gramoull André Weidemann for suggesting to only write Dolby Digital tracks into the 'info.vdr' file of a recording if Setup.UseDolbyDigital is true + for suggesting that the primary device should only be avoided for recording if + it is an old SD full featured card Jürgen Schilling for reporting that color buttons were displayed in the recording info menu if it diff --git a/HISTORY b/HISTORY index e72cda8a..5d9796cf 100644 --- a/HISTORY +++ b/HISTORY @@ -6618,3 +6618,5 @@ Video Disk Recorder Revision History are not dependent on the sequence of the files. Plugin authors may want to change the line containing the xgettext call in their Makefile accordingly by changing "$^" to "`ls $^`". +- The primary device is now only avoided for recording if it is an old SD full + featured card. This is done through the new function cDevice::AvoidRecording(). diff --git a/PLUGINS/src/dvbsddevice/dvbsdffdevice.c b/PLUGINS/src/dvbsddevice/dvbsdffdevice.c index 1d812d70..cad7d311 100644 --- a/PLUGINS/src/dvbsddevice/dvbsdffdevice.c +++ b/PLUGINS/src/dvbsddevice/dvbsdffdevice.c @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: dvbsdffdevice.c 2.27 2010/09/12 11:29:00 kls Exp $ + * $Id: dvbsdffdevice.c 2.28 2011/05/21 13:24:35 kls Exp $ */ #include "dvbsdffdevice.h" @@ -90,6 +90,11 @@ bool cDvbSdFfDevice::HasDecoder(void) const return true; } +bool cDvbSdFfDevice::AvoidRecording(void) const +{ + return true; +} + cSpuDecoder *cDvbSdFfDevice::GetSpuDecoder(void) { if (!spuDecoder && IsPrimaryDevice()) diff --git a/PLUGINS/src/dvbsddevice/dvbsdffdevice.h b/PLUGINS/src/dvbsddevice/dvbsdffdevice.h index b382bf62..afe4727e 100644 --- a/PLUGINS/src/dvbsddevice/dvbsdffdevice.h +++ b/PLUGINS/src/dvbsddevice/dvbsdffdevice.h @@ -3,7 +3,7 @@ * * See the README file for copyright information and how to reach the author. * - * $Id: dvbsdffdevice.h 2.11 2010/01/04 11:01:14 kls Exp $ + * $Id: dvbsdffdevice.h 2.12 2011/05/21 12:56:49 kls Exp $ */ #ifndef __DVBSDFFDEVICE_H @@ -23,6 +23,7 @@ public: cDvbSdFfDevice(int Adapter, int Frontend); virtual ~cDvbSdFfDevice(); virtual bool HasDecoder(void) const; + virtual bool AvoidRecording(void) const; // SPU facilities diff --git a/device.c b/device.c index 60340c06..a9e30f41 100644 --- a/device.c +++ b/device.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 2.38 2011/02/25 15:12:03 kls Exp $ + * $Id: device.c 2.39 2011/05/21 13:17:46 kls Exp $ */ #include "device.h" @@ -286,9 +286,9 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView 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 <<= 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 |= device[i]->IsPrimaryDevice() && device[i]->AvoidRecording(); // avoid the primary device imp <<= 1; imp |= NumUsableSlots ? 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 |= 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 if (imp < Impact) { // This device has less impact than any previous one, so we take it. diff --git a/device.h b/device.h index a383dac6..14036c61 100644 --- a/device.h +++ b/device.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.h 2.24 2011/03/21 17:58:41 kls Exp $ + * $Id: device.h 2.25 2011/05/21 12:54:43 kls Exp $ */ #ifndef __DEVICE_H @@ -197,6 +197,9 @@ public: ///< Returns the number of this device (0 ... numDevices). virtual bool HasDecoder(void) const; ///< Tells whether this device has an MPEG decoder. + virtual bool AvoidRecording(void) const { return false; } + ///< Returns true if this device should only be used for recording + ///< if no other device is available. // Device hooks -- cgit v1.2.3