From 9f919801465f49be6b2118f54bd54df846e2f865 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 13 Apr 2003 18:00:00 +0200 Subject: =?UTF-8?q?Version=201.1.27=20-=20The=20CAM=20is=20now=20accessed?= =?UTF-8?q?=20only=20if=20the=20current=20channel=20actually=20has=20a=20n?= =?UTF-8?q?on-zero=20Ca=20=20=20value,=20and=20CAM=20access=20is=20complet?= =?UTF-8?q?ely=20suppressed=20during=20replay,=20which=20avoids=20=20=20pr?= =?UTF-8?q?oblems=20in=20case=20the=20CAM=20is=20attached=20to=20the=20pri?= =?UTF-8?q?mary=20DVB=20device.=20-=20The=20"Left"=20and=20"Right"=20butto?= =?UTF-8?q?ns=20now=20set=20the=20cursor=20to=20the=20first=20or=20last=20?= =?UTF-8?q?list=20item=20=20=20even=20if=20the=20list=20consist=20only=20o?= =?UTF-8?q?f=20a=20single=20page,=20like,=20for=20instance,=20the=20Main?= =?UTF-8?q?=20menu=20=20=20(thanks=20to=20Oliver=20Endriss).=20-=20Made=20?= =?UTF-8?q?the=20log=20message=20"OSD=20window=20width=20must=20be=20a=20m?= =?UTF-8?q?ultiple=20of=204..."=20a=20debug=20message=20=20=20instead=20of?= =?UTF-8?q?=20an=20error=20message,=20so=20it=20can=20be=20avoided=20by=20?= =?UTF-8?q?using=20a=20log=20level=20less=20than=203.=20-=20Updated=20Gree?= =?UTF-8?q?k=20language=20texts=20(thanks=20to=20Dimitrios=20Dimitrakos).?= =?UTF-8?q?=20-=20Fixed=20faulty=20behaviour=20of=20the=20"Mute"=20key=20i?= =?UTF-8?q?n=20case=20the=20channel=20display=20is=20visible=20=20=20(than?= =?UTF-8?q?ks=20to=20Florian=20Bartels=20for=20reporting=20this=20one=20an?= =?UTF-8?q?d=20Sascha=20Volkenandt=20for=20=20=20helping=20to=20fix=20it).?= =?UTF-8?q?=20-=20Modified=20LOF=20handling=20to=20allow=20for=20C-band=20?= =?UTF-8?q?reception=20(thanks=20to=20Malcolm=20Caldwell).=20-=20Added=20s?= =?UTF-8?q?ome=20missing=20cAudio=20handling=20calls=20(thanks=20to=20Wern?= =?UTF-8?q?er=20Fink).=20-=20Replaced=20the=20'for'=20loops=20in=20StripAu?= =?UTF-8?q?dioPackets()=20with=20memset()=20calls=20(thanks=20to=20=20=20W?= =?UTF-8?q?erner=20Fink).=20-=20Further=20increased=20the=20timeout=20unti?= =?UTF-8?q?l=20an=20index=20file=20is=20considerd=20no=20longer=20to=20be?= =?UTF-8?q?=20=20=20written.=20-=20Fixed=20a=20crash=20in=20case=20the=20i?= =?UTF-8?q?ndex=20file=20can't=20be=20accessed=20any=20more=20during=20rep?= =?UTF-8?q?lay=20=20=20(thanks=20to=20Stefan=20Huelswitt=20for=20reporting?= =?UTF-8?q?=20this=20one).=20-=20Fixed=20displaying=20messages=20in=20the?= =?UTF-8?q?=20status=20line=20in=20case=20they=20exceed=20the=20OSD=20widt?= =?UTF-8?q?h=20=20=20(thanks=20to=20Gerhard=20Steiner=20for=20reporting=20?= =?UTF-8?q?this=20one).=20-=20Avoiding=20high=20CPU=20load=20in=20case=20t?= =?UTF-8?q?he=20connection=20to=20LIRC=20gets=20lost=20(thanks=20to=20=20?= =?UTF-8?q?=20Ludwig=20Nussel).=20-=20Fixed=20handling=20repeat=20function?= =?UTF-8?q?=20with=20LIRC=20(thanks=20to=20Ludwig=20Nussel).=20-=20Fixed?= =?UTF-8?q?=20handling=20min/max=20borders=20when=20entering=20integer=20v?= =?UTF-8?q?alues=20(thanks=20to=20Andy=20=20=20Grobb=20for=20reporting=20t?= =?UTF-8?q?his=20one).=20-=20Implemented=20a=20"resume=20ID"=20which=20all?= =?UTF-8?q?ows=20several=20users=20to=20each=20have=20their=20own=20=20=20?= =?UTF-8?q?resume.vdr=20files=20(thanks=20to=20Martin=20Hammerschmid).=20T?= =?UTF-8?q?his=20parameter=20can=20be=20set=20in=20=20=20the=20"Setup/Repl?= =?UTF-8?q?ay"=20menu=20(see=20MANUAL=20for=20details).=20-=20Now=20using?= =?UTF-8?q?=20'libdtv'=20version=200.0.5=20(thanks=20to=20Rolf=20Hakenes?= =?UTF-8?q?=20for=20the=20new=20version=20=20=20and=20Stefan=20Huelswitt?= =?UTF-8?q?=20for=20adapting=20VDR=20to=20it).=20-=20If=20no=20device=20wi?= =?UTF-8?q?th=20an=20MPEG=20decoder=20can=20be=20found=20at=20startup,=20t?= =?UTF-8?q?he=20first=20device=20=20=20is=20now=20used=20as=20primary=20de?= =?UTF-8?q?vice=20(just=20to=20have=20some=20device).=20-=20Adjusted=20som?= =?UTF-8?q?e=20Premiere=20channels=20in=20'channels.conf'=20(thanks=20to?= =?UTF-8?q?=20Thomas=20Koch).=20-=20Updated=20'channels.conf.cable'=20(tha?= =?UTF-8?q?nks=20to=20Stefan=20Hu=C3=9Ffeldt).=20-=20The=20'epg.data'=20fi?= =?UTF-8?q?le=20is=20now=20read=20after=20all=20plugins=20have=20been=20st?= =?UTF-8?q?arted=20(thanks=20=20=20to=20Sascha=20Volkenandt).=20-=20The=20?= =?UTF-8?q?LIRC=20remote=20control=20no=20longer=20tries=20to=20learn=20ke?= =?UTF-8?q?ys=20if=20it=20can't=20connect=20to=20=20=20the=20LIRC=20daemon?= =?UTF-8?q?=20(thanks=20to=20Ludwig=20Nussel=20for=20reporting=20this=20on?= =?UTF-8?q?e).=20The=20same=20=20=20applies=20to=20the=20RCU=20remote=20co?= =?UTF-8?q?ntrol=20in=20case=20of=20errors=20during=20startup.=20-=20Fixed?= =?UTF-8?q?=20handling=20of=20Ca=20parameters=20with=20values=20<=3D=20MAX?= =?UTF-8?q?DEVICES,=20which=20don't=20indicate=20=20=20an=20actual=20encry?= =?UTF-8?q?pted=20channel=20(thanks=20to=20Stefan=20Huelswitt=20for=20repo?= =?UTF-8?q?rting=20this=20one).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eit.c | 51 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 17 deletions(-) (limited to 'eit.c') diff --git a/eit.c b/eit.c index 4274085..ff5dd42 100644 --- a/eit.c +++ b/eit.c @@ -16,7 +16,7 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * $Id: eit.c 1.67 2003/03/16 11:20:05 kls Exp $ + * $Id: eit.c 1.68 2003/04/12 11:27:31 kls Exp $ ***************************************************************************/ #include "eit.h" @@ -1011,29 +1011,37 @@ private: int length; uchar *data; public: - cCaDescriptor(int Source, int Transponder, int ServiceId, int CaSystem, int Length, uchar *Data); + cCaDescriptor(int Source, int Transponder, int ServiceId, int CaSystem, int CaPid, int Length, uchar *Data); virtual ~cCaDescriptor(); int Length(void) const { return length; } const uchar *Data(void) const { return data; } }; -cCaDescriptor::cCaDescriptor(int Source, int Transponder, int ServiceId, int CaSystem, int Length, uchar *Data) +cCaDescriptor::cCaDescriptor(int Source, int Transponder, int ServiceId, int CaSystem, int CaPid, int Length, uchar *Data) { source = Source; transponder = Transponder; serviceId = ServiceId; caSystem = CaSystem; - length = Length; + length = Length + 6; data = MALLOC(uchar, length); - memcpy(data, Data, length); - /*//XXX just while debugging... + data[0] = DESCR_CA; + data[1] = length - 2; + data[2] = (caSystem >> 8) & 0xFF; + data[3] = caSystem & 0xFF; + data[4] = ((CaPid >> 8) & 0xFF) | 0xE0; + data[5] = CaPid & 0xFF; + if (Length) + memcpy(&data[6], Data, Length); +//#define DEBUG_CA_DESCRIPTORS 1 +#ifdef DEBUG_CA_DESCRIPTORS char buffer[1024]; char *q = buffer; q += sprintf(q, "CAM: %04X %5d %4d", source, transponder, serviceId); for (int i = 0; i < length; i++) q += sprintf(q, " %02X", data[i]); dsyslog(buffer); - *///XXX +#endif } cCaDescriptor::~cCaDescriptor() @@ -1312,16 +1320,13 @@ void cSIProcessor::Action() if (pid == pmtPid && buf[0] == 0x02 && currentSource && currentTransponder) { struct Pid *pi = siParsePMT(buf); if (pi) { - for (struct LIST *d = (struct LIST *)pi->Descriptors; d; d = (struct LIST *)xSucc(d)) { - if (DescriptorTag(d) == DESCR_CA) { - uchar *Data = ((ConditionalAccessDescriptor *)d)->Data; - int CaSystem = (Data[2] << 8) | Data[3]; - if (!caDescriptors->Get(currentSource, currentTransponder, pi->ProgramID, CaSystem)) { - cMutexLock MutexLock(&caDescriptorsMutex); - caDescriptors->Add(new cCaDescriptor(currentSource, currentTransponder, pi->ProgramID, CaSystem, ((ConditionalAccessDescriptor *)d)->Amount, Data)); - } - //XXX update??? - } + struct Descriptor *d; + for (d = (struct Descriptor *)pi->Descriptors->Head; d; d = (struct Descriptor *)xSucc(d)) + NewCaDescriptor(d, pi->ProgramID); + // Also scan the PidInfo list for descriptors - some broadcasts send them only here. + for (struct PidInfo *p = (struct PidInfo *)pi->InfoList->Head; p; p = (struct PidInfo *)xSucc(p)) { + for (d = (struct Descriptor *)p->Descriptors->Head; d; d = (struct Descriptor *)xSucc(d)) + NewCaDescriptor(d, pi->ProgramID); } } xMemFreeAll(NULL); @@ -1438,6 +1443,18 @@ void cSIProcessor::TriggerDump(void) lastDump = 0; } +void cSIProcessor::NewCaDescriptor(struct Descriptor *d, int ProgramID) +{ + if (DescriptorTag(d) == DESCR_CA) { + struct CaDescriptor *cd = (struct CaDescriptor *)d; + if (!caDescriptors->Get(currentSource, currentTransponder, ProgramID, cd->CA_type)) { + cMutexLock MutexLock(&caDescriptorsMutex); + caDescriptors->Add(new cCaDescriptor(currentSource, currentTransponder, ProgramID, cd->CA_type, cd->CA_PID, cd->DataLength, cd->Data)); + } + //XXX update??? + } +} + int cSIProcessor::GetCaDescriptors(int Source, int Transponder, int ServiceId, int BufSize, uchar *Data) { if (BufSize > 0 && Data) { -- cgit v1.2.3