summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2020-06-16 14:33:32 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2020-06-16 14:33:32 +0200
commitba9ccc12a5ec96dd07654417b378257200958d17 (patch)
tree1497355794ea0e32c58cdf16e34194620921da1d
parent67ea2163f41de6f0b42a32c25e82c7ea23b8570f (diff)
downloadvdr-ba9ccc12a5ec96dd07654417b378257200958d17.tar.gz
vdr-ba9ccc12a5ec96dd07654417b378257200958d17.tar.bz2
Added cMtdHandler::StopDecrypting()
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY1
-rw-r--r--ci.c8
-rw-r--r--mtd.c12
-rw-r--r--mtd.h4
5 files changed, 20 insertions, 6 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 61999e43..59b1884d 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -3598,6 +3598,7 @@ Helmut Binder <cco@aon.at>
override character table
for adding codes for more languages and special audio tracks
for adding cMtdCamSlot::TsPostProcess()
+ for adding cMtdHandler::StopDecrypting()
Ulrich Eckhardt <uli@uli-eckhardt.de>
for reporting a problem with shutdown after user inactivity in case a plugin is
diff --git a/HISTORY b/HISTORY
index 3f3fcf4f..aa58c64a 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9470,3 +9470,4 @@ Video Disk Recorder Revision History
Herdler).
- Added codes for more languages and special audio tracks (thanks to Helmut Binder).
- Added cMtdCamSlot::TsPostProcess() (thanks to Helmut Binder).
+- Added cMtdHandler::StopDecrypting() (thanks to Helmut Binder).
diff --git a/ci.c b/ci.c
index 2f399be2..7d001a4f 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.27 2020/06/16 14:25:43 kls Exp $
+ * $Id: ci.c 4.28 2020/06/16 14:33:32 kls Exp $
*/
#include "ci.h"
@@ -2757,9 +2757,13 @@ void cCamSlot::StartDecrypting(void)
void cCamSlot::StopDecrypting(void)
{
cMutexLock MutexLock(&mutex);
+ if (mtdHandler) {
+ mtdHandler->StopDecrypting();
+ return;
+ }
if (caProgramList.Count()) {
caProgramList.Clear();
- if (!dynamic_cast<cMtdCamSlot *>(this))
+ if (!dynamic_cast<cMtdCamSlot *>(this) || !MasterSlot()->IsDecrypting())
SendCaPmt(CPCI_NOT_SELECTED);
}
}
diff --git a/mtd.c b/mtd.c
index f2c51027..7536dcf8 100644
--- a/mtd.c
+++ b/mtd.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: mtd.c 1.15 2020/06/16 14:25:43 kls Exp $
+ * $Id: mtd.c 1.16 2020/06/16 14:33:32 kls Exp $
*/
#include "mtd.h"
@@ -112,6 +112,14 @@ void cMtdHandler::StartDecrypting(void)
}
}
+void cMtdHandler::StopDecrypting(void)
+{
+ for (int i = 0; i < camSlots.Size(); i++) {
+ if (camSlots[i]->Device())
+ camSlots[i]->StopDecrypting();
+ }
+}
+
void cMtdHandler::CancelActivation(void)
{
for (int i = 0; i < camSlots.Size(); i++)
@@ -292,8 +300,6 @@ void cMtdCamSlot::StartDecrypting(void)
void cMtdCamSlot::StopDecrypting(void)
{
cCamSlot::StopDecrypting();
- if (!MasterSlot()->IsDecrypting())
- MasterSlot()->StopDecrypting();
cMutexLock MutexLock(&clearMutex);
mtdMapper->Clear();
mtdBuffer->Clear();
diff --git a/mtd.h b/mtd.h
index 98ed99a6..914b8b95 100644
--- a/mtd.h
+++ b/mtd.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: mtd.h 1.10 2020/06/16 14:25:43 kls Exp $
+ * $Id: mtd.h 1.11 2020/06/16 14:33:32 kls Exp $
*/
#ifndef __MTD_H
@@ -132,6 +132,8 @@ public:
///< Returns true if any of the active MTD CAM slots is currently decrypting.
void StartDecrypting(void);
///< Tells all active MTD CAM slots to start decrypting.
+ void StopDecrypting(void);
+ ///< Tells all active MTD CAM slots to stop decrypting.
void CancelActivation(void);
///< Tells all active MTD CAM slots to cancel activation.
bool IsActivating(void);