diff --git a/HISTORY b/HISTORY index 5d07acd..e4203db 100644 --- a/HISTORY +++ b/HISTORY @@ -1,5 +1,6 @@ +=================================== VDR Plugin 'femon' Revision History ------------------------------------ +=================================== 2004-02-15: Version 0.0.1 @@ -58,7 +59,13 @@ VDR Plugin 'femon' Revision History - Backported the "AC3 Stream Information" feature from version 0.1.3. -------------------------- +2004-09-11: Version 0.0.7 + +- Backported changes and fixes from version 0.1.6. + +=================================== +VDR Plugin 'femon' Revision History +=================================== 2004-05-18: Version 0.1.0 @@ -94,3 +101,8 @@ VDR Plugin 'femon' Revision History - Added preliminary NTSC support (make NTSC_SYSTEM=1 plugins). - Fixed "Setup/OSD/Use Small Fonts" bug (Thanks to Winni for reporting this one). - Added patches directory: CA system names by Lauri Tischler. + +2004-09-11: Version 0.1.6 + +- Yet Another Minor Release. +- Integrated the CA system names patch: "Setup / Show CA System". diff --git a/README b/README index 27e1067..4f783b5 100644 --- a/README +++ b/README @@ -87,8 +87,8 @@ Notes: well. Btw., this same thing happens with OSDTeletext plugin too :) - Disable the stream analyze to speed up heavy zapping sessions. - The signal strength and signal-to-noise ratio values are comparable only - between the same brand/model frontends. Due to a lack of proper frontend - specifications those values cannot be calculated into any real unit. + between the same brand/model frontends. Due to the lack of proper frontend + specifications those values cannot be calculated into any real units. - Shrinked OSD is available for NTSC users: make NTSC_SYSTEM=1 - The device switching feature is still non-functional. diff --git a/femon.c b/femon.c index b5f9250..4f8b4f2 100644 --- a/femon.c +++ b/femon.c @@ -71,6 +71,7 @@ bool cPluginFemon::SetupParse(const char *Name, const char *Value) else if (!strcasecmp(Name, "SyslogOutput")) femonConfig.syslogoutput = atoi(Value); else if (!strcasecmp(Name, "DisplayMode")) femonConfig.displaymode = atoi(Value); else if (!strcasecmp(Name, "Position")) femonConfig.position = atoi(Value); + else if (!strcasecmp(Name, "ShowCASystem")) femonConfig.showcasystem = atoi(Value); else if (!strcasecmp(Name, "RedLimit")) femonConfig.redlimit = atoi(Value); else if (!strcasecmp(Name, "GreenLimit")) femonConfig.greenlimit = atoi(Value); else if (!strcasecmp(Name, "UpdateInterval")) femonConfig.updateinterval = atoi(Value); @@ -101,6 +102,7 @@ void cMenuFemonSetup::Setup(void) Add(new cMenuEditBoolItem( tr("Use Syslog Output"), &femonConfig.syslogoutput, tr("no"), tr("yes"))); Add(new cMenuEditStraItem( tr("Default Display Mode"), &femonConfig.displaymode, modeMaxNumber, dispmodes)); Add(new cMenuEditBoolItem( tr("Position"), &femonConfig.position, tr("bottom"), tr("top"))); + Add(new cMenuEditBoolItem( tr("Show CA System"), &femonConfig.showcasystem, tr("no"), tr("yes"))); Add(new cMenuEditIntItem( tr("Red Limit [%]"), &femonConfig.redlimit, 1, 50)); Add(new cMenuEditIntItem( tr("Green Limit [%]"), &femonConfig.greenlimit, 51, 100)); Add(new cMenuEditIntItem( tr("OSD Update Interval [0.1s]"), &femonConfig.updateinterval, 1, 100)); @@ -116,8 +118,9 @@ void cMenuFemonSetup::Store(void) { SetupStore("HideMenu", femonConfig.hidemenu); SetupStore("SyslogOutput", femonConfig.syslogoutput); - SetupStore("Position", femonConfig.position); SetupStore("DisplayMode", femonConfig.displaymode); + SetupStore("Position", femonConfig.position); + SetupStore("ShowCASystem", femonConfig.showcasystem); SetupStore("RedLimit", femonConfig.redlimit); SetupStore("GreenLimit", femonConfig.greenlimit); SetupStore("UpdateInterval", femonConfig.updateinterval); diff --git a/femon.h b/femon.h index f74c3a2..48f451e 100644 --- a/femon.h +++ b/femon.h @@ -11,7 +11,7 @@ #include -static const char *VERSION = "0.1.5"; +static const char *VERSION = "0.1.6"; static const char *DESCRIPTION = "DVB Signal Information Monitor (OSD)"; static const char *MAINMENUENTRY = "Signal Information"; diff --git a/femoncfg.c b/femoncfg.c index 3d0b7d8..69800fc 100644 --- a/femoncfg.c +++ b/femoncfg.c @@ -21,4 +21,5 @@ cFemonConfig::cFemonConfig(void) analyzestream = 1; calcinterval = 20; syslogoutput = 0; + showcasystem = 0; } diff --git a/femoncfg.h b/femoncfg.h index cf5f5b3..e458a39 100644 --- a/femoncfg.h +++ b/femoncfg.h @@ -30,6 +30,7 @@ public: int analyzestream; int calcinterval; int syslogoutput; + int showcasystem; }; extern cFemonConfig femonConfig; diff --git a/femoni18n.c b/femoni18n.c index 0961ce9..6e9b597 100644 --- a/femoni18n.c +++ b/femoni18n.c @@ -1548,5 +1548,252 @@ const tI18nPhrase Phrases[] = { "", // ÀãááÚØÙ (Russian) "", // Hrvatski (Croatian) }, + { "Show CA System", // English + "CA System anzeigen", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Näytä salausjärjestelmä", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català + "", // ÀãááÚØÙ (Russian) + "", // Hrvatski (Croatian) + }, + { "Fixed", // English + "Fest", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "kiinteä", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català + "", // ÀãááÚØÙ (Russian) + "", // Hrvatski (Croatian) + }, + { "Free to Air", // English + "Free to Air", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "salaamaton", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català + "", // ÀãááÚØÙ (Russian) + "", // Hrvatski (Croatian) + }, + { "SECA/Mediaguard", // English + "SECA/Mediaguard", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "SECA/Mediaguard", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català + "", // ÀãááÚØÙ (Russian) + "", // Hrvatski (Croatian) + }, + { "Viaccess", // English + "Viaccess", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Viaccess", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català + "", // ÀãááÚØÙ (Russian) + "", // Hrvatski (Croatian) + }, + { "Irdeto", // English + "Irdeto", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Irdeto", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català + "", // ÀãááÚØÙ (Russian) + "", // Hrvatski (Croatian) + }, + { "NDS/Videoguard", // English + "NDS/Videoguard", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "NDS/Videoguard", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català + "", // ÀãááÚØÙ (Russian) + "", // Hrvatski (Croatian) + }, + { "Conax", // English + "Conax", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "Conax", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català + "", // ÀãááÚØÙ (Russian) + "", // Hrvatski (Croatian) + }, + { "CryptoWorks", // English + "CryptoWorks", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "CryptoWorks", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català + "", // ÀãááÚØÙ (Russian) + "", // Hrvatski (Croatian) + }, + { "PowerVu", // English + "PowerVu", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "PowerVu", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català + "", // ÀãááÚØÙ (Russian) + "", // Hrvatski (Croatian) + }, + { "BetaCrypt", // English + "BetaCrypt", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "BetaCrypt", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català + "", // ÀãááÚØÙ (Russian) + "", // Hrvatski (Croatian) + }, + { "NagraVision", // English + "NagraVision", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "NagraVision", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català + "", // ÀãááÚØÙ (Russian) + "", // Hrvatski (Croatian) + }, + { "SkyCrypt", // English + "SkyCrypt", // Deutsch + "", // Slovenski + "", // Italiano + "", // Nederlands + "", // Português + "", // Français + "", // Norsk + "SkyCrypt", // suomi + "", // Polski + "", // Español + "", // ÅëëçíéêÜ (Greek) + "", // Svenska + "", // Romaneste + "", // Magyar + "", // Català + "", // ÀãááÚØÙ (Russian) + "", // Hrvatski (Croatian) + }, { NULL } }; diff --git a/femonosd.c b/femonosd.c index 3818f8b..a0b0d24 100644 --- a/femonosd.c +++ b/femonosd.c @@ -41,9 +41,9 @@ #define OSDSTATUSHEIGHT (m_Font->Height() * 6) // in pixels (6 rows) #define OSDINFOWIN_Y(offset) (femonConfig.position ? (OSDHEIGHT - OSDINFOHEIGHT + offset) : offset) -#define OSDINFOWIN_X(col) ((col == 4) ? 470 : (col == 3) ? 300 : (col==2) ? 180 : 15) +#define OSDINFOWIN_X(col) ((col == 4) ? 455 : (col == 3) ? 305 : (col == 2) ? 155 : 15) #define OSDSTATUSWIN_Y(offset) (femonConfig.position ? offset : (OSDHEIGHT - OSDSTATUSHEIGHT + offset)) -#define OSDSTATUSWIN_X(col) ((col == 7) ? 475 : (col == 6) ? 410 : (col == 5) ? 275 : (col == 4) ? 220 : (col == 3) ? 125 : (col==2) ? 70 : 15) +#define OSDSTATUSWIN_X(col) ((col == 7) ? 475 : (col == 6) ? 410 : (col == 5) ? 275 : (col == 4) ? 220 : (col == 3) ? 125 : (col == 2) ? 70 : 15) #define OSDSTATUSWIN_XC(col,txt) (((col - 1) * OSDWIDTH / 5) + ((OSDWIDTH / 5 - m_Font->Width(txt)) / 2)) #define BARWIDTH(x) (OSDWIDTH * x / 100) #define SPACING 5 @@ -320,7 +320,75 @@ void cFemonOsd::DrawInfoWindow(void) m_Osd->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font); offset += m_Font->Height(); m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("CA"), clrWhite, clrBackground, m_Font); - snprintf(buf, sizeof(buf), "%X", channel->Ca()); + value = channel->Ca(); + if (femonConfig.showcasystem) { + /* http://www.dvb.org/index.php?id=174 */ + switch (value) { + case 0x0000: + /* Reserved */ + snprintf(buf, sizeof(buf), "%s", tr("Free to Air")); + break; + case 0x0001 ... 0x00FF: + /* Standardized systems */ + snprintf(buf, sizeof(buf), "%s", tr("Fixed")); + break; + case 0x0100 ... 0x01FF: + /* Canal Plus */ + snprintf(buf, sizeof(buf), "%s", tr("SECA/Mediaguard")); + break; + case 0x0500 ... 0x05FF: + /* France Telecom */ + snprintf(buf, sizeof(buf), "%s", tr("Viaccess")); + break; + case 0x0600 ... 0x06FF: + /* Irdeto */ + snprintf(buf, sizeof(buf), "%s", tr("Irdeto")); + break; + case 0x0900 ... 0x09FF: + /* News Datacom */ + snprintf(buf, sizeof(buf), "%s", tr("NDS/Videoguard")); + break; + case 0x0B00 ... 0x0BFF: + /* Norwegian Telekom */ + snprintf(buf, sizeof(buf), "%s", tr("Conax")); + break; + case 0x0D00 ... 0x0DFF: + /* Philips */ + snprintf(buf, sizeof(buf), "%s", tr("CryptoWorks")); + break; + case 0x0E00 ... 0x0EFF: + /* Scientific Atlanta */ + snprintf(buf, sizeof(buf), "%s", tr("PowerVu")); + break; + case 0x1200 ... 0x12FF: + /* BellVu Express */ + snprintf(buf, sizeof(buf), "%s", tr("NagraVision")); + break; + case 0x1700 ... 0x17FF: + /* BetaTechnik */ + snprintf(buf, sizeof(buf), "%s", tr("BetaCrypt")); + break; + case 0x1800 ... 0x18FF: + /* Kudelski SA */ + snprintf(buf, sizeof(buf), "%s", tr("NagraVision")); + break; + case 0x4A60 ... 0x4A6F: + /* @Sky */ + snprintf(buf, sizeof(buf), "%s", tr("SkyCrypt")); + break; + default: + snprintf(buf, sizeof(buf), "%X", value); + break; + } + } + else { + snprintf(buf, sizeof(buf), "%X", value); + value = 1; + while (channel->Ca(value) && (value < MAXCAIDS)) { + snprintf(buf2, sizeof(buf2), ", %X", channel->Ca(value++)); + strncat(buf, buf2, sizeof(buf)); + } + } m_Osd->DrawText(OSDINFOWIN_X(2), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font); m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), tr("Tpid"), clrWhite, clrBackground, m_Font); snprintf(buf, sizeof(buf), "%d", channel->Tpid()); diff --git a/patches/ca_system_names.diff b/patches/ca_system_names.diff deleted file mode 100644 index 6bf4da1..0000000 --- a/patches/ca_system_names.diff +++ /dev/null @@ -1,52 +0,0 @@ ---- femonosd.c.orig 2004-08-19 19:42:32.000000000 +0300 -+++ femonosd.c 2004-08-19 20:02:31.000000000 +0300 -@@ -320,7 +320,48 @@ - m_Osd->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font); - offset += m_Font->Height(); - m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("CA"), clrWhite, clrBackground, m_Font); -- snprintf(buf, sizeof(buf), "%X", channel->Ca()); -+ value = channel->Ca(); -+ switch (value >> 8) { -+ case 0x0: -+ if (value) -+ snprintf(buf, sizeof(buf), "%s", "Fixed"); -+ else -+ snprintf(buf, sizeof(buf), "%s", "Free to Air"); -+ break; -+ case 0x1: -+ snprintf(buf, sizeof(buf), "%s", "SECA/Mediaguard"); -+ break; -+ case 0x5: -+ snprintf(buf, sizeof(buf), "%s", "Viaccess"); -+ break; -+ case 0x6: -+ snprintf(buf, sizeof(buf), "%s", "Irdeto"); -+ break; -+ case 0x9: -+ snprintf(buf, sizeof(buf), "%s", "NDS/Videoguard"); -+ break; -+ case 0xB: -+ snprintf(buf, sizeof(buf), "%s", "Conax"); -+ break; -+ case 0xD: -+ snprintf(buf, sizeof(buf), "%s", "CryptoWorks"); -+ break; -+ case 0xE: -+ snprintf(buf, sizeof(buf), "%s", "PowerVu"); -+ break; -+ case 0x17: -+ snprintf(buf, sizeof(buf), "%s", "BetaCrypt"); -+ break; -+ case 0x18: -+ snprintf(buf, sizeof(buf), "%s", "NagraVision"); -+ break; -+ case 0x4A: -+ snprintf(buf, sizeof(buf), "%s", "SkyCrypt"); -+ break; -+ default: -+ snprintf(buf, sizeof(buf), "%X", value); -+ break; -+ } - m_Osd->DrawText(OSDINFOWIN_X(2), OSDINFOWIN_Y(offset), buf, clrYellow, clrBackground, m_Font); - m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), tr("Tpid"), clrWhite, clrBackground, m_Font); - snprintf(buf, sizeof(buf), "%d", channel->Tpid());