summaryrefslogtreecommitdiff
path: root/eit.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-01-18 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2001-01-18 18:00:00 +0100
commit3fe3c15d5db9c1f3982ffe6dac1ae4ad56d1664d (patch)
treee1c4e489899c119fdfaad6f6bdf9bde988616df2 /eit.c
parent9aa2cda494d7af2733362de78234441a25959e86 (diff)
downloadvdr-patch-lnbsharing-3fe3c15d5db9c1f3982ffe6dac1ae4ad56d1664d.tar.gz
vdr-patch-lnbsharing-3fe3c15d5db9c1f3982ffe6dac1ae4ad56d1664d.tar.bz2
Version 0.70vdr-0.70
- VDR now requires driver version 0.8.1 or higher. - Recordings are now saved in PES mode. Note that you now need to install the driver *WITHOUT* 'outstream=0'! This is the default when you 'make insmod' in the DVB/driver directory. Old recordings (in AV_PES mode) can still be replayed (as long as the driver still supports replaying AV_PES files). The only limitation with this is that in fast forward/back mode the picture may be slightly distorted and there may be sound fragments. - The EPG data is now dumped into the file /video/epg.data every ten minutes. Use the Perl script 'epg2html.pl' to convert the raw EPG data into a simple HTML programme listing. - Fixed handling of channel switching with the "Blue" button in the "What's on now/next?" menus. - Fixed saving the MarginStop setup parameter. - Fixed missing initialization in cConfig. - Implemented "On Disk Editing". - There is no more default 'timers.conf' file. - Added Italian language texts (thanks to Alberto Carraro). - Fixed starting a replay session when the program is currently in "transfer mode". - Fixed setting/modifying timers via SVDRP with empty summary fields. - Fixed a problem with recordings that have a single quote character in their name (this is now mapped to 0x01). - Changed the value for Diseqc to '0' in the default 'channels.conf'. - Fixed displaying channels and recording status in the RCU's LED display when a recording is interrupted due to higher priority. - Implemented safe writing of config files (first writes into a temporary file and then renames it). - In case the video data stream is broken the log message will come only every 5 seconds. - The current channel is now saved in the 'setup.conf' file when VDR is cancelled, and will be restored next time it is started (thanks to Deti Fliegl). - The EIT scanning thread is now locked when switching channels to avoid problems. - Encrypted channels can now be selected even without knowing the PNR (however, it is still necessary for the EPG info).
Diffstat (limited to 'eit.c')
-rw-r--r--eit.c58
1 files changed, 54 insertions, 4 deletions
diff --git a/eit.c b/eit.c
index 7985528..e7c60c1 100644
--- a/eit.c
+++ b/eit.c
@@ -13,7 +13,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
- * $Id: eit.c 1.9 2000/11/18 13:42:28 kls Exp $
+ * $Id: eit.c 1.11 2000/12/03 15:33:37 kls Exp $
***************************************************************************/
#include "eit.h"
@@ -33,6 +33,8 @@
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
+#include "config.h"
+#include "videodir.h"
// --- cMJD ------------------------------------------------------------------
@@ -129,7 +131,7 @@ bool cMJD::SetSystemTime()
isyslog(LOG_INFO, "System Time = %s (%ld)\n", ctime(&loctim), loctim);
isyslog(LOG_INFO, "Local Time = %s (%ld)\n", ctime(&mjdtime), mjdtime);
if (stime(&mjdtime) < 0)
- esyslog(LOG_ERR, "ERROR while setting system time: %s", strerror(errno));
+ esyslog(LOG_ERR, "ERROR while setting system time: %m");
return true;
}
@@ -393,6 +395,21 @@ unsigned short cEventInfo::GetServiceID() const
return uServiceID;
}
+/** */
+void cEventInfo::Dump(FILE *f) const
+{
+ if (tTime + lDuration >= time(NULL)) {
+ fprintf(f, "E %u %ld %ld\n", uEventID, tTime, lDuration);
+ if (!isempty(pTitle))
+ fprintf(f, "T %s\n", pTitle);
+ if (!isempty(pSubtitle))
+ fprintf(f, "S %s\n", pSubtitle);
+ if (!isempty(pExtendedDescription))
+ fprintf(f, "D %s\n", pExtendedDescription);
+ fprintf(f, "e\n");
+ }
+}
+
// --- cSchedule -------------------------------------------------------------
cSchedule::cSchedule(unsigned short servid)
@@ -529,6 +546,19 @@ void cSchedule::Cleanup(time_t tTime)
}
}
+/** */
+void cSchedule::Dump(FILE *f) const
+{
+ cChannel *channel = Channels.GetByServiceID(uServiceID);
+ if (channel)
+ {
+ fprintf(f, "C %u %s\n", uServiceID, channel->name);
+ for (cEventInfo *p = Events.First(); p; p = Events.Next(p))
+ p->Dump(f);
+ fprintf(f, "c\n");
+ }
+}
+
// --- cSchedules ------------------------------------------------------------
cSchedules::cSchedules()
@@ -590,6 +620,13 @@ void cSchedules::Cleanup()
}
}
+/** */
+void cSchedules::Dump(FILE *f) const
+{
+ for (cSchedule *p = First(); p; p = Next(p))
+ p->Dump(f);
+}
+
// --- cEIT ------------------------------------------------------------------
#define DEC(N) dec << setw(N) << setfill(int('0'))
@@ -1080,7 +1117,7 @@ cSIProcessor::~cSIProcessor()
{
if (fsvbi >= 0)
{
- Stop();
+ Cancel();
ShutDownFilters();
delete filters;
if (!--numSIProcessors) // the last one deletes it
@@ -1105,6 +1142,7 @@ void cSIProcessor::Action()
unsigned int seclen;
unsigned int pid;
time_t lastCleanup = time(NULL);
+ time_t lastDump = time(NULL);
struct pollfd pfd;
while(true)
@@ -1123,6 +1161,19 @@ void cSIProcessor::Action()
schedulesMutex.Unlock();
lastCleanup = now;
}
+ if (now - lastDump > 600)
+ {
+ LOCK_THREAD;
+
+ schedulesMutex.Lock();
+ FILE *f = fopen(AddDirectory(VideoDirectory, "epg.data"), "w");
+ if (f) {
+ schedules->Dump(f);
+ fclose(f);
+ }
+ lastDump = now;
+ schedulesMutex.Unlock();
+ }
}
/* wait data become ready from the bitfilter */
@@ -1283,4 +1334,3 @@ bool cSIProcessor::RefreshFilters()
return ret;
}
-