mirror of
https://github.com/rofafor/vdr-plugin-femon.git
synced 2023-10-10 13:36:53 +02:00
Fixed frequency, guard and bandwidth units in transponder information.
Added Apid2, Dpid1, Dpid2 information. Added option to write signal information into system log.
This commit is contained in:
parent
23487c5972
commit
954f09182f
6
HISTORY
6
HISTORY
@ -29,3 +29,9 @@ VDR Plugin 'femon' Revision History
|
|||||||
- Transponder information is now available in advanced display mode:
|
- Transponder information is now available in advanced display mode:
|
||||||
Press 'OK' key to switch between the simple and the advanced display mode.
|
Press 'OK' key to switch between the simple and the advanced display mode.
|
||||||
- Moved bitrate calculation to it's own thread for improved accurancy.
|
- Moved bitrate calculation to it's own thread for improved accurancy.
|
||||||
|
|
||||||
|
2004-03-07: Version 0.0.3a
|
||||||
|
|
||||||
|
- Fixed frequency, guard and bandwidth units in transponder information.
|
||||||
|
- Added Apid2, Dpid1, Dpid2 information.
|
||||||
|
- Added option to write signal information into system log.
|
||||||
|
6
README
6
README
@ -11,7 +11,7 @@ See the file COPYING for license information.
|
|||||||
Requirements:
|
Requirements:
|
||||||
|
|
||||||
Ph.D. in Astro Physics and preferably a six-pack waiting in a fridge.
|
Ph.D. in Astro Physics and preferably a six-pack waiting in a fridge.
|
||||||
Never trust a Klingon.
|
Never trust a Klingon. "Qu'vaD lI' De'vam"
|
||||||
|
|
||||||
Description:
|
Description:
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ excellent 'OSD Picture-In-Picture' plugin by Sascha Volkenandt <sascha@akv-soft.
|
|||||||
and Andreas Regel <andreas.regel@powarman.de>. The bitrate calculation algorithm
|
and Andreas Regel <andreas.regel@powarman.de>. The bitrate calculation algorithm
|
||||||
originates from the 'dvbstream' application by Dave Chapman <dave@dchapman.com>.
|
originates from the 'dvbstream' application by Dave Chapman <dave@dchapman.com>.
|
||||||
|
|
||||||
Shortcomings / Todo list:
|
Shortcomings / Todo list / Notes:
|
||||||
|
|
||||||
- The current version is a kind of Proof In Concept to replace the old 'tech
|
- The current version is a kind of Proof In Concept to replace the old 'tech
|
||||||
patch', and it's now eating many unnecessary cpu clock cycles - this will be
|
patch', and it's now eating many unnecessary cpu clock cycles - this will be
|
||||||
@ -41,3 +41,5 @@ Shortcomings / Todo list:
|
|||||||
well. Btw., this same thing happens with OSDTeletext plugin too :)
|
well. Btw., this same thing happens with OSDTeletext plugin too :)
|
||||||
- The plugin GUI is designed for _small fonts_, so stable vdr-1.2.6 users should
|
- The plugin GUI is designed for _small fonts_, so stable vdr-1.2.6 users should
|
||||||
consider a small font patch (e.g. ElchiAIO4a) to maximize the visual effect :)
|
consider a small font patch (e.g. ElchiAIO4a) to maximize the visual effect :)
|
||||||
|
- The stream information is still missing.
|
||||||
|
- Disable bitrate calculation to speed up heavy zapping sessions.
|
||||||
|
3
femon.c
3
femon.c
@ -64,6 +64,7 @@ bool cPluginFemon::SetupParse(const char *Name, const char *Value)
|
|||||||
{
|
{
|
||||||
// Parse your own setup parameters and store their values.
|
// Parse your own setup parameters and store their values.
|
||||||
if (!strcasecmp(Name, "HideMenu")) femonConfig.hidemenu = atoi(Value);
|
if (!strcasecmp(Name, "HideMenu")) femonConfig.hidemenu = atoi(Value);
|
||||||
|
else if (!strcasecmp(Name, "SyslogOutput")) femonConfig.syslogoutput = atoi(Value);
|
||||||
else if (!strcasecmp(Name, "DisplayMode")) femonConfig.displaymode = atoi(Value);
|
else if (!strcasecmp(Name, "DisplayMode")) femonConfig.displaymode = atoi(Value);
|
||||||
else if (!strcasecmp(Name, "Position")) femonConfig.position = atoi(Value);
|
else if (!strcasecmp(Name, "Position")) femonConfig.position = atoi(Value);
|
||||||
else if (!strcasecmp(Name, "RedLimit")) femonConfig.redlimit = atoi(Value);
|
else if (!strcasecmp(Name, "RedLimit")) femonConfig.redlimit = atoi(Value);
|
||||||
@ -88,6 +89,7 @@ void cMenuFemonSetup::Setup(void)
|
|||||||
|
|
||||||
Clear();
|
Clear();
|
||||||
Add(new cMenuEditBoolItem( tr("Hide Mainmenu Entry"), &femonConfig.hidemenu, tr("no"), tr("yes")));
|
Add(new cMenuEditBoolItem( tr("Hide Mainmenu Entry"), &femonConfig.hidemenu, tr("no"), tr("yes")));
|
||||||
|
Add(new cMenuEditBoolItem( tr("Use Syslog Output"), &femonConfig.syslogoutput, tr("no"), tr("yes")));
|
||||||
Add(new cMenuEditBoolItem( tr("Default Display Mode"), &femonConfig.displaymode, tr("simple"), tr("advanced")));
|
Add(new cMenuEditBoolItem( tr("Default Display Mode"), &femonConfig.displaymode, tr("simple"), tr("advanced")));
|
||||||
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("Red Limit [%]"), &femonConfig.redlimit, 1, 50));
|
Add(new cMenuEditIntItem( tr("Red Limit [%]"), &femonConfig.redlimit, 1, 50));
|
||||||
@ -104,6 +106,7 @@ void cMenuFemonSetup::Setup(void)
|
|||||||
void cMenuFemonSetup::Store(void)
|
void cMenuFemonSetup::Store(void)
|
||||||
{
|
{
|
||||||
SetupStore("HideMenu", femonConfig.hidemenu);
|
SetupStore("HideMenu", femonConfig.hidemenu);
|
||||||
|
SetupStore("SyslogOutput", femonConfig.syslogoutput);
|
||||||
SetupStore("Position", femonConfig.position);
|
SetupStore("Position", femonConfig.position);
|
||||||
SetupStore("DisplayMode", femonConfig.displaymode);
|
SetupStore("DisplayMode", femonConfig.displaymode);
|
||||||
SetupStore("RedLimit", femonConfig.redlimit);
|
SetupStore("RedLimit", femonConfig.redlimit);
|
||||||
|
2
femon.h
2
femon.h
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include <vdr/plugin.h>
|
#include <vdr/plugin.h>
|
||||||
|
|
||||||
static const char *VERSION = "0.0.3";
|
static const char *VERSION = "0.0.3a";
|
||||||
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";
|
||||||
|
|
||||||
|
@ -20,4 +20,5 @@ cFemonConfig::cFemonConfig(void)
|
|||||||
updateinterval = 5;
|
updateinterval = 5;
|
||||||
showbitrate = 1;
|
showbitrate = 1;
|
||||||
calcinterval = 20;
|
calcinterval = 20;
|
||||||
|
syslogoutput = 0;
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ public:
|
|||||||
int updateinterval;
|
int updateinterval;
|
||||||
int showbitrate;
|
int showbitrate;
|
||||||
int calcinterval;
|
int calcinterval;
|
||||||
|
int syslogoutput;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern cFemonConfig femonConfig;
|
extern cFemonConfig femonConfig;
|
||||||
|
48
femoni18n.c
48
femoni18n.c
@ -12,7 +12,7 @@ const tI18nPhrase Phrases[] = {
|
|||||||
{ "DVB Signal Information Monitor (OSD)", // English
|
{ "DVB Signal Information Monitor (OSD)", // English
|
||||||
"DVB Signal Informationsanzeige (OSD)", // Deutsch
|
"DVB Signal Informationsanzeige (OSD)", // Deutsch
|
||||||
"", // Slovenski
|
"", // Slovenski
|
||||||
"", // Italiano
|
"Visualizza le informazioni sul segnale DVB", // Italiano
|
||||||
"", // Nederlands
|
"", // Nederlands
|
||||||
"", // Português
|
"", // Português
|
||||||
"", // Français
|
"", // Français
|
||||||
@ -32,7 +32,7 @@ const tI18nPhrase Phrases[] = {
|
|||||||
{ "Signal Information", // English
|
{ "Signal Information", // English
|
||||||
"Signalinformationen", // Deutsch
|
"Signalinformationen", // Deutsch
|
||||||
"", // Slovenski
|
"", // Slovenski
|
||||||
"", // Italiano
|
"Informazioni sul segnale", // Italiano
|
||||||
"", // Nederlands
|
"", // Nederlands
|
||||||
"", // Português
|
"", // Português
|
||||||
"", // Français
|
"", // Français
|
||||||
@ -72,7 +72,7 @@ const tI18nPhrase Phrases[] = {
|
|||||||
{ "Default Display Mode", // English
|
{ "Default Display Mode", // English
|
||||||
"Standard Anzeigemodus", // Deutsch
|
"Standard Anzeigemodus", // Deutsch
|
||||||
"", // Slovenski
|
"", // Slovenski
|
||||||
"", // Italiano
|
"Modo di visualizzazione standard", // Italiano
|
||||||
"", // Nederlands
|
"", // Nederlands
|
||||||
"", // Português
|
"", // Português
|
||||||
"", // Français
|
"", // Français
|
||||||
@ -92,7 +92,7 @@ const tI18nPhrase Phrases[] = {
|
|||||||
{ "simple", // English
|
{ "simple", // English
|
||||||
"einfach", // Deutsch
|
"einfach", // Deutsch
|
||||||
"", // Slovenski
|
"", // Slovenski
|
||||||
"", // Italiano
|
"semplice", // Italiano
|
||||||
"", // Nederlands
|
"", // Nederlands
|
||||||
"", // Português
|
"", // Português
|
||||||
"", // Français
|
"", // Français
|
||||||
@ -112,7 +112,7 @@ const tI18nPhrase Phrases[] = {
|
|||||||
{ "advanced", // English
|
{ "advanced", // English
|
||||||
"fortgeschritten", // Deutsch
|
"fortgeschritten", // Deutsch
|
||||||
"", // Slovenski
|
"", // Slovenski
|
||||||
"", // Italiano
|
"avanzato", // Italiano
|
||||||
"", // Nederlands
|
"", // Nederlands
|
||||||
"", // Português
|
"", // Português
|
||||||
"", // Français
|
"", // Français
|
||||||
@ -132,7 +132,7 @@ const tI18nPhrase Phrases[] = {
|
|||||||
{ "Hide Mainmenu Entry", // English
|
{ "Hide Mainmenu Entry", // English
|
||||||
"Hauptmenüeintrag verstecken", // Deutsch
|
"Hauptmenüeintrag verstecken", // Deutsch
|
||||||
"", // Slovenski
|
"", // Slovenski
|
||||||
"Nascondere Voce Menu", // Italiano
|
"Nascondi voce menù", // Italiano
|
||||||
"", // Nederlands
|
"", // Nederlands
|
||||||
"", // Português
|
"", // Português
|
||||||
"", // Français
|
"", // Français
|
||||||
@ -172,7 +172,7 @@ const tI18nPhrase Phrases[] = {
|
|||||||
{ "Bitrate Calculation", // English
|
{ "Bitrate Calculation", // English
|
||||||
"Bitratenberechnung", // Deutsch
|
"Bitratenberechnung", // Deutsch
|
||||||
"", // Slovenski
|
"", // Slovenski
|
||||||
"", // Italiano
|
"Calcolo Bitrate", // Italiano
|
||||||
"", // Nederlands
|
"", // Nederlands
|
||||||
"", // Português
|
"", // Português
|
||||||
"", // Français
|
"", // Français
|
||||||
@ -192,7 +192,7 @@ const tI18nPhrase Phrases[] = {
|
|||||||
{ "Calculation Interval [0.1s]", // English
|
{ "Calculation Interval [0.1s]", // English
|
||||||
"Berechnungsintervall [0.1s]", // Deutsch
|
"Berechnungsintervall [0.1s]", // Deutsch
|
||||||
"", // Slovenski
|
"", // Slovenski
|
||||||
"", // Italiano
|
"Intervallo di calcolo [0.1s]", // Italiano
|
||||||
"", // Nederlands
|
"", // Nederlands
|
||||||
"", // Português
|
"", // Português
|
||||||
"", // Français
|
"", // Français
|
||||||
@ -212,7 +212,7 @@ const tI18nPhrase Phrases[] = {
|
|||||||
{ "Red Limit [%]", // English
|
{ "Red Limit [%]", // English
|
||||||
"Grenze Rot [%]", // Deutsch
|
"Grenze Rot [%]", // Deutsch
|
||||||
"", // Slovenski
|
"", // Slovenski
|
||||||
"Limite Rosso [%]", // Italiano
|
"Limite rosso [%]", // Italiano
|
||||||
"", // Nederlands
|
"", // Nederlands
|
||||||
"", // Português
|
"", // Português
|
||||||
"", // Français
|
"", // Français
|
||||||
@ -232,7 +232,7 @@ const tI18nPhrase Phrases[] = {
|
|||||||
{ "Green Limit [%]", // English
|
{ "Green Limit [%]", // English
|
||||||
"Grenze Grün [%]", // Deutsch
|
"Grenze Grün [%]", // Deutsch
|
||||||
"", // Slovenski
|
"", // Slovenski
|
||||||
"Limite Verde [%]", // Italiano
|
"Limite verde [%]", // Italiano
|
||||||
"", // Nederlands
|
"", // Nederlands
|
||||||
"", // Português
|
"", // Português
|
||||||
"", // Français
|
"", // Français
|
||||||
@ -252,7 +252,7 @@ const tI18nPhrase Phrases[] = {
|
|||||||
{ "Transponder Information", // English
|
{ "Transponder Information", // English
|
||||||
"Transponderinformation", // Deutsch
|
"Transponderinformation", // Deutsch
|
||||||
"", // Slovenski
|
"", // Slovenski
|
||||||
"", // Italiano
|
"Informazioni transponder", // Italiano
|
||||||
"", // Nederlands
|
"", // Nederlands
|
||||||
"", // Português
|
"", // Português
|
||||||
"", // Français
|
"", // Français
|
||||||
@ -272,7 +272,7 @@ const tI18nPhrase Phrases[] = {
|
|||||||
{ "Satellite Card", // English
|
{ "Satellite Card", // English
|
||||||
"Satellitenkarte", // Deutsch
|
"Satellitenkarte", // Deutsch
|
||||||
"", // Slovenski
|
"", // Slovenski
|
||||||
"", // Italiano
|
"Scheda satellitare", // Italiano
|
||||||
"", // Nederlands
|
"", // Nederlands
|
||||||
"", // Português
|
"", // Português
|
||||||
"", // Français
|
"", // Français
|
||||||
@ -292,7 +292,7 @@ const tI18nPhrase Phrases[] = {
|
|||||||
{ "Cable Card", // English
|
{ "Cable Card", // English
|
||||||
"Kabelkarte", // Deutsch
|
"Kabelkarte", // Deutsch
|
||||||
"", // Slovenski
|
"", // Slovenski
|
||||||
"", // Italiano
|
"Scheda via cavo", // Italiano
|
||||||
"", // Nederlands
|
"", // Nederlands
|
||||||
"", // Português
|
"", // Português
|
||||||
"", // Français
|
"", // Français
|
||||||
@ -312,7 +312,7 @@ const tI18nPhrase Phrases[] = {
|
|||||||
{ "Terrestial Card", // English
|
{ "Terrestial Card", // English
|
||||||
"Terrestrische Karte", // Deutsch
|
"Terrestrische Karte", // Deutsch
|
||||||
"", // Slovenski
|
"", // Slovenski
|
||||||
"", // Italiano
|
"Scheda terrestre", // Italiano
|
||||||
"", // Nederlands
|
"", // Nederlands
|
||||||
"", // Português
|
"", // Português
|
||||||
"", // Français
|
"", // Français
|
||||||
@ -327,6 +327,26 @@ const tI18nPhrase Phrases[] = {
|
|||||||
"", // Català
|
"", // Català
|
||||||
#if VDRVERSNUM >= 10300
|
#if VDRVERSNUM >= 10300
|
||||||
"" // ÀãááÚØÙ
|
"" // ÀãááÚØÙ
|
||||||
|
#endif
|
||||||
|
},
|
||||||
|
{ "Use Syslog Output", // English
|
||||||
|
"Benutze syslog Ausgabe", // Deutsch
|
||||||
|
"", // Slovenski
|
||||||
|
"Registra su syslog", // Italiano
|
||||||
|
"", // Nederlands
|
||||||
|
"", // Português
|
||||||
|
"", // Français
|
||||||
|
"", // Norsk
|
||||||
|
"Kirjaa systeemilokiin", // suomi
|
||||||
|
"", // Polski
|
||||||
|
"", // Español
|
||||||
|
"", // ÅëëçíéêÜ
|
||||||
|
"", // Svenska
|
||||||
|
"", // Romaneste
|
||||||
|
"", // Magyar
|
||||||
|
"", // Català
|
||||||
|
#if VDRVERSNUM >= 10300
|
||||||
|
"" // ÀãááÚØÙ
|
||||||
#endif
|
#endif
|
||||||
},
|
},
|
||||||
{ NULL }
|
{ NULL }
|
||||||
|
272
femonosd.c
272
femonosd.c
@ -16,9 +16,12 @@
|
|||||||
#warning You should consider using the small fonts!
|
#warning You should consider using the small fonts!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FE_DEVICE "/dev/dvb/adapter%d/frontend%d"
|
#define FRONTEND_DEVICE "/dev/dvb/adapter%d/frontend%d"
|
||||||
#define CHANNELINPUT_TIMEOUT 1000
|
#define CHANNELINPUT_TIMEOUT 1000
|
||||||
|
|
||||||
|
#define SCREENWIDTH 720
|
||||||
|
#define SCREENHEIGHT 576
|
||||||
|
|
||||||
#define OSDWIDTH 46
|
#define OSDWIDTH 46
|
||||||
#define OSDINFOHEIGHT 11
|
#define OSDINFOHEIGHT 11
|
||||||
#define OSDGAPHEIGHT 1
|
#define OSDGAPHEIGHT 1
|
||||||
@ -85,15 +88,16 @@ void cFemonOsd::DrawStatusWindow(void)
|
|||||||
int snr = m_SNR / 655;
|
int snr = m_SNR / 655;
|
||||||
int signal = m_Signal / 655;
|
int signal = m_Signal / 655;
|
||||||
int lines = 0;
|
int lines = 0;
|
||||||
|
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||||
|
|
||||||
if (m_Osd) {
|
if (m_Osd) {
|
||||||
#if (VDRVERSNUM >= 10300) || defined(ELCHIAIOVERSION)
|
#if (VDRVERSNUM >= 10300) || defined(ELCHIAIOVERSION)
|
||||||
eDvbFont OldFont = m_Osd->SetFont(fontSml);
|
eDvbFont OldFont = m_Osd->SetFont(fontSml);
|
||||||
#endif
|
#endif
|
||||||
m_Osd->Clear(m_StatusWindow);
|
m_Osd->Clear(m_StatusWindow);
|
||||||
snprintf(buf, sizeof(buf), "%d%s %s", m_Number ? m_Number : Channels.GetByNumber(cDevice::CurrentChannel())->Number(), m_Number ? "-" : "", Channels.GetByNumber(cDevice::CurrentChannel())->Name());
|
snprintf(buf, sizeof(buf), "%d%s %s", m_Number ? m_Number : channel->Number(), m_Number ? "-" : "", channel->Name());
|
||||||
m_Osd->Fill(0, femonConfig.position ? 0 : (OSDINFOHEIGHT + OSDGAPHEIGHT) * cOsd::LineHeight(), OSDWIDTH * cOsd::CellWidth(), femonConfig.position ? cOsd::LineHeight() - 1 : (OSDINFOHEIGHT + OSDGAPHEIGHT + 1) * cOsd::LineHeight() - 1, clrWhite, m_StatusWindow);
|
m_Osd->Fill(0, femonConfig.position ? 0 : (OSDINFOHEIGHT + OSDGAPHEIGHT) * cOsd::LineHeight(), OSDWIDTH * cOsd::CellWidth(), femonConfig.position ? cOsd::LineHeight() - 1 : (OSDINFOHEIGHT + OSDGAPHEIGHT + 1) * cOsd::LineHeight() - 1, clrWhite, m_StatusWindow);
|
||||||
m_Osd->Text(OSDSTATUSCOL1 * cOsd::CellWidth(), femonConfig.position ? 0 : (OSDINFOHEIGHT + OSDGAPHEIGHT + 0) * cOsd::LineHeight(), buf, clrBlack, clrWhite, m_StatusWindow);
|
m_Osd->Text(OSDSTATUSCOL1 * cOsd::CellWidth(), femonConfig.position ? 0 : (OSDINFOHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight(), buf, clrBlack, clrWhite, m_StatusWindow);
|
||||||
lines++;
|
lines++;
|
||||||
if (signal > 0) {
|
if (signal > 0) {
|
||||||
signal = (OSDWIDTH * cOsd::CellWidth()) * signal / 100;
|
signal = (OSDWIDTH * cOsd::CellWidth()) * signal / 100;
|
||||||
@ -157,6 +161,7 @@ void cFemonOsd::DrawInfoWindow(void)
|
|||||||
char buf2[20];
|
char buf2[20];
|
||||||
int lines = 0;
|
int lines = 0;
|
||||||
int value = 0;
|
int value = 0;
|
||||||
|
cChannel *channel = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||||
|
|
||||||
if (m_Osd) {
|
if (m_Osd) {
|
||||||
if (m_DisplayMode) {
|
if (m_DisplayMode) {
|
||||||
@ -168,76 +173,85 @@ void cFemonOsd::DrawInfoWindow(void)
|
|||||||
m_Osd->Text( OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines, tr("Transponder Information"), clrBackground, clrWhite, m_InfoWindow);
|
m_Osd->Text( OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines, tr("Transponder Information"), clrBackground, clrWhite, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Vpid"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Vpid"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%d", Channels.GetByNumber(cDevice::CurrentChannel())->Vpid());
|
snprintf(buf, sizeof(buf), "%d", channel->Vpid());
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Ppid"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Ppid"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%d", Channels.GetByNumber(cDevice::CurrentChannel())->Ppid());
|
snprintf(buf, sizeof(buf), "%d", channel->Ppid());
|
||||||
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Apid1"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Apid1"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%d", Channels.GetByNumber(cDevice::CurrentChannel())->Apid1());
|
value = channel->Apid2();
|
||||||
|
if (value) snprintf(buf, sizeof(buf), "%d, %d", channel->Apid1(), value);
|
||||||
|
else snprintf(buf, sizeof(buf), "%d", channel->Apid1());
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Tpid"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Dpid1"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%d", Channels.GetByNumber(cDevice::CurrentChannel())->Tpid());
|
value = channel->Dpid2();
|
||||||
|
if (value) snprintf(buf, sizeof(buf), "%d, %d", channel->Dpid1(), value);
|
||||||
|
else snprintf(buf, sizeof(buf), "%d", channel->Dpid1());
|
||||||
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("CA"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("CA"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%d", Channels.GetByNumber(cDevice::CurrentChannel())->Ca());
|
snprintf(buf, sizeof(buf), "%d", channel->Ca());
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Sid"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Tpid"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%d", Channels.GetByNumber(cDevice::CurrentChannel())->Sid());
|
snprintf(buf, sizeof(buf), "%d", channel->Tpid());
|
||||||
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Sid"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
|
snprintf(buf, sizeof(buf), "%d", channel->Sid());
|
||||||
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
#if (VDRVERSNUM >= 10300)
|
#if (VDRVERSNUM >= 10300)
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), "Nid", clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), "Nid", clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%d", Channels.GetByNumber(cDevice::CurrentChannel())->Nid());
|
snprintf(buf, sizeof(buf), "%d", channel->Nid());
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
|
||||||
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), "Tid" /*tr("Tid")*/, clrWhite, clrBackground, m_InfoWindow);
|
|
||||||
snprintf(buf, sizeof(buf), "%d", Channels.GetByNumber(cDevice::CurrentChannel())->Tid());
|
|
||||||
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), "Rid" /*tr("Rid")*/, clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), "Tid" /*tr("Tid")*/, clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%d", Channels.GetByNumber(cDevice::CurrentChannel())->Rid());
|
snprintf(buf, sizeof(buf), "%d", channel->Tid());
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), "Rid" /*tr("Rid")*/, clrWhite, clrBackground, m_InfoWindow);
|
||||||
|
snprintf(buf, sizeof(buf), "%d", channel->Rid());
|
||||||
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
#endif
|
#endif
|
||||||
|
lines++;
|
||||||
switch (m_FrontendInfo.type) {
|
switch (m_FrontendInfo.type) {
|
||||||
case FE_QPSK:
|
case FE_QPSK:
|
||||||
snprintf(buf, sizeof(buf), "%s #%d - %s", tr("Satellite Card"), cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name);
|
snprintf(buf, sizeof(buf), "%s #%d - %s", tr("Satellite Card"), cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name);
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Frequency"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Frequency"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%d kHz", Channels.GetByNumber(cDevice::CurrentChannel())->Frequency());
|
value = channel->Frequency();
|
||||||
|
while (value > 20000) value /= 1000;
|
||||||
|
snprintf(buf, sizeof(buf), "%d MHz", value);
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Source"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Source"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%s", cSource::ToString(Channels.GetByNumber(cDevice::CurrentChannel())->Source()));
|
snprintf(buf, sizeof(buf), "%s", cSource::ToString(channel->Source()));
|
||||||
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Srate"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Srate"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%d", Channels.GetByNumber(cDevice::CurrentChannel())->Srate());
|
snprintf(buf, sizeof(buf), "%d", channel->Srate());
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Polarization"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Polarization"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%c", toupper(Channels.GetByNumber(cDevice::CurrentChannel())->Polarization()));
|
snprintf(buf, sizeof(buf), "%c", toupper(channel->Polarization()));
|
||||||
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Inversion"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Inversion"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
value = Channels.GetByNumber(cDevice::CurrentChannel())->Inversion();
|
value = channel->Inversion();
|
||||||
if (value == 0) snprintf(buf, sizeof(buf), "Off");
|
if (value == INVERSION_OFF) snprintf(buf, sizeof(buf), "Off");
|
||||||
else if (value == 1) snprintf(buf, sizeof(buf), "On");
|
else if (value == INVERSION_ON) snprintf(buf, sizeof(buf), "On");
|
||||||
else snprintf(buf, sizeof(buf), "Auto");
|
else /*INVERSION_AUTO*/ snprintf(buf, sizeof(buf), "Auto");
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("CoderateH"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("CoderateH"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
value = Channels.GetByNumber(cDevice::CurrentChannel())->CoderateH();
|
value = channel->CoderateH();
|
||||||
if (value == 0) snprintf(buf, sizeof(buf), "None");
|
if (value == FEC_NONE) snprintf(buf, sizeof(buf), "None");
|
||||||
else if (value == 1) snprintf(buf, sizeof(buf), "1/2");
|
else if (value == FEC_1_2) snprintf(buf, sizeof(buf), "1/2");
|
||||||
else if (value == 2) snprintf(buf, sizeof(buf), "2/3");
|
else if (value == FEC_2_3) snprintf(buf, sizeof(buf), "2/3");
|
||||||
else if (value == 3) snprintf(buf, sizeof(buf), "3/4");
|
else if (value == FEC_3_4) snprintf(buf, sizeof(buf), "3/4");
|
||||||
else if (value == 4) snprintf(buf, sizeof(buf), "4/5");
|
else if (value == FEC_4_5) snprintf(buf, sizeof(buf), "4/5");
|
||||||
else if (value == 5) snprintf(buf, sizeof(buf), "5/6");
|
else if (value == FEC_5_6) snprintf(buf, sizeof(buf), "5/6");
|
||||||
else if (value == 6) snprintf(buf, sizeof(buf), "6/7");
|
else if (value == FEC_6_7) snprintf(buf, sizeof(buf), "6/7");
|
||||||
else if (value == 7) snprintf(buf, sizeof(buf), "7/8");
|
else if (value == FEC_7_8) snprintf(buf, sizeof(buf), "7/8");
|
||||||
else if (value == 8) snprintf(buf, sizeof(buf), "8/9");
|
else if (value == FEC_8_9) snprintf(buf, sizeof(buf), "8/9");
|
||||||
else snprintf(buf, sizeof(buf), "Auto");
|
else /*FEC_AUTO*/ snprintf(buf, sizeof(buf), "Auto");
|
||||||
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -246,44 +260,46 @@ void cFemonOsd::DrawInfoWindow(void)
|
|||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Frequency"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Frequency"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%d kHz", Channels.GetByNumber(cDevice::CurrentChannel())->Frequency());
|
value = channel->Frequency();
|
||||||
|
while (value > 20000) value /= 1000;
|
||||||
|
snprintf(buf, sizeof(buf), "%d MHz", value);
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Source"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Source"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%s", cSource::ToString(Channels.GetByNumber(cDevice::CurrentChannel())->Source()));
|
snprintf(buf, sizeof(buf), "%s", cSource::ToString(channel->Source()));
|
||||||
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Srate"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Srate"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%d", Channels.GetByNumber(cDevice::CurrentChannel())->Srate());
|
snprintf(buf, sizeof(buf), "%d", channel->Srate());
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Modulation"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Modulation"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
value = Channels.GetByNumber(cDevice::CurrentChannel())->Modulation();
|
value = channel->Modulation();
|
||||||
if (value == 0) snprintf(buf, sizeof(buf), "QPSK");
|
if (value == QPSK) snprintf(buf, sizeof(buf), "QPSK");
|
||||||
else if (value == 1) snprintf(buf, sizeof(buf), "QAM 16");
|
else if (value == QAM_16) snprintf(buf, sizeof(buf), "QAM 16");
|
||||||
else if (value == 2) snprintf(buf, sizeof(buf), "QAM 32");
|
else if (value == QAM_32) snprintf(buf, sizeof(buf), "QAM 32");
|
||||||
else if (value == 3) snprintf(buf, sizeof(buf), "QAM 64");
|
else if (value == QAM_64) snprintf(buf, sizeof(buf), "QAM 64");
|
||||||
else if (value == 4) snprintf(buf, sizeof(buf), "QAM 128");
|
else if (value == QAM_128) snprintf(buf, sizeof(buf), "QAM 128");
|
||||||
else if (value == 5) snprintf(buf, sizeof(buf), "QAM 256");
|
else if (value == QAM_256) snprintf(buf, sizeof(buf), "QAM 256");
|
||||||
else snprintf(buf, sizeof(buf), "QAM Auto");
|
else /*QAM_AUTO*/ snprintf(buf, sizeof(buf), "QAM Auto");
|
||||||
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Inversion"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Inversion"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
value = Channels.GetByNumber(cDevice::CurrentChannel())->Inversion();
|
value = channel->Inversion();
|
||||||
if (value == 0) snprintf(buf, sizeof(buf), "Off");
|
if (value == INVERSION_OFF) snprintf(buf, sizeof(buf), "Off");
|
||||||
else if (value == 1) snprintf(buf, sizeof(buf), "On");
|
else if (value == INVERSION_ON) snprintf(buf, sizeof(buf), "On");
|
||||||
else snprintf(buf, sizeof(buf), "Auto");
|
else /*INVERSION_AUTO*/ snprintf(buf, sizeof(buf), "Auto");
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("CoderateH"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("CoderateH"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
value = Channels.GetByNumber(cDevice::CurrentChannel())->CoderateH();
|
value = channel->CoderateH();
|
||||||
if (value == 0) snprintf(buf, sizeof(buf), "None");
|
if (value == FEC_NONE) snprintf(buf, sizeof(buf), "None");
|
||||||
else if (value == 1) snprintf(buf, sizeof(buf), "1/2");
|
else if (value == FEC_1_2) snprintf(buf, sizeof(buf), "1/2");
|
||||||
else if (value == 2) snprintf(buf, sizeof(buf), "2/3");
|
else if (value == FEC_2_3) snprintf(buf, sizeof(buf), "2/3");
|
||||||
else if (value == 3) snprintf(buf, sizeof(buf), "3/4");
|
else if (value == FEC_3_4) snprintf(buf, sizeof(buf), "3/4");
|
||||||
else if (value == 4) snprintf(buf, sizeof(buf), "4/5");
|
else if (value == FEC_4_5) snprintf(buf, sizeof(buf), "4/5");
|
||||||
else if (value == 5) snprintf(buf, sizeof(buf), "5/6");
|
else if (value == FEC_5_6) snprintf(buf, sizeof(buf), "5/6");
|
||||||
else if (value == 6) snprintf(buf, sizeof(buf), "6/7");
|
else if (value == FEC_6_7) snprintf(buf, sizeof(buf), "6/7");
|
||||||
else if (value == 7) snprintf(buf, sizeof(buf), "7/8");
|
else if (value == FEC_7_8) snprintf(buf, sizeof(buf), "7/8");
|
||||||
else if (value == 8) snprintf(buf, sizeof(buf), "8/9");
|
else if (value == FEC_8_9) snprintf(buf, sizeof(buf), "8/9");
|
||||||
else snprintf(buf, sizeof(buf), "Auto");
|
else /*FEC_AUTO*/ snprintf(buf, sizeof(buf), "Auto");
|
||||||
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -292,79 +308,82 @@ void cFemonOsd::DrawInfoWindow(void)
|
|||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Frequency"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Frequency"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
snprintf(buf, sizeof(buf), "%d kHz", Channels.GetByNumber(cDevice::CurrentChannel())->Frequency() / 1000);
|
value = channel->Frequency();
|
||||||
|
while (value > 20000) value /= 1000;
|
||||||
|
snprintf(buf, sizeof(buf), "%d MHz", value);
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Transmission"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Transmission"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
value = Channels.GetByNumber(cDevice::CurrentChannel())->Transmission();
|
value = channel->Transmission();
|
||||||
if (value == 0) snprintf(buf, sizeof(buf), "2K");
|
if (value == TRANSMISSION_MODE_2K) snprintf(buf, sizeof(buf), "2K");
|
||||||
else if (value == 1) snprintf(buf, sizeof(buf), "8K");
|
else if (value == TRANSMISSION_MODE_8K) snprintf(buf, sizeof(buf), "8K");
|
||||||
else snprintf(buf, sizeof(buf), "Auto");
|
else /*TRANSMISSION_MODE_AUTO*/ snprintf(buf, sizeof(buf), "Auto");
|
||||||
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
m_Osd->Text( OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Bandwidth"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text( OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Bandwidth"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
value = Channels.GetByNumber(cDevice::CurrentChannel())->Bandwidth();
|
value = channel->Bandwidth();
|
||||||
if (value == 0) snprintf(buf, sizeof(buf), "6 MHz");
|
if (value == BANDWIDTH_8_MHZ) snprintf(buf, sizeof(buf), "8 MHz");
|
||||||
else if (value == 1) snprintf(buf, sizeof(buf), "7 MHz");
|
else if (value == BANDWIDTH_7_MHZ) snprintf(buf, sizeof(buf), "7 MHz");
|
||||||
else if (value == 2) snprintf(buf, sizeof(buf), "8 MHz");
|
else if (value == BANDWIDTH_6_MHZ) snprintf(buf, sizeof(buf), "6 MHz");
|
||||||
else snprintf(buf, sizeof(buf), "Auto");
|
else /*BANDWIDTH_AUTO*/ snprintf(buf, sizeof(buf), "Auto");
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Modulation"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Modulation"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
value = Channels.GetByNumber(cDevice::CurrentChannel())->Modulation();
|
value = channel->Modulation();
|
||||||
if (value == 0) snprintf(buf, sizeof(buf), "QPSK");
|
if (value == QPSK) snprintf(buf, sizeof(buf), "QPSK");
|
||||||
else if (value == 1) snprintf(buf, sizeof(buf), "QAM 16");
|
else if (value == QAM_16) snprintf(buf, sizeof(buf), "QAM 16");
|
||||||
else if (value == 2) snprintf(buf, sizeof(buf), "QAM 32");
|
else if (value == QAM_32) snprintf(buf, sizeof(buf), "QAM 32");
|
||||||
else if (value == 3) snprintf(buf, sizeof(buf), "QAM 64");
|
else if (value == QAM_64) snprintf(buf, sizeof(buf), "QAM 64");
|
||||||
else if (value == 4) snprintf(buf, sizeof(buf), "QAM 128");
|
else if (value == QAM_128) snprintf(buf, sizeof(buf), "QAM 128");
|
||||||
else if (value == 5) snprintf(buf, sizeof(buf), "QAM 256");
|
else if (value == QAM_256) snprintf(buf, sizeof(buf), "QAM 256");
|
||||||
else snprintf(buf, sizeof(buf), "QAM Auto");
|
else /*QAM_AUTO*/ snprintf(buf, sizeof(buf), "QAM Auto");
|
||||||
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Inversion"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Inversion"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
value = Channels.GetByNumber(cDevice::CurrentChannel())->Inversion();
|
value = channel->Inversion();
|
||||||
if (value == 0) snprintf(buf, sizeof(buf), "Off");
|
if (value == INVERSION_OFF) snprintf(buf, sizeof(buf), "Off");
|
||||||
else if (value == 1) snprintf(buf, sizeof(buf), "On");
|
else if (value == INVERSION_ON) snprintf(buf, sizeof(buf), "On");
|
||||||
else snprintf(buf, sizeof(buf), "Auto");
|
else /*INVERSION_AUTO*/ snprintf(buf, sizeof(buf), "Auto");
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("CoderateH"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("CoderateH"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
value = Channels.GetByNumber(cDevice::CurrentChannel())->CoderateH();
|
value = channel->CoderateH();
|
||||||
if (value == 0) snprintf(buf, sizeof(buf), "None");
|
if (value == FEC_NONE) snprintf(buf, sizeof(buf), "None");
|
||||||
else if (value == 1) snprintf(buf, sizeof(buf), "1/2");
|
else if (value == FEC_1_2) snprintf(buf, sizeof(buf), "1/2");
|
||||||
else if (value == 2) snprintf(buf, sizeof(buf), "2/3");
|
else if (value == FEC_2_3) snprintf(buf, sizeof(buf), "2/3");
|
||||||
else if (value == 3) snprintf(buf, sizeof(buf), "3/4");
|
else if (value == FEC_3_4) snprintf(buf, sizeof(buf), "3/4");
|
||||||
else if (value == 4) snprintf(buf, sizeof(buf), "4/5");
|
else if (value == FEC_4_5) snprintf(buf, sizeof(buf), "4/5");
|
||||||
else if (value == 5) snprintf(buf, sizeof(buf), "5/6");
|
else if (value == FEC_5_6) snprintf(buf, sizeof(buf), "5/6");
|
||||||
else if (value == 6) snprintf(buf, sizeof(buf), "6/7");
|
else if (value == FEC_6_7) snprintf(buf, sizeof(buf), "6/7");
|
||||||
else if (value == 7) snprintf(buf, sizeof(buf), "7/8");
|
else if (value == FEC_7_8) snprintf(buf, sizeof(buf), "7/8");
|
||||||
else if (value == 8) snprintf(buf, sizeof(buf), "8/9");
|
else if (value == FEC_8_9) snprintf(buf, sizeof(buf), "8/9");
|
||||||
else snprintf(buf, sizeof(buf), "Auto");
|
else /*FEC_AUTO*/ snprintf(buf, sizeof(buf), "Auto");
|
||||||
value = Channels.GetByNumber(cDevice::CurrentChannel())->CoderateL();
|
value = channel->CoderateL();
|
||||||
if (value == 0) snprintf(buf2, sizeof(buf2), " - None");
|
if (value == FEC_NONE) snprintf(buf2, sizeof(buf2), " - None");
|
||||||
else if (value == 1) snprintf(buf2, sizeof(buf2), " - 1/2");
|
else if (value == FEC_1_2) snprintf(buf2, sizeof(buf2), " - 1/2");
|
||||||
else if (value == 2) snprintf(buf2, sizeof(buf2), " - 2/3");
|
else if (value == FEC_2_3) snprintf(buf2, sizeof(buf2), " - 2/3");
|
||||||
else if (value == 3) snprintf(buf2, sizeof(buf2), " - 3/4");
|
else if (value == FEC_3_4) snprintf(buf2, sizeof(buf2), " - 3/4");
|
||||||
else if (value == 4) snprintf(buf2, sizeof(buf2), " - 4/5");
|
else if (value == FEC_4_5) snprintf(buf2, sizeof(buf2), " - 4/5");
|
||||||
else if (value == 5) snprintf(buf2, sizeof(buf2), " - 5/6");
|
else if (value == FEC_5_6) snprintf(buf2, sizeof(buf2), " - 5/6");
|
||||||
else if (value == 6) snprintf(buf2, sizeof(buf2), " - 6/7");
|
else if (value == FEC_6_7) snprintf(buf2, sizeof(buf2), " - 6/7");
|
||||||
else if (value == 7) snprintf(buf2, sizeof(buf2), " - 7/8");
|
else if (value == FEC_7_8) snprintf(buf2, sizeof(buf2), " - 7/8");
|
||||||
else if (value == 8) snprintf(buf2, sizeof(buf2), " - 8/9");
|
else if (value == FEC_8_9) snprintf(buf2, sizeof(buf2), " - 8/9");
|
||||||
else snprintf(buf2, sizeof(buf2), " - Auto");
|
else /*FEC_AUTO*/ snprintf(buf2, sizeof(buf2), " - Auto");
|
||||||
strncat(buf, buf2, sizeof(buf));
|
strncat(buf, buf2, sizeof(buf));
|
||||||
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
lines++;
|
lines++;
|
||||||
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Hierarchy"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL1 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Hierarchy"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
value = Channels.GetByNumber(cDevice::CurrentChannel())->Hierarchy();
|
value = channel->Hierarchy();
|
||||||
if (value == 0) snprintf(buf, sizeof(buf), "None");
|
if (value == HIERARCHY_NONE) snprintf(buf, sizeof(buf), "None");
|
||||||
else if (value == 1) snprintf(buf, sizeof(buf), "1");
|
else if (value == HIERARCHY_1) snprintf(buf, sizeof(buf), "1");
|
||||||
else if (value == 2) snprintf(buf, sizeof(buf), "2");
|
else if (value == HIERARCHY_2) snprintf(buf, sizeof(buf), "2");
|
||||||
else snprintf(buf, sizeof(buf), "Auto");
|
else if (value == HIERARCHY_4) snprintf(buf, sizeof(buf), "4");
|
||||||
|
else /*HIERARCHY_AUTO*/ snprintf(buf, sizeof(buf), "Auto");
|
||||||
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL2 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Guard"), clrWhite, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL3 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), tr("Guard"), clrWhite, clrBackground, m_InfoWindow);
|
||||||
value = Channels.GetByNumber(cDevice::CurrentChannel())->Guard();
|
value = channel->Guard();
|
||||||
if (value == 0) snprintf(buf, sizeof(buf), "1/4");
|
if (value == GUARD_INTERVAL_1_32) snprintf(buf, sizeof(buf), "1/32");
|
||||||
else if (value == 1) snprintf(buf, sizeof(buf), "1/8");
|
else if (value == GUARD_INTERVAL_1_16) snprintf(buf, sizeof(buf), "1/16");
|
||||||
else if (value == 2) snprintf(buf, sizeof(buf), "1/16");
|
else if (value == GUARD_INTERVAL_1_8) snprintf(buf, sizeof(buf), "1/8");
|
||||||
else if (value == 3) snprintf(buf, sizeof(buf), "1/32");
|
else if (value == GUARD_INTERVAL_1_4) snprintf(buf, sizeof(buf), "1/4");
|
||||||
else snprintf(buf, sizeof(buf), "Auto");
|
else /*GUARD_INTERVAL_AUTO*/ snprintf(buf, sizeof(buf), "Auto");
|
||||||
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
m_Osd->Text(OSDINFOLCOL4 * cOsd::CellWidth(), femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT + lines) * cOsd::LineHeight() : lines * cOsd::LineHeight(), buf, clrYellow, clrBackground, m_InfoWindow);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -395,6 +414,9 @@ void cFemonOsd::Action(void)
|
|||||||
CHECK(ioctl(m_Frontend, FE_READ_UNCORRECTED_BLOCKS, &m_UNC));
|
CHECK(ioctl(m_Frontend, FE_READ_UNCORRECTED_BLOCKS, &m_UNC));
|
||||||
DrawInfoWindow();
|
DrawInfoWindow();
|
||||||
DrawStatusWindow();
|
DrawStatusWindow();
|
||||||
|
if (femonConfig.syslogoutput) {
|
||||||
|
isyslog("Card #%d (%s) STR: %04x SNR: %04x BER: %08x UNC: %08x |%c|%c|%c|%c|%c|", cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name, m_Signal, m_SNR, m_BER, m_UNC, (m_FrontendStatus & FE_HAS_LOCK) ? 'L' : ' ', (m_FrontendStatus & FE_HAS_SIGNAL) ? 'S' : ' ', (m_FrontendStatus & FE_HAS_CARRIER) ? 'C' : ' ', (m_FrontendStatus & FE_HAS_VITERBI) ? 'V' : ' ', (m_FrontendStatus & FE_HAS_SYNC) ? 'Z' : ' ');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
usleep(100000L * femonConfig.updateinterval);
|
usleep(100000L * femonConfig.updateinterval);
|
||||||
}
|
}
|
||||||
@ -407,7 +429,7 @@ void cFemonOsd::Show(void)
|
|||||||
{
|
{
|
||||||
//printf("cFemonOsd::Show()\n");
|
//printf("cFemonOsd::Show()\n");
|
||||||
char *dev = NULL;
|
char *dev = NULL;
|
||||||
asprintf(&dev, FE_DEVICE, cDevice::ActualDevice()->CardIndex(), 0);
|
asprintf(&dev, FRONTEND_DEVICE, cDevice::ActualDevice()->CardIndex(), 0);
|
||||||
m_Frontend = open(dev, O_RDONLY | O_NONBLOCK);
|
m_Frontend = open(dev, O_RDONLY | O_NONBLOCK);
|
||||||
free(dev);
|
free(dev);
|
||||||
if (m_Frontend < 0) {
|
if (m_Frontend < 0) {
|
||||||
@ -421,7 +443,7 @@ void cFemonOsd::Show(void)
|
|||||||
close(m_Frontend);
|
close(m_Frontend);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_Osd = cOsd::OpenRaw((720 - OSDWIDTH * cOsd::CellWidth()) / 2, (576 - (OSDSTATUSHEIGHT + OSDINFOHEIGHT + OSDGAPHEIGHT) * cOsd::LineHeight()) / 2);
|
m_Osd = cOsd::OpenRaw((SCREENWIDTH - OSDWIDTH * cOsd::CellWidth()) / 2, (SCREENHEIGHT - (OSDSTATUSHEIGHT + OSDINFOHEIGHT + OSDGAPHEIGHT) * cOsd::LineHeight()) / 2);
|
||||||
if (m_Osd) {
|
if (m_Osd) {
|
||||||
m_StatusWindow = m_Osd->Create(0, femonConfig.position ? 0 : (OSDINFOHEIGHT + OSDGAPHEIGHT) * cOsd::LineHeight(), OSDWIDTH * cOsd::CellWidth(), OSDSTATUSHEIGHT * cOsd::LineHeight(), 4);
|
m_StatusWindow = m_Osd->Create(0, femonConfig.position ? 0 : (OSDINFOHEIGHT + OSDGAPHEIGHT) * cOsd::LineHeight(), OSDWIDTH * cOsd::CellWidth(), OSDSTATUSHEIGHT * cOsd::LineHeight(), 4);
|
||||||
m_InfoWindow = m_Osd->Create(0, femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT) * cOsd::LineHeight() : 0, OSDWIDTH * cOsd::CellWidth(), OSDINFOHEIGHT * cOsd::LineHeight(), 2);
|
m_InfoWindow = m_Osd->Create(0, femonConfig.position ? (OSDSTATUSHEIGHT + OSDGAPHEIGHT) * cOsd::LineHeight() : 0, OSDWIDTH * cOsd::CellWidth(), OSDINFOHEIGHT * cOsd::LineHeight(), 2);
|
||||||
@ -431,7 +453,8 @@ void cFemonOsd::Show(void)
|
|||||||
if (m_Receiver)
|
if (m_Receiver)
|
||||||
delete m_Receiver;
|
delete m_Receiver;
|
||||||
if (femonConfig.showbitrate) {
|
if (femonConfig.showbitrate) {
|
||||||
m_Receiver = new cFemonReceiver(Channels.GetByNumber(cDevice::CurrentChannel())->Ca(), Channels.GetByNumber(cDevice::CurrentChannel())->Vpid(), Channels.GetByNumber(cDevice::CurrentChannel())->Apid1());
|
int channelNumber = cDevice::CurrentChannel();
|
||||||
|
m_Receiver = new cFemonReceiver(Channels.GetByNumber(channelNumber)->Ca(), Channels.GetByNumber(channelNumber)->Vpid(), Channels.GetByNumber(channelNumber)->Apid1());
|
||||||
cDevice::ActualDevice()->AttachReceiver(m_Receiver);
|
cDevice::ActualDevice()->AttachReceiver(m_Receiver);
|
||||||
}
|
}
|
||||||
Start();
|
Start();
|
||||||
@ -443,7 +466,7 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber)
|
|||||||
//printf("cFemonOsd::ChannelSwitch()\n");
|
//printf("cFemonOsd::ChannelSwitch()\n");
|
||||||
char *dev = NULL;
|
char *dev = NULL;
|
||||||
close(m_Frontend);
|
close(m_Frontend);
|
||||||
asprintf(&dev, FE_DEVICE, cDevice::ActualDevice()->CardIndex(), 0);
|
asprintf(&dev, FRONTEND_DEVICE, cDevice::ActualDevice()->CardIndex(), 0);
|
||||||
m_Frontend = open(dev, O_RDONLY | O_NONBLOCK);
|
m_Frontend = open(dev, O_RDONLY | O_NONBLOCK);
|
||||||
free(dev);
|
free(dev);
|
||||||
if (m_Frontend < 0) {
|
if (m_Frontend < 0) {
|
||||||
@ -460,7 +483,8 @@ void cFemonOsd::ChannelSwitch(const cDevice * device, int channelNumber)
|
|||||||
if (m_Receiver)
|
if (m_Receiver)
|
||||||
delete m_Receiver;
|
delete m_Receiver;
|
||||||
if (femonConfig.showbitrate) {
|
if (femonConfig.showbitrate) {
|
||||||
m_Receiver = new cFemonReceiver(Channels.GetByNumber(cDevice::CurrentChannel())->Ca(), Channels.GetByNumber(cDevice::CurrentChannel())->Vpid(), Channels.GetByNumber(cDevice::CurrentChannel())->Apid1());
|
channelNumber = cDevice::CurrentChannel();
|
||||||
|
m_Receiver = new cFemonReceiver(Channels.GetByNumber(channelNumber)->Ca(), Channels.GetByNumber(channelNumber)->Vpid(), Channels.GetByNumber(channelNumber)->Apid1());
|
||||||
cDevice::ActualDevice()->AttachReceiver(m_Receiver);
|
cDevice::ActualDevice()->AttachReceiver(m_Receiver);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ cFemonReceiver::~cFemonReceiver(void)
|
|||||||
//printf("cFemonReceiver::~cFemonReceiver()\n");
|
//printf("cFemonReceiver::~cFemonReceiver()\n");
|
||||||
if (m_Active) {
|
if (m_Active) {
|
||||||
m_Active = false;
|
m_Active = false;
|
||||||
Cancel(5);
|
Cancel(3);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ void cFemonReceiver::Action(void)
|
|||||||
#endif
|
#endif
|
||||||
m_Active = true;
|
m_Active = true;
|
||||||
while (m_Active) {
|
while (m_Active) {
|
||||||
// should we do some averaging to smooth the bitrates ?
|
// should we strip the 4 byte header off from TS packet ?
|
||||||
m_VideoBitrate = (8.0 * TS_SIZE * m_VideoPacketCount) / (femonConfig.calcinterval * 102.4 * 1024.0);
|
m_VideoBitrate = (8.0 * TS_SIZE * m_VideoPacketCount) / (femonConfig.calcinterval * 102.4 * 1024.0);
|
||||||
m_VideoPacketCount = 0;
|
m_VideoPacketCount = 0;
|
||||||
m_AudioBitrate = (8.0 * TS_SIZE * m_AudioPacketCount) / (femonConfig.calcinterval * 102.4);
|
m_AudioBitrate = (8.0 * TS_SIZE * m_AudioPacketCount) / (femonConfig.calcinterval * 102.4);
|
||||||
|
@ -32,8 +32,8 @@ public:
|
|||||||
cFemonReceiver(int Ca, int Vpid, int Apid);
|
cFemonReceiver(int Ca, int Vpid, int Apid);
|
||||||
virtual ~cFemonReceiver();
|
virtual ~cFemonReceiver();
|
||||||
|
|
||||||
double VideoBitrate(void) { return m_VideoBitrate; };
|
double VideoBitrate(void) { return m_VideoBitrate; }; // Mbit/s
|
||||||
double AudioBitrate(void) { return m_AudioBitrate; };
|
double AudioBitrate(void) { return m_AudioBitrate; }; // kbit/s
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //__FEMONRECEIVER_H
|
#endif //__FEMONRECEIVER_H
|
||||||
|
Loading…
Reference in New Issue
Block a user