From 475e7bbd6ad0dba119c87dc8b08ebc1580a8cf84 Mon Sep 17 00:00:00 2001 From: Frank Schmirler Date: Sat, 10 Sep 2011 00:04:08 +0200 Subject: updated device selection to code of VDR 1.7.19 --- server/connection.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'server') diff --git a/server/connection.c b/server/connection.c index 3bf0ad5..a73470b 100644 --- a/server/connection.c +++ b/server/connection.c @@ -318,10 +318,19 @@ cDevice* cServerConnection::CheckDevice(const cChannel *Channel, int Priority, b imp <<= 8; imp |= min(max(device->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 +#if VDRVERSNUM < 10719 imp <<= 1; imp |= device->IsPrimaryDevice(); // avoid the primary device +#endif imp <<= 1; imp |= NumUsableSlots ? 0 : device->HasCi(); // avoid cards with Common Interface for FTA channels +#if VDRVERSNUM < 10719 imp <<= 1; imp |= device->HasDecoder(); // avoid full featured cards +#else + imp <<= 1; imp |= device->AvoidRecording(); // avoid SD full featured cards +#endif imp <<= 1; imp |= NumUsableSlots ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel +#if VDRVERSNUM >= 10719 + imp <<= 1; imp |= device->IsPrimaryDevice(); // avoid the primary device +#endif if (imp < Impact) { // This device has less impact than any previous one, so we take it. Impact = imp; -- cgit v1.2.3