diff options
author | mrwastl <mrwastl@users.sourceforge.net> | 2011-10-01 13:16:40 +0200 |
---|---|---|
committer | mrwastl <mrwastl@users.sourceforge.net> | 2011-10-01 13:16:40 +0200 |
commit | 898a8985746efb429d721f42c0d380a59be98828 (patch) | |
tree | 72f355678275a9991e3d841645fcd0f348d830b4 /display.c | |
parent | d4dc62c55c2b5c4713df89a12a33b55c0085ed6b (diff) | |
download | vdr-plugin-graphlcd-898a8985746efb429d721f42c0d380a59be98828.tar.gz vdr-plugin-graphlcd-898a8985746efb429d721f42c0d380a59be98828.tar.bz2 |
support added for audio track selection / audio channel display (new tokens: 'AudioTrackItem', 'AudioTrackCurrent', 'IsAudioTrackCurrent', 'AudioChannel'); skins: support for new display section 'audio'; default.skin: bug fixes, enhancements
Diffstat (limited to 'display.c')
-rw-r--r-- | display.c | 38 |
1 files changed, 38 insertions, 0 deletions
@@ -50,6 +50,7 @@ cGraphLCDDisplay::cGraphLCDDisplay() LastTimeDisplayMode = 0; mShowVolume = false; + mShowAudio = false; nCurrentBrightness = -1; LastTimeBrightness = 0; @@ -226,6 +227,35 @@ void cGraphLCDDisplay::Action(void) } } + if (GraphLCDSetup.ShowMenu) + { + tAudioState audio; + audio = mGraphLCDState->GetAudioState(); + + if (audio.tracks.size() == 0) { + mShowAudio = false; + } else + if (audio.lastChange > 0) + { + if (!mShowAudio) + { + if (currTimeMs - audio.lastChange < 5000) + { + mShowAudio = true; + mUpdate = true; + } + } + else + { + if (currTimeMs - audio.lastChange > 5000) + { + mShowAudio = false; + mUpdate = true; + } + } + } + } + /* display mode (normal or interactive): reset after 10 secs if not normal */ if ( (mDisplayMode != DisplayModeNormal) && ( (uint32_t)(currTimeMs - LastTimeDisplayMode) > (uint32_t)(10000)) ) { mDisplayMode = DisplayModeNormal; @@ -259,6 +289,7 @@ void cGraphLCDDisplay::Action(void) bool bActive = bBrightnessActive || (mState != StateNormal) || (GraphLCDSetup.ShowVolume && mShowVolume) + || (GraphLCDSetup.ShowMenu && mShowAudio) || (GraphLCDSetup.ShowMessages && mGraphLCDState->ShowMessage()) || (GraphLCDSetup.BrightnessDelay == 900); @@ -324,6 +355,12 @@ void cGraphLCDDisplay::Action(void) if (display) display->Render(mScreen); } + if (mShowAudio) + { + display = mSkin->GetDisplay("audio"); + if (display) + display->Render(mScreen); + } if (GraphLCDSetup.ShowMessages && mGraphLCDState->ShowMessage()) { display = mSkin->GetDisplay("message"); @@ -455,6 +492,7 @@ void cGraphLCDDisplay::SetBrightness() bool bActive = bBrightnessActive || (mState != StateNormal) || (GraphLCDSetup.ShowVolume && mShowVolume) + || (GraphLCDSetup.ShowMenu && mShowAudio) || (GraphLCDSetup.ShowMessages && mGraphLCDState->ShowMessage()) || (GraphLCDSetup.BrightnessDelay == 900); if (bActive) |