summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2011-05-21 13:40:47 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2011-05-21 13:40:47 +0200
commit8cb8e6333a4663c90ab55015bbf7ad1ebe04def9 (patch)
tree554dbb05ffb5dbe8e32657bdf2002ea945e752fc
parent299335153644eb24276724cd2e9f4234ee77cdca (diff)
downloadvdr-8cb8e6333a4663c90ab55015bbf7ad1ebe04def9.tar.gz
vdr-8cb8e6333a4663c90ab55015bbf7ad1ebe04def9.tar.bz2
The primary device is now only avoided for recording if it is an old SD full featured card
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY2
-rw-r--r--PLUGINS/src/dvbsddevice/dvbsdffdevice.c7
-rw-r--r--PLUGINS/src/dvbsddevice/dvbsdffdevice.h3
-rw-r--r--device.c6
-rw-r--r--device.h5
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é <philippe@gramoulle.com>
André Weidemann <Andre.Weidemann@web.de>
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 <juergen_schilling@web.de>
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