summaryrefslogtreecommitdiff
path: root/eit.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2021-03-16 15:10:54 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2021-03-16 15:10:54 +0100
commit36a833053b4b1d51ffe51ca75d06478819e92eeb (patch)
tree5eaf3ab1e809f7c8ceeb13832629deead6dbfc0d /eit.h
parentad35c9c2d331e8c87886ce559fe838b5ac60776b (diff)
downloadvdr-36a833053b4b1d51ffe51ca75d06478819e92eeb.tar.gz
vdr-36a833053b4b1d51ffe51ca75d06478819e92eeb.tar.bz2
Improved cSectionSyncer
Diffstat (limited to 'eit.h')
-rw-r--r--eit.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/eit.h b/eit.h
index c93aabc3..aedf0b56 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 4.2 2017/05/08 21:10:29 kls Exp $
+ * $Id: eit.h 5.1 2021/03/16 15:10:54 kls Exp $
*/
#ifndef __EIT_H
@@ -13,9 +13,26 @@
#include "filter.h"
#include "tools.h"
-class cSectionSyncerEntry : public cListObject, public cSectionSyncer {};
+#define NUM_EIT_TABLES 17
-class cSectionSyncerHash : public cHash<cSectionSyncerEntry> {
+// 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",
+// 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
+ bool complete;
+ int Index(uchar TableId) { return (TableId < 0x50) ? 0 : (TableId & 0x0F) + 1; }
+public:
+ cEitTables(void) { complete = false; }
+ bool Check(uchar TableId, uchar Version, int SectionNumber);
+ bool Processed(uchar TableId, uchar LastTableId, int SectionNumber, int LastSectionNumber, int SegmentLastSectionNumber = -1);
+ bool Complete(void) { return complete; }
+ };
+
+class cSectionSyncerHash : public cHash<cEitTables> {
public:
cSectionSyncerHash(void) : cHash(HASHSIZE, true) {};
};