diff options
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | config.c | 2 | ||||
-rw-r--r-- | config.h | 1 | ||||
-rw-r--r-- | displaychannel.c | 63 | ||||
-rw-r--r-- | displaychannel.h | 3 | ||||
-rw-r--r-- | po/de_DE.po | 14 | ||||
-rw-r--r-- | setup.c | 9 |
7 files changed, 90 insertions, 4 deletions
@@ -5,6 +5,8 @@ VDR Plugin 'skinflatplus' Revision History - [fix] position of widgets in main menu (add menu item border size) - [fix] wrong epg logo in epgsearch eventsview - [update] disk usage icons with 32 sections instead of 16, thanks to MegaV0lt +- [add] displaychannel - dvbapi info + you need oscam min rev 10653 and dvbapi min commit 85da7b2 2015-02-14: Version 0.5.1 - [fix] topbar number recordings @@ -27,6 +27,7 @@ cFlatConfig::cFlatConfig(void) { ChannelBitrateShow = false; ChannelBitrateShowCalcInterval = 20; ChannelTimeLeft = 0; + ChannelDvbapiInfoShow = 1; RecordingResolutionAspectShow = true; RecordingFormatShow = true; @@ -373,6 +374,7 @@ bool cFlatConfig::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "MainMenuWidgetActiveTimerShowRemoteActive") == 0) MainMenuWidgetActiveTimerShowRemoteActive = atoi(Value); else if (strcmp(Name, "MainMenuWidgetActiveTimerShowRemoteRecording") == 0) MainMenuWidgetActiveTimerShowRemoteRecording = atoi(Value); else if (strcmp(Name, "MainMenuWidgetActiveTimerShowRemoteRefreshTime") == 0) MainMenuWidgetActiveTimerShowRemoteRefreshTime = atoi(Value); + else if (strcmp(Name, "ChannelDvbapiInfoShow") == 0) ChannelDvbapiInfoShow = atoi(Value); else return false; return true; @@ -207,6 +207,7 @@ class cFlatConfig int ChannelBitrateShow; int ChannelBitrateShowCalcInterval; // hidden config int ChannelTimeLeft; + int ChannelDvbapiInfoShow; int ChannelWeatherShow; int PlaybackWeatherShow; diff --git a/displaychannel.c b/displaychannel.c index 491684a9..b73d71ec 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -26,6 +26,8 @@ cFlatDisplayChannel::cFlatDisplayChannel(bool WithInfo) : m_Receiver(NULL) { LastSignalStrength = -1; LastSignalQuality = -1; + SignalStrengthRight = BitrateRight = 0; + CreateFullOsd(); if ( !osd ) return; @@ -544,24 +546,74 @@ void cFlatDisplayChannel::SignalQualityDraw(void) { cRect(progressLeft, progressTop, progressWidth, Config.decorProgressSignalSize), SignalQuality, 100, Config.decorProgressSignalFg, Config.decorProgressSignalBarFg, Config.decorProgressSignalBg, Config.decorProgressSignalType, false, Config.SignalQualityUseColors); + SignalStrengthRight = progressLeft + progressWidth; + delete SignalFont; } +// you need oscam min rev 10653 +// you need dvbapi min commit 85da7b2 +void cFlatDisplayChannel::DvbapiInfoDraw(void) { + dsyslog("DvbapiInfoDraw"); + int ChannelSid = CurChannel->Sid(); + + static cPlugin *pDVBApi = cPluginManager::GetPlugin("dvbapi"); + if (!pDVBApi) + return; + sDVBAPIEcmInfo ecmInfo; + ecmInfo.ecmtime = -1; + ecmInfo.hops = -1; + + /* + ecmInfo.cardsystem = "nagravision"; + ecmInfo.reader = "kd"; + ecmInfo.ecmtime = 200; + */ + + dsyslog("ChannelSid: %d Channel: %s", ChannelSid, CurChannel->Name()); + + ecmInfo.sid = ChannelSid; + if (!pDVBApi->Service("GetEcmInfo", &ecmInfo)) { + return; + } + dsyslog("caid: %d", ecmInfo.caid); + dsyslog("cardsystem: %s", *ecmInfo.cardsystem); + dsyslog("reader: %s", *ecmInfo.reader); + dsyslog("from: %s", *ecmInfo.from); + dsyslog("protocol: %s", *ecmInfo.protocol); + + if (ecmInfo.hops < 0 || ecmInfo.ecmtime <= 0) + return; + int top = fontHeight*2 + fontSmlHeight*2 + marginItem; + top += max(fontSmlHeight, Config.decorProgressSignalSize) - (Config.decorProgressSignalSize*2) - marginItem; + int left = BitrateRight + marginItem * 2; + if (BitrateRight == 0 ) + left = SignalStrengthRight + marginItem * 2; + + cFont *dvbapiInfoFont = cFont::CreateFont(Setup.FontOsd, (Config.decorProgressSignalSize*2)); + cString dvbapiInfoText; + dvbapiInfoText = cString::sprintf("DVBAPI - %s %s %s %s (%d)", tr("System"), *ecmInfo.cardsystem, tr("from"), *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; - int left = marginItem * 2; + int left = SignalStrengthRight + marginItem * 4; cFont *SignalFont = cFont::CreateFont(Setup.FontOsd, Config.decorProgressSignalSize); cFont *BitrateFont = cFont::CreateFont(Setup.FontOsd, (Config.decorProgressSignalSize*2)); +/* if( Config.SignalQualityShow ) { int signalWidth = channelWidth / 2; - int progressLeft = left + SignalFont->Width("STR") + SignalFont->Width(" ") + marginItem; + int progressLeft = bottomLeft + SignalFont->Width("STR") + SignalFont->Width(" ") + marginItem; int progressWidth = signalWidth / 2 - progressLeft - marginItem; left = progressLeft + progressWidth + marginItem * 4; } - +*/ cString bitrateText; if( bitrateAudio > 0.0 || bitrateDolby == 0.0 ) bitrateText = cString::sprintf("Video: %.2f Mbit/s | Audio: %.2f kbit/s", bitrateVideo / 1000000.0, bitrateAudio / 1000.0 ); @@ -570,6 +622,8 @@ void cFlatDisplayChannel::BitrateDraw(void) { chanInfoBottomPixmap->DrawText(cPoint(left, top), bitrateText, Theme.Color(clrChannelSignalFont), Theme.Color(clrChannelBg), BitrateFont, BitrateFont->Width(bitrateText) * 2); + BitrateRight = left + BitrateFont->Width(bitrateText) + marginItem; + delete SignalFont; delete BitrateFont; } @@ -672,6 +726,9 @@ void cFlatDisplayChannel::Flush(void) { BitrateDraw(); } + if( Config.ChannelDvbapiInfoShow ) + DvbapiInfoDraw(); + TopBarUpdate(); osd->Flush(); } diff --git a/displaychannel.h b/displaychannel.h index a83b0e5a..8e41dcba 100644 --- a/displaychannel.h +++ b/displaychannel.h @@ -4,6 +4,7 @@ #include "baserender.h" #include "flat.h" #include "services/scraper2vdr.h" +#include "services/dvbapi.h" #include "femonreceiver.h" class cFlatDisplayChannel : public cFlatBaseRender, public cSkinDisplayChannel, public cStatus { @@ -29,6 +30,7 @@ class cFlatDisplayChannel : public cFlatBaseRender, public cSkinDisplayChannel, int heightBottom, heightImageLogo; int LastSignalStrength, LastSignalQuality; + int SignalStrengthRight, BitrateRight; // femon cFemonReceiver *m_Receiver; @@ -47,6 +49,7 @@ class cFlatDisplayChannel : public cFlatBaseRender, public cSkinDisplayChannel, void SignalQualityDraw(void); void BitrateDraw(void); void ChannelIconsDraw(const cChannel *Channel, bool Resolution); + void DvbapiInfoDraw(void); public: cFlatDisplayChannel(bool WithInfo); diff --git a/po/de_DE.po b/po/de_DE.po index 8e71ab0a..4b3b327b 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-02-09 20:09+0100\n" +"POT-Creation-Date: 2015-05-05 19:09+0200\n" "PO-Revision-Date: 2015-02-09 20:09+0100\n" "Last-Translator: Martin Schirrmacher\n" "Language-Team: Martin Schirrmacher\n" @@ -27,6 +27,12 @@ msgstr "belegt" msgid "clock" msgstr "Uhr" +msgid "System" +msgstr "" + +msgid "from" +msgstr "" + msgid "Genre" msgstr "Kategorie" @@ -561,6 +567,12 @@ msgstr "Zeige Video/Audio Bitrate" msgid "Simple aspect & format" msgstr "Auflösung & Bildformat Einfache Anzeige" +msgid "dvbapi plugin not installed" +msgstr "" + +msgid "Show dvbapi informations" +msgstr "" + msgid "program past/remaining time format" msgstr "Programm vergangen/verbleibend Format" @@ -324,6 +324,7 @@ void cFlatSetup::Store(void) { SetupStore("MainMenuWidgetActiveTimerShowRemoteActive", Config.MainMenuWidgetActiveTimerShowRemoteActive); SetupStore("MainMenuWidgetActiveTimerShowRemoteRecording", Config.MainMenuWidgetActiveTimerShowRemoteRecording); SetupStore("MainMenuWidgetActiveTimerShowRemoteRefreshTime", Config.MainMenuWidgetActiveTimerShowRemoteRefreshTime); + SetupStore("ChannelDvbapiInfoShow", Config.ChannelDvbapiInfoShow); Config.Init(); } @@ -513,6 +514,7 @@ bool cFlatSetupGeneral::SetupParse(const char *Name, const char *Value) { else if (strcmp(Name, "MainMenuWidgetActiveTimerShowRemoteActive") == 0) SetupConfig->MainMenuWidgetActiveTimerShowRemoteActive = atoi(Value); else if (strcmp(Name, "MainMenuWidgetActiveTimerShowRemoteRecording") == 0) SetupConfig->MainMenuWidgetActiveTimerShowRemoteRecording = atoi(Value); else if (strcmp(Name, "MainMenuWidgetActiveTimerShowRemoteRefreshTime") == 0) SetupConfig->MainMenuWidgetActiveTimerShowRemoteRefreshTime = atoi(Value); + else if (strcmp(Name, "ChannelDvbapiInfoShow") == 0) SetupConfig->ChannelDvbapiInfoShow = atoi(Value); else return false; return true; @@ -684,6 +686,7 @@ void cFlatSetupGeneral::SaveCurrentSettings(void) { Config.Store("MainMenuWidgetActiveTimerShowRemoteActive", SetupConfig->MainMenuWidgetActiveTimerShowRemoteActive, *Filename); Config.Store("MainMenuWidgetActiveTimerShowRemoteRecording", SetupConfig->MainMenuWidgetActiveTimerShowRemoteRecording, *Filename); Config.Store("MainMenuWidgetActiveTimerShowRemoteRefreshTime", SetupConfig->MainMenuWidgetActiveTimerShowRemoteRefreshTime, *Filename); + Config.Store("ChannelDvbapiInfoShow", SetupConfig->ChannelDvbapiInfoShow, *Filename); cString msg = cString::sprintf("%s %s", tr("saved settings in file:"), *File); Skins.Message(mtInfo, msg); @@ -862,6 +865,12 @@ void cFlatSetupChannelInfo::Setup(void) { Add(new cMenuEditBoolItem(tr("Show format (hd/sd)"), &SetupConfig->ChannelFormatShow)); Add(new cMenuEditBoolItem(tr("Show video/audio bitrate"), &SetupConfig->ChannelBitrateShow)); Add(new cMenuEditBoolItem(tr("Simple aspect & format"), &SetupConfig->ChannelSimpleAspectFormat)); + static cPlugin *pDVBApi = cPluginManager::GetPlugin("dvbapi"); + if (!pDVBApi) { + Add(new cOsdItem(tr("dvbapi plugin not installed"), osUnknown, false)); + } else { + Add(new cMenuEditBoolItem(tr("Show dvbapi informations"), &SetupConfig->ChannelDvbapiInfoShow)); + } Add(new cMenuEditStraItem(tr("program past/remaining time format"), &SetupConfig->ChannelTimeLeft, ChannelTimeLefts.Size(), &ChannelTimeLefts[0])); Add(new cMenuEditBoolItem(tr("Channelinfo border by decor-file?"), &SetupConfig->decorBorderChannelByTheme)); |