@@ -862,7 +862,8 @@ TV::TV(void)
862
862
disableDrawUnusedRects(false ),
863
863
isEmbedded(false ), ignoreKeyPresses(false ),
864
864
// Timers
865
- lcdTimerId(0 ), keyListTimerId(0 ),
865
+ lcdTimerId(0 ), lcdVolumeTimerId(0 ),
866
+ keyListTimerId(0 ),
866
867
networkControlTimerId(0 ), jumpMenuTimerId(0 ),
867
868
pipChangeTimerId(0 ),
868
869
switchToInputTimerId(0 ), ccInputTimerId(0 ),
@@ -2398,6 +2399,8 @@ void TV::timerEvent(QTimerEvent *te)
2398
2399
bool handled = true ;
2399
2400
if (timer_id == lcdTimerId)
2400
2401
HandleLCDTimerEvent ();
2402
+ else if (timer_id == lcdVolumeTimerId)
2403
+ HandleLCDVolumeTimerEvent ();
2401
2404
else if (timer_id == sleepTimerId)
2402
2405
ShowOSDSleep ();
2403
2406
else if (timer_id == sleepDialogTimerId)
@@ -2955,6 +2958,21 @@ bool TV::HandleLCDTimerEvent(void)
2955
2958
return true ;
2956
2959
}
2957
2960
2961
+ void TV::HandleLCDVolumeTimerEvent ()
2962
+ {
2963
+ PlayerContext *actx = GetPlayerReadLock (-1 , __FILE__, __LINE__);
2964
+ LCD *lcd = LCD::Get ();
2965
+ if (lcd)
2966
+ {
2967
+ ShowLCDChannelInfo (actx);
2968
+ lcd->switchToChannel (lcdCallsign, lcdTitle, lcdSubtitle);
2969
+ }
2970
+ ReturnPlayerLock (actx);
2971
+
2972
+ QMutexLocker locker (&timerIdLock);
2973
+ KillTimer (lcdVolumeTimerId);
2974
+ }
2975
+
2958
2976
int TV::StartTimer (int interval, int line)
2959
2977
{
2960
2978
int x = QObject::startTimer (interval);
@@ -7781,6 +7799,26 @@ void TV::ChangeVolume(PlayerContext *ctx, bool up)
7781
7799
kOSDFunctionalType_PictureAdjust , " %" , curvol * 10 ,
7782
7800
kOSDTimeout_Med );
7783
7801
SetUpdateOSDPosition (false );
7802
+
7803
+ if (LCD * lcd = LCD::Get ())
7804
+ {
7805
+ QString appName = tr (" Video" );
7806
+
7807
+ if (StateIsLiveTV (GetState (ctx)))
7808
+ appName = tr (" TV" );
7809
+
7810
+ if (ctx->buffer && ctx->buffer ->IsDVD ())
7811
+ appName = tr (" DVD" );
7812
+
7813
+ lcd->switchToVolume (appName);
7814
+ lcd->setVolumeLevel ((float )curvol / 100 );
7815
+
7816
+ QMutexLocker locker (&timerIdLock);
7817
+ if (lcdVolumeTimerId)
7818
+ KillTimer (lcdVolumeTimerId);
7819
+
7820
+ lcdVolumeTimerId = StartTimer (2000 , __LINE__);
7821
+ }
7784
7822
}
7785
7823
}
7786
7824
0 commit comments