On 05/02/08 19:26, Simon Baxter wrote:
You could add some debug outputs to
cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView)
to find out why it thinks that channel 9 is not available.
Can someone help me out here? How do I do this?
Try the attached patch.
Klaus
--- device.c 2008/04/12 14:12:14 2.2
+++ device.c 2008/05/03 10:49:26
@@ -372,6 +372,7 @@
cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool LiveView)
{
+ printf("GetDevice %d %d %d %d\n", Channel->Number(), Priority, LiveView, avoidDevice ? avoidDevice->CardIndex() : -1);//XXX
cDevice *AvoidDevice = avoidDevice;
avoidDevice = NULL;
// Collect the current priorities of all CAM slots that can decrypt the channel:
@@ -391,7 +392,9 @@
}
}
if (!NumUsableSlots)
+ {printf("no usable CAM slots!\n");//XXX
return NULL; // no CAM is able to decrypt this channel
+ }//XXX
}
bool NeedsDetachReceivers = false;
@@ -432,6 +435,7 @@
imp <<= 1; imp |= NumUsableSlots ? 0 : device[i]->HasCi(); // avoid cards with Common Interface for FTA channels
imp <<= 1; imp |= device[i]->HasDecoder(); // avoid full featured cards
imp <<= 1; imp |= NumUsableSlots ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel
+ printf("j = %d, i = %d, imp = %08X, Impact = %08X\n", j, i, imp, Impact);//XXX
if (imp < Impact) {
// This device has less impact than any previous one, so we take it.
Impact = imp;
@@ -446,6 +450,7 @@
break; // no CAM necessary, so just one loop over the devices
}
if (d) {
+ printf("device %d\n", d->CardIndex());//XXX
if (NeedsDetachReceivers)
d->DetachAllReceivers();
if (s) {
@@ -460,6 +465,7 @@
else if (d->CamSlot() && !d->CamSlot()->IsDecrypting())
d->CamSlot()->Assign(NULL);
}
+ else printf("no device found\n");//XXX
return d;
}
_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr