vdr 2.6.1
include/vdr/eit.h
Go to the documentation of this file.
1/*
2 * eit.h: EIT section filter
3 *
4 * See the main source file 'vdr.c' for copyright information and
5 * how to reach the author.
6 *
7 * $Id: eit.h 5.2 2021/04/04 11:06:30 kls Exp $
8 */
9
10#ifndef __EIT_H
11#define __EIT_H
12
13#include "filter.h"
14#include "tools.h"
15
16#define NUM_EIT_TABLES 17
17
18// Event information (or EPG) is broadcast in tables 0x4E and 0x4F for "present/following" events on
19// "this transponder" (0x4E) and "other transponders" (0x4F), as well as 0x50-0x5F ("all events on this
20// transponder") and 0x60-0x6F ("all events on other transponders"). Since it's either "this" or "other",
21// we only use one section syncer for 0x4E/0x4F and 16 syncers for either 0x5X or 0x6X.
22
23class cEitTables : public cListObject {
24private:
25 cSectionSyncerRandom sectionSyncer[NUM_EIT_TABLES]; // for tables 0x4E/0x4F and 0x50-0x5F/0x60-0x6F
26 time_t tableStart; // only used for table 0x4E
27 time_t tableEnd;
28 bool complete;
29 int Index(uchar TableId) { return (TableId < 0x50) ? 0 : (TableId & 0x0F) + 1; }
30public:
32 void SetTableStart(time_t t) { tableStart = t; }
33 void SetTableEnd(time_t t) { tableEnd = t; }
34 time_t TableStart(void) { return tableStart; }
35 time_t TableEnd(void) { return tableEnd; }
36 bool Check(uchar TableId, uchar Version, int SectionNumber);
37 bool Processed(uchar TableId, uchar LastTableId, int SectionNumber, int LastSectionNumber, int SegmentLastSectionNumber = -1);
39 bool Complete(void) { return complete; }
41 };
42
43class cEitTablesHash : public cHash<cEitTables> {
44public:
45 cEitTablesHash(void) : cHash(HASHSIZE, true) {};
46 };
47
48class cEitFilter : public cFilter {
49private:
52 static time_t disableUntil;
53protected:
54 virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);
55public:
57 virtual void SetStatus(bool On);
58 static void SetDisableUntil(time_t Time);
59 };
60
61#endif //__EIT_H
Definition: eit.h:48
cMutex mutex
Definition: eit.h:50
virtual void SetStatus(bool On)
Turns this filter on or off, depending on the value of On.
static void SetDisableUntil(time_t Time)
cEitTablesHash eitTablesHash
Definition: eit.h:51
cEitFilter(void)
static time_t disableUntil
Definition: eit.h:52
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
Processes the data delivered to this filter.
Definition: eit.h:23
bool complete
Definition: eit.h:28
time_t tableStart
Definition: eit.h:26
void SetTableStart(time_t t)
bool Processed(uchar TableId, uchar LastTableId, int SectionNumber, int LastSectionNumber, int SegmentLastSectionNumber=-1)
Returns true if all sections of the table with the given TableId have been processed.
cEitTables(void)
bool Complete(void)
Returns true if all sections of all tables have been processed.
int Index(uchar TableId)
void SetTableEnd(time_t t)
time_t TableEnd(void)
time_t tableEnd
Definition: eit.h:27
bool Check(uchar TableId, uchar Version, int SectionNumber)
time_t TableStart(void)
cSectionSyncerRandom sectionSyncer[NUM_EIT_TABLES]
Definition: eit.h:25
Definition: filter.h:80
#define NUM_EIT_TABLES
#define HASHSIZE
unsigned char uchar
unsigned char u_char