vdr 2.6.3
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;
29 int Index(uchar TableId) { return (TableId < 0x50) ? 0 : (TableId & 0x0F) + 1; }
30public:
31 cEitTables(void);
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:
56 cEitFilter(void);
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 Process(u_short Pid, u_char Tid, const u_char *Data, int Length)
Processes the data delivered to this filter.
Definition: eit.c:513
static void SetDisableUntil(time_t Time)
Definition: eit.c:508
cEitTablesHash eitTablesHash
Definition: eit.h:51
virtual void SetStatus(bool On)
Turns this filter on or off, depending on the value of On.
Definition: eit.c:501
cEitFilter(void)
Definition: eit.c:495
static time_t disableUntil
Definition: eit.h:52
cEitTablesHash(void)
Definition: eit.h:45
Definition: eit.h:23
bool complete
Definition: eit.h:28
time_t tableStart
Definition: eit.h:26
void SetTableStart(time_t t)
Definition: eit.h:32
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.
Definition: eit.c:57
cEitTables(void)
Definition: eit.c:44
cSectionSyncerRandom sectionSyncer[NUM_EIT_TABLES]
Definition: eit.h:25
bool Complete(void)
Returns true if all sections of all tables have been processed.
Definition: eit.h:39
int Index(uchar TableId)
Definition: eit.h:29
void SetTableEnd(time_t t)
Definition: eit.h:33
time_t TableEnd(void)
Definition: eit.h:35
time_t tableEnd
Definition: eit.h:27
bool Check(uchar TableId, uchar Version, int SectionNumber)
Definition: eit.c:51
time_t TableStart(void)
Definition: eit.h:34
Definition: filter.h:80
Definition: tools.h:926
Definition: thread.h:67
#define NUM_EIT_TABLES
Definition: eit.h:16
#define HASHSIZE
Definition: tools.h:924
unsigned char uchar
Definition: tools.h:31