diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2004-02-08 18:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2004-02-08 18:00:00 +0100 |
commit | 3fc29659759abb10154b78f9e3568407e523e1fc (patch) | |
tree | fdc9df96602026fc353d90733b74b61a8f679cf7 | |
parent | 7c5ef5dbbada89f55aa15a7c5ac653f4390ce9b4 (diff) | |
download | vdr-patch-lnbsharing-3fc29659759abb10154b78f9e3568407e523e1fc.tar.gz vdr-patch-lnbsharing-3fc29659759abb10154b78f9e3568407e523e1fc.tar.bz2 |
Version 1.3.4vdr-1.3.4
- Fixed handling language codes in case there is no audio or Dolby PID.
- Fixed handling CA ids (was broken in 1.3.3).
- Fixed the SVDRP command 'STAT DISK' to avoid a 'division by 0' in case the
disk is full (thanks to Jens Rosenboom).
- Fixed handling bitmap indexes for 256 color mode (thanks to Andreas Regel).
- Now handling "linked services" (based on the 'autopid' patch from Andreas
Schultz). Linked channels are detected and added to 'channels.conf', but
currently they are not yet presented to the user other than being in the
normal channel list (this will come later).
- Preliminary fix for the "Unknown picture type error" (thanks to Sascha
Volkenandt for his support in debugging this one). This may slow down switching
between channels on different transponders for now, but a better solution will
come later.
- Fixed the validity check for channel IDs, because some providers use TIDs with
value 0 (thanks to Thomas Bergwinkl).
- Enabled switching to a channel even if it has no Vpid or Apid set, because these
might be automatically set when tuned to that transponder.
- No longer closing the Channels menu after trying to switch to a channel that
is currently not available.
- Removed the now obsolete CaCaps stuff. The Setup/CICAM menu now displays the
actual CAM type as reported by the CAM. The 'ca.conf' file has been stripped
down to the values 0..4.
-rw-r--r-- | CONTRIBUTORS | 12 | ||||
-rw-r--r-- | HISTORY | 25 | ||||
-rw-r--r-- | README.developer | 4 | ||||
-rw-r--r-- | ca.conf | 83 | ||||
-rw-r--r-- | channels.c | 92 | ||||
-rw-r--r-- | channels.conf | 10 | ||||
-rw-r--r-- | channels.h | 24 | ||||
-rw-r--r-- | ci.c | 10 | ||||
-rw-r--r-- | ci.h | 3 | ||||
-rw-r--r-- | config.c | 49 | ||||
-rw-r--r-- | config.h | 9 | ||||
-rw-r--r-- | device.c | 16 | ||||
-rw-r--r-- | device.h | 7 | ||||
-rw-r--r-- | dvbdevice.c | 9 | ||||
-rw-r--r-- | eit.c | 36 | ||||
-rw-r--r-- | fontfix-iso8859-5.c | 1 | ||||
-rw-r--r-- | menu.c | 21 | ||||
-rw-r--r-- | osdbase.c | 16 | ||||
-rw-r--r-- | osdbase.h | 12 | ||||
-rw-r--r-- | sections.c | 4 | ||||
-rw-r--r-- | svdrp.c | 9 | ||||
-rw-r--r-- | vdr.c | 4 |
22 files changed, 245 insertions, 211 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 1f8e02a..bc4c2ee 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -685,6 +685,7 @@ Sascha Volkenandt <sascha@akv-soft.de> for reporting a problem with cReceivers that use a ring buffer and didn't immediately return from their Receive() function if the buffer runs full for reporting a crash in case there is no DVB hardware present + for his support in debugging the the "Unknown picture type error" Malcolm Caldwell <malcolm.caldwell@ntu.edu.au> for modifying LOF handling to allow for C-band reception @@ -921,3 +922,14 @@ Christian Tramnitz <maillist@tramnitz.com> for terrestrial transponders for his support in debugging a problem in setting the source type for newly detected terrestrial transponders + +Jens Rosenboom <me@jayr.de> + for fixing the SVDRP command 'STAT DISK' to avoid a 'division by 0' in case + the disk is full + +Andreas Regel <andreas.regel@gmx.de> + for fixing handling bitmap indexes for 256 color mode + +Thomas Bergwinkl <Thomas.Bergwinkl@t-online.de> + for fixing the validity check for channel IDs, because some providers use TIDs + with value 0 @@ -2626,3 +2626,28 @@ Video Disk Recorder Revision History code (see man vdr(5)). Currently this is only stored and not yet used otherwise. - Added a call to cStatus::MsgOsdCurrentItem() to cMenuEditItem::SetValue() (thanks to Martin Hammerschmid). + +2004-02-08: Version 1.3.4 + +- Fixed handling language codes in case there is no audio or Dolby PID. +- Fixed handling CA ids (was broken in 1.3.3). +- Fixed the SVDRP command 'STAT DISK' to avoid a 'division by 0' in case the + disk is full (thanks to Jens Rosenboom). +- Fixed handling bitmap indexes for 256 color mode (thanks to Andreas Regel). +- Now handling "linked services" (based on the 'autopid' patch from Andreas + Schultz). Linked channels are detected and added to 'channels.conf', but + currently they are not yet presented to the user other than being in the + normal channel list (this will come later). +- Preliminary fix for the "Unknown picture type error" (thanks to Sascha + Volkenandt for his support in debugging this one). This may slow down switching + between channels on different transponders for now, but a better solution will + come later. +- Fixed the validity check for channel IDs, because some providers use TIDs with + value 0 (thanks to Thomas Bergwinkl). +- Enabled switching to a channel even if it has no Vpid or Apid set, because these + might be automatically set when tuned to that transponder. +- No longer closing the Channels menu after trying to switch to a channel that + is currently not available. +- Removed the now obsolete CaCaps stuff. The Setup/CICAM menu now displays the + actual CAM type as reported by the CAM. The 'ca.conf' file has been stripped + down to the values 0..4. diff --git a/README.developer b/README.developer index d079d63..4fe75c8 100644 --- a/README.developer +++ b/README.developer @@ -30,7 +30,7 @@ Here's a list of the highlights - and what _not_ to expect yet to have them start at some high number. - Improved CAM support. Channels with conditional access now automatically use the device that contains the proper CAM. -- No NVOD or "linked services" support yet. +- No NVOD support yet. Note that this is currently work in progress, so there may be some areas that don't work as smooth as expected, yet. @@ -47,7 +47,7 @@ Known issues: EURO1080:12168:v:S19.2E:27500:308:256:0:FF:21100:1:1088:0 - in your 'channels.conf' file. Note the Ca parameter 'F' (255 in hex), + in your 'channels.conf' file. Note the Ca parameter 'FF' (255 in hex), which gives this channel a non-existent Ca mode, so that it won't be tuned to at all. If you really want to tune to this channel for tests, do it on your own risk. @@ -9,89 +9,6 @@ 0 Free To Air -# BetaCrypt - -101 Premiere World -102 ORF -103 DIGI-Kabel - -# Cryptoworks - -201 GOD-DIGITAL -202 Slovak Link -203 Czech Link - -# Videoguard - -301 Sky Digital - -# Viaccess 1 - -401 SRG Swiss -402 NTV Plus -403 Viasat -404 Parabole Reunion -405 Hrvatska radiotelevizija -406 RTV Slovenija -407 Visat - -# Viaccess 2 - -501 Alpha Digital Greece - -# Cryptoworks - -601 UPC Direct -602 DigiTurk - -# Mediaguard - -701 CanalSatellite Reunion - -# Mediaguard 2 - -801 Orbit Network - -# Nagravision - -901 PolSat Cyfrowy -902 TV Cabo - -# Irdeto 2 - -1001 ADD -1002 Nova Greece -1003 Multichoice Africa - -# Conax - -1101 Canal Digital Scandinavia - -# Mediaguard, Viaccess 1, Viaccess 2 - -10001 AB Sat France -10002 TPS France - -# Videoguard, Mediaguard 2, Irdeto 2 - -12001 Sky Italia - -# Mediaguard 1, Irdeto 1 - -13001 Canal Digitaal Satelliet NL - -# Mediaguard 1, Mediaguard 2, Viaccess 1 - -14001 Canal Satellite France - -# Mediaguard 2, Nagravision - -15001 Digital+ Espana - -# Mediaguard 2, Cryptoworks - -16001 Cyfra+ Polska - # Special values to "hard code" a channel to a specific DVB card: 1 DVB 1 @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.c 1.20 2004/01/25 15:32:08 kls Exp $ + * $Id: channels.c 1.23 2004/02/08 11:05:22 kls Exp $ */ #include "channels.h" @@ -169,11 +169,13 @@ cChannel::cChannel(void) guard = GUARD_INTERVAL_AUTO; hierarchy = HIERARCHY_AUTO; modification = CHANNELMOD_NONE; + linkChannels = NULL; + refChannel = NULL; } -cChannel::cChannel(const cChannel *Channel) +cChannel::cChannel(const cChannel &Channel) { - *this = *Channel; + *this = Channel; *name = 0; vpid = 0; ppid = 0; @@ -188,6 +190,28 @@ cChannel::cChannel(const cChannel *Channel) number = 0; groupSep = false; modification = CHANNELMOD_NONE; + linkChannels = NULL; + refChannel = NULL; +} + +cChannel::~cChannel() +{ + delete linkChannels; + linkChannels = NULL; // more than one channel can link to this one, so we need the following loop + for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { + if (Channel->linkChannels) { + for (cLinkChannel *lc = Channel->linkChannels->First(); lc; lc = Channel->linkChannels->Next(lc)) { + if (lc->Channel() == this) { + Channel->linkChannels->Del(lc); + break; + } + } + if (Channel->linkChannels->Count() == 0) { + delete Channel->linkChannels; + Channel->linkChannels = NULL; + } + } + } } cChannel& cChannel::operator= (const cChannel &Channel) @@ -320,8 +344,10 @@ static int IntArrayToString(char *s, const int *a, int Base = 10, const char n[] int i = 0; while (a[i] || i == 0) { q += sprintf(q, Base == 16 ? "%s%X" : "%s%d", i ? "," : "", a[i]); - if (n && *n[i]) + if (a[i] && n && *n[i]) q += sprintf(q, "=%s", n[i]); + if (!a[i]) + break; i++; } *q = 0; @@ -375,8 +401,11 @@ void cChannel::SetCaIds(const int *CaIds) IntArrayToString(OldCaIdsBuf, caids, 16); IntArrayToString(NewCaIdsBuf, CaIds, 16); dsyslog("changing caids of channel %d from %s to %s", Number(), OldCaIdsBuf, NewCaIdsBuf); - for (int i = 0; i <= MAXCAIDS && CaIds[i]; i++) // <= to copy the terminating 0 + for (int i = 0; i <= MAXCAIDS; i++) { // <= to copy the terminating 0 caids[i] = CaIds[i]; + if (!CaIds[i]) + break; + } modification |= CHANNELMOD_CA; Channels.SetModified(); } @@ -392,6 +421,57 @@ void cChannel::SetCaDescriptors(int Level) } } +void cChannel::SetLinkChannels(cLinkChannels *LinkChannels) +{ + if (!linkChannels && !LinkChannels) + return; + if (linkChannels && LinkChannels) { + cLinkChannel *lca = linkChannels->First(); + cLinkChannel *lcb = LinkChannels->First(); + while (lca && lcb) { + if (lca->Channel() != lcb->Channel()) { + lca = NULL; + break; + } + lca = linkChannels->Next(lca); + lcb = LinkChannels->Next(lcb); + } + if (!lca && !lcb) { + delete LinkChannels; + return; // linkage has not changed + } + } + char buffer[((linkChannels ? linkChannels->Count() : 0) + (LinkChannels ? LinkChannels->Count() : 0)) * 6 + 256]; // 6: 5 digit channel number plus blank, 256: other texts (see below) plus reserve + char *q = buffer; + q += sprintf(q, "linking channel %d from", Number()); + if (linkChannels) { + for (cLinkChannel *lc = linkChannels->First(); lc; lc = linkChannels->Next(lc)) { + lc->Channel()->SetRefChannel(NULL); + q += sprintf(q, " %d", lc->Channel()->Number()); + } + delete linkChannels; + } + else + q += sprintf(q, " none"); + q += sprintf(q, " to"); + linkChannels = LinkChannels; + if (linkChannels) { + for (cLinkChannel *lc = linkChannels->First(); lc; lc = linkChannels->Next(lc)) { + lc->Channel()->SetRefChannel(this); + q += sprintf(q, " %d", lc->Channel()->Number()); + //dsyslog("link %4d -> %4d: %s", Number(), lc->Channel()->Number(), lc->Channel()->Name()); + } + } + else + q += sprintf(q, " none"); + dsyslog(buffer); +} + +void cChannel::SetRefChannel(cChannel *RefChannel) +{ + refChannel = RefChannel; +} + static int PrintParameter(char *p, char Name, int Value) { return Value >= 0 && Value != 999 ? sprintf(p, "%c%d", Name, Value) : 0; @@ -771,7 +851,7 @@ cChannel *cChannels::NewChannel(const cChannel *Transponder, const char *Name, i { if (Transponder) { dsyslog("creating new channel '%s' on %s transponder %d with id %d-%d-%d-%d", Name, cSource::ToString(Transponder->Source()), Transponder->Transponder(), Nid, Tid, Sid, Rid); - cChannel *NewChannel = new cChannel(Transponder); + cChannel *NewChannel = new cChannel(*Transponder); Add(NewChannel); ReNumber(); NewChannel->SetId(Nid, Tid, Sid, Rid, false); diff --git a/channels.conf b/channels.conf index f5c6dd0..e7aa7f3 100644 --- a/channels.conf +++ b/channels.conf @@ -11,7 +11,7 @@ WDR Köln:11836:hC34:S19.2E:27500:601:602=deu:604:0:28111:1:1101:0 BR-alpha:11836:hC34:S19.2E:27500:701:702=deu:704:0:28112:1:1101:0 SÜDWEST BW:11836:hC34:S19.2E:27500:801:802=deu:804:0:28113:1:1101:0 Phoenix:11836:hC34:S19.2E:27500:901:902=deu:904:0:28114:1:1101:0 -ZDF:11953:hC34:S19.2E:27500:110:120=deu;125=deu:130:3:28006:1:1079:0 +ZDF:11953:hC34:S19.2E:27500:110:120=deu;125=deu:130:0:28006:1:1079:0 3sat:11953:hC34:S19.2E:27500:210:220=deu:230:0:28007:1:1079:0 KiKa:11953:hC34:S19.2E:27500:310:320=deu:330:0:28008:1:1079:0 arte:11836:hC34:S19.2E:27500:401:402=deu,403=fra:404:0:28109:1:1101:0 @@ -30,7 +30,7 @@ EURONEWS:11817:vC34:S19.2E:27500:163:92=fra,93=eng,94=ita,95=esl,91=rus,98=por,9 Sky News:11597:vC56:S19.2E:22000:305:306=eng:0:0:28707:1:1026:0 Veronica/FoxKids:12574:hC56:S19.2E:22000:518+8190:92=dut:38:622,602,100:5020:53:1109:0 BVN:12574:hC56:S19.2E:22000:515+8190:96=dut:36:0:5025:53:1109:0 -CNBC Europe:12610:vC56:S19.2E:22000:944:945=eng:0:0:12200:1:1112:0 +CNBC Europe:12610:vC56:S19.2E:22000:944:945=eng:946:0:12200:1:1112:0 n-tv:12669:vC56:S19.2E:22000:162:96=deu:55:0:12730:1:1116:0 Al Jazeera:11567:vC56:S19.2E:22000:55:56=ara:0:0:9021:1:1024:0 TW1:12692:hC56:S19.2E:22000:166:167=deu:168:0:13013:1:1117:0 @@ -47,7 +47,7 @@ RBB Berlin:12109:hC34:S19.2E:27500:601:602=deu:604:0:28206:1:1073:0 START,PREMIERE START:11797:hC34:S19.2E:27500:255:256=deu:32:1702,1722,1801:8:133:2:0 PREM 1,PREMIERE 1:11797:hC34:S19.2E:27500:511:512=deu;515=deu:0:1702,1722,1801:10:133:2:0 PREM 2,PREMIERE 2:11797:hC34:S19.2E:27500:1791:1792=deu;1795=deu:0:1702,1722,1801:11:133:2:0 -PREM 3,PREMIERE 3:11797:hC34:S19.2E:27500:2303:2304=deu,2305=deu:0:1702,1722,1801:43:133:2:0 +PREM 3,PREMIERE 3:11797:hC34:S19.2E:27500:2303:2304=deu:0:1702,1722,1801:43:133:2:0 PREM 4,PREMIERE 4:11797:hC34:S19.2E:27500:767:768=deu:0:1702,1722,1801:9:133:2:0 PREM 5,PREMIERE 5:11797:hC34:S19.2E:27500:1279:1280=deu:0:1702,1722,1801:29:133:2:0 PREM 6,PREMIERE 6:11797:hC34:S19.2E:27500:1535:1536=deu:0:1702,1722,1801:41:133:2:0 @@ -59,7 +59,7 @@ DIREKT,PREMIERE DIREKT:12031:hC34:S19.2E:27500:2815:2816=deu,2817=deu;2819=deu:0 B-UHSE,BEATE-UHSE.TV:12070:hC34:S19.2E:27500:1023:1024=deu:0:1702,1722,1801:21:133:1:0 EROTIK,PREMIERE EROTIK:12031:hC34:S19.2E:27500:1279:0:0:1702,1722,1801:513:133:4:0 :Sportsworld -SPORT 1,PREMIERE SPORT 1:11719:hC34:S19.2E:27500:255:256=deu,257=deu:0:1702,1722,1801:17:133:3:0 +Konferenz:11719:hC34:S19.2E:27500:255:256=deu,257=deu:0:1702,1722,1801:17:133:3:0 SPORT 2,PREMIERE SPORT 2:12031:hC34:S19.2E:27500:3839:3840=deu,3841=deu:0:1702,1722,1801:27:133:4:0 :Beta Digital N24:12480:vC34:S19.2E:27500:2047:2048:36:0:47:133:33:0 @@ -68,7 +68,7 @@ Liberty TV.com:12610:vC56:S19.2E:22000:941:943=deu:0:0:12199:1:1112:0 ProSieben Austria:12051:vC34:S19.2E:27500:161:84=deu:36:0:20002:1:1082:0 Kabel 1 Schweiz:12051:vC34:S19.2E:27500:162:163=deu:165:0:20003:1:1082:0 Kabel 1 Austria:12051:vC34:S19.2E:27500:166:167=deu:169:0:20004:1:1082:0 -ProSieben Schweiz:12051:vC34:S19.2E:27500:289:290:33:0:20001:1:1082:0 +ProSieben Schweiz:12051:vC34:S19.2E:27500:289:290=deu:33:0:20001:1:1082:0 FRANCE 5:12207:vC34:S19.2E:27500:160:80=fra:32:0:8501:1:1090:0 LCP:12207:vC34:S19.2E:27500:165:100=fra:0:0:8506:1:1090:0 ESCALES:12285:vC34:S19.2E:27500:165:100:0:500,100:17025:1:1094:0 @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: channels.h 1.13 2004/01/25 15:31:16 kls Exp $ + * $Id: channels.h 1.15 2004/02/08 12:20:22 kls Exp $ */ #ifndef __CHANNELS_H @@ -59,13 +59,26 @@ public: tChannelID(void) { source = nid = tid = sid = rid = 0; } tChannelID(int Source, int Nid, int Tid, int Sid, int Rid = 0) { source = Source; nid = Nid; tid = Tid; sid = Sid; rid = Rid; } bool operator== (const tChannelID &arg) const; - bool Valid(void) { return tid && sid; } // nid and rid are optional and source may be 0//XXX source may not be 0??? + bool Valid(void) { return (nid || tid) && sid; } // rid is optional and source may be 0//XXX source may not be 0??? tChannelID &ClrRid(void) { rid = 0; return *this; } static tChannelID FromString(const char *s); const char *ToString(void); static const tChannelID InvalidID; }; +class cChannel; + +class cLinkChannel : public cListObject { +private: + cChannel *channel; +public: + cLinkChannel(cChannel *Channel) { channel = Channel; } + cChannel *Channel(void) { return channel; } + }; + +class cLinkChannels : public cList<cLinkChannel> { + }; + class cChannel : public cListObject { friend class cMenuEditChannel; private: @@ -102,11 +115,14 @@ private: int hierarchy; int __EndData__; int modification; + cLinkChannels *linkChannels; + cChannel *refChannel; const char *ParametersToString(void); bool StringToParameters(const char *s); public: cChannel(void); - cChannel(const cChannel *Channel); + cChannel(const cChannel &Channel); + ~cChannel(); cChannel& operator= (const cChannel &Channel); const char *ToText(void); bool Parse(const char *s, bool AllowNonUniqueID = false); @@ -153,6 +169,8 @@ public: 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); + void SetLinkChannels(cLinkChannels *LinkChannels); + void SetRefChannel(cChannel *RefChannel); }; class cChannels : public cRwLock, public cConfig<cChannel> { @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: ci.c 1.21 2004/01/02 15:07:36 kls Exp $ + * $Id: ci.c 1.22 2004/02/08 15:02:04 kls Exp $ */ #include "ci.h" @@ -763,6 +763,7 @@ public: virtual ~cCiApplicationInformation(); virtual bool Process(int Length = 0, const uint8_t *Data = NULL); bool EnterMenu(void); + const char *GetMenuString(void) { return menuString; } }; cCiApplicationInformation::cCiApplicationInformation(int SessionId, cCiTransportConnection *Tc) @@ -1559,6 +1560,13 @@ cCiEnquiry *cCiHandler::GetEnquiry(void) return NULL; } +const char *cCiHandler::GetCamName(int Slot) +{ + cMutexLock MutexLock(&mutex); + cCiApplicationInformation *ai = (cCiApplicationInformation *)GetSessionByResourceId(RI_APPLICATION_INFORMATION, Slot); + return ai ? ai->GetMenuString() : NULL; +} + const unsigned short *cCiHandler::GetCaSystemIds(int Slot) { cMutexLock MutexLock(&mutex); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: ci.h 1.12 2003/12/31 13:49:49 kls Exp $ + * $Id: ci.h 1.13 2004/02/08 14:36:23 kls Exp $ */ #ifndef __CI_H @@ -110,6 +110,7 @@ public: bool EnterMenu(int Slot); cCiMenu *GetMenu(void); cCiEnquiry *GetEnquiry(void); + const char *GetCamName(int Slot); const unsigned short *GetCaSystemIds(int Slot); bool ProvidesCa(const unsigned short *CaSystemIds); //XXX Slot??? bool SetCaPmt(cCiCaPmt &CaPmt, int Slot); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.c 1.121 2004/01/25 14:41:10 kls Exp $ + * $Id: config.c 1.122 2004/02/08 15:04:41 kls Exp $ */ #include "config.h" @@ -286,7 +286,6 @@ cSetup::cSetup(void) MultiSpeedMode = 0; ShowReplayMode = 0; ResumeID = 0; - memset(CaCaps, sizeof(CaCaps), 0); CurrentChannel = -1; CurrentVolume = MAXVOLUME; } @@ -352,50 +351,6 @@ bool cSetup::Load(const char *FileName) return false; } -void cSetup::StoreCaCaps(const char *Name) -{ - cSetupLine *l; - while ((l = Get(Name)) != NULL) - Del(l); - for (int d = 0; d < MAXDEVICES; d++) { - char buffer[MAXPARSEBUFFER]; - char *q = buffer; - *buffer = 0; - for (int i = 0; i < MAXCACAPS; i++) { - if (CaCaps[d][i]) { - if (!*buffer) - q += snprintf(buffer, sizeof(buffer), "%d", d + 1); - q += snprintf(q, sizeof(buffer) - (q - buffer), " %d", CaCaps[d][i]); - } - } - if (*buffer) - Store(Name, buffer, NULL, true); - } -} - -bool cSetup::ParseCaCaps(const char *Value) -{ - char *p; - int d = strtol(Value, &p, 10); - if (d > 0 && d <= MAXDEVICES) { - d--; - int i = 0; - while (p != Value && p && *p) { - if (i < MAXCACAPS) { - int c = strtol(p, &p, 10); - if (c > 0) - CaCaps[d][i++] = c; - else - return false; - } - else - return false; - } - return true; - } - return false; -} - void cSetup::StoreLanguages(const char *Name, int *Values) { char buffer[I18nNumLanguages * 4]; @@ -473,7 +428,6 @@ bool cSetup::Parse(const char *Name, const char *Value) else if (!strcasecmp(Name, "MultiSpeedMode")) MultiSpeedMode = atoi(Value); else if (!strcasecmp(Name, "ShowReplayMode")) ShowReplayMode = atoi(Value); else if (!strcasecmp(Name, "ResumeID")) ResumeID = atoi(Value); - else if (!strcasecmp(Name, "CaCaps")) return ParseCaCaps(Value); else if (!strcasecmp(Name, "CurrentChannel")) CurrentChannel = atoi(Value); else if (!strcasecmp(Name, "CurrentVolume")) CurrentVolume = atoi(Value); else @@ -525,7 +479,6 @@ bool cSetup::Save(void) Store("MultiSpeedMode", MultiSpeedMode); Store("ShowReplayMode", ShowReplayMode); Store("ResumeID", ResumeID); - StoreCaCaps("CaCaps"); Store("CurrentChannel", CurrentChannel); Store("CurrentVolume", CurrentVolume); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: config.h 1.184 2004/01/24 10:03:55 kls Exp $ + * $Id: config.h 1.186 2004/02/08 15:04:52 kls Exp $ */ #ifndef __CONFIG_H @@ -20,8 +20,8 @@ #include "i18n.h" #include "tools.h" -#define VDRVERSION "1.3.3" -#define VDRVERSNUM 10303 // Version * 10000 + Major * 100 + Minor +#define VDRVERSION "1.3.4" +#define VDRVERSNUM 10304 // Version * 10000 + Major * 100 + Minor #define MAXPRIORITY 99 #define MAXLIFETIME 99 @@ -194,8 +194,6 @@ public: class cSetup : public cConfig<cSetupLine> { friend class cPlugin; // needs to be able to call Store() private: - void StoreCaCaps(const char *Name); - bool ParseCaCaps(const char *Value); void StoreLanguages(const char *Name, int *Values); bool ParseLanguages(const char *Value, int *Values); bool Parse(const char *Name, const char *Value); @@ -242,7 +240,6 @@ public: int MultiSpeedMode; int ShowReplayMode; int ResumeID; - int CaCaps[MAXDEVICES][MAXCACAPS]; int CurrentChannel; int CurrentVolume; int __EndData__; @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.c 1.52 2004/01/11 13:21:12 kls Exp $ + * $Id: device.c 1.53 2004/02/08 15:05:11 kls Exp $ */ #include "device.h" @@ -56,10 +56,8 @@ cDevice::cDevice(void) for (int i = 0; i < MAXRECEIVERS; i++) receiver[i] = NULL; - if (numDevices < MAXDEVICES) { + if (numDevices < MAXDEVICES) device[numDevices++] = this; - SetCaCaps(cardIndex); - } else esyslog("ERROR: too many devices!"); } @@ -200,16 +198,6 @@ cDevice *cDevice::GetDevice(const cChannel *Channel, int Priority, bool *NeedsDe return d; } -void cDevice::SetCaCaps(int Index) -{ - for (int d = 0; d < numDevices; d++) { - if (Index < 0 || Index == device[d]->CardIndex()) { - for (int i = 0; i < MAXCACAPS; i++) - device[d]->caCaps[i] = Setup.CaCaps[device[d]->CardIndex()][i]; - } - } -} - void cDevice::Shutdown(void) { for (int i = 0; i < numDevices; i++) { @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: device.h 1.38 2004/01/10 14:15:10 kls Exp $ + * $Id: device.h 1.39 2004/02/08 15:05:49 kls Exp $ */ #ifndef __DEVICE_H @@ -21,7 +21,6 @@ #include "tools.h" #define MAXDEVICES 16 // the maximum number of devices in the system -#define MAXCACAPS 16 // the maximum number of different CA values per device #define MAXPIDHANDLES 16 // the maximum number of different PIDs per device #define MAXRECEIVERS 16 // the maximum number of receivers per device #define MAXVOLUME 255 @@ -97,16 +96,12 @@ public: ///< given Priority. ///< See ProvidesChannel() for more information on how ///< priorities are handled, and the meaning of NeedsDetachReceivers. - static void SetCaCaps(int Index = -1); - ///< Sets the CaCaps of the given device according to the Setup data. - ///< By default the CaCaps of all devices are set. static void Shutdown(void); ///< Closes down all devices. ///< Must be called at the end of the program. private: static int nextCardIndex; int cardIndex; - int caCaps[MAXCACAPS]; protected: cDevice(void); virtual ~cDevice(); diff --git a/dvbdevice.c b/dvbdevice.c index 01a9a6c..e1d5fc6 100644 --- a/dvbdevice.c +++ b/dvbdevice.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: dvbdevice.c 1.79 2004/01/25 13:50:21 kls Exp $ + * $Id: dvbdevice.c 1.81 2004/02/08 14:07:07 kls Exp $ */ #include "dvbdevice.h" @@ -680,7 +680,7 @@ bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *Ne bool hasPriority = Priority < 0 || Priority > this->Priority(); bool needsDetachReceivers = false; - if ((Channel->Vpid() || Channel->Apid1()) && ProvidesSource(Channel->Source()) && ProvidesCa(Channel)) { + if (ProvidesSource(Channel->Source()) && ProvidesCa(Channel)) { result = hasPriority; if (Priority >= 0 && Receiving()) { if (dvbTuner->IsTunedTo(Channel)) { @@ -751,6 +751,11 @@ bool cDvbDevice::SetChannelDevice(const cChannel *Channel, bool LiveView) dvbTuner->Set(Channel, DoTune, !EITScanner.UsesDevice(this)); //XXX 1.3: this is an ugly hack - find a cleaner solution//XXX + //XXX TODO preliminary fix for the "Unknown picture type" error + time_t t0 = time(NULL); + while (!dvbTuner->Locked() && time(NULL) - t0 < 5) + usleep(100); + //XXX // PID settings: if (TurnOnLivePIDs) { @@ -8,7 +8,7 @@ * Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>. * Adapted to 'libsi' for VDR 1.3.0 by Marcel Wiesweg <marcel.wiesweg@gmx.de>. * - * $Id: eit.c 1.85 2004/01/09 15:44:43 kls Exp $ + * $Id: eit.c 1.86 2004/02/08 10:26:54 kls Exp $ */ #include "eit.h" @@ -95,6 +95,7 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) SI::Descriptor *d; SI::ExtendedEventDescriptors *ExtendedEventDescriptors = NULL; SI::ShortEventDescriptor *ShortEventDescriptor = NULL; + cLinkChannels *LinkChannels = NULL; for (SI::Loop::Iterator it2; (d = SiEitEvent.eventDescriptors.getNext(it2)); ) { switch (d->getDescriptorTag()) { case SI::ExtendedEventDescriptorTag: { @@ -138,6 +139,36 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) pEvent->SetDescription(rEvent->Description()); } break; + case SI::LinkageDescriptorTag: { + SI::LinkageDescriptor *ld = (SI::LinkageDescriptor *)d; + tChannelID linkID(Source, ld->getOriginalNetworkId(), ld->getTransportStreamId(), ld->getServiceId()); + if (ld->getLinkageType() == 0xB0) { // Premiere World + time_t now = time(NULL); + bool hit = SiEitEvent.getStartTime() <= now && now < SiEitEvent.getStartTime() + SiEitEvent.getDuration(); + if (hit) { + cChannel *link = Channels.GetByChannelID(linkID); + if (link != channel) { // only link to other channels, not the same one + char linkName[ld->privateData.getLength() + 1]; + strn0cpy(linkName, (const char *)ld->privateData.getData(), sizeof(linkName)); + //fprintf(stderr, "Linkage %s %4d %4d %5d %5d %5d %5d %02X '%s'\n", hit ? "*" : "", channel->Number(), link ? link->Number() : -1, SiEitEvent.getEventId(), ld->getOriginalNetworkId(), ld->getTransportStreamId(), ld->getServiceId(), ld->getLinkageType(), linkName);//XXX + if (link) { + if (Setup.UpdateChannels >= 1) + link->SetName(linkName); + } + else if (Setup.UpdateChannels >= 3) { + link = Channels.NewChannel(channel, linkName, ld->getOriginalNetworkId(), ld->getTransportStreamId(), ld->getServiceId()); + //XXX patFilter->Trigger(); + } + if (link) { + if (!LinkChannels) + LinkChannels = new cLinkChannels; + LinkChannels->Add(new cLinkChannel(link)); + } + } + } + } + } + break; default: ; } delete d; @@ -167,6 +198,9 @@ cEIT::cEIT(cSchedules *Schedules, int Source, u_char Tid, const u_char *Data) else if (SiEitEvent.getRunningStatus() == SI::RunningStatusStartsInAFewSeconds) pSchedule->SetFollowingEvent(pEvent); } + + if (LinkChannels) + channel->SetLinkChannels(LinkChannels); } } diff --git a/fontfix-iso8859-5.c b/fontfix-iso8859-5.c index 08f7fd7..51cef24 100644 --- a/fontfix-iso8859-5.c +++ b/fontfix-iso8859-5.c @@ -6048,4 +6048,3 @@ cFont::tPixelData FontFix_iso8859_5[][26] = { 0x00000000, // }, }; -
\ No newline at end of file @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.282 2004/01/24 13:22:04 kls Exp $ + * $Id: menu.c 1.284 2004/02/08 15:06:42 kls Exp $ */ #include "menu.h" @@ -723,7 +723,7 @@ eOSState cMenuChannels::Switch(void) return osContinue; cChannel *ch = GetChannel(Current()); if (ch) - cDevice::PrimaryDevice()->SwitchChannel(ch, true); + return cDevice::PrimaryDevice()->SwitchChannel(ch, true) ? osEnd : osContinue; return osEnd; } @@ -2216,11 +2216,16 @@ cMenuSetupCICAM::cMenuSetupCICAM(void) helpKeys = -1; SetSection(tr("CICAM")); for (int d = 0; d < cDevice::NumDevices(); d++) { - for (int i = 0; i < 2; i++) { + cDevice *Device = cDevice::GetDevice(d); + cCiHandler *CiHandler = Device->CiHandler(); + for (int Slot = 0; Slot < 2; Slot++) { char buffer[32]; - int CardIndex = cDevice::GetDevice(d)->CardIndex(); - snprintf(buffer, sizeof(buffer), "%s%d %d", tr("Setup.CICAM$CICAM DVB"), CardIndex + 1, i + 1); - Add(new cMenuEditCaItem(buffer, &data.CaCaps[CardIndex][i])); + int CardIndex = Device->CardIndex(); + const char *CamName = CiHandler ? CiHandler->GetCamName(Slot) : NULL; + if (!CamName) + CamName = "-"; + snprintf(buffer, sizeof(buffer), "%s%d %d\t%s", tr("Setup.CICAM$CICAM DVB"), CardIndex + 1, Slot + 1, CamName); + Add(new cOsdItem(buffer)); } } SetHelpKeys(); @@ -2275,9 +2280,7 @@ eOSState cMenuSetupCICAM::ProcessKey(eKeys Key) { eOSState state = cMenuSetupBase::ProcessKey(Key); - if (state == osBack && Key == kOk) - cDevice::SetCaCaps(); - else if (state == osUnknown) { + if (state == osUnknown) { switch (Key) { case kRed: if (helpKeys == 1) return Menu(); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osdbase.c 1.11 2003/10/19 14:32:32 kls Exp $ + * $Id: osdbase.c 1.12 2004/01/31 10:31:13 kls Exp $ */ #include "osdbase.h" @@ -116,7 +116,7 @@ cBitmap::cBitmap(int Width, int Height, int Bpp, bool ClearWithBackground) fontType = fontOsd; font = NULL; if (width > 0 && height > 0) { - bitmap = MALLOC(char, width * height); + bitmap = MALLOC(u_char, width * height); if (bitmap) { Clean(); memset(bitmap, 0x00, width * height); @@ -186,7 +186,7 @@ void cBitmap::Clean(void) dirtyY2 = -1; } -void cBitmap::SetIndex(int x, int y, char Index) +void cBitmap::SetIndex(int x, int y, u_char Index) { if (bitmap) { if (0 <= x && x < width && 0 <= y && y < height) { @@ -231,8 +231,8 @@ int cBitmap::Width(const char *s) void cBitmap::Text(int x, int y, const char *s, eDvbColor ColorFg, eDvbColor ColorBg) { if (bitmap) { - char fg = Index(ColorFg); - char bg = Index(ColorBg); + u_char fg = Index(ColorFg); + u_char bg = Index(ColorBg); int h = font->Height(s); while (s && *s) { const cFont::tCharData *CharData = font->CharData(*s++); @@ -253,7 +253,7 @@ void cBitmap::Text(int x, int y, const char *s, eDvbColor ColorFg, eDvbColor Col void cBitmap::Fill(int x1, int y1, int x2, int y2, eDvbColor Color) { if (bitmap) { - char c = Index(Color); + u_char c = Index(Color); for (int y = y1; y <= y2; y++) for (int x = x1; x <= x2; x++) SetIndex(x, y, c); @@ -267,7 +267,7 @@ void cBitmap::Clear(void) Fill(0, 0, width - 1, height - 1, clrBackground); } -const char *cBitmap::Data(int x, int y) +const u_char *cBitmap::Data(int x, int y) { return &bitmap[y * width + x]; } @@ -327,7 +327,7 @@ void cWindow::Text(int x, int y, const char *s, eDvbColor ColorFg, eDvbColor Col cBitmap::Text(x, y, s, ColorFg, ColorBg); } -const char *cWindow::Data(int x, int y) +const u_char *cWindow::Data(int x, int y) { return cBitmap::Data(x, y); } @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osdbase.h 1.8 2004/01/04 14:22:43 kls Exp $ + * $Id: osdbase.h 1.9 2004/01/31 10:28:49 kls Exp $ */ #ifndef __OSDBASE_H @@ -49,7 +49,7 @@ private: bool fetched[MAXNUMCOLORS]; bool full; protected: - typedef unsigned char tIndexes[MAXNUMCOLORS]; + typedef u_char tIndexes[MAXNUMCOLORS]; public: cPalette(int Bpp); int Index(eDvbColor Color); @@ -75,7 +75,7 @@ class cBitmap : public cPalette { private: const cFont *font; eDvbFont fontType; - char *bitmap; + u_char *bitmap; bool clearWithBackground; protected: int width, height; @@ -86,7 +86,7 @@ public: bool ClearWithBackground(void) { return clearWithBackground; } eDvbFont SetFont(eDvbFont Font); bool Dirty(int &x1, int &y1, int &x2, int &y2); - void SetIndex(int x, int y, char Index); + void SetIndex(int x, int y, u_char Index); void SetPixel(int x, int y, eDvbColor Color); void SetBitmap(int x, int y, const cBitmap &Bitmap); int Width(void) { return width; } @@ -97,7 +97,7 @@ public: void Fill(int x1, int y1, int x2, int y2, eDvbColor Color); void Clean(void); void Clear(void); - const char *Data(int x, int y); + const u_char *Data(int x, int y); }; #define MAXNUMWINDOWS 7 // OSD windows are counted 1...7 @@ -122,7 +122,7 @@ public: void Fill(int x1, int y1, int x2, int y2, eDvbColor Color); void SetBitmap(int x, int y, const cBitmap &Bitmap); void Text(int x, int y, const char *s, eDvbColor ColorFg = clrWhite, eDvbColor ColorBg = clrBackground); - const char *Data(int x, int y); + const u_char *Data(int x, int y); }; typedef int tWindowHandle; @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: sections.c 1.4 2004/01/11 13:22:13 kls Exp $ + * $Id: sections.c 1.5 2004/02/07 15:51:57 kls Exp $ */ #include "sections.h" @@ -133,7 +133,7 @@ void cSectionHandler::Detach(cFilter *Filter) void cSectionHandler::SetChannel(const cChannel *Channel) { Lock(); - shp->channel = Channel? *Channel : cChannel(); + shp->channel = Channel ? *Channel : cChannel(); Unlock(); } @@ -10,7 +10,7 @@ * and interact with the Video Disk Recorder - or write a full featured * graphical interface that sits on top of an SVDRP connection. * - * $Id: svdrp.c 1.58 2004/01/17 13:47:39 kls Exp $ + * $Id: svdrp.c 1.59 2004/01/31 10:13:50 kls Exp $ */ #include "svdrp.h" @@ -968,10 +968,9 @@ void cSVDRP::CmdSTAT(const char *Option) { if (*Option) { if (strcasecmp(Option, "DISK") == 0) { - int FreeMB; - int Percent = VideoDiskSpace(&FreeMB); - int Total = (FreeMB / (100 - Percent)) * 100; - Reply(250, "%dMB %dMB %d%%", Total, FreeMB, Percent); + int FreeMB, UsedMB; + int Percent = VideoDiskSpace(&FreeMB, &UsedMB); + Reply(250, "%dMB %dMB %d%%", FreeMB + UsedMB, FreeMB, Percent); } else Reply(501, "Invalid Option \"%s\"", Option); @@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/vdr * - * $Id: vdr.c 1.174 2004/01/17 16:56:57 kls Exp $ + * $Id: vdr.c 1.175 2004/02/08 11:23:29 kls Exp $ */ #include <getopt.h> @@ -518,7 +518,7 @@ int main(int argc, char *argv[]) Channels.Save(); //XXX only after user changes??? Timers.Save(); for (cChannel *Channel = Channels.First(); Channel; Channel = Channels.Next(Channel)) { - if (Channel && Channel->Modification(CHANNELMOD_RETUNE)) { + if (Channel->Modification(CHANNELMOD_RETUNE)) { cRecordControls::ChannelDataModified(Channel); if (Channel->Number() == cDevice::CurrentChannel()) { if (!cDevice::PrimaryDevice()->Replaying() || cTransferControl::ReceiverDevice()) { |