diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2004-01-04 12:30:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2004-01-04 12:30:00 +0100 |
commit | 8976ebcec5ca1ac03c54209b7cc12e9d14915c6b (patch) | |
tree | 8562202f489ee585c1252b2cb4a9e61b3e200efe /ci.c | |
parent | 3a1058fe1fca6d10cea42786aa54abf3d0bd0b94 (diff) | |
download | vdr-8976ebcec5ca1ac03c54209b7cc12e9d14915c6b.tar.gz vdr-8976ebcec5ca1ac03c54209b7cc12e9d14915c6b.tar.bz2 |
Implemented automatic PID switching and channel detection
Diffstat (limited to 'ci.c')
-rw-r--r-- | ci.c | 23 |
1 files changed, 18 insertions, 5 deletions
@@ -4,13 +4,9 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: ci.c 1.20 2003/12/24 10:23:24 kls Exp $ + * $Id: ci.c 1.21 2004/01/02 15:07:36 kls Exp $ */ -/* XXX TODO -- update CA descriptors in case they change -XXX*/ - #include "ci.h" #include <asm/unaligned.h> #include <ctype.h> @@ -1570,6 +1566,23 @@ const unsigned short *cCiHandler::GetCaSystemIds(int Slot) return cas ? cas->GetCaSystemIds() : NULL; } +bool cCiHandler::ProvidesCa(const unsigned short *CaSystemIds) +{ + cMutexLock MutexLock(&mutex); + for (int Slot = 0; Slot < numSlots; Slot++) { + cCiConditionalAccessSupport *cas = (cCiConditionalAccessSupport *)GetSessionByResourceId(RI_CONDITIONAL_ACCESS_SUPPORT, Slot); + if (cas) { + for (const unsigned short *ids = cas->GetCaSystemIds(); ids && *ids; ids++) { + for (const unsigned short *id = CaSystemIds; *id; id++) { + if (*id == *ids) + return true; + } + } + } + } + return false; +} + bool cCiHandler::SetCaPmt(cCiCaPmt &CaPmt, int Slot) { cMutexLock MutexLock(&mutex); |