From 3038be2a6a849e726d6fe99236d5dc61b679198f Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Mon, 1 Nov 2004 18:00:00 +0100 Subject: =?UTF-8?q?Version=201.3.15=20-=20Fixed=20some=20typos=20in=20the?= =?UTF-8?q?=20Makefile's=20'font'=20target=20(thanks=20to=20Uwe=20Hanke).?= =?UTF-8?q?=20-=20Added=20more=20checks=20and=20polling=20when=20getting?= =?UTF-8?q?=20frontend=20events=20(based=20on=20a=20patch=20=20=20from=20W?= =?UTF-8?q?erner=20Fink).=20-=20No=20longer=20explicitly=20waiting=20for?= =?UTF-8?q?=20a=20tuner=20lock=20when=20switching=20channels=20=20=20(appa?= =?UTF-8?q?rently=20setting=20"live"=20PIDs=20before=20the=20tuner=20is=20?= =?UTF-8?q?locked=20doesn't=20hurt).=20=20=20Moved=20the=20wait=20into=20c?= =?UTF-8?q?Device::AttachReceiver()=20instead.=20-=20Immediately=20display?= =?UTF-8?q?ing=20the=20new=20channel=20info=20when=20switching=20channel?= =?UTF-8?q?=20groups.=20-=20Moved=20the=20main=20program=20loop=20variable?= =?UTF-8?q?s=20further=20up=20to=20allow=20compilation=20with=20=20=20olde?= =?UTF-8?q?r=20compiler=20versions=20(thanks=20to=20Marco=20Schl=C3=BC?= =?UTF-8?q?=C3=9Fler=20for=20reporting=20this=20one).=20-=20Now=20calling?= =?UTF-8?q?=20pthread=5Fcond=5Fbroadcast()=20in=20the=20destructor=20of=20?= =?UTF-8?q?cCondWait=20and=20=20=20cCondVar=20to=20make=20sure=20any=20sle?= =?UTF-8?q?epers=20will=20wake=20up=20(suggested=20by=20Werner=20Fink).=20?= =?UTF-8?q?=20=20Also=20using=20pthread=5Fcond=5Fbroadcast()=20instead=20o?= =?UTF-8?q?f=20pthread=5Fcond=5Fsignal()=20in=20=20=20cCondWait,=20in=20ca?= =?UTF-8?q?se=20there=20is=20more=20than=20one=20sleeper.=20-=20Making=20s?= =?UTF-8?q?ure=20that=20timers=20and=20channels=20are=20only=20saved=20tog?= =?UTF-8?q?ether,=20in=20a=20consistent=20=20=20manner=20(thanks=20to=20Mi?= =?UTF-8?q?rko=20D=C3=B6lle=20for=20reporting=20a=20problem=20with=20incon?= =?UTF-8?q?sistent=20=20=20channel=20and=20timer=20lists).=20-=20Now=20han?= =?UTF-8?q?dling=20the=20channel=20name,=20short=20name=20and=20provider?= =?UTF-8?q?=20separately.=20cChannel=20=20=20therefore=20has=20two=20new?= =?UTF-8?q?=20functions,=20ShortName()=20and=20Provider().=20ShortName()?= =?UTF-8?q?=20=20=20can=20be=20used=20to=20display=20a=20short=20version?= =?UTF-8?q?=20of=20the=20name=20(in=20case=20such=20a=20version=20=20=20is?= =?UTF-8?q?=20available).=20The=20optional=20boolean=20parameter=20of=20Sh?= =?UTF-8?q?ortName()=20can=20be=20set=20to=20=20=20true=20to=20make=20it?= =?UTF-8?q?=20return=20the=20name,=20if=20no=20short=20name=20is=20availab?= =?UTF-8?q?le.=20=20=20The=20sequence=20of=20'name'=20and=20'short=20name'?= =?UTF-8?q?=20in=20the=20channels.conf=20file=20has=20been=20=20=20swapped?= =?UTF-8?q?=20(see=20man=20vdr(5)).=20-=20Added=20the=20'portal=20name'=20?= =?UTF-8?q?to=20cChannels=20(thanks=20to=20Marco=20Schl=C3=BC=C3=9Fler).?= =?UTF-8?q?=20-=20Fixed=20handling=20key=20codes=20that=20start=20with=200?= =?UTF-8?q?x1B=20in=20the=20KBD=20remote=20control=20code.=20-=20Now=20usi?= =?UTF-8?q?ng=20qsort()=20to=20sort=20cListBase=20lists.=20For=20this,=20t?= =?UTF-8?q?he=20virtual=20function=20=20=20cListObject::operator<()=20has?= =?UTF-8?q?=20been=20replaced=20with=20cListObject::Compare().=20=20=20Plu?= =?UTF-8?q?gins=20that=20implement=20derived=20cListObject=20classes=20may?= =?UTF-8?q?=20need=20to=20adjust=20their=20=20=20code.=20-=20The=20"Channe?= =?UTF-8?q?ls"=20menu=20can=20now=20be=20sorted=20"by=20number"=20(default?= =?UTF-8?q?),=20"by=20name"=20and=20=20=20"by=20provider".=20While=20in=20?= =?UTF-8?q?the=20"Channels"=20menu,=20pressing=20the=20'0'=20key=20switche?= =?UTF-8?q?s=20=20=20through=20these=20modes.=20-=20Fixed=20the=20buffer?= =?UTF-8?q?=20size=20in=20cRecording::SortName().=20-=20Now=20displaying?= =?UTF-8?q?=20the=20name=20of=20the=20remote=20control=20for=20which=20the?= =?UTF-8?q?=20keys=20are=20being=20=20=20learned=20inside=20the=20menu=20t?= =?UTF-8?q?o=20avoid=20overwriting=20the=20date/time=20in=20the=20'classic?= =?UTF-8?q?'=20=20=20skin=20(thanks=20to=20Oliver=20Endriss=20for=20report?= =?UTF-8?q?ing=20this=20one).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- channels.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'channels.h') diff --git a/channels.h b/channels.h index a2530f1..62b00c3 100644 --- a/channels.h +++ b/channels.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.h 1.20 2004/10/22 14:09:47 kls Exp $ + * $Id: channels.h 1.22 2004/10/31 12:54:26 kls Exp $ */ #ifndef __CHANNELS_H @@ -89,9 +89,11 @@ class cChannel : public cListObject { private: static char *buffer; static const char *ToText(const cChannel *Channel); - enum { MaxChannelName = 64 }; // 63 chars + terminating 0! + char *name; + char *shortName; + char *provider; + char *portalName; int __BeginData__; - char name[MaxChannelName]; int frequency; // MHz int source; int srate; @@ -133,6 +135,9 @@ public: bool Parse(const char *s, bool AllowNonUniqueID = false); bool Save(FILE *f); const char *Name(void) const { return name; } + const char *ShortName(bool OrName = false) const { return (OrName && isempty(shortName)) ? name : shortName; } + const char *Provider(void) const { return provider; } + const char *PortalName(void) const { return portalName; } int Frequency(void) const { return frequency; } ///< Returns the actual frequency, as given in 'channels.conf' int Transponder(void) const; ///< Returns the transponder frequency in MHz, plus the polarization in case of sat static int Transponder(int Frequency, char Polarization); ///< builds the transponder from the given Frequency and Polarization @@ -171,7 +176,8 @@ public: bool SetCableTransponderData(int Source, int Frequency, int Modulation, int Srate, int CoderateH); bool SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CodeRateH, int CodeRateL, int Guard, int Transmission); void SetId(int Nid, int Tid, int Sid, int Rid = 0); - void SetName(const char *Name); + void SetName(const char *Name, const char *ShortName, const char *Provider); + void SetPortalName(const char *PortalName); void SetPids(int Vpid, int Ppid, int *Apids, char ALangs[][4], int *Dpids, char DLangs[][4], int Tpid); void SetCaIds(const int *CaIds); // list must be zero-terminated void SetCaDescriptors(int Level); @@ -205,7 +211,7 @@ public: ///< Returns 0 if no channels have been modified, 1 if an automatic ///< modification has been made, and 2 if the user has made a modification. ///< Calling this function resets the 'modified' flag to 0. - cChannel *NewChannel(const cChannel *Transponder, const char *Name, int Nid, int Tid, int Sid, int Rid = 0); + cChannel *NewChannel(const cChannel *Transponder, const char *Name, const char *ShortName, const char *Provider, int Nid, int Tid, int Sid, int Rid = 0); }; extern cChannels Channels; -- cgit v1.2.3