From 55188e8353da8fc0186d3f3cb37d5e164905db70 Mon Sep 17 00:00:00 2001 From: Martin Schirrmacher Date: Tue, 12 May 2015 13:38:33 +0200 Subject: update dvbapi info view --- displaychannel.c | 36 +++++++++++++++++++++++++++++------- icons/default/crypt_betacrypt.png | Bin 0 -> 1482 bytes icons/default/crypt_biss.png | Bin 0 -> 1468 bytes icons/default/crypt_conax.png | Bin 0 -> 2957 bytes icons/default/crypt_cryptoworks.png | Bin 0 -> 2809 bytes icons/default/crypt_dgcrypt.png | Bin 0 -> 1418 bytes icons/default/crypt_irdeto.png | Bin 0 -> 522 bytes icons/default/crypt_nagravision.png | Bin 0 -> 1189 bytes icons/default/crypt_seca.png | Bin 0 -> 1856 bytes icons/default/crypt_unknown.png | Bin 0 -> 1355 bytes icons/default/crypt_videoguard.png | Bin 0 -> 2187 bytes po/de_DE.po | 8 +------- services/dvbapi.h | 19 +++++++++++++++++++ 13 files changed, 49 insertions(+), 14 deletions(-) create mode 100644 icons/default/crypt_betacrypt.png create mode 100644 icons/default/crypt_biss.png create mode 100644 icons/default/crypt_conax.png create mode 100644 icons/default/crypt_cryptoworks.png create mode 100644 icons/default/crypt_dgcrypt.png create mode 100644 icons/default/crypt_irdeto.png create mode 100644 icons/default/crypt_nagravision.png create mode 100644 icons/default/crypt_seca.png create mode 100644 icons/default/crypt_unknown.png create mode 100644 icons/default/crypt_videoguard.png create mode 100644 services/dvbapi.h 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 Binary files /dev/null and b/icons/default/crypt_betacrypt.png differ diff --git a/icons/default/crypt_biss.png b/icons/default/crypt_biss.png new file mode 100644 index 00000000..3015ff1d Binary files /dev/null and b/icons/default/crypt_biss.png differ diff --git a/icons/default/crypt_conax.png b/icons/default/crypt_conax.png new file mode 100644 index 00000000..6da7aaa8 Binary files /dev/null and b/icons/default/crypt_conax.png differ diff --git a/icons/default/crypt_cryptoworks.png b/icons/default/crypt_cryptoworks.png new file mode 100644 index 00000000..64ae1458 Binary files /dev/null and b/icons/default/crypt_cryptoworks.png differ diff --git a/icons/default/crypt_dgcrypt.png b/icons/default/crypt_dgcrypt.png new file mode 100644 index 00000000..6cc376c6 Binary files /dev/null and b/icons/default/crypt_dgcrypt.png differ diff --git a/icons/default/crypt_irdeto.png b/icons/default/crypt_irdeto.png new file mode 100644 index 00000000..27cac25f Binary files /dev/null and b/icons/default/crypt_irdeto.png differ diff --git a/icons/default/crypt_nagravision.png b/icons/default/crypt_nagravision.png new file mode 100644 index 00000000..fd91b1a1 Binary files /dev/null and b/icons/default/crypt_nagravision.png differ diff --git a/icons/default/crypt_seca.png b/icons/default/crypt_seca.png new file mode 100644 index 00000000..607a9a6e Binary files /dev/null and b/icons/default/crypt_seca.png differ diff --git a/icons/default/crypt_unknown.png b/icons/default/crypt_unknown.png new file mode 100644 index 00000000..6d3439be Binary files /dev/null and b/icons/default/crypt_unknown.png differ diff --git a/icons/default/crypt_videoguard.png b/icons/default/crypt_videoguard.png new file mode 100644 index 00000000..d8b32c40 Binary files /dev/null and b/icons/default/crypt_videoguard.png 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: \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 -- cgit v1.2.3