1
0
mirror of https://github.com/rofafor/vdr-plugin-femon.git synced 2023-10-10 13:36:53 +02:00

Updated for vdr-1.3.34.

Added Enigma theme (Thanks to Rolf Hoverath).
Added EgalsTry theme (Thanks to Uwe Hanke).
Added option to disable rounded corners.
This commit is contained in:
Rolf Ahrenberg 2005-10-04 04:20:00 +03:00
parent 37957be99f
commit e2fb9e994a
12 changed files with 229 additions and 80 deletions

View File

@ -176,3 +176,10 @@ VDR Plugin 'femon' Revision History
- Updated for vdr-1.3.31. - Updated for vdr-1.3.31.
- Added preliminary svdrp and service support. - Added preliminary svdrp and service support.
2005-10-04: Version 0.9.4
- Updated for vdr-1.3.34.
- Added Enigma theme (Thanks to Rolf Hoverath).
- Added EgalsTry theme (Thanks to Uwe Hanke).
- Added option to disable rounded corners.

12
femon.c
View File

@ -14,8 +14,8 @@
#include "femontools.h" #include "femontools.h"
#include "femon.h" #include "femon.h"
#if VDRVERSNUM && VDRVERSNUM < 10331 #if defined(VDRVERSNUM) && VDRVERSNUM < 10334
#error "You don't exist! Go away!" #error "You don't exist! Go away! Upgrade yourself!"
#endif #endif
cPluginFemon::cPluginFemon(void) cPluginFemon::cPluginFemon(void)
@ -80,6 +80,7 @@ bool cPluginFemon::SetupParse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "Position")) femonConfig.position = atoi(Value); else if (!strcasecmp(Name, "Position")) femonConfig.position = atoi(Value);
else if (!strcasecmp(Name, "OSDHeight")) femonConfig.osdheight = atoi(Value); else if (!strcasecmp(Name, "OSDHeight")) femonConfig.osdheight = atoi(Value);
else if (!strcasecmp(Name, "OSDOffset")) femonConfig.osdoffset = atoi(Value); else if (!strcasecmp(Name, "OSDOffset")) femonConfig.osdoffset = atoi(Value);
else if (!strcasecmp(Name, "Skin")) femonConfig.skin = atoi(Value);
else if (!strcasecmp(Name, "Theme")) femonConfig.theme = atoi(Value); else if (!strcasecmp(Name, "Theme")) femonConfig.theme = atoi(Value);
else if (!strcasecmp(Name, "ShowCASystem")) femonConfig.showcasystem = atoi(Value); else if (!strcasecmp(Name, "ShowCASystem")) femonConfig.showcasystem = atoi(Value);
else if (!strcasecmp(Name, "RedLimit")) femonConfig.redlimit = atoi(Value); else if (!strcasecmp(Name, "RedLimit")) femonConfig.redlimit = atoi(Value);
@ -173,10 +174,15 @@ cMenuFemonSetup::cMenuFemonSetup(void)
dispmodes[eFemonModeStream] = tr("stream"); dispmodes[eFemonModeStream] = tr("stream");
dispmodes[eFemonModeAC3] = tr("AC-3"); dispmodes[eFemonModeAC3] = tr("AC-3");
skins[eFemonSkinClassic] = tr("Classic");
skins[eFemonSkinElchi] = tr("Elchi");
themes[eFemonThemeClassic] = tr("Classic"); themes[eFemonThemeClassic] = tr("Classic");
themes[eFemonThemeElchi] = tr("Elchi"); themes[eFemonThemeElchi] = tr("Elchi");
themes[eFemonThemeDeepBlue] = tr("DeepBlue"); themes[eFemonThemeDeepBlue] = tr("DeepBlue");
themes[eFemonThemeMoronimo] = tr("Moronimo"); themes[eFemonThemeMoronimo] = tr("Moronimo");
themes[eFemonThemeEnigma] = tr("Enigma");
themes[eFemonThemeEgalsTry] = tr("EgalsTry");
Setup(); Setup();
} }
@ -189,6 +195,7 @@ void cMenuFemonSetup::Setup(void)
Add(new cMenuEditBoolItem( tr("Hide main menu entry"), &femonConfig.hidemenu, tr("no"), tr("yes"))); Add(new cMenuEditBoolItem( tr("Hide main menu entry"), &femonConfig.hidemenu, tr("no"), tr("yes")));
Add(new cMenuEditBoolItem( tr("Use syslog output"), &femonConfig.syslogoutput, tr("no"), tr("yes"))); Add(new cMenuEditBoolItem( tr("Use syslog output"), &femonConfig.syslogoutput, tr("no"), tr("yes")));
Add(new cMenuEditStraItem( tr("Default display mode"), &femonConfig.displaymode, eFemonModeMaxNumber, dispmodes)); Add(new cMenuEditStraItem( tr("Default display mode"), &femonConfig.displaymode, eFemonModeMaxNumber, dispmodes));
Add(new cMenuEditStraItem( tr("Skin"), &femonConfig.skin, eFemonSkinMaxNumber, skins));
Add(new cMenuEditStraItem( tr("Theme"), &femonConfig.theme, eFemonThemeMaxNumber,themes)); Add(new cMenuEditStraItem( tr("Theme"), &femonConfig.theme, eFemonThemeMaxNumber,themes));
Add(new cMenuEditBoolItem( tr("Position"), &femonConfig.position, tr("bottom"), tr("top"))); Add(new cMenuEditBoolItem( tr("Position"), &femonConfig.position, tr("bottom"), tr("top")));
Add(new cMenuEditIntItem( tr("Height"), &femonConfig.osdheight, 400, 500)); Add(new cMenuEditIntItem( tr("Height"), &femonConfig.osdheight, 400, 500));
@ -210,6 +217,7 @@ void cMenuFemonSetup::Store(void)
SetupStore("HideMenu", femonConfig.hidemenu); SetupStore("HideMenu", femonConfig.hidemenu);
SetupStore("SyslogOutput", femonConfig.syslogoutput); SetupStore("SyslogOutput", femonConfig.syslogoutput);
SetupStore("DisplayMode", femonConfig.displaymode); SetupStore("DisplayMode", femonConfig.displaymode);
SetupStore("Skin", femonConfig.skin);
SetupStore("Theme", femonConfig.theme); SetupStore("Theme", femonConfig.theme);
SetupStore("Position", femonConfig.position); SetupStore("Position", femonConfig.position);
SetupStore("OSDHeight", femonConfig.osdheight); SetupStore("OSDHeight", femonConfig.osdheight);

View File

@ -11,7 +11,7 @@
#include <vdr/plugin.h> #include <vdr/plugin.h>
static const char *VERSION = "0.9.3"; static const char *VERSION = "0.9.4";
static const char *DESCRIPTION = "DVB Signal Information Monitor (OSD)"; static const char *DESCRIPTION = "DVB Signal Information Monitor (OSD)";
static const char *MAINMENUENTRY = "Signal Information"; static const char *MAINMENUENTRY = "Signal Information";
@ -41,6 +41,7 @@ public:
class cMenuFemonSetup : public cMenuSetupPage { class cMenuFemonSetup : public cMenuSetupPage {
private: private:
const char *dispmodes[eFemonModeMaxNumber]; const char *dispmodes[eFemonModeMaxNumber];
const char *skins[eFemonSkinMaxNumber];
const char *themes[eFemonThemeMaxNumber]; const char *themes[eFemonThemeMaxNumber];
virtual void Setup(void); virtual void Setup(void);
protected: protected:

View File

@ -14,6 +14,7 @@ cFemonConfig::cFemonConfig(void)
{ {
hidemenu = 0; hidemenu = 0;
displaymode = 0; displaymode = 0;
skin = 0;
theme = 0; theme = 0;
position = 1; position = 1;
redlimit = 33; redlimit = 33;
@ -77,5 +78,26 @@ const cFemonTheme femonTheme[eFemonThemeMaxNumber] =
0xFFCE7B00, // clrYellow 0xFFCE7B00, // clrYellow
0xFF336600, // clrGreen 0xFF336600, // clrGreen
}, },
{
// eFemonThemeEnigma
0xB8DEE5FA, // clrBackground
0xB84158BC, // clrTitleBackground
0xFFFFFFFF, // clrTitleText
0xFF000000, // clrActiveText
0xFF000000, // clrInactiveText
0xB8C40000, // clrRed
0xB8C4C400, // clrYellow
0xB800C400, // clrGreen
},
{
// eFemonThemeEgalsTry
0xCA2B1B9E, // clrBackground
0xDFBEBAC3, // clrTitleBackground
0xFF280249, // clrTitleText
0xFFD4D7DB, // clrActiveText
0xDFCFCFCF, // clrInactiveText
0xFFFF0000, // clrRed
0xFFFCC024, // clrYellow
0xFF20980B, // clrGreen
},
}; };

View File

@ -24,6 +24,7 @@ public:
cFemonConfig(void); cFemonConfig(void);
int hidemenu; int hidemenu;
int displaymode; int displaymode;
int skin;
int theme; int theme;
int position; int position;
int redlimit; int redlimit;
@ -39,12 +40,21 @@ public:
extern cFemonConfig femonConfig; extern cFemonConfig femonConfig;
enum eFemonSkins
{
eFemonSkinClassic,
eFemonSkinElchi,
eFemonSkinMaxNumber
};
enum eFemonThemes enum eFemonThemes
{ {
eFemonThemeClassic, eFemonThemeClassic,
eFemonThemeElchi, eFemonThemeElchi,
eFemonThemeDeepBlue, eFemonThemeDeepBlue,
eFemonThemeMoronimo, eFemonThemeMoronimo,
eFemonThemeEnigma,
eFemonThemeEgalsTry,
eFemonThemeMaxNumber eFemonThemeMaxNumber
}; };

View File

@ -198,6 +198,27 @@ const tI18nPhrase Phrases[] = {
"voog", // Eesti "voog", // Eesti
"", // Dansk "", // Dansk
}, },
{ "Skin", // English
"Oberfläche", // Deutsch
"", // Slovenski
"", // Italiano
"", // Nederlands
"", // Português
"", // Français
"", // Norsk
"Ulkoasu", // suomi
"", // Polski
"", // Español
"", // ÅëëçíéêÜ (Greek)
"", // Svenska
"", // Romaneste
"", // Magyar
"", // Català
"", // ÀãááÚØÙ (Russian)
"", // Hrvatski (Croatian)
"Kest", // Eesti
"", // Dansk
},
{ "Theme", // English { "Theme", // English
"Thema", // Deutsch "Thema", // Deutsch
"", // Slovenski "", // Slovenski
@ -303,6 +324,48 @@ const tI18nPhrase Phrases[] = {
"Moronimo", // Eesti "Moronimo", // Eesti
"Moronimo", // Dansk "Moronimo", // Dansk
}, },
{ "Enigma", // English
"Enigma", // Deutsch
"Enigma", // Slovenski
"Enigma", // Italiano
"Enigma", // Nederlands
"Enigma", // Português
"Enigma", // Français
"Enigma", // Norsk
"Enigma", // suomi
"Enigma", // Polski
"Enigma", // Español
"Enigma", // ÅëëçíéêÜ (Greek)
"Enigma", // Svenska
"Enigma", // Romaneste
"Enigma", // Magyar
"Enigma", // Català
"Enigma", // ÀãááÚØÙ (Russian)
"Enigma", // Hrvatski (Croatian)
"Enigma", // Eesti
"Enigma", // Dansk
},
{ "EgalsTry", // English
"EgalsTry", // Deutsch
"EgalsTry", // Slovenski
"EgalsTry", // Italiano
"EgalsTry", // Nederlands
"EgalsTry", // Português
"EgalsTry", // Français
"EgalsTry", // Norsk
"EgalsTry", // suomi
"EgalsTry", // Polski
"EgalsTry", // Español
"EgalsTry", // ÅëëçíéêÜ (Greek)
"EgalsTry", // Svenska
"EgalsTry", // Romaneste
"EgalsTry", // Magyar
"EgalsTry", // Català
"EgalsTry", // ÀãááÚØÙ (Russian)
"EgalsTry", // Hrvatski (Croatian)
"EgalsTry", // Eesti
"EgalsTry", // Dansk
},
{ "Hide main menu entry", // English { "Hide main menu entry", // English
"Hauptmenüeintrag verstecken", // Deutsch "Hauptmenüeintrag verstecken", // Deutsch
"", // Slovenski "", // Slovenski
@ -1185,6 +1248,27 @@ const tI18nPhrase Phrases[] = {
"Rid", // Eesti "Rid", // Eesti
"Rid", // Dansk "Rid", // Dansk
}, },
{ "Coderate", // English
"Coderate", // Deutsch
"Coderate", // Slovenski
"Coderate", // Italiano
"Coderate", // Nederlands
"Coderate", // Português
"Coderate", // Français
"Coderate", // Norsk
"Suojaustaso", // suomi
"Coderate", // Polski
"Coderate", // Español
"Coderate", // ÅëëçíéêÜ (Greek)
"Coderate", // Svenska
"Coderate", // Romaneste
"Coderate", // Magyar
"Coderate", // Català
"Coderate", // ÀãááÚØÙ (Russian)
"Coderate", // Hrvatski (Croatian)
"Coderate", // Eesti
"Coderate", // Dansk
},
{ "dB", // English { "dB", // English
"dB", // Deutsch "dB", // Deutsch
"dB", // Slovenski "dB", // Slovenski

View File

@ -47,6 +47,7 @@
#define OSDSTATUSHEIGHT (OSDROWHEIGHT * 6) // in pixels (6 rows) #define OSDSTATUSHEIGHT (OSDROWHEIGHT * 6) // in pixels (6 rows)
#define OSDSPACING 5 #define OSDSPACING 5
#define OSDCORNERING 10 #define OSDCORNERING 10
#define IS_OSDCORNERING (femonConfig.skin == eFemonSkinElchi)
#define OSDINFOWIN_Y(offset) (femonConfig.position ? (OSDHEIGHT - OSDINFOHEIGHT + offset) : offset) #define OSDINFOWIN_Y(offset) (femonConfig.position ? (OSDHEIGHT - OSDINFOHEIGHT + offset) : offset)
#define OSDINFOWIN_X(col) ((col == 4) ? 455 : (col == 3) ? 305 : (col == 2) ? 155 : 15) #define OSDINFOWIN_X(col) ((col == 4) ? 455 : (col == 3) ? 305 : (col == 2) ? 155 : 15)
@ -136,8 +137,10 @@ void cFemonOsd::DrawStatusWindow(void)
snprintf(buf, sizeof(buf), "%d%s %s", m_Number ? m_Number : channel->Number(), m_Number ? "-" : "", channel->ShortName(true)); snprintf(buf, sizeof(buf), "%d%s %s", m_Number ? m_Number : channel->Number(), m_Number ? "-" : "", channel->ShortName(true));
m_Osd->DrawRectangle(0, OSDSTATUSWIN_Y(offset), OSDWIDTH, OSDSTATUSWIN_Y(offset+OSDROWHEIGHT-1), femonTheme[femonConfig.theme].clrTitleBackground); m_Osd->DrawRectangle(0, OSDSTATUSWIN_Y(offset), OSDWIDTH, OSDSTATUSWIN_Y(offset+OSDROWHEIGHT-1), femonTheme[femonConfig.theme].clrTitleBackground);
m_Osd->DrawText(OSDSTATUSWIN_X(1), OSDSTATUSWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrTitleText, femonTheme[femonConfig.theme].clrTitleBackground, m_Font); m_Osd->DrawText(OSDSTATUSWIN_X(1), OSDSTATUSWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrTitleText, femonTheme[femonConfig.theme].clrTitleBackground, m_Font);
m_Osd->DrawEllipse(0, OSDSTATUSWIN_Y(0), OSDCORNERING, OSDSTATUSWIN_Y(OSDCORNERING), clrTransparent, -2); if (IS_OSDCORNERING) {
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDSTATUSWIN_Y(0), OSDWIDTH, OSDSTATUSWIN_Y(OSDCORNERING), clrTransparent, -1); m_Osd->DrawEllipse(0, OSDSTATUSWIN_Y(0), OSDCORNERING, OSDSTATUSWIN_Y(OSDCORNERING), clrTransparent, -2);
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDSTATUSWIN_Y(0), OSDWIDTH, OSDSTATUSWIN_Y(OSDCORNERING), clrTransparent, -1);
}
if (m_Receiver) { if (m_Receiver) {
value = cDevice::ActualDevice()->CardIndex(); value = cDevice::ActualDevice()->CardIndex();
if (value == 1) { if (value == 1) {
@ -343,8 +346,10 @@ void cFemonOsd::DrawStatusWindow(void)
m_Osd->DrawBitmap(OSDSTATUSWIN_XSYMBOL(3, x), OSDSTATUSWIN_Y(offset + y), bmCarrier, (m_FrontendStatus & FE_HAS_CARRIER) ? femonTheme[femonConfig.theme].clrActiveText : femonTheme[femonConfig.theme].clrRed, femonTheme[femonConfig.theme].clrBackground); m_Osd->DrawBitmap(OSDSTATUSWIN_XSYMBOL(3, x), OSDSTATUSWIN_Y(offset + y), bmCarrier, (m_FrontendStatus & FE_HAS_CARRIER) ? femonTheme[femonConfig.theme].clrActiveText : femonTheme[femonConfig.theme].clrRed, femonTheme[femonConfig.theme].clrBackground);
m_Osd->DrawBitmap(OSDSTATUSWIN_XSYMBOL(4, x), OSDSTATUSWIN_Y(offset + y), bmViterbi, (m_FrontendStatus & FE_HAS_VITERBI) ? femonTheme[femonConfig.theme].clrActiveText : femonTheme[femonConfig.theme].clrRed, femonTheme[femonConfig.theme].clrBackground); m_Osd->DrawBitmap(OSDSTATUSWIN_XSYMBOL(4, x), OSDSTATUSWIN_Y(offset + y), bmViterbi, (m_FrontendStatus & FE_HAS_VITERBI) ? femonTheme[femonConfig.theme].clrActiveText : femonTheme[femonConfig.theme].clrRed, femonTheme[femonConfig.theme].clrBackground);
m_Osd->DrawBitmap(OSDSTATUSWIN_XSYMBOL(5, x), OSDSTATUSWIN_Y(offset + y), bmSync, (m_FrontendStatus & FE_HAS_SYNC) ? femonTheme[femonConfig.theme].clrActiveText : femonTheme[femonConfig.theme].clrRed, femonTheme[femonConfig.theme].clrBackground); m_Osd->DrawBitmap(OSDSTATUSWIN_XSYMBOL(5, x), OSDSTATUSWIN_Y(offset + y), bmSync, (m_FrontendStatus & FE_HAS_SYNC) ? femonTheme[femonConfig.theme].clrActiveText : femonTheme[femonConfig.theme].clrRed, femonTheme[femonConfig.theme].clrBackground);
m_Osd->DrawEllipse(0, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT-OSDCORNERING), OSDCORNERING, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT), clrTransparent, -3); if (IS_OSDCORNERING) {
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDSTATUSWIN_Y(OSDSTATUSHEIGHT-OSDCORNERING), OSDWIDTH, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT), clrTransparent, -4); m_Osd->DrawEllipse(0, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT-OSDCORNERING), OSDCORNERING, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT), clrTransparent, -3);
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDSTATUSWIN_Y(OSDSTATUSHEIGHT-OSDCORNERING), OSDWIDTH, OSDSTATUSWIN_Y(OSDSTATUSHEIGHT), clrTransparent, -4);
}
m_Osd->Flush(); m_Osd->Flush();
} }
} }
@ -365,8 +370,10 @@ void cFemonOsd::DrawInfoWindow(void)
m_Osd->DrawRectangle(0, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), femonTheme[femonConfig.theme].clrBackground); m_Osd->DrawRectangle(0, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), femonTheme[femonConfig.theme].clrBackground);
m_Osd->DrawRectangle(0, OSDINFOWIN_Y(offset), OSDWIDTH, OSDINFOWIN_Y(offset+OSDROWHEIGHT-1), femonTheme[femonConfig.theme].clrTitleBackground); m_Osd->DrawRectangle(0, OSDINFOWIN_Y(offset), OSDWIDTH, OSDINFOWIN_Y(offset+OSDROWHEIGHT-1), femonTheme[femonConfig.theme].clrTitleBackground);
m_Osd->DrawText( OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Transponder Information"), femonTheme[femonConfig.theme].clrTitleText, femonTheme[femonConfig.theme].clrTitleBackground, m_Font); m_Osd->DrawText( OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Transponder Information"), femonTheme[femonConfig.theme].clrTitleText, femonTheme[femonConfig.theme].clrTitleBackground, m_Font);
m_Osd->DrawEllipse(0, OSDINFOWIN_Y(0), OSDCORNERING, OSDINFOWIN_Y(OSDCORNERING), clrTransparent, -2); if (IS_OSDCORNERING) {
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDCORNERING), clrTransparent, -1); m_Osd->DrawEllipse(0, OSDINFOWIN_Y(0), OSDCORNERING, OSDINFOWIN_Y(OSDCORNERING), clrTransparent, -2);
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDCORNERING), clrTransparent, -1);
}
offset += OSDROWHEIGHT; offset += OSDROWHEIGHT;
m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Vpid"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Vpid"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
snprintf(buf, sizeof(buf), "%d", channel->Vpid()); snprintf(buf, sizeof(buf), "%d", channel->Vpid());
@ -614,29 +621,29 @@ void cFemonOsd::DrawInfoWindow(void)
else if (value == INVERSION_ON) snprintf(buf, sizeof(buf), tr("On")); else if (value == INVERSION_ON) snprintf(buf, sizeof(buf), tr("On"));
else /*INVERSION_AUTO*/ snprintf(buf, sizeof(buf), tr("Auto")); else /*INVERSION_AUTO*/ snprintf(buf, sizeof(buf), tr("Auto"));
m_Osd->DrawText(OSDINFOWIN_X(2), OSDINFOWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); m_Osd->DrawText(OSDINFOWIN_X(2), OSDINFOWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), tr("CoderateH"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), tr("Coderate"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
value = channel->CoderateH(); value = channel->CoderateH();
if (value == FEC_NONE) snprintf(buf, sizeof(buf), tr("None")); if (value == FEC_NONE) snprintf(buf, sizeof(buf), "%s (H)", tr("None"));
else if (value == FEC_1_2) snprintf(buf, sizeof(buf), "1/2"); else if (value == FEC_1_2) snprintf(buf, sizeof(buf), "1/2 (H)");
else if (value == FEC_2_3) snprintf(buf, sizeof(buf), "2/3"); else if (value == FEC_2_3) snprintf(buf, sizeof(buf), "2/3 (H)");
else if (value == FEC_3_4) snprintf(buf, sizeof(buf), "3/4"); else if (value == FEC_3_4) snprintf(buf, sizeof(buf), "3/4 (H)");
else if (value == FEC_4_5) snprintf(buf, sizeof(buf), "4/5"); else if (value == FEC_4_5) snprintf(buf, sizeof(buf), "4/5 (H)");
else if (value == FEC_5_6) snprintf(buf, sizeof(buf), "5/6"); else if (value == FEC_5_6) snprintf(buf, sizeof(buf), "5/6 (H)");
else if (value == FEC_6_7) snprintf(buf, sizeof(buf), "6/7"); else if (value == FEC_6_7) snprintf(buf, sizeof(buf), "6/7 (H)");
else if (value == FEC_7_8) snprintf(buf, sizeof(buf), "7/8"); else if (value == FEC_7_8) snprintf(buf, sizeof(buf), "7/8 (H)");
else if (value == FEC_8_9) snprintf(buf, sizeof(buf), "8/9"); else if (value == FEC_8_9) snprintf(buf, sizeof(buf), "8/9 (H)");
else /*FEC_AUTO*/ snprintf(buf, sizeof(buf), tr("Auto")); else /*FEC_AUTO*/ snprintf(buf, sizeof(buf), "%s (H)", tr("Auto"));
value = channel->CoderateL(); value = channel->CoderateL();
if (value == FEC_NONE) snprintf(buf2, sizeof(buf2), " - %s", tr("None")); if (value == FEC_NONE) snprintf(buf2, sizeof(buf2), " %s (L)", tr("None"));
else if (value == FEC_1_2) snprintf(buf2, sizeof(buf2), " - 1/2"); else if (value == FEC_1_2) snprintf(buf2, sizeof(buf2), " 1/2 (L)");
else if (value == FEC_2_3) snprintf(buf2, sizeof(buf2), " - 2/3"); else if (value == FEC_2_3) snprintf(buf2, sizeof(buf2), " 2/3 (L)");
else if (value == FEC_3_4) snprintf(buf2, sizeof(buf2), " - 3/4"); else if (value == FEC_3_4) snprintf(buf2, sizeof(buf2), " 3/4 (L)");
else if (value == FEC_4_5) snprintf(buf2, sizeof(buf2), " - 4/5"); else if (value == FEC_4_5) snprintf(buf2, sizeof(buf2), " 4/5 (L)");
else if (value == FEC_5_6) snprintf(buf2, sizeof(buf2), " - 5/6"); else if (value == FEC_5_6) snprintf(buf2, sizeof(buf2), " 5/6 (L)");
else if (value == FEC_6_7) snprintf(buf2, sizeof(buf2), " - 6/7"); else if (value == FEC_6_7) snprintf(buf2, sizeof(buf2), " 6/7 (L)");
else if (value == FEC_7_8) snprintf(buf2, sizeof(buf2), " - 7/8"); else if (value == FEC_7_8) snprintf(buf2, sizeof(buf2), " 7/8 (L)");
else if (value == FEC_8_9) snprintf(buf2, sizeof(buf2), " - 8/9"); else if (value == FEC_8_9) snprintf(buf2, sizeof(buf2), " 8/9 (L)");
else /*FEC_AUTO*/ snprintf(buf2, sizeof(buf2), " - %s", tr("Auto")); else /*FEC_AUTO*/ snprintf(buf2, sizeof(buf2), " %s (L)", tr("Auto"));
strncat(buf, buf2, sizeof(buf)); strncat(buf, buf2, sizeof(buf));
m_Osd->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); m_Osd->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
offset += OSDROWHEIGHT; offset += OSDROWHEIGHT;
@ -658,15 +665,19 @@ void cFemonOsd::DrawInfoWindow(void)
m_Osd->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); m_Osd->DrawText(OSDINFOWIN_X(4), OSDINFOWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
break; break;
} }
m_Osd->DrawEllipse(0, OSDINFOWIN_Y(OSDINFOHEIGHT-OSDCORNERING), OSDCORNERING, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -3); if (IS_OSDCORNERING) {
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDINFOWIN_Y(OSDINFOHEIGHT-OSDCORNERING), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -4); m_Osd->DrawEllipse(0, OSDINFOWIN_Y(OSDINFOHEIGHT-OSDCORNERING), OSDCORNERING, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -3);
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDINFOWIN_Y(OSDINFOHEIGHT-OSDCORNERING), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -4);
}
} }
else if (m_DisplayMode == eFemonModeStream) { else if (m_DisplayMode == eFemonModeStream) {
m_Osd->DrawRectangle(0, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), femonTheme[femonConfig.theme].clrBackground); m_Osd->DrawRectangle(0, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), femonTheme[femonConfig.theme].clrBackground);
m_Osd->DrawRectangle(0, OSDINFOWIN_Y(offset), OSDWIDTH, OSDINFOWIN_Y(offset+OSDROWHEIGHT-1), femonTheme[femonConfig.theme].clrTitleBackground); m_Osd->DrawRectangle(0, OSDINFOWIN_Y(offset), OSDWIDTH, OSDINFOWIN_Y(offset+OSDROWHEIGHT-1), femonTheme[femonConfig.theme].clrTitleBackground);
m_Osd->DrawText( OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Stream Information"), femonTheme[femonConfig.theme].clrTitleText, femonTheme[femonConfig.theme].clrTitleBackground, m_Font); m_Osd->DrawText( OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Stream Information"), femonTheme[femonConfig.theme].clrTitleText, femonTheme[femonConfig.theme].clrTitleBackground, m_Font);
m_Osd->DrawEllipse(0, OSDINFOWIN_Y(0), OSDCORNERING, OSDINFOWIN_Y(OSDCORNERING), clrTransparent, -2); if (IS_OSDCORNERING) {
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDCORNERING), clrTransparent, -1); m_Osd->DrawEllipse(0, OSDINFOWIN_Y(0), OSDCORNERING, OSDINFOWIN_Y(OSDCORNERING), clrTransparent, -2);
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDCORNERING), clrTransparent, -1);
}
offset += OSDROWHEIGHT; offset += OSDROWHEIGHT;
m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Video Stream"), femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Video Stream"), femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
snprintf(buf, sizeof(buf), "#%d", channel->Vpid()); snprintf(buf, sizeof(buf), "#%d", channel->Vpid());
@ -736,16 +747,20 @@ void cFemonOsd::DrawInfoWindow(void)
} }
else snprintf(buf, sizeof(buf), "---"); else snprintf(buf, sizeof(buf), "---");
m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
m_Osd->DrawEllipse(0, OSDINFOWIN_Y(OSDINFOHEIGHT-OSDCORNERING), OSDCORNERING, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -3); if (IS_OSDCORNERING) {
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDINFOWIN_Y(OSDINFOHEIGHT-OSDCORNERING), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -4); m_Osd->DrawEllipse(0, OSDINFOWIN_Y(OSDINFOHEIGHT-OSDCORNERING), OSDCORNERING, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -3);
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDINFOWIN_Y(OSDINFOHEIGHT-OSDCORNERING), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -4);
}
} }
else if (m_DisplayMode == eFemonModeAC3) { else if (m_DisplayMode == eFemonModeAC3) {
m_Osd->DrawRectangle(0, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), femonTheme[femonConfig.theme].clrBackground); m_Osd->DrawRectangle(0, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), femonTheme[femonConfig.theme].clrBackground);
m_Osd->DrawRectangle(0, OSDINFOWIN_Y(offset), OSDWIDTH, OSDINFOWIN_Y(offset+OSDROWHEIGHT-1), femonTheme[femonConfig.theme].clrTitleBackground); m_Osd->DrawRectangle(0, OSDINFOWIN_Y(offset), OSDWIDTH, OSDINFOWIN_Y(offset+OSDROWHEIGHT-1), femonTheme[femonConfig.theme].clrTitleBackground);
snprintf(buf, sizeof(buf), "%s - %s #%d %s", tr("Stream Information"), tr("AC-3 Stream"), IS_DOLBY_TRACK(track) ? channel->Dpid(int(track - ttDolbyFirst)) : channel->Dpid(0), IS_DOLBY_TRACK(track) ? channel->Dlang(int(track - ttDolbyFirst)) : channel->Dlang(0)); snprintf(buf, sizeof(buf), "%s - %s #%d %s", tr("Stream Information"), tr("AC-3 Stream"), IS_DOLBY_TRACK(track) ? channel->Dpid(int(track - ttDolbyFirst)) : channel->Dpid(0), IS_DOLBY_TRACK(track) ? channel->Dlang(int(track - ttDolbyFirst)) : channel->Dlang(0));
m_Osd->DrawText( OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrTitleText, femonTheme[femonConfig.theme].clrTitleBackground, m_Font); m_Osd->DrawText( OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrTitleText, femonTheme[femonConfig.theme].clrTitleBackground, m_Font);
m_Osd->DrawEllipse(0, OSDINFOWIN_Y(0), OSDCORNERING, OSDINFOWIN_Y(OSDCORNERING), clrTransparent, -2); if (IS_OSDCORNERING) {
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDCORNERING), clrTransparent, -1); m_Osd->DrawEllipse(0, OSDINFOWIN_Y(0), OSDCORNERING, OSDINFOWIN_Y(OSDCORNERING), clrTransparent, -2);
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDCORNERING), clrTransparent, -1);
}
offset += OSDROWHEIGHT; offset += OSDROWHEIGHT;
if (m_Receiver && m_Receiver->AC3Valid() && IS_DOLBY_TRACK(track)) { if (m_Receiver && m_Receiver->AC3Valid() && IS_DOLBY_TRACK(track)) {
m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Bitrate"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); m_Osd->DrawText(OSDINFOWIN_X(1), OSDINFOWIN_Y(offset), tr("Bitrate"), femonTheme[femonConfig.theme].clrInactiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
@ -831,8 +846,10 @@ void cFemonOsd::DrawInfoWindow(void)
else snprintf(buf, sizeof(buf), "---"); else snprintf(buf, sizeof(buf), "---");
m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font); m_Osd->DrawText(OSDINFOWIN_X(3), OSDINFOWIN_Y(offset), buf, femonTheme[femonConfig.theme].clrActiveText, femonTheme[femonConfig.theme].clrBackground, m_Font);
} }
m_Osd->DrawEllipse(0, OSDINFOWIN_Y(OSDINFOHEIGHT-OSDCORNERING), OSDCORNERING, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -3); if (IS_OSDCORNERING) {
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDINFOWIN_Y(OSDINFOHEIGHT-OSDCORNERING), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -4); m_Osd->DrawEllipse(0, OSDINFOWIN_Y(OSDINFOHEIGHT-OSDCORNERING), OSDCORNERING, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -3);
m_Osd->DrawEllipse((OSDWIDTH-OSDCORNERING), OSDINFOWIN_Y(OSDINFOHEIGHT-OSDCORNERING), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent, -4);
}
} }
else /* eFemonModeBasic */ { else /* eFemonModeBasic */ {
m_Osd->DrawRectangle(0, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent); m_Osd->DrawRectangle(0, OSDINFOWIN_Y(0), OSDWIDTH, OSDINFOWIN_Y(OSDINFOHEIGHT), clrTransparent);