Hello!
A new release of the configurable LNB-sharing patch for VDR 1.4 is available at: http://xn--ltzke-jua.de/dvb/VDR_LNB_sharing_patch/configurableLNBshare-VDR_1...
Changes: - revamped the check whether the source is an DVB-S card or not for mixed source DVB systems - hide non DVB-S cards in the configuration menu - complete rewrite of the LNB-sharing code in cDevice::GetDevice() to fit that somewhat cryptic new code in the VDR source - adapted to VDR 1.4.0-3
For general information about the LNB-sharing patch have a look at: http://xn--ltzke-jua.de/dvb/VDR_LNB_sharing_patch/Description.txt http://www.vdr-wiki.de/wiki/index.php/Lnbsharing-patch (german)
Matthias.
Klaus.Schmidinger@cadsoft.de says...
- complete rewrite of the LNB-sharing code in cDevice::GetDevice() to fit that somewhat cryptic new code in the VDR source
What's "cryptic" about it?
Bit shifting and bit manipulating code like
[...] imp <<= 8; imp |= min(max(device[i]->Priority() + MAXPRIORITY, 0), 0xFF); imp <<= 8; imp |= min(max(device[i]->ProvidesCa(Channel), 0), 0xFF); [...]
is hard to read and makes it difficult to understand the whole algorithm without documentation. Personally I prefer to use bit manipulating operations only where it is unavoidable.
Matthias.
Matthias Lötzke wrote:
Klaus.Schmidinger@cadsoft.de says...
- complete rewrite of the LNB-sharing code in cDevice::GetDevice() to fit that somewhat cryptic new code in the VDR source
What's "cryptic" about it?
Bit shifting and bit manipulating code like
[...] imp <<= 8; imp |= min(max(device[i]->Priority() + MAXPRIORITY, 0), 0xFF); imp <<= 8; imp |= min(max(device[i]->ProvidesCa(Channel), 0), 0xFF); [...]
is hard to read and makes it difficult to understand the whole algorithm without documentation. Personally I prefer to use bit manipulating operations only where it is unavoidable.
Well, I thought that this new GetDevice() function was pretty short and self-explaining. And, most of all, it actually works as expected ;-)
Would you like to suggest a version that doesn't use bit manipulation, is as short as the current one, and also works correctly?
Klaus