summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2015-05-12 13:38:33 +0200
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2015-05-12 13:38:33 +0200
commit55188e8353da8fc0186d3f3cb37d5e164905db70 (patch)
tree67b0e0160c1d62d2b16fa5f6f7c0d39407a87140
parent157407f4c1b4a264a4a8f4cd01612ea1d85cb1fc (diff)
downloadskin-flatplus-55188e8353da8fc0186d3f3cb37d5e164905db70.tar.gz
skin-flatplus-55188e8353da8fc0186d3f3cb37d5e164905db70.tar.bz2
update dvbapi info view
-rw-r--r--displaychannel.c36
-rw-r--r--icons/default/crypt_betacrypt.pngbin0 -> 1482 bytes
-rw-r--r--icons/default/crypt_biss.pngbin0 -> 1468 bytes
-rw-r--r--icons/default/crypt_conax.pngbin0 -> 2957 bytes
-rw-r--r--icons/default/crypt_cryptoworks.pngbin0 -> 2809 bytes
-rw-r--r--icons/default/crypt_dgcrypt.pngbin0 -> 1418 bytes
-rw-r--r--icons/default/crypt_irdeto.pngbin0 -> 522 bytes
-rw-r--r--icons/default/crypt_nagravision.pngbin0 -> 1189 bytes
-rw-r--r--icons/default/crypt_seca.pngbin0 -> 1856 bytes
-rw-r--r--icons/default/crypt_unknown.pngbin0 -> 1355 bytes
-rw-r--r--icons/default/crypt_videoguard.pngbin0 -> 2187 bytes
-rw-r--r--po/de_DE.po8
-rw-r--r--services/dvbapi.h19
13 files changed, 49 insertions, 14 deletions
diff --git a/displaychannel.c b/displaychannel.c
index b73d71ec..982b8bd8 100644
--- a/displaychannel.c
+++ b/displaychannel.c
@@ -564,11 +564,11 @@ void cFlatDisplayChannel::DvbapiInfoDraw(void) {
ecmInfo.ecmtime = -1;
ecmInfo.hops = -1;
- /*
+/*
ecmInfo.cardsystem = "nagravision";
ecmInfo.reader = "kd";
ecmInfo.ecmtime = 200;
- */
+*/
dsyslog("ChannelSid: %d Channel: %s", ChannelSid, CurChannel->Name());
@@ -584,26 +584,48 @@ void cFlatDisplayChannel::DvbapiInfoDraw(void) {
if (ecmInfo.hops < 0 || ecmInfo.ecmtime <= 0)
return;
+
+ if (ecmInfo.ecmtime > 9999 )
+ return;
+
int top = fontHeight*2 + fontSmlHeight*2 + marginItem;
- top += max(fontSmlHeight, Config.decorProgressSignalSize) - (Config.decorProgressSignalSize*2) - marginItem;
+ top += max(fontSmlHeight, Config.decorProgressSignalSize) - (Config.decorProgressSignalSize*2) - marginItem*2;
int left = BitrateRight + marginItem * 2;
if (BitrateRight == 0 )
left = SignalStrengthRight + marginItem * 2;
- cFont *dvbapiInfoFont = cFont::CreateFont(Setup.FontOsd, (Config.decorProgressSignalSize*2));
+ cFont *dvbapiInfoFont = cFont::CreateFont(Setup.FontOsd, (Config.decorProgressSignalSize*2) + marginItem);
cString dvbapiInfoText;
- dvbapiInfoText = cString::sprintf("DVBAPI - %s %s %s %s (%d)", tr("System"), *ecmInfo.cardsystem, tr("from"), *ecmInfo.reader, ecmInfo.ecmtime);
+ dvbapiInfoText = cString::sprintf("DVBAPI: ");
chanInfoBottomPixmap->DrawText(cPoint(left, top), dvbapiInfoText, Theme.Color(clrChannelSignalFont), Theme.Color(clrChannelBg), dvbapiInfoFont, dvbapiInfoFont->Width(dvbapiInfoText) * 2);
+ left += dvbapiInfoFont->Width(dvbapiInfoText) + marginItem;
+ cImage *img = NULL;
+ cString iconName = cString::sprintf("crypt_%s", *ecmInfo.cardsystem);
+ img = imgLoader.LoadIcon(*iconName, 999, dvbapiInfoFont->Height());
+ if( img ) {
+ chanIconsPixmap->DrawImage(cPoint(left, top), *img);
+ left += img->Width() + marginItem;
+ } else {
+ iconName = "crypt_unknown";
+ img = imgLoader.LoadIcon(*iconName, 999, dvbapiInfoFont->Height());
+ if( img ) {
+ chanIconsPixmap->DrawImage(cPoint(left, top), *img);
+ left += img->Width() + marginItem;
+ }
+ }
+
+ dvbapiInfoText = cString::sprintf(" %s (%d ms)", *ecmInfo.reader, ecmInfo.ecmtime);
+ chanInfoBottomPixmap->DrawText(cPoint(left, top), dvbapiInfoText, Theme.Color(clrChannelSignalFont), Theme.Color(clrChannelBg), dvbapiInfoFont, dvbapiInfoFont->Width(dvbapiInfoText) * 2);
}
void cFlatDisplayChannel::BitrateDraw(void) {
int top = fontHeight*2 + fontSmlHeight*2 + marginItem;
- top += max(fontSmlHeight, Config.decorProgressSignalSize) - (Config.decorProgressSignalSize*2) - marginItem;
+ top += max(fontSmlHeight, Config.decorProgressSignalSize) - (Config.decorProgressSignalSize*2) - marginItem*2;
int left = SignalStrengthRight + marginItem * 4;
cFont *SignalFont = cFont::CreateFont(Setup.FontOsd, Config.decorProgressSignalSize);
- cFont *BitrateFont = cFont::CreateFont(Setup.FontOsd, (Config.decorProgressSignalSize*2));
+ cFont *BitrateFont = cFont::CreateFont(Setup.FontOsd, (Config.decorProgressSignalSize*2) + marginItem);
/*
if( Config.SignalQualityShow ) {
diff --git a/icons/default/crypt_betacrypt.png b/icons/default/crypt_betacrypt.png
new file mode 100644
index 00000000..a359e583
--- /dev/null
+++ b/icons/default/crypt_betacrypt.png
Binary files differ
diff --git a/icons/default/crypt_biss.png b/icons/default/crypt_biss.png
new file mode 100644
index 00000000..3015ff1d
--- /dev/null
+++ b/icons/default/crypt_biss.png
Binary files differ
diff --git a/icons/default/crypt_conax.png b/icons/default/crypt_conax.png
new file mode 100644
index 00000000..6da7aaa8
--- /dev/null
+++ b/icons/default/crypt_conax.png
Binary files differ
diff --git a/icons/default/crypt_cryptoworks.png b/icons/default/crypt_cryptoworks.png
new file mode 100644
index 00000000..64ae1458
--- /dev/null
+++ b/icons/default/crypt_cryptoworks.png
Binary files differ
diff --git a/icons/default/crypt_dgcrypt.png b/icons/default/crypt_dgcrypt.png
new file mode 100644
index 00000000..6cc376c6
--- /dev/null
+++ b/icons/default/crypt_dgcrypt.png
Binary files differ
diff --git a/icons/default/crypt_irdeto.png b/icons/default/crypt_irdeto.png
new file mode 100644
index 00000000..27cac25f
--- /dev/null
+++ b/icons/default/crypt_irdeto.png
Binary files differ
diff --git a/icons/default/crypt_nagravision.png b/icons/default/crypt_nagravision.png
new file mode 100644
index 00000000..fd91b1a1
--- /dev/null
+++ b/icons/default/crypt_nagravision.png
Binary files differ
diff --git a/icons/default/crypt_seca.png b/icons/default/crypt_seca.png
new file mode 100644
index 00000000..607a9a6e
--- /dev/null
+++ b/icons/default/crypt_seca.png
Binary files differ
diff --git a/icons/default/crypt_unknown.png b/icons/default/crypt_unknown.png
new file mode 100644
index 00000000..6d3439be
--- /dev/null
+++ b/icons/default/crypt_unknown.png
Binary files differ
diff --git a/icons/default/crypt_videoguard.png b/icons/default/crypt_videoguard.png
new file mode 100644
index 00000000..d8b32c40
--- /dev/null
+++ b/icons/default/crypt_videoguard.png
Binary files differ
diff --git a/po/de_DE.po b/po/de_DE.po
index e75f6815..9ead4c05 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: vdr-skinflat 0.5.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2015-05-05 19:09+0200\n"
+"POT-Creation-Date: 2015-05-12 13:16+0200\n"
"PO-Revision-Date: 2015-02-09 20:09+0100\n"
"Last-Translator: Martin Schirrmacher\n"
"Language-Team: Martin Schirrmacher\n"
@@ -27,12 +27,6 @@ msgstr "belegt"
msgid "clock"
msgstr "Uhr"
-msgid "System"
-msgstr "System"
-
-msgid "from"
-msgstr "von"
-
msgid "Genre"
msgstr "Kategorie"
diff --git a/services/dvbapi.h b/services/dvbapi.h
new file mode 100644
index 00000000..a78aba44
--- /dev/null
+++ b/services/dvbapi.h
@@ -0,0 +1,19 @@
+#ifndef __DVBAPISERVICES_H
+#define __DVBAPISERVICES_H
+
+struct sDVBAPIEcmInfo {
+ //in parameters
+ uint16_t sid;
+ //out parameters
+ uint16_t caid;
+ uint16_t pid;
+ uint32_t prid;
+ uint32_t ecmtime;
+ cString cardsystem;
+ cString reader;
+ cString from;
+ cString protocol;
+ int8_t hops;
+};
+
+#endif //__DVBAPISERVICES_H \ No newline at end of file