diff --git a/mythtv/libs/libmythtv/mythplayer.h b/mythtv/libs/libmythtv/mythplayer.h
index 87f8753..d3d4d70 100644
a
|
b
|
class MPUBLIC MythPlayer |
173 | 173 | PIPLocation GetNextPIPLocation(void) const; |
174 | 174 | |
175 | 175 | // Bool Gets |
| 176 | bool IsPaused(void) { return allpaused; } |
176 | 177 | bool GetRawAudioState(void) const; |
177 | 178 | bool GetLimitKeyRepeat(void) const { return limitKeyRepeat; } |
178 | 179 | bool GetEof(void); |
diff --git a/mythtv/libs/libmythtv/playercontext.cpp b/mythtv/libs/libmythtv/playercontext.cpp
index 2464bdd..5a238dc 100644
a
|
b
|
PlayerContext::PlayerContext(const QString &inUseID) : |
42 | 42 | // Fast forward state |
43 | 43 | ff_rew_state(0), ff_rew_index(0), ff_rew_speed(0), |
44 | 44 | // Other state |
45 | | paused(false), playingState(kState_None), |
| 45 | playingState(kState_None), |
46 | 46 | errored(false), |
47 | 47 | // pseudo states |
48 | 48 | pseudoLiveTVRec(NULL), pseudoLiveTVState(kPseudoNormalLiveTV), |
diff --git a/mythtv/libs/libmythtv/playercontext.h b/mythtv/libs/libmythtv/playercontext.h
index 97faf89..e2f6b28 100644
a
|
b
|
class MPUBLIC PlayerContext |
184 | 184 | int ff_rew_index; |
185 | 185 | /// Caches value of ff_rew_speeds[ff_rew_index] |
186 | 186 | int ff_rew_speed; |
187 | | bool paused; |
188 | 187 | TVState playingState; |
189 | 188 | |
190 | 189 | bool errored; |
diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp
index baf1d23..f17fd37 100644
a
|
b
|
bool TV::Init(bool createWindow) |
1178 | 1178 | } |
1179 | 1179 | |
1180 | 1180 | PlayerContext *mctx = GetPlayerReadLock(0, __FILE__, __LINE__); |
1181 | | mctx->paused = false; |
1182 | 1181 | mctx->ff_rew_state = 0; |
1183 | 1182 | mctx->ff_rew_index = kInitFFRWSpeed; |
1184 | 1183 | mctx->ff_rew_speed = 0; |
… |
… |
void TV::HandleEndOfPlaybackTimerEvent(void) |
3111 | 3110 | void TV::HandleIsNearEndWhenEmbeddingTimerEvent(void) |
3112 | 3111 | { |
3113 | 3112 | PlayerContext *actx = GetPlayerReadLock(-1, __FILE__, __LINE__); |
3114 | | |
3115 | | bool toggle = !actx->paused && !StateIsLiveTV(GetState(actx)); |
3116 | | |
3117 | | if (toggle) |
| 3113 | if (!StateIsLiveTV(GetState(actx))) |
3118 | 3114 | { |
3119 | 3115 | actx->LockDeletePlayer(__FILE__, __LINE__); |
3120 | | |
3121 | | toggle = actx->player && actx->player->IsEmbedding() |
3122 | | && actx->player->IsNearEnd(); |
3123 | | |
| 3116 | bool toggle = actx->player && actx->player->IsEmbedding() && |
| 3117 | actx->player->IsNearEnd() && !actx->player->IsPaused(); |
3124 | 3118 | actx->UnlockDeletePlayer(__FILE__, __LINE__); |
3125 | | |
3126 | 3119 | if (toggle) |
3127 | 3120 | DoTogglePause(actx, true); |
3128 | 3121 | } |
… |
… |
void TV::HandleEndOfRecordingExitPromptTimerEvent(void) |
3155 | 3148 | jumped_back = false; |
3156 | 3149 | |
3157 | 3150 | do_prompt = mctx->player->IsNearEnd() && !jumped_back && |
3158 | | !mctx->player->IsEmbedding() && !mctx->paused; |
| 3151 | !mctx->player->IsEmbedding() && !mctx->player->IsPaused(); |
3159 | 3152 | } |
3160 | 3153 | mctx->UnlockDeletePlayer(__FILE__, __LINE__); |
3161 | 3154 | |
… |
… |
bool TV::ActiveHandleAction(PlayerContext *ctx, |
3921 | 3914 | DoPlay(ctx); |
3922 | 3915 | else if (has_action("PAUSE", actions)) |
3923 | 3916 | { |
3924 | | if (ctx->paused) |
| 3917 | if (ContextIsPaused(ctx, __FILE__, __LINE__)) |
3925 | 3918 | SendMythSystemPlayEvent("PLAY_UNPAUSED", ctx->playingInfo); |
3926 | 3919 | else |
3927 | 3920 | SendMythSystemPlayEvent("PLAY_PAUSED", ctx->playingInfo); |
… |
… |
void TV::ProcessNetworkControlCommand(PlayerContext *ctx, |
4482 | 4475 | } |
4483 | 4476 | else if (tokens.size() == 3 && tokens[1] == "SPEED") |
4484 | 4477 | { |
| 4478 | bool paused = ContextIsPaused(ctx, __FILE__, __LINE__); |
| 4479 | |
4485 | 4480 | if (tokens[2] == "0x") |
4486 | 4481 | { |
4487 | 4482 | NormalSpeed(ctx); |
4488 | 4483 | StopFFRew(ctx); |
4489 | | |
4490 | | if (!ctx->paused) |
| 4484 | if (!paused) |
4491 | 4485 | DoTogglePause(ctx, true); |
4492 | 4486 | } |
4493 | 4487 | else |
… |
… |
void TV::ProcessNetworkControlCommand(PlayerContext *ctx, |
4529 | 4523 | float searchSpeed = fabs(tmpSpeed); |
4530 | 4524 | unsigned int index; |
4531 | 4525 | |
4532 | | if (ctx->paused) |
| 4526 | if (paused) |
4533 | 4527 | DoTogglePause(ctx, true); |
4534 | 4528 | |
4535 | 4529 | if (tmpSpeed == 0.0f) |
… |
… |
void TV::ProcessNetworkControlCommand(PlayerContext *ctx, |
4537 | 4531 | NormalSpeed(ctx); |
4538 | 4532 | StopFFRew(ctx); |
4539 | 4533 | |
4540 | | if (!ctx->paused) |
| 4534 | if (!paused) |
4541 | 4535 | DoTogglePause(ctx, true); |
4542 | 4536 | } |
4543 | 4537 | else if (tmpSpeed == 1.0f) |
… |
… |
void TV::ProcessNetworkControlCommand(PlayerContext *ctx, |
4675 | 4669 | if (tokens[2] == "POSITION") |
4676 | 4670 | { |
4677 | 4671 | QString speedStr; |
4678 | | |
4679 | | if (ctx->paused) |
| 4672 | if (ContextIsPaused(ctx, __FILE__, __LINE__)) |
4680 | 4673 | { |
4681 | 4674 | speedStr = "pause"; |
4682 | 4675 | } |
… |
… |
void TV::DoPlay(PlayerContext *ctx) |
5522 | 5515 | ctx->player->Play(ctx->ts_normal, true); |
5523 | 5516 | ctx->ff_rew_speed = 0; |
5524 | 5517 | } |
5525 | | else if (ctx->paused || (ctx->ff_rew_speed != 0)) |
| 5518 | else if (ctx->player->IsPaused() || (ctx->ff_rew_speed != 0)) |
5526 | 5519 | { |
5527 | 5520 | ctx->player->Play(ctx->ts_normal, true); |
5528 | | ctx->paused = false; |
5529 | 5521 | ctx->ff_rew_speed = 0; |
5530 | 5522 | } |
5531 | 5523 | ctx->UnlockDeletePlayer(__FILE__, __LINE__); |
… |
… |
float TV::DoTogglePauseStart(PlayerContext *ctx) |
5555 | 5547 | ctx->UnlockDeletePlayer(__FILE__, __LINE__); |
5556 | 5548 | return 0.0f; |
5557 | 5549 | } |
5558 | | if (ctx->paused) |
| 5550 | if (ctx->player->IsPaused()) |
5559 | 5551 | { |
5560 | 5552 | ctx->player->Play(ctx->ts_normal, true); |
5561 | 5553 | } |
… |
… |
float TV::DoTogglePauseStart(PlayerContext *ctx) |
5571 | 5563 | ctx->player->Pause(); |
5572 | 5564 | } |
5573 | 5565 | ctx->UnlockDeletePlayer(__FILE__, __LINE__); |
5574 | | |
5575 | | ctx->paused = !ctx->paused; |
5576 | | |
5577 | 5566 | return time; |
5578 | 5567 | } |
5579 | 5568 | |
… |
… |
void TV::DoTogglePauseFinish(PlayerContext *ctx, float time, bool showOSD) |
5585 | 5574 | if (ctx->buffer && ctx->buffer->InDVDMenuOrStillFrame()) |
5586 | 5575 | return; |
5587 | 5576 | |
5588 | | if (ctx->paused) |
| 5577 | if (ContextIsPaused(ctx, __FILE__, __LINE__)) |
5589 | 5578 | { |
5590 | 5579 | if (ctx->buffer) |
5591 | 5580 | ctx->buffer->WaitForPause(); |
… |
… |
bool TV::SeekHandleAction(PlayerContext *actx, const QStringList &actions, |
5689 | 5678 | { |
5690 | 5679 | DoArbSeek(actx, static_cast<ArbSeekWhence>(flags & kWhenceMask)); |
5691 | 5680 | } |
5692 | | else if (actx->paused) |
| 5681 | else if (ContextIsPaused(actx, __FILE__, __LINE__)) |
5693 | 5682 | { |
5694 | 5683 | if (!isDVD) |
5695 | 5684 | { |
… |
… |
void TV::ChangeSpeed(PlayerContext *ctx, int direction) |
5791 | 5780 | { |
5792 | 5781 | int old_speed = ctx->ff_rew_speed; |
5793 | 5782 | |
5794 | | if (ctx->paused) |
| 5783 | if (ContextIsPaused(ctx, __FILE__, __LINE__)) |
5795 | 5784 | ctx->ff_rew_speed = -4; |
5796 | 5785 | |
5797 | 5786 | ctx->ff_rew_speed += direction; |
… |
… |
void TV::ChangeSpeed(PlayerContext *ctx, int direction) |
5827 | 5816 | return; |
5828 | 5817 | } |
5829 | 5818 | ctx->UnlockDeletePlayer(__FILE__, __LINE__); |
5830 | | |
5831 | | ctx->paused = false; |
5832 | 5819 | DoPlayerSeek(ctx, time); |
5833 | 5820 | UpdateOSDSeekMessage(ctx, mesg, kOSDTimeout_Med); |
5834 | 5821 | |
… |
… |
void TV::ChangeFFRew(PlayerContext *ctx, int direction) |
5888 | 5875 | else |
5889 | 5876 | { |
5890 | 5877 | NormalSpeed(ctx); |
5891 | | ctx->paused = false; |
5892 | 5878 | ctx->ff_rew_state = direction; |
5893 | 5879 | SetFFRew(ctx, kInitFFRWSpeed); |
5894 | 5880 | } |
… |
… |
void TV::ToggleInputs(PlayerContext *ctx, uint inputid) |
6447 | 6433 | return; |
6448 | 6434 | } |
6449 | 6435 | |
6450 | | // If Nuppel Video Player is paused, unpause it |
6451 | | if (ctx->paused) |
| 6436 | // If MythPlayer is paused, unpause it |
| 6437 | if (ContextIsPaused(ctx, __FILE__, __LINE__)) |
6452 | 6438 | { |
6453 | 6439 | HideOSDWindow(ctx, "osd_status"); |
6454 | 6440 | GetMythUI()->DisableScreensaver(); |
6455 | | ctx->paused = false; |
6456 | 6441 | } |
6457 | 6442 | |
6458 | 6443 | const QString curinputname = ctx->recorder->GetInput(); |
… |
… |
void TV::ChangeChannel(PlayerContext *ctx, int direction) |
6777 | 6762 | |
6778 | 6763 | QString oldinputname = ctx->recorder->GetInput(); |
6779 | 6764 | |
6780 | | if (ctx->paused) |
| 6765 | if (ContextIsPaused(ctx, __FILE__, __LINE__)) |
6781 | 6766 | { |
6782 | 6767 | HideOSDWindow(ctx, "osd_status"); |
6783 | 6768 | GetMythUI()->DisableScreensaver(); |
6784 | | ctx->paused = false; |
6785 | 6769 | } |
6786 | 6770 | |
6787 | 6771 | // Save the current channel if this is the first time |
… |
… |
void TV::ChangeChannel(PlayerContext *ctx, uint chanid, const QString &chan) |
6890 | 6874 | if (getit || !ctx->recorder || !ctx->recorder->CheckChannel(channum)) |
6891 | 6875 | return; |
6892 | 6876 | |
6893 | | if (ctx->paused) |
| 6877 | if (ContextIsPaused(ctx, __FILE__, __LINE__)) |
6894 | 6878 | { |
6895 | 6879 | HideOSDWindow(ctx, "osd_status"); |
6896 | 6880 | GetMythUI()->DisableScreensaver(); |
6897 | | ctx->paused = false; |
6898 | 6881 | } |
6899 | 6882 | |
6900 | 6883 | // Save the current channel if this is the first time |
… |
… |
bool TV::ClearOSD(const PlayerContext *ctx) |
7019 | 7002 | /** \fn TV::ToggleOSD(const PlayerContext*, bool includeStatus) |
7020 | 7003 | * \brief Cycle through the available Info OSDs. |
7021 | 7004 | */ |
7022 | | void TV::ToggleOSD(const PlayerContext *ctx, bool includeStatusOSD) |
| 7005 | void TV::ToggleOSD(PlayerContext *ctx, bool includeStatusOSD) |
7023 | 7006 | { |
7024 | 7007 | OSD *osd = GetOSDLock(ctx); |
7025 | 7008 | bool hideAll = false; |
7026 | 7009 | bool showStatus = false; |
7027 | | if (ctx->paused || !osd) |
| 7010 | if (ContextIsPaused(ctx, __FILE__, __LINE__) || !osd) |
7028 | 7011 | { |
7029 | 7012 | ReturnOSDLock(ctx, osd); |
7030 | 7013 | return; |
… |
… |
vector<bool> TV::DoSetPauseState(PlayerContext *lctx, const vector<bool> &pause) |
7660 | 7643 | vector<float> times; |
7661 | 7644 | for (uint i = 0; lctx && i < player.size() && i < pause.size(); i++) |
7662 | 7645 | { |
7663 | | was_paused.push_back(GetPlayer(lctx,i)->paused); |
| 7646 | PlayerContext *actx = GetPlayer(lctx, i); |
| 7647 | if (actx) |
| 7648 | was_paused.push_back(ContextIsPaused(actx, __FILE__, __LINE__)); |
7664 | 7649 | float time = 0.0f; |
7665 | 7650 | if (pause[i] ^ was_paused.back()) |
7666 | 7651 | time = DoTogglePauseStart(GetPlayer(lctx,i)); |
… |
… |
void TV::DoEditSchedule(int editType) |
7711 | 7696 | bool isNearEnd = false; |
7712 | 7697 | bool isLiveTV = StateIsLiveTV(GetState(actx)); |
7713 | 7698 | bool allowEmbedding = false; |
| 7699 | bool paused = false; |
7714 | 7700 | |
7715 | 7701 | { |
7716 | 7702 | actx->LockDeletePlayer(__FILE__, __LINE__); |
7717 | | pause_active = !actx->player || !actx->player->getVideoOutput(); |
7718 | | if (actx->player && actx->player->getVideoOutput()) |
7719 | | allowEmbedding = actx->player->getVideoOutput()->AllowPreviewEPG(); |
7720 | | |
7721 | | if (!pause_active) |
| 7703 | pause_active = !actx->player; |
| 7704 | if (actx->player) |
7722 | 7705 | { |
7723 | | long long margin = (long long) |
7724 | | (actx->last_framerate * actx->player->GetAudioStretchFactor()); |
7725 | | isNearEnd = actx->player->IsNearEnd(margin); |
| 7706 | pause_active = !actx->player->getVideoOutput(); |
| 7707 | paused = actx->player->IsPaused(); |
| 7708 | if (actx->player->getVideoOutput()) |
| 7709 | allowEmbedding = actx->player->getVideoOutput()->AllowPreviewEPG(); |
| 7710 | if (!pause_active) |
| 7711 | { |
| 7712 | long long margin = (long long) |
| 7713 | (actx->last_framerate * actx->player->GetAudioStretchFactor()); |
| 7714 | isNearEnd = actx->player->IsNearEnd(margin); |
| 7715 | } |
7726 | 7716 | } |
7727 | 7717 | actx->UnlockDeletePlayer(__FILE__, __LINE__); |
7728 | 7718 | } |
… |
… |
void TV::DoEditSchedule(int editType) |
7732 | 7722 | pause_active |= kScheduleProgramFinder == editType; |
7733 | 7723 | pause_active |= |
7734 | 7724 | !isLiveTV && (!db_continue_embedded || isNearEnd); |
7735 | | pause_active |= actx->paused; |
| 7725 | pause_active |= paused; |
7736 | 7726 | vector<bool> do_pause; |
7737 | 7727 | do_pause.insert(do_pause.begin(), true, player.size()); |
7738 | 7728 | do_pause[find_player_index(actx)] = pause_active; |
… |
… |
void TV::ChangeTimeStretch(PlayerContext *ctx, int dir, bool allowEdit) |
7875 | 7865 | |
7876 | 7866 | ctx->ts_normal = new_ts_normal; |
7877 | 7867 | |
7878 | | if (!ctx->paused) |
7879 | | { |
7880 | | ctx->LockDeletePlayer(__FILE__, __LINE__); |
7881 | | if (ctx->player) |
| 7868 | ctx->LockDeletePlayer(__FILE__, __LINE__); |
| 7869 | if (ctx->player && !ctx->player->IsPaused()) |
7882 | 7870 | ctx->player->Play(ctx->ts_normal, true); |
7883 | | ctx->UnlockDeletePlayer(__FILE__, __LINE__); |
7884 | | } |
| 7871 | ctx->UnlockDeletePlayer(__FILE__, __LINE__); |
7885 | 7872 | |
7886 | 7873 | if (!browsehelper->IsBrowsing()) |
7887 | 7874 | { |
… |
… |
void TV::ShowOSDAlreadyEditing(PlayerContext *ctx) |
9053 | 9040 | if (osd) |
9054 | 9041 | { |
9055 | 9042 | osd->DialogQuit(); |
9056 | | bool was_paused = ctx->paused; |
| 9043 | bool was_paused = ContextIsPaused(ctx, __FILE__, __LINE__); |
9057 | 9044 | if (!was_paused) |
9058 | 9045 | DoTogglePause(ctx, true); |
9059 | 9046 | |
… |
… |
void TV::HandleOSDAlreadyEditing(PlayerContext *ctx, QString action, |
9074 | 9061 | if (!DialogIsVisible(ctx, OSD_DLG_EDITING)) |
9075 | 9062 | return; |
9076 | 9063 | |
| 9064 | bool paused = ContextIsPaused(ctx, __FILE__, __LINE__); |
| 9065 | |
9077 | 9066 | if (action == "STOP") |
9078 | 9067 | { |
9079 | 9068 | ctx->LockPlayingInfo(__FILE__, __LINE__); |
9080 | 9069 | if (ctx->playingInfo) |
9081 | 9070 | ctx->playingInfo->SaveEditing(false); |
9082 | 9071 | ctx->UnlockPlayingInfo(__FILE__, __LINE__); |
9083 | | if (!was_paused && ctx->paused) |
| 9072 | if (!was_paused && paused) |
9084 | 9073 | DoTogglePause(ctx, true); |
9085 | 9074 | } |
9086 | 9075 | else // action == "CONTINUE" |
… |
… |
void TV::HandleOSDAlreadyEditing(PlayerContext *ctx, QString action, |
9090 | 9079 | { |
9091 | 9080 | ctx->playingInfo->SaveEditing(false); |
9092 | 9081 | editmode = ctx->player->EnableEdit(); |
9093 | | if (!editmode && !was_paused && ctx->paused) |
| 9082 | if (!editmode && !was_paused && paused) |
9094 | 9083 | DoTogglePause(ctx, false); |
9095 | 9084 | } |
9096 | 9085 | ctx->UnlockDeletePlayer(__FILE__, __LINE__); |
… |
… |
void TV::OSDDialogEvent(int result, QString text, QString action) |
9594 | 9583 | |
9595 | 9584 | StopFFRew(actx); |
9596 | 9585 | |
9597 | | if (actx->paused) |
| 9586 | if (ContextIsPaused(actx, __FILE__, __LINE__)) |
9598 | 9587 | DoTogglePause(actx, true); |
9599 | 9588 | |
9600 | 9589 | ChangeTimeStretch(actx, 0, !floatRead); // just display |
… |
… |
void TV::ITVRestart(PlayerContext *ctx, bool isLive) |
11218 | 11207 | uint chanid = 0; |
11219 | 11208 | uint cardid = 0; |
11220 | 11209 | |
11221 | | if (ctx->paused) |
| 11210 | if (ContextIsPaused(ctx, __FILE__, __LINE__)) |
11222 | 11211 | return; |
11223 | 11212 | |
11224 | 11213 | ctx->LockPlayingInfo(__FILE__, __LINE__); |
… |
… |
void TV::ShowOSDStopWatchingRecording(PlayerContext *ctx) |
11419 | 11408 | if ((ctx != GetPlayer(ctx, 0))) |
11420 | 11409 | return; |
11421 | 11410 | |
11422 | | if (!ctx->paused) |
| 11411 | if (!ContextIsPaused(ctx, __FILE__, __LINE__)) |
11423 | 11412 | DoTogglePause(ctx, false); |
11424 | 11413 | |
11425 | 11414 | QString message; |
… |
… |
void TV::ShowOSDPromptDeleteRecording(PlayerContext *ctx, QString title, |
11540 | 11529 | |
11541 | 11530 | ClearOSD(ctx); |
11542 | 11531 | |
11543 | | bool paused = ctx->paused; |
| 11532 | bool paused = ContextIsPaused(ctx, __FILE__, __LINE__); |
11544 | 11533 | if (!paused) |
11545 | 11534 | DoTogglePause(ctx, false); |
11546 | 11535 | |
… |
… |
bool TV::PromptRecGroupPassword(PlayerContext *ctx) |
11691 | 11680 | if (!lastProgram) |
11692 | 11681 | return false; |
11693 | 11682 | |
11694 | | bool stayPaused = ctx->paused; |
11695 | | if (!ctx->paused) |
| 11683 | bool paused = ContextIsPaused(ctx, __FILE__, __LINE__); |
| 11684 | bool stayPaused = paused; |
| 11685 | if (!paused) |
11696 | 11686 | DoTogglePause(ctx, false); |
11697 | 11687 | QString recGroupPassword; |
11698 | 11688 | lastProgram->SetRecordingGroup(lastProgram->QueryRecordingGroup()); |
… |
… |
bool TV::PromptRecGroupPassword(PlayerContext *ctx) |
11717 | 11707 | { |
11718 | 11708 | SetOSDMessage(ctx, tr("Password Failed")); |
11719 | 11709 | |
11720 | | if (ctx->paused && !stayPaused) |
| 11710 | if (ContextIsPaused(ctx, __FILE__, __LINE__) && !stayPaused) |
11721 | 11711 | DoTogglePause(ctx, false); |
11722 | 11712 | |
11723 | 11713 | return false; |
11724 | 11714 | } |
11725 | 11715 | } |
11726 | 11716 | |
11727 | | if (ctx->paused && !stayPaused) |
| 11717 | if (ContextIsPaused(ctx, __FILE__, __LINE__) && !stayPaused) |
11728 | 11718 | DoTogglePause(ctx, false); |
11729 | 11719 | |
11730 | 11720 | return true; |
… |
… |
void TV::HandleUDPNotifyEvent(void) |
11806 | 11796 | ReturnPlayerLock(mctx); |
11807 | 11797 | } |
11808 | 11798 | |
| 11799 | bool TV::ContextIsPaused(PlayerContext *ctx, const char *file, int location) |
| 11800 | { |
| 11801 | if (!ctx) |
| 11802 | return false; |
| 11803 | bool paused = false; |
| 11804 | ctx->LockDeletePlayer(file, location); |
| 11805 | if (ctx->player) |
| 11806 | paused = ctx->player->IsPaused(); |
| 11807 | ctx->UnlockDeletePlayer(file, location); |
| 11808 | return paused; |
| 11809 | } |
| 11810 | |
11809 | 11811 | OSD *TV::GetOSDL(const char *file, int location) |
11810 | 11812 | { |
11811 | 11813 | PlayerContext *actx = GetPlayerReadLock(-1, file, location); |
diff --git a/mythtv/libs/libmythtv/tv_play.h b/mythtv/libs/libmythtv/tv_play.h
index 64f80c7..205cd7a 100644
a
|
b
|
class MPUBLIC TV : public QObject |
307 | 307 | static EMBEDRETURNVOIDSCHEDIT RunScheduleEditorPtr; |
308 | 308 | |
309 | 309 | private: |
| 310 | bool ContextIsPaused(PlayerContext *ctx, const char *file, int location); |
310 | 311 | void SetActive(PlayerContext *lctx, int index, bool osd_msg); |
311 | 312 | |
312 | 313 | PlayerContext *GetPlayerWriteLock( |
… |
… |
class MPUBLIC TV : public QObject |
462 | 463 | const QStringList &actions); |
463 | 464 | |
464 | 465 | bool ClearOSD(const PlayerContext*); |
465 | | void ToggleOSD(const PlayerContext*, bool includeStatusOSD); |
| 466 | void ToggleOSD(PlayerContext*, bool includeStatusOSD); |
466 | 467 | void UpdateOSDProgInfo(const PlayerContext*, const char *whichInfo); |
467 | 468 | void UpdateOSDStatus(const PlayerContext *ctx, QString title, QString desc, |
468 | 469 | QString value, int type, QString units, |
diff --git a/mythtv/libs/libmythtv/tvbrowsehelper.cpp b/mythtv/libs/libmythtv/tvbrowsehelper.cpp
index d3f2abf..d08db85 100644
a
|
b
|
|
6 | 6 | #include "playercontext.h" |
7 | 7 | #include "remoteencoder.h" |
8 | 8 | #include "recordinginfo.h" |
| 9 | #include "mythplayer.h" |
9 | 10 | #include "tv_play.h" |
10 | 11 | |
11 | 12 | #define GetPlayer(X,Y) GetPlayerHaveLock(X, Y, __FILE__ , __LINE__) |
… |
… |
bool TVBrowseHelper::BrowseStart(PlayerContext *ctx, bool skip_browse) |
65 | 66 | if (m_ctx) |
66 | 67 | return m_ctx == ctx; |
67 | 68 | |
68 | | if (ctx->paused) |
| 69 | bool paused = false; |
| 70 | ctx->LockDeletePlayer(__FILE__, __LINE__); |
| 71 | if (ctx->player) |
| 72 | paused = ctx->player->IsPaused(); |
| 73 | ctx->UnlockDeletePlayer(__FILE__, __LINE__); |
| 74 | if (paused) |
69 | 75 | return false; |
70 | 76 | |
71 | 77 | m_tv->ClearOSD(ctx); |