added tokens for current video and audio bitrate in displaychannel

This commit is contained in:
louis
2014-10-28 16:39:42 +01:00
parent c53dbf7cd6
commit abd8fd8db0
17 changed files with 402 additions and 10 deletions

View File

@@ -5,7 +5,6 @@
#include "../libcore/timers.h"
#include "../libcore/helpers.h"
cDisplayChannelView::cDisplayChannelView(cTemplateView *tmplView) : cView(tmplView) {
lastDate = "";
lastScreenWidth = 0;
@@ -18,6 +17,7 @@ cDisplayChannelView::cDisplayChannelView(cTemplateView *tmplView) : cView(tmplVi
lastTracDesc = "";
lastTrackLang = "";
InitDevices();
InitFemonReceiver();
DeleteOsdOnExit();
SetFadeTime(tmplView->GetNumericParameter(ptFadeTime));
}
@@ -424,6 +424,33 @@ void cDisplayChannelView::ClearDevices(void) {
ClearViewElement(veDevices);
}
void cDisplayChannelView::DrawBitrates(void) {
if (!ViewElementImplemented(veBitRate)) {
return;
}
double bitrateVideo;
double bitrateAudio;
double bitrateDolby;
bool changed = GetBitrates(bitrateVideo, bitrateAudio, bitrateDolby);
if (!changed) {
return;
}
map < string, string > stringTokens;
map < string, int > intTokens;
stringTokens.insert(pair<string,string>("bitratevideo", *cString::sprintf("%.2f", bitrateVideo)));
intTokens.insert(pair<string,int>("bitrateaudio", bitrateAudio));
intTokens.insert(pair<string,int>("bitratedolby", bitrateDolby));
intTokens.insert(pair<string,int>("isdolby", (bitrateDolby > 0) ? true : false));
ClearBitrates();
DrawViewElement(veBitRate, &stringTokens, &intTokens);
}
void cDisplayChannelView::ClearBitrates(void) {
ClearViewElement(veBitRate);
}
void cDisplayChannelView::DrawChannelGroups(const cChannel *Channel, cString ChannelName) {
if (!ViewElementImplemented(veChannelGroup)) {
return;