summaryrefslogtreecommitdiff
path: root/receiver.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2014-01-01 12:37:22 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2014-01-01 12:37:22 +0100
commit566c6fa4641ea116307cfb5e40d151a104ab1490 (patch)
tree4d541f4e23394b252898ab302be48bfb59fd5463 /receiver.c
parentb95b85fee4a7c26bfbc2890ac3ff00cef5fa0388 (diff)
downloadvdr-566c6fa4641ea116307cfb5e40d151a104ab1490.tar.gz
vdr-566c6fa4641ea116307cfb5e40d151a104ab1490.tar.bz2
Added receiving Ca pids to cCamSlot
Diffstat (limited to 'receiver.c')
-rw-r--r--receiver.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/receiver.c b/receiver.c
index bde60e46..de5d0aea 100644
--- a/receiver.c
+++ b/receiver.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: receiver.c 2.7 2012/06/02 13:20:38 kls Exp $
+ * $Id: receiver.c 3.1 2014/01/01 12:03:00 kls Exp $
*/
#include "receiver.h"
@@ -72,6 +72,28 @@ bool cReceiver::SetPids(const cChannel *Channel)
return true;
}
+void cReceiver::DelPid(int Pid)
+{
+ if (Pid) {
+ for (int i = 0; i < numPids; i++) {
+ if (pids[i] == Pid) {
+ for ( ; i < numPids; i++) // we also copy the terminating 0!
+ pids[i] = pids[i + 1];
+ numPids--;
+ return;
+ }
+ }
+ }
+}
+
+void cReceiver::DelPids(const int *Pids)
+{
+ if (Pids) {
+ while (*Pids)
+ DelPid(*Pids++);
+ }
+}
+
bool cReceiver::WantsPid(int Pid)
{
if (Pid) {