From 177b875945e5898ebc07d79527e0ddc5e4e0f93d Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 28 May 2006 18:00:00 +0200 Subject: =?UTF-8?q?Version=201.4.0-2=20-=20Removed=20leftover=20LSMOD=3D..?= =?UTF-8?q?.=20line=20from=20'runvdr'.=20-=20Modified=20the=20Makefile=20t?= =?UTF-8?q?o=20copy=20additional=20libraries=20a=20plugin=20might=20provid?= =?UTF-8?q?e=20(suggested=20=20=20by=20Wayne=20Keer).=20See=20PLUGINS.html?= =?UTF-8?q?=20for=20details.=20-=20Fixed=20handling=20Transfer=20Mode=20wh?= =?UTF-8?q?en=20replaying=20Dolby=20Digital=20audio=20and=20the=20option?= =?UTF-8?q?=20=20=20'-a'=20was=20given=20(based=20on=20a=20patch=20from=20?= =?UTF-8?q?Werner=20Fink).=20To=20avoid=20having=20to=20increment=20=20=20?= =?UTF-8?q?the=20API=20version,=20several=20#if=20checks=20have=20been=20i?= =?UTF-8?q?ntroduced=20around=20this.=20These=20will=20=20=20be=20removed?= =?UTF-8?q?=20once=20the=20API=20version=20actually=20needs=20to=20be=20in?= =?UTF-8?q?cremented.=20-=20Fixed=20deleting=20the=20'skinDescriptions'=20?= =?UTF-8?q?in=20cMenuSetupOSD::~cMenuSetupOSD()=20(thanks=20=20=20to=20Tob?= =?UTF-8?q?ias=20Grimm).=20-=20Fixed=20calculating=20the=20start=20time=20?= =?UTF-8?q?of=20repeated=20timers=20with=20"first=20day"=20(thanks=20to=20?= =?UTF-8?q?=20=20Udo=20Richter).=20-=20Now=20setting=20a=20timer's=20cache?= =?UTF-8?q?d=20start=20time=20to=200=20after=20a=20call=20to=20Skip()=20(t?= =?UTF-8?q?hanks=20to=20=20=20Udo=20Richter).=20-=20Fixed=20handling=20the?= =?UTF-8?q?=20running=20status=20of=20EPG=20events=20in=20case=20the=20"Sc?= =?UTF-8?q?hedule"=20menu=20is=20=20=20currently=20open=20(i.e.=20a=20writ?= =?UTF-8?q?e=20lock=20on=20the=20schedules=20data=20can't=20be=20achieved)?= =?UTF-8?q?.=20-=20Fixed=20handling=20VPS=20timers=20in=20case=20the=20EPG?= =?UTF-8?q?=20event=20hasn't=20been=20'seen'=20in=20a=20while.=20-=20Fixed?= =?UTF-8?q?=20calculating=20the=20cache=20size=20in=20cUnbufferedFile::Rea?= =?UTF-8?q?d()=20(thanks=20to=20Artur=20Skawina).=20-=20Removed=20-fPIC=20?= =?UTF-8?q?from=20VDR's=20and=20libsi's=20Makefile=20(suggested=20by=20Pra?= =?UTF-8?q?kash=20Punnoor).=20-=20Modifed=20the=20device=20selection=20to?= =?UTF-8?q?=20better=20handle=20timer=20conflicts=20(reported=20by=20=20?= =?UTF-8?q?=20Christian=20Wieninger).=20-=20Avoiding=20a=20compiler=20warn?= =?UTF-8?q?ing=20in=20libsi's=20TypeLoop::operator[].=20-=20Now=20processi?= =?UTF-8?q?ng=20the=20"frequency=20list=20descriptor"=20(based=20on=20a=20?= =?UTF-8?q?patch=20from=20Anssi=20Hannula).=20-=20Improved=20the=20repeat?= =?UTF-8?q?=20function=20for=20LIRC=20remote=20controls=20(thanks=20to=20J?= =?UTF-8?q?oerg=20Riechardt).=20-=20Fixed=20moving=20channels,=20which=20s?= =?UTF-8?q?ometimes=20stopped=20the=20current=20replay=20session=20=20=20(?= =?UTF-8?q?reported=20by=20Mirko=20D=C3=B6lle).=20-=20Fixed=20deleting=20c?= =?UTF-8?q?hannels=20in=20case=20the=20current=20channel's=20number=20chan?= =?UTF-8?q?ges=20(reported=20=20=20by=20Mirko=20D=C3=B6lle).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eit.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'eit.c') diff --git a/eit.c b/eit.c index 39567f8..d27849c 100644 --- a/eit.c +++ b/eit.c @@ -8,7 +8,7 @@ * Robert Schneider and Rolf Hakenes . * Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg . * - * $Id: eit.c 1.117 2006/04/29 11:38:37 kls Exp $ + * $Id: eit.c 1.118 2006/05/25 14:35:19 kls Exp $ */ #include "eit.h" @@ -21,10 +21,10 @@ class cEIT : public SI::EIT { public: - cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data); + cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bool OnlyRunningStatus = false); }; -cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) +cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bool OnlyRunningStatus) :SI::EIT(Data, false) { if (!CheckCRCAndParse()) @@ -57,6 +57,8 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) cEvent *rEvent = NULL; cEvent *pEvent = (cEvent *)pSchedule->GetEvent(SiEitEvent.getEventId(), SiEitEvent.getStartTime()); if (!pEvent) { + if (OnlyRunningStatus) + continue; // If we don't have that event yet, we create a new one. // Otherwise we copy the information into the existing event anyway, because the data might have changed. pEvent = newEvent = new cEvent(SiEitEvent.getEventId()); @@ -92,6 +94,12 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) pEvent->SetStartTime(SiEitEvent.getStartTime()); pEvent->SetDuration(SiEitEvent.getDuration()); } + if (Tid == 0x4E) { // we trust only the present/following info on the actual TS + if (SiEitEvent.getRunningStatus() >= SI::RunningStatusNotRunning) + pSchedule->SetRunningStatus(pEvent, SiEitEvent.getRunningStatus(), channel); + } + if (OnlyRunningStatus) + continue; // do this before setting the version, so that the full update can be done later pEvent->SetVersion(getVersionNumber()); int LanguagePreferenceShort = -1; @@ -240,15 +248,13 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) pEvent->FixEpgBugs(); if (LinkChannels) channel->SetLinkChannels(LinkChannels); - if (Tid == 0x4E) { // we trust only the present/following info on the actual TS - if (SiEitEvent.getRunningStatus() >= SI::RunningStatusNotRunning) - pSchedule->SetRunningStatus(pEvent, SiEitEvent.getRunningStatus(), channel); - } Modified = true; } if (Empty && Tid == 0x4E && getSectionNumber() == 0) // ETR 211: an empty entry in section 0 of table 0x4E means there is currently no event running pSchedule->ClrRunningStatus(channel); + if (OnlyRunningStatus) + return; if (Tid == 0x4E) pSchedule->SetPresentSeen(); if (Modified) { @@ -312,6 +318,16 @@ void cEitFilter::Process(u_short Pid, u_char Tid, const u_char *Data, int Length cSchedules *Schedules = (cSchedules *)cSchedules::Schedules(SchedulesLock); if (Schedules) cEIT EIT(Schedules, Source(), Tid, Data); + else { + // If we don't get a write lock, let's at least get a read lock, so + // that we can set the running status and 'seen' timestamp (well, actually + // with a read lock we shouldn't be doing that, but it's only integers that + // get changed, so it should be ok) + cSchedulesLock SchedulesLock; + cSchedules *Schedules = (cSchedules *)cSchedules::Schedules(SchedulesLock); + if (Schedules) + cEIT EIT(Schedules, Source(), Tid, Data, true); + } } break; case 0x14: { -- cgit v1.2.3