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

Compare commits

..

6 Commits

Author SHA1 Message Date
Rolf Ahrenberg
dfc66b3d69 Updated the femonclient plugin. 2010-03-04 22:54:45 +02:00
Rolf Ahrenberg
252bd0e479 Added parsing for a missing setup option. 2010-03-04 22:49:19 +02:00
Rolf Ahrenberg
7657d21d5e Updated CXXFLAGS. 2010-03-04 12:58:25 +02:00
Rolf Ahrenberg
7b004e9427 Updated Estonian translation (Thanks to Arthur Konovalov). 2010-03-04 12:55:18 +02:00
Rolf Ahrenberg
a08f9de9d3 Updated for vdr-1.7.13. 2010-02-28 21:42:06 +02:00
Rolf Ahrenberg
513791d5f1 Added a setup option to downscale the OSD size. 2010-02-25 20:33:20 +02:00
20 changed files with 125 additions and 43 deletions

View File

@@ -389,3 +389,9 @@ VDR Plugin 'femon' Revision History
- Updated for vdr-1.7.12.
- Updated Estonian translation (Thanks to Arthur Konovalov).
- Added Lithuanian translation (Thanks to Valdemaras Pipiras).
2010-03-05: Version 1.7.7
- Updated for vdr-1.7.13.
- Added a setup option to downscale the OSD size.
- Updated Estonian translation (Thanks to Arthur Konovalov).

View File

@@ -31,6 +31,10 @@ VDRDIR = ../../..
LIBDIR = ../../lib
TMPDIR = /tmp
### Make sure that necessary options are included:
include $(VDRDIR)/Make.global
### Allow user defined options to overwrite defaults:
-include $(VDRDIR)/Make.config

11
femon.c
View File

@@ -14,11 +14,11 @@
#include "femonservice.h"
#include "femontools.h"
#if defined(APIVERSNUM) && APIVERSNUM < 10712
#error "VDR-1.7.12 API version or greater is required!"
#if defined(APIVERSNUM) && APIVERSNUM < 10713
#error "VDR-1.7.13 API version or greater is required!"
#endif
static const char VERSION[] = "1.7.6";
static const char VERSION[] = "1.7.7";
static const char DESCRIPTION[] = trNOOP("DVB Signal Information Monitor (OSD)");
static const char MAINMENUENTRY[] = trNOOP("Signal Information");
@@ -112,6 +112,7 @@ bool cPluginFemon::SetupParse(const char *Name, const char *Value)
else if (!strcasecmp(Name, "Position")) femonConfig.position = atoi(Value);
else if (!strcasecmp(Name, "Skin")) femonConfig.skin = atoi(Value);
else if (!strcasecmp(Name, "Theme")) femonConfig.theme = atoi(Value);
else if (!strcasecmp(Name, "Downscale")) femonConfig.downscale = atoi(Value);
else if (!strcasecmp(Name, "RedLimit")) femonConfig.redlimit = atoi(Value);
else if (!strcasecmp(Name, "GreenLimit")) femonConfig.greenlimit = atoi(Value);
else if (!strcasecmp(Name, "UpdateInterval")) femonConfig.updateinterval = atoi(Value);
@@ -319,6 +320,9 @@ void cMenuFemonSetup::Setup(void)
Add(new cMenuEditBoolItem(tr("Position"), &data.position, trVDR("bottom"), trVDR("top")));
help.Append(tr("Define the position of OSD."));
Add(new cMenuEditIntItem(tr("Downscale OSD size [%]"), &data.downscale, 0, 20));
help.Append(tr("Define the downscale ratio for OSD size."));
Add(new cMenuEditIntItem(tr("Red limit [%]"), &data.redlimit, 1, 50));
help.Append(tr("Define a limit for red bar, which is used to indicate a bad signal."));
@@ -360,6 +364,7 @@ void cMenuFemonSetup::Store(void)
SetupStore("Skin", femonConfig.skin);
SetupStore("Theme", femonConfig.theme);
SetupStore("Position", femonConfig.position);
SetupStore("Downscale", femonConfig.downscale);
SetupStore("RedLimit", femonConfig.redlimit);
SetupStore("GreenLimit", femonConfig.greenlimit);
SetupStore("UpdateInterval", femonConfig.updateinterval);

View File

@@ -17,6 +17,7 @@ cFemonConfig::cFemonConfig(void)
skin = 0;
theme = 0;
position = 1;
downscale = 0;
redlimit = 33;
greenlimit = 66;
updateinterval = 5;

View File

@@ -28,6 +28,7 @@ public:
int skin;
int theme;
int position;
int downscale;
int redlimit;
int greenlimit;
int updateinterval;

Binary file not shown.

View File

@@ -179,8 +179,10 @@ cFemonOsd::cFemonOsd()
m_UNCValid(false),
m_FrontendStatusValid(false),
m_DisplayMode(femonConfig.displaymode),
m_OsdWidth(cOsd::OsdWidth()),
m_OsdHeight(cOsd::OsdHeight()),
m_OsdWidth(cOsd::OsdWidth() * (100 - femonConfig.downscale) / 100),
m_OsdHeight(cOsd::OsdHeight() * (100 - femonConfig.downscale) / 100),
m_OsdLeft(cOsd::OsdLeft() + (cOsd::OsdWidth() * femonConfig.downscale / 200)),
m_OsdTop(cOsd::OsdTop() + (cOsd::OsdHeight() * femonConfig.downscale / 200)),
m_InputTime(0),
m_Sleep(),
m_Mutex()
@@ -364,6 +366,7 @@ void cFemonOsd::DrawInfoWindow(void)
eTrackType track = cDevice::PrimaryDevice()->GetCurrentAudioTrack();
if (m_Osd && channel) {
cDvbTransponderParameters dtp(channel->Parameters());
switch (m_DisplayMode) {
case eFemonModeTransponder:
OSDDRAWINFOTITLEBAR(tr("Transponder Information"));
@@ -393,13 +396,13 @@ void cFemonOsd::DrawInfoWindow(void)
OSDDRAWINFORIGHT(trVDR("Source"), *cSource::ToString(channel->Source()));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Srate"), *cString::sprintf("%d", channel->Srate()));
OSDDRAWINFORIGHT(trVDR("Polarization"), *cString::sprintf("%c", toupper(channel->Polarization())));
OSDDRAWINFORIGHT(trVDR("Polarization"), *cString::sprintf("%c", toupper(dtp.Polarization())));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Inversion"), *getInversion(channel->Inversion()));
OSDDRAWINFORIGHT(trVDR("CoderateH"), *getCoderate(channel->CoderateH()));
OSDDRAWINFOLEFT( trVDR("Inversion"), *getInversion(dtp.Inversion()));
OSDDRAWINFORIGHT(trVDR("CoderateH"), *getCoderate(dtp.CoderateH()));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("System"), *getSystem(channel->System()));
OSDDRAWINFORIGHT(trVDR("RollOff"), *getRollOff(channel->RollOff()));
OSDDRAWINFOLEFT( trVDR("System"), *getSystem(dtp.System()));
OSDDRAWINFORIGHT(trVDR("RollOff"), *getRollOff(dtp.RollOff()));
break;
case cSource::stCable:
@@ -409,26 +412,26 @@ void cFemonOsd::DrawInfoWindow(void)
OSDDRAWINFORIGHT(trVDR("Source"), *cSource::ToString(channel->Source()));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Srate"), *cString::sprintf("%d", channel->Srate()));
OSDDRAWINFORIGHT(trVDR("Modulation"), *getModulation(channel->Modulation()));
OSDDRAWINFORIGHT(trVDR("Modulation"), *getModulation(dtp.Modulation()));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Inversion"), *getInversion(channel->Inversion()));
OSDDRAWINFORIGHT(trVDR("CoderateH"), *getCoderate(channel->CoderateH()));
OSDDRAWINFOLEFT( trVDR("Inversion"), *getInversion(dtp.Inversion()));
OSDDRAWINFORIGHT(trVDR("CoderateH"), *getCoderate(dtp.CoderateH()));
break;
case cSource::stTerr:
OSDDRAWINFOLINE(*cString::sprintf("DVB-T #%d - %s", (m_SvdrpFrontend >= 0) ? m_SvdrpFrontend : cDevice::ActualDevice()->CardIndex(), m_FrontendInfo.name));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Frequency"), *getFrequencyMHz(channel->Frequency()));
OSDDRAWINFORIGHT(trVDR("Transmission"), *getTransmission(channel->Transmission()));
OSDDRAWINFORIGHT(trVDR("Transmission"), *getTransmission(dtp.Transmission()));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Bandwidth"), *getBandwidth(channel->Bandwidth()));
OSDDRAWINFORIGHT(trVDR("Modulation"), *getModulation(channel->Modulation()));
OSDDRAWINFOLEFT( trVDR("Bandwidth"), *getBandwidth(dtp.Bandwidth()));
OSDDRAWINFORIGHT(trVDR("Modulation"), *getModulation(dtp.Modulation()));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Inversion"), *getInversion(channel->Inversion()));
OSDDRAWINFORIGHT(tr ("Coderate"), *cString::sprintf("%s (H) %s (L)", *getCoderate(channel->CoderateH()), *getCoderate(channel->CoderateL())));
OSDDRAWINFOLEFT( trVDR("Inversion"), *getInversion(dtp.Inversion()));
OSDDRAWINFORIGHT(tr ("Coderate"), *cString::sprintf("%s (H) %s (L)", *getCoderate(dtp.CoderateH()), *getCoderate(dtp.CoderateL())));
offset += OSDROWHEIGHT;
OSDDRAWINFOLEFT( trVDR("Hierarchy"), *getHierarchy(channel->Hierarchy()));
OSDDRAWINFORIGHT(trVDR("Guard"), *getGuard(channel->Guard()));
OSDDRAWINFOLEFT( trVDR("Hierarchy"), *getHierarchy(dtp.Hierarchy()));
OSDDRAWINFORIGHT(trVDR("Guard"), *getGuard(dtp.Guard()));
break;
default:
@@ -597,7 +600,7 @@ void cFemonOsd::Show(void)
return;
}
m_Osd = cOsdProvider::NewOsd(cOsd::OsdLeft(), cOsd::OsdTop());
m_Osd = cOsdProvider::NewOsd(m_OsdLeft, m_OsdTop);
if (m_Osd) {
tArea Areas1[] = { { 0, 0, OSDWIDTH - 1, OSDHEIGHT - 1, 8 } };
if (Setup.AntiAlias && m_Osd->CanHandleAreas(Areas1, sizeof(Areas1) / sizeof(tArea)) == oeOk) {

View File

@@ -50,6 +50,8 @@ private:
int m_DisplayMode;
int m_OsdWidth;
int m_OsdHeight;
int m_OsdLeft;
int m_OsdTop;
cFont *m_Font;
cTimeMs m_InputTime;
cCondWait m_Sleep;

View File

@@ -65,9 +65,9 @@ static cString getCA(int value)
return cString::sprintf("%X", value);
}
static const char *getUserString(int Value, const tChannelParameterMap *Map)
static const char *getUserString(int Value, const tDvbParameterMap *Map)
{
const tChannelParameterMap *map = Map;
const tDvbParameterMap *map = Map;
while (map && map->userValue != -1) {
if (map->driverValue == Value)
return map->userString ? trVDR(map->userString) : "---";

View File

@@ -7,9 +7,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: femon 1.7.3\n"
"Project-Id-Version: femon 1.7.7\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
"POT-Creation-Date: 2009-08-29 20:57+0300\n"
"POT-Creation-Date: 2010-02-25 20:31+0200\n"
"PO-Revision-Date: 2007-08-12 23:22+0300\n"
"Last-Translator: Christian Wieninger\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -89,6 +89,12 @@ msgstr "Position"
msgid "Define the position of OSD."
msgstr ""
msgid "Downscale OSD size [%]"
msgstr ""
msgid "Define the downscale ratio for OSD size."
msgstr ""
msgid "Red limit [%]"
msgstr "Grenze Rot [%]"

View File

@@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: femon 1.7.3\n"
"Project-Id-Version: femon 1.7.7\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
"POT-Creation-Date: 2009-08-29 20:57+0300\n"
"POT-Creation-Date: 2010-02-25 20:31+0200\n"
"PO-Revision-Date: 2007-08-12 23:22+0300\n"
"Last-Translator: Luis Palacios\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -87,6 +87,12 @@ msgstr "Posici
msgid "Define the position of OSD."
msgstr ""
msgid "Downscale OSD size [%]"
msgstr ""
msgid "Define the downscale ratio for OSD size."
msgstr ""
msgid "Red limit [%]"
msgstr "L<>mite de rojo [%s]"

View File

@@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: femon 1.7.3\n"
"Project-Id-Version: femon 1.7.7\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
"POT-Creation-Date: 2009-08-29 20:57+0300\n"
"POT-Creation-Date: 2010-02-25 20:31+0200\n"
"PO-Revision-Date: 2007-08-12 23:22+0300\n"
"Last-Translator: Arthur Konovalov\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -87,6 +87,12 @@ msgstr "Positsioon"
msgid "Define the position of OSD."
msgstr "Ekraaniinfo positsiooni m<><6D>ritlemine."
msgid "Downscale OSD size [%]"
msgstr "Ekraanimen<65><6E> v<>hendamine [%]"
msgid "Define the downscale ratio for OSD size."
msgstr "Ekraanimen<65><6E> suuruse v<>hendamise m<><6D>ritlemine"
msgid "Red limit [%]"
msgstr "Punase limiit [%]"

View File

@@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: femon 1.7.3\n"
"Project-Id-Version: femon 1.7.7\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
"POT-Creation-Date: 2009-08-29 20:57+0300\n"
"POT-Creation-Date: 2010-02-25 20:31+0200\n"
"PO-Revision-Date: 2007-08-12 23:22+0300\n"
"Last-Translator: Rolf Ahrenberg\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -87,6 +87,12 @@ msgstr "Sijainti"
msgid "Define the position of OSD."
msgstr "Määrittele näytön sijainti."
msgid "Downscale OSD size [%]"
msgstr "Pienennä näytön kokoa [%]"
msgid "Define the downscale ratio for OSD size."
msgstr "Määrittele näytön pienennyssuhde."
msgid "Red limit [%]"
msgstr "Punaisen taso [%]"

View File

@@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: femon 1.7.3\n"
"Project-Id-Version: femon 1.7.7\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
"POT-Creation-Date: 2009-08-29 20:57+0300\n"
"POT-Creation-Date: 2010-02-25 20:31+0200\n"
"PO-Revision-Date: 2008-01-26 09:59+0100\n"
"Last-Translator: NIVAL Micha<68>l <mnival@club-internet.fr>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -87,6 +87,12 @@ msgstr "Position"
msgid "Define the position of OSD."
msgstr "D<>finit la position de l'OSD."
msgid "Downscale OSD size [%]"
msgstr ""
msgid "Define the downscale ratio for OSD size."
msgstr ""
msgid "Red limit [%]"
msgstr "Limite du rouge (%)"

View File

@@ -6,9 +6,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: femon 1.7.3\n"
"Project-Id-Version: femon 1.7.7\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
"POT-Creation-Date: 2009-08-29 20:57+0300\n"
"POT-Creation-Date: 2010-02-25 20:31+0200\n"
"PO-Revision-Date: 2008-11-10 23:37+0100\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -88,6 +88,12 @@ msgstr "Posizione"
msgid "Define the position of OSD."
msgstr "Definisci la posizione dell'OSD."
msgid "Downscale OSD size [%]"
msgstr ""
msgid "Define the downscale ratio for OSD size."
msgstr ""
msgid "Red limit [%]"
msgstr "Limite rosso [%]"

View File

@@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: femon 1.7.3\n"
"Project-Id-Version: femon 1.7.7\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
"POT-Creation-Date: 2009-08-29 20:57+0300\n"
"POT-Creation-Date: 2010-02-25 20:31+0200\n"
"PO-Revision-Date: 2007-08-12 23:22+0300\n"
"Last-Translator: Valdemaras Pipiras\n"
"Language-Team: <varas@ambernet.lt>\n"
@@ -87,6 +87,12 @@ msgstr "Pozicija"
msgid "Define the position of OSD."
msgstr "Nustatyti ekrano užsklandos poziciją."
msgid "Downscale OSD size [%]"
msgstr ""
msgid "Define the downscale ratio for OSD size."
msgstr ""
msgid "Red limit [%]"
msgstr "Raudonoji ribą [%]"

View File

@@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: femon 1.7.3\n"
"Project-Id-Version: femon 1.7.7\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
"POT-Creation-Date: 2009-08-29 20:57+0300\n"
"POT-Creation-Date: 2010-02-25 20:31+0200\n"
"PO-Revision-Date: 2007-08-12 23:22+0300\n"
"Last-Translator: Vyacheslav Dikonov\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -87,6 +87,12 @@ msgstr "
msgid "Define the position of OSD."
msgstr ""
msgid "Downscale OSD size [%]"
msgstr ""
msgid "Define the downscale ratio for OSD size."
msgstr ""
msgid "Red limit [%]"
msgstr "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> (%)"

View File

@@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: femon 1.7.3\n"
"Project-Id-Version: femon 1.7.7\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
"POT-Creation-Date: 2009-08-29 20:57+0300\n"
"POT-Creation-Date: 2010-02-25 20:31+0200\n"
"PO-Revision-Date: 2009-09-21 21:36+0800\n"
"Last-Translator: NanFeng <nfgx@21cn.com>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -87,6 +87,12 @@ msgstr "位置"
msgid "Define the position of OSD."
msgstr "确定菜单的位置."
msgid "Downscale OSD size [%]"
msgstr ""
msgid "Define the downscale ratio for OSD size."
msgstr ""
msgid "Red limit [%]"
msgstr "红限制[ ]"

View File

@@ -5,9 +5,9 @@
#
msgid ""
msgstr ""
"Project-Id-Version: femon 1.7.3\n"
"Project-Id-Version: femon 1.7.7\n"
"Report-Msgid-Bugs-To: Rolf Ahrenberg\n"
"POT-Creation-Date: 2009-08-29 20:57+0300\n"
"POT-Creation-Date: 2010-02-25 20:31+0200\n"
"PO-Revision-Date: 2009-09-21 21:36+0800\n"
"Last-Translator: NanFeng <nfgx@21cn.com>\n"
"Language-Team: <vdr@linuxtv.org>\n"
@@ -87,6 +87,12 @@ msgstr "位置"
msgid "Define the position of OSD."
msgstr "確定菜單的位置."
msgid "Downscale OSD size [%]"
msgstr ""
msgid "Define the downscale ratio for OSD size."
msgstr ""
msgid "Red limit [%]"
msgstr "紅限制[ ]"