vdr 2.6.9
receiver.h
Go to the documentation of this file.
1/*
2 * receiver.h: The basic receiver interface
3 *
4 * See the main source file 'vdr.c' for copyright information and
5 * how to reach the author.
6 *
7 * $Id: receiver.h 4.3 2017/05/01 08:48:34 kls Exp $
8 */
9
10#ifndef __RECEIVER_H
11#define __RECEIVER_H
12
13#include "device.h"
14
15#define MAXRECEIVEPIDS 64 // the maximum number of PIDs per receiver
16
17class cReceiver {
18 friend class cDevice;
19private:
30 bool WantsPid(int Pid);
31protected:
32 cDevice *Device(void) { return device; }
33 void Detach(void);
34 virtual void Activate(bool On) {}
39 virtual void Receive(const uchar *Data, int Length) = 0;
46public:
47 cReceiver(const cChannel *Channel = NULL, int Priority = MINPRIORITY);
56 virtual ~cReceiver();
57 int Priority(void) { return priority; }
58 void SetPriority(int Priority);
59 bool AddPid(int Pid);
61 bool AddPids(const int *Pids);
64 bool AddPids(int Pid1, int Pid2, int Pid3 = 0, int Pid4 = 0, int Pid5 = 0, int Pid6 = 0, int Pid7 = 0, int Pid8 = 0, int Pid9 = 0);
66 bool SetPids(const cChannel *Channel);
75 void DelPid(int Pid);
77 void DelPids(const int *Pids);
80 tChannelID ChannelID(void) { return channelID; }
81 int NumPids(void) const { return numPids; }
82 bool IsAttached(void) { return device != NULL; }
88 };
89
90#endif //__RECEIVER_H
void SetPriority(int Priority)
Definition receiver.c:37
time_t lastEitInjection
Definition receiver.h:29
bool IsAttached(void)
Returns true if this receiver is (still) attached to a device.
Definition receiver.h:82
int Priority(void)
Definition receiver.h:57
bool WantsPid(int Pid)
Definition receiver.c:114
bool AddPids(const int *Pids)
Adds the given zero terminated list of Pids to the list of PIDs of this receiver.
Definition receiver.c:60
time_t startEitInjection
Definition receiver.h:28
int pids[MAXRECEIVEPIDS]
Definition receiver.h:23
tChannelID ChannelID(void)
Definition receiver.h:80
void Detach(void)
Definition receiver.c:125
cDevice * device
Definition receiver.h:20
int priority
Definition receiver.h:22
virtual void Receive(const uchar *Data, int Length)=0
This function is called from the cDevice we are attached to, and delivers one TS packet from the set ...
int numPids
Definition receiver.h:24
bool AddPid(int Pid)
Adds the given Pid to the list of PIDs of this receiver.
Definition receiver.c:42
bool SetPids(const cChannel *Channel)
Sets the PIDs of this receiver to those of the given Channel, replacing any previously stored PIDs.
Definition receiver.c:76
void DelPids(const int *Pids)
Deletes the given zero terminated list of Pids from the list of PIDs of this receiver.
Definition receiver.c:106
time_t startScrambleDetection
Definition receiver.h:26
tChannelID channelID
Definition receiver.h:21
time_t lastScrambledPacket
Definition receiver.h:25
int NumPids(void) const
Definition receiver.h:81
int scramblingTimeout
Definition receiver.h:27
cReceiver(const cChannel *Channel=NULL, int Priority=MINPRIORITY)
Creates a new receiver for the given Channel with the given Priority.
Definition receiver.c:14
virtual void Activate(bool On)
This function is called just before the cReceiver gets attached to (On == true) and right after it ge...
Definition receiver.h:34
cDevice * Device(void)
Definition receiver.h:32
virtual ~cReceiver()
Definition receiver.c:27
void DelPid(int Pid)
Deletes the given Pid from the list of PIDs of this receiver.
Definition receiver.c:90
#define MINPRIORITY
Definition config.h:44
#define MAXRECEIVEPIDS
Definition receiver.h:15
unsigned char uchar
Definition tools.h:31