diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
index 5f57074..7f1ff44 100644
a
|
b
|
TV::TV(void) |
915 | 915 | endOfPlaybackTimerId(0), embedCheckTimerId(0), |
916 | 916 | endOfRecPromptTimerId(0), videoExitDialogTimerId(0), |
917 | 917 | pseudoChangeChanTimerId(0), speedChangeTimerId(0), |
918 | | errorRecoveryTimerId(0), exitPlayerTimerId(0) |
| 918 | errorRecoveryTimerId(0), exitPlayerTimerId(0), |
| 919 | lcdVolumeTimerId(0) |
919 | 920 | { |
920 | 921 | VERBOSE(VB_PLAYBACK, LOC + "ctor -- begin"); |
921 | 922 | ctorTime.start(); |
… |
… |
void TV::timerEvent(QTimerEvent *te) |
2457 | 2458 | bool handled = true; |
2458 | 2459 | if (timer_id == lcdTimerId) |
2459 | 2460 | HandleLCDTimerEvent(); |
| 2461 | else if (timer_id == lcdVolumeTimerId) |
| 2462 | HandleLCDVolumeTimerEvent(); |
2460 | 2463 | else if (timer_id == sleepTimerId) |
2461 | 2464 | ShowOSDSleep(); |
2462 | 2465 | else if (timer_id == sleepDialogTimerId) |
… |
… |
bool TV::HandleLCDTimerEvent(void) |
3028 | 3031 | return true; |
3029 | 3032 | } |
3030 | 3033 | |
| 3034 | void TV::HandleLCDVolumeTimerEvent() |
| 3035 | { |
| 3036 | PlayerContext *actx = GetPlayerReadLock(-1, __FILE__, __LINE__); |
| 3037 | LCD *lcd = LCD::Get(); |
| 3038 | if (lcd) |
| 3039 | { |
| 3040 | ShowLCDChannelInfo(actx); |
| 3041 | lcd->switchToChannel(lcdCallsign, lcdTitle, lcdSubtitle); |
| 3042 | } |
| 3043 | ReturnPlayerLock(actx); |
| 3044 | |
| 3045 | QMutexLocker locker(&timerIdLock); |
| 3046 | KillTimer(lcdVolumeTimerId); |
| 3047 | } |
| 3048 | |
3031 | 3049 | int TV::StartTimer(int interval, int line) |
3032 | 3050 | { |
3033 | 3051 | int x = QObject::startTimer(interval); |
… |
… |
void TV::ChangeVolume(PlayerContext *ctx, bool up) |
7890 | 7908 | kOSDFunctionalType_PictureAdjust, "%", curvol * 10, |
7891 | 7909 | kOSDTimeout_Med); |
7892 | 7910 | SetUpdateOSDPosition(false); |
| 7911 | |
| 7912 | if (class LCD * lcd = LCD::Get()) |
| 7913 | { |
| 7914 | QString appName = tr("Video"); |
| 7915 | |
| 7916 | if (StateIsLiveTV(GetState(ctx))) |
| 7917 | appName = tr("TV"); |
| 7918 | |
| 7919 | if (ctx->buffer && ctx->buffer->isDVD()) |
| 7920 | appName = tr("DVD"); |
| 7921 | |
| 7922 | lcd->switchToVolume(appName); |
| 7923 | lcd->setVolumeLevel((float)curvol / 100); |
| 7924 | |
| 7925 | QMutexLocker locker(&timerIdLock); |
| 7926 | if (lcdVolumeTimerId) |
| 7927 | KillTimer(lcdVolumeTimerId); |
| 7928 | |
| 7929 | lcdVolumeTimerId = StartTimer(2000, __LINE__); |
| 7930 | } |
7893 | 7931 | } |
7894 | 7932 | } |
7895 | 7933 | |
diff --git a/mythtv/libs/libmythtv/tv_play.h b/mythtv/libs/libmythtv/tv_play.h
index 1a370b8..b26e381 100644
a
|
b
|
class MPUBLIC TV : public QObject |
600 | 600 | int level = 0, const QString selected = ""); |
601 | 601 | void UpdateLCD(void); |
602 | 602 | bool HandleLCDTimerEvent(void); |
| 603 | void HandleLCDVolumeTimerEvent(void); |
603 | 604 | void ShowLCDChannelInfo(const PlayerContext*); |
604 | 605 | void ShowLCDDVDInfo(const PlayerContext*); |
605 | 606 | |
… |
… |
class MPUBLIC TV : public QObject |
834 | 835 | typedef QMap<int,const PlayerContext*> TimerContextConstMap; |
835 | 836 | mutable QMutex timerIdLock; |
836 | 837 | volatile int lcdTimerId; |
| 838 | volatile int lcdVolumeTimerId; |
837 | 839 | volatile int keyListTimerId; |
838 | 840 | volatile int networkControlTimerId; |
839 | 841 | volatile int jumpMenuTimerId; |