From 566c6fa4641ea116307cfb5e40d151a104ab1490 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Wed, 1 Jan 2014 12:37:22 +0100 Subject: Added receiving Ca pids to cCamSlot --- receiver.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'receiver.c') 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) { -- cgit v1.2.3