From ab6f2ccf424896a80b6e2fdf9ab9313ea4b7f316 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 14 Jun 2009 13:49:00 +0200 Subject: =?UTF-8?q?Version=201.7.8=20-=20The=20name=20of=20the=20function?= =?UTF-8?q?=20cDevice::GetVideoSize()=20wasn't=20very=20well=20chosen=20?= =?UTF-8?q?=20=20for=20its=20purpose=20of=20defining=20the=20optimum=20siz?= =?UTF-8?q?e=20of=20the=20OSD=20for=20the=20current=20=20=20output=20devic?= =?UTF-8?q?e.=20Therefore=20a=20new=20function=20named=20cDevice::GetOsdSi?= =?UTF-8?q?ze()=20has=20=20=20been=20introduced=20(suggested=20by=20Rolf?= =?UTF-8?q?=20Ahrenberg).=20Plugin=20authors=20should=20=20=20implement=20?= =?UTF-8?q?this=20function=20in=20classes=20derived=20from=20cDevice,=20if?= =?UTF-8?q?=20they=20are=20able=20=20=20to=20replay=20video.=20cDevice::Ge?= =?UTF-8?q?tVideoSize()=20still=20exists=20and=20should=20return=20the=20?= =?UTF-8?q?=20=20actual=20size=20of=20the=20video=20material=20that=20is?= =?UTF-8?q?=20currently=20replayed.=20Note=20that=20=20=20because=20of=20t?= =?UTF-8?q?he=20many=20possible=20aspect=20ratios=20for=20video=20material?= =?UTF-8?q?,=20the=20type=20=20=20of=20the=20Aspect=20parameter=20of=20Get?= =?UTF-8?q?VideoSize()=20has=20been=20changed=20to=20'double',=20=20=20and?= =?UTF-8?q?=20the=20Aspect=20parameter=20in=20both=20functions=20is=20name?= =?UTF-8?q?d=20differently,=20because=20=20=20it=20returns=20different=20v?= =?UTF-8?q?alues=20(suggested=20by=20Reinhard=20Nissl).=20=20=20Thanks=20t?= =?UTF-8?q?o=20Oliver=20Endriss=20for=20his=20input=20on=20calculating=20t?= =?UTF-8?q?he=20Aspect=20factor=20in=20=20=20GetOsdSize().=20-=20Fixed=20t?= =?UTF-8?q?he=20way=20the=20OSD=20size=20is=20determined=20on=20full=20fea?= =?UTF-8?q?tured=20DVB=20cards=20(thanks=20=20=20to=20Oliver=20Endriss).?= =?UTF-8?q?=20-=20Increased=20MAXOSDHEIGHT=20to=201200=20(suggested=20by?= =?UTF-8?q?=20Nicolas=20Huillard).=20-=20Removed=20limitation=20to=20PAL?= =?UTF-8?q?=20resolution=20from=20SPU=20handling.=20-=20Checking=20fd=5Fvi?= =?UTF-8?q?deo=20in=20cDvbDevice::GetVideoSize()=20to=20avoid=20error=20me?= =?UTF-8?q?ssages=20on=20=20=20systems=20with=20no=20real=20primary=20repl?= =?UTF-8?q?ay=20device=20(reported=20by=20Martin=20Neuditschko).=20-=20Add?= =?UTF-8?q?ed=20a=20note=20to=20cTsToPes::GetPes()=20about=20having=20to?= =?UTF-8?q?=20call=20it=20repeatedly,=20once=20=20=20it=20has=20returned?= =?UTF-8?q?=20a=20non-NULL=20value.=20-=20Added=20MPEG=201=20handling=20to?= =?UTF-8?q?=20remux.c=20(thanks=20to=20Ales=20Jurik).=20-=20Fixed=20use=20?= =?UTF-8?q?of=20time=5Ft=20in=20cEIT::cEIT()=20(thanks=20to=20Tobias=20Bra?= =?UTF-8?q?tfisch).=20-=20Added=20missing=20update=20of=20lastOsdSizeUpdat?= =?UTF-8?q?e.=20-=20EIT=20events=20are=20now=20only=20processed=20if=20a?= =?UTF-8?q?=20plausible=20system=20time=20is=20available,=20to=20=20=20avo?= =?UTF-8?q?id=20wrong=20handling=20of=20PDC=20descriptors=20(thanks=20to?= =?UTF-8?q?=20Tobias=20Bratfisch).=20-=20Removed=20unused=20'synced'=20mem?= =?UTF-8?q?ber=20from=20cTsToPes=20(reported=20by=20Christoph=20Haubrich).?= =?UTF-8?q?=20-=20Added=20a=20note=20to=20cTsToPes=20about=20all=20TS=20pa?= =?UTF-8?q?ckets=20having=20to=20belong=20to=20the=20same=20PID,=20=20=20a?= =?UTF-8?q?nd=20that=20for=20video=20data=20GetPes()=20may=20only=20be=20c?= =?UTF-8?q?alled=20if=20the=20next=20TS=20packet=20that=20=20=20will=20be?= =?UTF-8?q?=20given=20to=20PutTs()=20has=20the=20"payload=20start"=20flag?= =?UTF-8?q?=20set=20(suggested=20by=20Christoph=20=20=20Haubrich).=20-=20A?= =?UTF-8?q?dded=20a=20note=20about=20the=20meaning=20of=20PERCENTAGEDELTA?= =?UTF-8?q?=20in=20cRingBuffer::UpdatePercentage()=20=20=20(thanks=20to=20?= =?UTF-8?q?Rolf=20Ahrenberg).=20-=20The=20new=20setup=20option=20"Recordin?= =?UTF-8?q?g/Pause=20key=20handling"=20can=20be=20used=20to=20define=20=20?= =?UTF-8?q?=20what=20happens=20if=20the=20Pause=20key=20on=20the=20remote?= =?UTF-8?q?=20control=20is=20pressed=20during=20=20=20live=20tv=20(thanks?= =?UTF-8?q?=20to=20Timo=20Eskola).=20-=20Added=20a=20note=20about=20cFont:?= =?UTF-8?q?:GetFont()=20not=20being=20thread-safe.=20-=20Fixed=20generatin?= =?UTF-8?q?g=20PAT/PMT=20version=20numbers=20in=20case=20the=20PIDs=20chan?= =?UTF-8?q?ge=20during=20=20=20recording=20(reported=20by=20Reinhard=20Nis?= =?UTF-8?q?sl).=20-=20Updated=20the=20Ukrainian=20OSD=20texts=20(thanks=20?= =?UTF-8?q?to=20Yarema=20Aka=20Knedlyk).=20-=20Fixed=20a=20memory=20leak?= =?UTF-8?q?=20when=20reaching=20the=20end=20of=20a=20recording=20during=20?= =?UTF-8?q?replay=20(reported=20=20=20by=20Reinhard=20Nissl).=20-=20Fixed?= =?UTF-8?q?=20calling=20close(-1)=20in=20cUnbufferedFile::Close()=20(repor?= =?UTF-8?q?ted=20by=20Reinhard=20Nissl).=20-=20Added=20a=20workaround=20fo?= =?UTF-8?q?r=20the=20broken=20linux-dvb=20driver=20header=20files=20(based?= =?UTF-8?q?=20on=20a=20patch=20=20=20from=20Tobias=20Grimm).=20-=20Fixed?= =?UTF-8?q?=20handling=20the=20length=20of=20DiSEqC=20command=20sequences?= =?UTF-8?q?=20(reported=20by=20Reinhard=20Nissl).=20-=20Fixed=20cOsdMenu::?= =?UTF-8?q?Display()=20in=20case=20the=20menu=20size=20has=20changed=20(th?= =?UTF-8?q?anks=20to=20=20=20Reinhard=20Nissl).=20-=20Added=20some=20missi?= =?UTF-8?q?ng=20'const'=20keywords=20to=20avoid=20compilation=20errors=20w?= =?UTF-8?q?ith=20gcc=204.4=20=20=20(thanks=20to=20Ville=20Skytt=C3=A4=20an?= =?UTF-8?q?d=20Ludwig=20Nussel).=20-=20Modified=20cSVDRP::CmdGRAB()=20to?= =?UTF-8?q?=20avoid=20writing=20into=20const=20data=20(reported=20by=20=20?= =?UTF-8?q?=20Ludwig=20Nussel).=20-=20Fixed=20calculating=20menu=20colum?= =?UTF-8?q?=20widths=20in=20case=20the=20font=20has=20a=20size=20other=20t?= =?UTF-8?q?han=20the=20=20=20default=20size=20(reported=20by=20Reinhard=20?= =?UTF-8?q?Nissl).=20-=20Added=20a=20plausibility=20check=20for=20the=20OS?= =?UTF-8?q?D=20percentage=20parameters=20=20=20to=20avoid=20problems=20in?= =?UTF-8?q?=20case=20the=20values=20are=20stored=20in=20the=20setup.conf?= =?UTF-8?q?=20=20=20file=20in=20a=20=20wrong=20way.=20-=20Fixed=20variable?= =?UTF-8?q?=20types=20in=20cIndexFile=20(reported=20by=20Udo=20Richter).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eit.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'eit.c') diff --git a/eit.c b/eit.c index b78c117..1189a10 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 2.3 2009/04/11 10:03:24 kls Exp $ + * $Id: eit.c 2.5 2009/05/15 12:34:43 kls Exp $ */ #include "eit.h" @@ -17,6 +17,8 @@ #include "libsi/section.h" #include "libsi/descriptor.h" +#define VALID_TIME (31536000 * 2) // two years + // --- cEIT ------------------------------------------------------------------ class cEIT : public SI::EIT { @@ -46,10 +48,13 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data, bo struct tm tm_r; struct tm t = *localtime_r(&Now, &tm_r); // this initializes the time zone in 't' + if (Now < VALID_TIME) + return; // we need the current time for handling PDC descriptors + SI::EIT::Event SiEitEvent; for (SI::Loop::Iterator it; eventLoop.getNext(SiEitEvent, it); ) { bool ExternalData = false; - int StartTime = SiEitEvent.getStartTime(); + time_t StartTime = SiEitEvent.getStartTime(); int Duration = SiEitEvent.getDuration(); // Drop bogus events - but keep NVOD reference events, where all bits of the start time field are set to 1, resulting in a negative number. if (StartTime == 0 || StartTime > 0 && Duration == 0) -- cgit v1.2.3