diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2011-05-22 09:42:57 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2011-05-22 09:42:57 +0200 |
commit | 7978112850497d4a4587c142923c248747aed383 (patch) | |
tree | 182e3e871de8f773b84041c613115773a523ef98 | |
parent | 7c1a04d7c3ec67db30bf9b8fbd0d8b23cedbd5cb (diff) | |
download | vdr-7978112850497d4a4587c142923c248747aed383.tar.gz vdr-7978112850497d4a4587c142923c248747aed383.tar.bz2 |
Better avoiding the primary device for recording
-rw-r--r-- | device.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 2.39 2011/05/21 13:17:46 kls Exp $ + * $Id: device.c 2.40 2011/05/22 09:42:57 kls Exp $ */ #include "device.h" @@ -286,10 +286,10 @@ 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() && 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]->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 + imp <<= 1; imp |= device[i]->IsPrimaryDevice(); // avoid the primary device if (imp < Impact) { // This device has less impact than any previous one, so we take it. Impact = imp; |