summaryrefslogtreecommitdiff
path: root/eit.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2021-04-04 11:06:30 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2021-04-04 11:06:30 +0200
commitb80c22e9c4097220cf4a1e2cce82daeca1ba4a36 (patch)
treead8653e4511ae9fd96c1b69d6e873d2a122e5db4 /eit.h
parentf672fe90c1f5e0cbe0f6a0842b8ed0fe22d05a70 (diff)
downloadvdr-b80c22e9c4097220cf4a1e2cce82daeca1ba4a36.tar.gz
vdr-b80c22e9c4097220cf4a1e2cce82daeca1ba4a36.tar.bz2
Improved handling EPG data from the EIT tables
Diffstat (limited to 'eit.h')
-rw-r--r--eit.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/eit.h b/eit.h
index aedf0b56..8beae026 100644
--- a/eit.h
+++ b/eit.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: eit.h 5.1 2021/03/16 15:10:54 kls Exp $
+ * $Id: eit.h 5.2 2021/04/04 11:06:30 kls Exp $
*/
#ifndef __EIT_H
@@ -17,30 +17,38 @@
// Event information (or EPG) is broadcast in tables 0x4E and 0x4F for "present/following" events on
// "this transponder" (0x4E) and "other transponders" (0x4F), as well as 0x50-0x5F ("all events on this
-// transponder) and 0x60-0x6F ("all events on other transponders). Since it's either "this" or "other",
+// transponder") and 0x60-0x6F ("all events on other transponders"). Since it's either "this" or "other",
// we only use one section syncer for 0x4E/0x4F and 16 syncers for either 0x5X or 0x6X.
class cEitTables : public cListObject {
private:
cSectionSyncerRandom sectionSyncer[NUM_EIT_TABLES]; // for tables 0x4E/0x4F and 0x50-0x5F/0x60-0x6F
+ time_t tableStart; // only used for table 0x4E
+ time_t tableEnd;
bool complete;
int Index(uchar TableId) { return (TableId < 0x50) ? 0 : (TableId & 0x0F) + 1; }
public:
- cEitTables(void) { complete = false; }
+ cEitTables(void);
+ void SetTableStart(time_t t) { tableStart = t; }
+ void SetTableEnd(time_t t) { tableEnd = t; }
+ time_t TableStart(void) { return tableStart; }
+ time_t TableEnd(void) { return tableEnd; }
bool Check(uchar TableId, uchar Version, int SectionNumber);
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.
bool Complete(void) { return complete; }
+ ///< Returns true if all sections of all tables have been processed.
};
-class cSectionSyncerHash : public cHash<cEitTables> {
+class cEitTablesHash : public cHash<cEitTables> {
public:
- cSectionSyncerHash(void) : cHash(HASHSIZE, true) {};
+ cEitTablesHash(void) : cHash(HASHSIZE, true) {};
};
class cEitFilter : public cFilter {
private:
cMutex mutex;
- cSectionSyncerHash sectionSyncerHash;
+ cEitTablesHash eitTablesHash;
static time_t disableUntil;
protected:
virtual void Process(u_short Pid, u_char Tid, const u_char *Data, int Length);