[vdr] VDR prefers my CI DVB device for recordings and blocks
it unnecessarily
Anssi Hannula
anssi.hannula at gmail.com
Sun Aug 6 12:07:34 CEST 2006
Klaus Schmidinger wrote:
> Jörn Reder wrote:
>
>> ...
>> I'm having problems with VDR's decision of recording devices. The 1.4
>> change log states that budget cards are preferred, unfortunately my
>> budget card has the CI. So when a recording starts and no pay TV channel
>> is actually tuned, the CI device is blocked and I can't switch to a pay
>> TV channel anymore (whithout stopping the recording).
>>
>> Is it possible to tell VDR to prefer my FF card for recordings instead
>> of my CI budget device?
>
>
> Please try the attached patch.
> With this change "avoiding full featured or primary cards" gets
> less priority than "using the device with the lowest priority
> or the lowest number of CA methods".
>
> Klaus
>
>
> ------------------------------------------------------------------------
>
> --- device.c 2006/07/29 10:03:56 1.134
> +++ device.c 2006/08/06 09:37:21
> @@ -295,10 +295,10 @@
> 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)
Note that the above ActualDevice() returns primary device when transfer
mode is not active, so I guess if the user is for example watching a
recording, this will cause VDR to prefer budget card anyway.
Maybe replace it with cTransferControl::ReceiverDevice(), which returns
NULL when transfer mode is not active?
> - imp <<= 1; imp |= device[i]->IsPrimaryDevice(); // avoid the primary device
> - imp <<= 1; imp |= device[i]->HasDecoder(); // avoid full featured cards
> 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;
>
--
Anssi Hannula
More information about the vdr
mailing list