summaryrefslogtreecommitdiff
path: root/dvbdevice.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-04-18 12:48:49 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-04-18 12:48:49 +0200
commit78d85cee06c99ff4d31e8a2af929b198824b68d9 (patch)
treede67041cb2b97c2cb368eade34a7216575efdc81 /dvbdevice.c
parentb57eae00d387e24f0dc1882efeb7ecf070957cf7 (diff)
downloadvdr-78d85cee06c99ff4d31e8a2af929b198824b68d9.tar.gz
vdr-78d85cee06c99ff4d31e8a2af929b198824b68d9.tar.bz2
Now only those Ca descriptors are sent to a CAM that are actually understood by that CAM
Diffstat (limited to 'dvbdevice.c')
-rw-r--r--dvbdevice.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/dvbdevice.c b/dvbdevice.c
index 9bbac2d2..19a7c431 100644
--- a/dvbdevice.c
+++ b/dvbdevice.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: dvbdevice.c 1.51 2003/04/12 15:06:11 kls Exp $
+ * $Id: dvbdevice.c 1.52 2003/04/18 11:35:08 kls Exp $
*/
#include "dvbdevice.h"
@@ -264,27 +264,29 @@ void cDvbTuner::Action(void)
}
}
if (tunerStatus >= tsLocked) {
- if (ciHandler && channel.Ca()) {
+ if (ciHandler && channel.Ca() > CACONFBASE) {
if (ciHandler->Process()) {
if (tunerStatus != tsCam) {//XXX TODO update in case the CA descriptors have changed
- uchar buffer[2048];
- int length = cSIProcessor::GetCaDescriptors(channel.Source(), channel.Frequency(), channel.Sid(), sizeof(buffer), buffer);
- if (length > 0) {
- cCiCaPmt CaPmt(channel.Sid());
- CaPmt.AddCaDescriptor(length, buffer);
- if (channel.Vpid())
- CaPmt.AddPid(channel.Vpid());
- if (channel.Apid1())
- CaPmt.AddPid(channel.Apid1());
- if (channel.Apid2())
- CaPmt.AddPid(channel.Apid2());
- if (channel.Dpid1())
- CaPmt.AddPid(channel.Dpid1());
- if (ciHandler->SetCaPmt(CaPmt)) {
- tunerStatus = tsCam;
- startTime = 0;
- }
- }
+ for (int Slot = 0; Slot < ciHandler->NumSlots(); Slot++) {
+ uchar buffer[2048];
+ int length = cSIProcessor::GetCaDescriptors(channel.Source(), channel.Frequency(), channel.Sid(), ciHandler->GetCaSystemIds(Slot), sizeof(buffer), buffer);
+ if (length > 0) {
+ cCiCaPmt CaPmt(channel.Sid());
+ CaPmt.AddCaDescriptor(length, buffer);
+ if (channel.Vpid())
+ CaPmt.AddPid(channel.Vpid());
+ if (channel.Apid1())
+ CaPmt.AddPid(channel.Apid1());
+ if (channel.Apid2())
+ CaPmt.AddPid(channel.Apid2());
+ if (channel.Dpid1())
+ CaPmt.AddPid(channel.Dpid1());
+ if (ciHandler->SetCaPmt(CaPmt, Slot)) {
+ tunerStatus = tsCam;
+ startTime = 0;
+ }
+ }
+ }
}
}
else