1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

The epg.data file is now read in a separate thread

This commit is contained in:
Klaus Schmidinger 2012-02-11 13:41:29 +01:00
parent b3891d8319
commit 2772964f99
5 changed files with 27 additions and 5 deletions

View File

@ -604,6 +604,7 @@ Helmut Auer <vdr@helmutauer.de>
for a patch that was used to implement the command line options --edit and for a patch that was used to implement the command line options --edit and
--genindex --genindex
for suggesting to disable EPG processing for a while after a CLRE command for suggesting to disable EPG processing for a while after a CLRE command
for suggesting to read the epg.data file in a separate thread
Jeremy Hall <jhall@UU.NET> Jeremy Hall <jhall@UU.NET>
for fixing an incomplete initialization of the filter parameters in eit.c for fixing an incomplete initialization of the filter parameters in eit.c

View File

@ -6836,7 +6836,7 @@ Video Disk Recorder Revision History
- Fixed frozen live view with device bonding in case the bonded master is used for - Fixed frozen live view with device bonding in case the bonded master is used for
live viewing (reported by Uwe Scheffler). live viewing (reported by Uwe Scheffler).
2012-01-26: Version 1.7.24 2012-02-11: Version 1.7.24
- Updated the Italian OSD texts (thanks to Diego Pierotto). - Updated the Italian OSD texts (thanks to Diego Pierotto).
- Fixed a high load in case a transponder can't be received. - Fixed a high load in case a transponder can't be received.
@ -6851,3 +6851,5 @@ Video Disk Recorder Revision History
minutes (thanks to Christoph Haubrich). minutes (thanks to Christoph Haubrich).
- Symbolic links are no longer resolved in cRecordings::ScanVideoDir() (thanks to - Symbolic links are no longer resolved in cRecordings::ScanVideoDir() (thanks to
Sundararaj Reel). Sundararaj Reel).
- The epg.data file is now read in a separate thread to make the startup process
faster in case the file is very large (suggested by Helmut Auer).

14
epg.c
View File

@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by * Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* *
* $Id: epg.c 2.8 2012/01/08 14:59:38 kls Exp $ * $Id: epg.c 2.9 2012/02/11 12:33:04 kls Exp $
*/ */
#include "epg.h" #include "epg.h"
@ -1284,3 +1284,15 @@ const cSchedule *cSchedules::GetSchedule(const cChannel *Channel, bool AddIfMiss
} }
return Channel->schedule != &DummySchedule? Channel->schedule : NULL; return Channel->schedule != &DummySchedule? Channel->schedule : NULL;
} }
// --- cEpgDataReader --------------------------------------------------------
cEpgDataReader::cEpgDataReader(void)
:cThread("epg data reader")
{
}
void cEpgDataReader::Action(void)
{
cSchedules::Read();
}

8
epg.h
View File

@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by * Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
* *
* $Id: epg.h 2.5 2011/02/25 14:14:38 kls Exp $ * $Id: epg.h 2.6 2012/02/11 12:29:55 kls Exp $
*/ */
#ifndef __EPG_H #ifndef __EPG_H
@ -213,6 +213,12 @@ public:
const cSchedule *GetSchedule(const cChannel *Channel, bool AddIfMissing = false) const; const cSchedule *GetSchedule(const cChannel *Channel, bool AddIfMissing = false) const;
}; };
class cEpgDataReader : public cThread {
public:
cEpgDataReader(void);
virtual void Action(void);
};
void ReportEpgBugFixStats(bool Reset = false); void ReportEpgBugFixStats(bool Reset = false);
#endif //__EPG_H #endif //__EPG_H

5
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.tvdr.de * The project's page is at http://www.tvdr.de
* *
* $Id: vdr.c 2.27 2011/12/03 15:35:09 kls Exp $ * $Id: vdr.c 2.28 2012/02/11 12:34:01 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -569,6 +569,7 @@ int main(int argc, char *argv[])
// Main program loop variables - need to be here to have them initialized before any EXIT(): // Main program loop variables - need to be here to have them initialized before any EXIT():
cEpgDataReader EpgDataReader;
cOsdObject *Menu = NULL; cOsdObject *Menu = NULL;
int LastChannel = 0; int LastChannel = 0;
int LastTimerChannel = -1; int LastTimerChannel = -1;
@ -633,7 +634,7 @@ int main(int argc, char *argv[])
cSchedules::SetEpgDataFileName(AddDirectory(EpgDirectory, EpgDataFileName)); cSchedules::SetEpgDataFileName(AddDirectory(EpgDirectory, EpgDataFileName));
else else
cSchedules::SetEpgDataFileName(EpgDataFileName); cSchedules::SetEpgDataFileName(EpgDataFileName);
cSchedules::Read(); EpgDataReader.Start();
} }
// DVB interfaces: // DVB interfaces: