diff options
-rw-r--r-- | HISTORY | 3 | ||||
-rw-r--r-- | ca.conf | 83 | ||||
-rw-r--r-- | ci.c | 10 | ||||
-rw-r--r-- | ci.h | 3 | ||||
-rw-r--r-- | config.c | 49 | ||||
-rw-r--r-- | config.h | 5 | ||||
-rw-r--r-- | device.c | 16 | ||||
-rw-r--r-- | device.h | 7 | ||||
-rw-r--r-- | menu.c | 19 |
9 files changed, 30 insertions, 165 deletions
@@ -2648,3 +2648,6 @@ Video Disk Recorder Revision History 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. @@ -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: 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.185 2004/01/25 16:08:23 kls Exp $ + * $Id: config.h 1.186 2004/02/08 15:04:52 kls Exp $ */ #ifndef __CONFIG_H @@ -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/11 10:35:36 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(); @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 1.283 2004/02/08 14:12:23 kls Exp $ + * $Id: menu.c 1.284 2004/02/08 15:06:42 kls Exp $ */ #include "menu.h" @@ -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(); |