Klaus Schmidinger wrote:

> 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".

Thanks for your patch, I played around with it. The ActualDevice() test
has a very high priority, so if I start a recording on the fly, my CI 
device is still preferred. For testing purposes I commented out the 
ActualDevice() test, then your patch worked for me.

I don't understand the device[i]->ProvidesCa(Channel) test, because it 
checks for the currently requested channel. I dunno any internals (so 
please be patient with me ;), but from reading the source code it looks
that the first if condition in the device loop

  device[i]->ProvidesChannel(Channel, Priority, &ndr)

already checks if the device is basically capable of decoding the 
requested channel, this must include a test for decryption capability 
(if the channel is encrypted), not?. So why another ProvidesCA() test? 
All devices in this if block should pass it anyway.

What about adding a high priority test like hasCAM() (ideally with 
weighting the number of channels the device is able to decrypt) to avoid
blocking a CA device unnecessarily?



Think before you code. And while you're doing it probably won't hurt. ;)

Attachment: pgpxSLFyR2XzM.pgp
Description: PGP signature

vdr mailing list

Reply via email to