Ticket #1303: live_bookmark.patch
File live_bookmark.patch, 5.1 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/NuppelVideoPlayer.cpp
2958 2958 2959 2959 void NuppelVideoPlayer::SetBookmark(void) 2960 2960 { 2961 if (livetv)2962 return;2963 2961 if (!m_playbackinfo || !osd) 2964 2962 return; 2965 2963 … … 2969 2967 2970 2968 void NuppelVideoPlayer::ClearBookmark(void) 2971 2969 { 2972 if (livetv)2973 return;2974 2970 if (!m_playbackinfo || !osd) 2975 2971 return; 2976 2972 -
libs/libmythtv/tv_play.cpp
2346 2346 } 2347 2347 else if (StateIsLiveTV(GetState())) 2348 2348 { 2349 if (nvp && gContext->GetNumSetting("PlaybackExitPrompt") == 2) 2350 nvp->SetBookmark(); 2349 2351 exitPlayer = true; 2350 2352 wantsToQuit = true; 2351 2353 } … … 2459 2461 else if (action == "TOGGLEFAV") 2460 2462 ToggleChannelFavorite(); 2461 2463 else if (action == "SELECT") 2462 CommitQueuedInput(); 2464 { 2465 if (!CommitQueuedInput()) 2466 handled = false; 2467 } 2463 2468 else if (action == "TOGGLERECCONTROLS") 2464 2469 DoToggleRecPictureAttribute(); 2465 2470 else if (action == "TOGGLEBROWSE" && pseudoLiveTVState[aindx]) … … 2472 2477 BrowseStart(); 2473 2478 } 2474 2479 2480 if (StateIsLiveTV(GetState()) || StateIsPlaying(internalState)) 2481 { 2482 for (unsigned int i = 0; i < actions.size() && !handled; i++) 2483 { 2484 QString action = actions[i]; 2485 handled = true; 2486 2487 if (action == "SELECT") 2488 { 2489 if (!was_doing_ff_rew) 2490 { 2491 if (gContext->GetNumSetting("AltClearSavedPosition", 1) 2492 && nvp->GetBookmark()) 2493 nvp->ClearBookmark(); 2494 else 2495 nvp->SetBookmark(); 2496 } 2497 else 2498 handled = false; 2499 } 2500 else 2501 handled = false; 2502 } 2503 } 2504 2475 2505 if (StateIsLiveTV(GetState()) && !pseudoLiveTVState[aindx]) 2476 2506 { 2477 2507 for (unsigned int i = 0; i < actions.size() && !handled; i++) … … 2542 2572 nvp->ActivateDVDButton(); 2543 2573 } 2544 2574 } 2545 else if (action == "SELECT")2546 {2547 if (!was_doing_ff_rew)2548 {2549 if (gContext->GetNumSetting("AltClearSavedPosition", 1)2550 && nvp->GetBookmark())2551 nvp->ClearBookmark();2552 else2553 nvp->SetBookmark();2554 }2555 else2556 handled = false;2557 }2558 2575 else if (action == "DELETE") 2559 2576 { 2560 2577 NormalSpeed(); … … 2739 2756 } 2740 2757 else if (tokens.size() == 2 && tokens[1] == "STOP") 2741 2758 { 2742 if ( internalState != kState_WatchingLiveTV &&nvp)2759 if (nvp) 2743 2760 nvp->SetBookmark(); 2744 2761 exitPlayer = true; 2745 2762 wantsToQuit = true; … … 3799 3816 GetOSD()->SetText("channel_number", infoMap, 2); 3800 3817 } 3801 3818 3802 voidTV::CommitQueuedInput(void)3819 bool TV::CommitQueuedInput(void) 3803 3820 { 3821 bool commited = false; 3822 3804 3823 VERBOSE(VB_PLAYBACK, LOC + "CommitQueuedInput() " + 3805 3824 QString("livetv(%1) qchannum(%2) qchanid(%3)") 3806 3825 .arg(StateIsLiveTV(GetState())) … … 3810 3829 if (ccInputMode) 3811 3830 { 3812 3831 bool valid = false; 3832 commited = true; 3813 3833 int page = GetQueuedInputAsInt(&valid, 16); 3814 3834 if (valid && page) 3815 3835 nvp->ToggleCC(vbimode, page); … … 3817 3837 } 3818 3838 else if (asInputMode) 3819 3839 { 3840 commited = true; 3820 3841 if (HasQueuedInput()) 3821 3842 DoArbSeek(ARBSEEK_FORWARD); 3822 3843 } … … 3827 3848 QString chaninput = GetQueuedInput(); 3828 3849 if (browsemode) 3829 3850 { 3851 commited = true; 3830 3852 BrowseChannel(channum); 3831 3853 if (activenvp == nvp && GetOSD()) 3832 3854 GetOSD()->HideSet("channel_number"); 3833 3855 } 3834 3856 else if (GetQueuedChanID() || !channum.isEmpty()) 3857 { 3858 commited = true; 3835 3859 ChangeChannel(GetQueuedChanID(), channum); 3860 } 3836 3861 } 3837 3862 3838 3863 ClearInputQueues(true); 3864 return commited; 3839 3865 } 3840 3866 3841 3867 void TV::ChangeChannel(uint chanid, const QString &chan) -
libs/libmythtv/tv_play.h
224 224 // key queue commands 225 225 void AddKeyToInputQueue(char key); 226 226 void ClearInputQueues(bool hideosd = false); 227 voidCommitQueuedInput(void);227 bool CommitQueuedInput(void); 228 228 bool ProcessSmartChannel(QString&); 229 229 230 230 // query key queues