diff options
author | Frank Schmirler <vdr@schmirler.de> | 2011-09-10 00:04:08 +0200 |
---|---|---|
committer | Frank Schmirler <vdr@schmirler.de> | 2011-09-10 00:04:08 +0200 |
commit | 475e7bbd6ad0dba119c87dc8b08ebc1580a8cf84 (patch) | |
tree | f21cfbb9cdb84d6448562a9e6ee91caf1db40ca0 /server | |
parent | 4c0888d483b935977ca62755b5c30135a39e91e8 (diff) | |
download | vdr-plugin-streamdev-475e7bbd6ad0dba119c87dc8b08ebc1580a8cf84.tar.gz vdr-plugin-streamdev-475e7bbd6ad0dba119c87dc8b08ebc1580a8cf84.tar.bz2 |
updated device selection to code of VDR 1.7.19
Diffstat (limited to 'server')
-rw-r--r-- | server/connection.c | 9 |
1 files changed, 9 insertions, 0 deletions
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; |