summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2006-08-12 11:33:34 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2006-08-12 11:33:34 +0200
commit713093670f5d6c60886f61a1aa6137852339db72 (patch)
tree7bcade62a5efb328313f5e23fee9857899b7e400
parent7390eaf7652125fa438b74ffd8d42e0c7bf345c8 (diff)
downloadvdr-713093670f5d6c60886f61a1aa6137852339db72.tar.gz
vdr-713093670f5d6c60886f61a1aa6137852339db72.tar.bz2
Changed the way a device is selected for receiving in order to keep devices with CAMs better available
-rw-r--r--CONTRIBUTORS5
-rw-r--r--HISTORY4
-rw-r--r--device.c8
3 files changed, 13 insertions, 4 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 90699891..ca56c83a 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1955,6 +1955,7 @@ Anssi Hannula <anssi.hannula@gmail.com>
for a patch that was used to implement processing the "frequency list descriptor"
for suggesting that cDevice::GetDevice() should prefer any device that's already
receiving and doesn't require detatching receivers
+ for improving handling Transfer Mode devices when selecting a device to receive
Antti Hartikainen <ami+vdr@ah.fi>
for updating 'S13E' in 'sources.conf'
@@ -1972,3 +1973,7 @@ Norbert Wentz <norbert.wentz@online.de>
Frank Schmirler <vdr@schmirler.de>
for fixing handling client side termination of SVDRP connections
for fixing assigning schedules to channels in case there is no initial EPG information
+
+Jörn Reder <joern@zyn.de>
+ for reporting that a recording may unnecessarily block a device with a CAM, while
+ it could record on the primary device as well
diff --git a/HISTORY b/HISTORY
index d74f9dae..3e15e236 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4866,3 +4866,7 @@ Video Disk Recorder Revision History
- Made the cCiSession members sessionId and resourceId uint16_t and uint32_t,
respectively, to match their types in the CI session data (thanks to Ville Skyttä
for reporting that there are places where ntohs() is assigned to different types).
+- Changed the way a device is selected for receiving in order to keep devices with
+ CAMs better available, even if this means recording on the primary device (reported
+ by Jörn Reder; thanks to Anssi Hannula for improving handling Transfer Mode devices
+ in this).
diff --git a/device.c b/device.c
index 882279cb..a1a1d698 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 1.134 2006/07/29 10:03:56 kls Exp $
+ * $Id: device.c 1.135 2006/08/12 11:33:34 kls Exp $
*/
#include "device.h"
@@ -294,11 +294,11 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDe
uint imp = 0;
imp <<= 1; imp |= !device[i]->Receiving(true) || ndr; // use receiving devices if we don't need to detach existing receivers
imp <<= 1; imp |= device[i]->Receiving(); // avoid devices that are receiving
- imp <<= 1; imp |= device[i] == ActualDevice(); // avoid the actual device (in case of Transfer Mode)
- imp <<= 1; imp |= device[i]->IsPrimaryDevice(); // avoid the primary device
- imp <<= 1; imp |= device[i]->HasDecoder(); // avoid full featured cards
+ 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(device[i]->ProvidesCa(Channel), 0), 0xFF); // use the device that provides the lowest number of conditional access methods
+ imp <<= 1; imp |= device[i]->IsPrimaryDevice(); // avoid the primary device
+ imp <<= 1; imp |= device[i]->HasDecoder(); // avoid full featured cards
if (imp < Impact) {
// This device has less impact than any previous one, so we take it.
Impact = imp;