From 94d43abecf01f203d9dc476c09717abbc3f34664 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 11 Sep 2005 13:23:49 +0200 Subject: Implemented a hash for the channels to reduce the system load in the EIT scanning thread --- channels.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'channels.h') diff --git a/channels.h b/channels.h index 2742e350..c2e1efc2 100644 --- a/channels.h +++ b/channels.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.h 1.34 2005/09/04 10:17:12 kls Exp $ + * $Id: channels.h 1.35 2005/09/11 11:17:19 kls Exp $ */ #ifndef __CHANNELS_H @@ -72,6 +72,11 @@ public: bool Valid(void) const { return (nid || tid) && sid; } // rid is optional and source may be 0//XXX source may not be 0??? tChannelID &ClrRid(void) { rid = 0; return *this; } tChannelID &ClrPolarization(void); + int Source(void) { return source; } + int Nid(void) { return nid; } + int Tid(void) { return tid; } + int Sid(void) { return sid; } + int Rid(void) { return rid; } static tChannelID FromString(const char *s); cString ToString(void) const; static const tChannelID InvalidID; @@ -203,10 +208,13 @@ private: int maxNumber; int modified; int beingEdited; + cHash channelsHashSid; void DeleteDuplicateChannels(void); public: cChannels(void); bool Load(const char *FileName, bool AllowComments = false, bool MustExist = false); + void HashChannel(cChannel *Channel); + void UnhashChannel(cChannel *Channel); int GetNextGroup(int Idx); // Get next channel group int GetPrevGroup(int Idx); // Get previous channel group int GetNextNormal(int Idx); // Get next normal channel (not group) -- cgit v1.2.3