summaryrefslogtreecommitdiff
path: root/ci.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-03-23 14:34:53 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2017-03-23 14:34:53 +0100
commit2d9eb7e25dc08d700b5d2c97d0baf36d5aa35f96 (patch)
treee37483f46ccd457aea0900310ae0345385aaf808 /ci.c
parentb7be7c900a4ce4ab74cbc52cee563ff4f0b5bf8f (diff)
downloadvdr-2d9eb7e25dc08d700b5d2c97d0baf36d5aa35f96.tar.gz
vdr-2d9eb7e25dc08d700b5d2c97d0baf36d5aa35f96.tar.bz2
Mapping PIDs in CanDecrypt(); improved description of Start-/StopDecrypting(); removed obsolete cMtdCamSlot::IsDecrypting(); fixed getting device fpr channel up/down
Diffstat (limited to 'ci.c')
-rw-r--r--ci.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/ci.c b/ci.c
index e4f43209..a788781b 100644
--- a/ci.c
+++ b/ci.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: ci.c 4.7 2017/03/18 15:20:27 kls Exp $
+ * $Id: ci.c 4.8 2017/03/23 14:30:56 kls Exp $
*/
#include "ci.h"
@@ -2205,6 +2205,8 @@ void cCamSlot::BuildCaPmts(uint8_t CmdId, cCiCaPmtList &CaPmtList, cMtdMapper *M
}
}
}
+ else if (CmdId == CPCI_NOT_SELECTED)
+ CaPmtList.Add(CmdId, 0, 0, 0, NULL);
}
}
@@ -2343,7 +2345,7 @@ void cCamSlot::AddChannel(const cChannel *Channel)
#define QUERY_REPLY_WAIT 100 // ms to wait between checks for a reply
-bool cCamSlot::CanDecrypt(const cChannel *Channel)
+bool cCamSlot::CanDecrypt(const cChannel *Channel, cMtdMapper *MtdMapper)
{
if (Channel->Ca() < CA_ENCRYPTED_MIN)
return true; // channel not encrypted
@@ -2361,6 +2363,8 @@ bool cCamSlot::CanDecrypt(const cChannel *Channel)
CaPmt.AddPid(*Dpid, STREAM_TYPE_PRIVATE);
for (const int *Spid = Channel->Spids(); *Spid; Spid++)
CaPmt.AddPid(*Spid, STREAM_TYPE_PRIVATE);
+ if (MtdMapper)
+ CaPmt.MtdMapPids(MtdMapper);
cas->SendPMT(&CaPmt);
cTimeMs Timeout(QUERY_REPLY_TIMEOUT);
do {
@@ -2385,7 +2389,11 @@ void cCamSlot::StartDecrypting(void)
void cCamSlot::StopDecrypting(void)
{
cMutexLock MutexLock(&mutex);
- caProgramList.Clear();
+ if (caProgramList.Count()) {
+ caProgramList.Clear();
+ if (!dynamic_cast<cMtdCamSlot *>(this))
+ SendCaPmt(CPCI_NOT_SELECTED);
+ }
}
bool cCamSlot::IsDecrypting(void)