Ticket #2426: pbb_playbackvideo_enhancements.diff
File pbb_playbackvideo_enhancements.diff, 7.3 KB (added by , 19 years ago) |
---|
-
libs/libmythtv/NuppelVideoPlayer.cpp
4589 4589 videoOutput->ExposeEvent(); 4590 4590 } 4591 4591 4592 bool NuppelVideoPlayer::IsEmbedding(void) 4593 { 4594 if (videoOutput) 4595 return videoOutput->IsEmbedding(); 4596 return false; 4597 } 4598 4592 4599 void NuppelVideoPlayer::UpdateSeekAmount(bool up) 4593 4600 { 4594 4601 if (seekamountpos > 0 && !up) -
libs/libmythtv/tv_play.h
110 110 // Embedding commands for the guidegrid to use in LiveTV 111 111 void EmbedOutput(WId wid, int x, int y, int w, int h); 112 112 void StopEmbeddingOutput(void); 113 bool IsEmbedding(void); 113 114 void EPGChannelUpdate(uint chanid, QString channum); 114 115 115 116 // Recording commands -
libs/libmythtv/NuppelVideoPlayer.h
117 117 void EmbedInWidget(WId wid, int x, int y, int w, int h); 118 118 void StopEmbedding(void); 119 119 void ExposeEvent(void); 120 bool IsEmbedding(void); 120 121 121 122 // Audio Sets 122 123 void SetNoAudio(void) { no_audio_out = true; } -
libs/libmythtv/tv_play.cpp
1785 1785 (gContext->GetNumSetting("EndofRecordingExitPrompt") == 1) && 1786 1786 !jumped_back && !editmode) 1787 1787 { 1788 PromptDeleteRecording(tr("End Of Recording")); 1788 if (IsEmbedding()) 1789 StopEmbeddingOutput(); 1790 else 1791 PromptDeleteRecording(tr("End Of Recording")); 1789 1792 } 1790 1793 1791 1794 … … 4938 4941 embedWinID = 0; 4939 4942 } 4940 4943 4944 bool TV::IsEmbedding(void) 4945 { 4946 if (nvp) 4947 return nvp->IsEmbedding(); 4948 return false; 4949 } 4950 4941 4951 void TV::doEditSchedule(int editType) 4942 4952 { 4943 4953 if (!playbackinfo) … … 4965 4975 4966 4976 bool changeChannel = false; 4967 4977 ProgramInfo *nextProgram = NULL; 4978 if (!nvp) 4979 return; 4968 4980 4969 4981 if (StateIsLiveTV(GetState())) 4970 4982 { … … 5003 5015 exitPlayer = true; 5004 5016 delete nextProgram; 5005 5017 } 5006 if (paused & !stayPaused)5018 if (paused && !stayPaused) 5007 5019 DoPause(false); 5008 5020 break; 5009 5021 } 5010 5022 } 5011 StopEmbeddingOutput(); 5023 if (IsEmbedding()) 5024 StopEmbeddingOutput(); 5012 5025 } 5013 5026 else 5014 5027 { … … 5020 5033 { 5021 5034 default: 5022 5035 case kScheduleProgramGuide: 5023 5024 5036 RunProgramGuide(chanid, channum, true); 5037 break; 5025 5038 case kScheduleProgramFinder: 5026 5027 5039 RunProgramFind(true, false); 5040 break; 5028 5041 case kScheduledRecording: 5029 5042 { 5030 5043 QMutexLocker locker(&pbinfoLock); … … 5036 5049 } 5037 5050 case kPlaybackBox: 5038 5051 { 5039 nextProgram = RunPlaybackBoxPtr((void *)this); 5040 if (nextProgram) 5052 long long margin = 5053 (long long)(nvp->GetFrameRate() * nvp->GetAudioStretchFactor()); 5054 // keep video paused if only 5 seconds left in recording 5055 margin = margin * 5; 5056 QDomElement pbbxmldata; 5057 XMLParse *theme = new XMLParse(); 5058 if (theme->LoadTheme(pbbxmldata, "playback-video")) 5059 { 5060 if (!stayPaused && paused && !nvp->IsNearEnd(margin)) 5041 5061 { 5042 setLastProgram(nextProgram); 5043 jumpToProgram = true; 5044 exitPlayer = true; 5045 delete nextProgram; 5062 DoPause(false); 5063 stayPaused = true; 5046 5064 } 5047 break; 5065 } 5066 if (theme) 5067 delete theme; 5068 nextProgram = RunPlaybackBoxPtr((void *)this); 5069 if (IsEmbedding()) 5070 StopEmbeddingOutput(); 5071 if (nextProgram) 5072 { 5073 setLastProgram(nextProgram); 5074 jumpToProgram = true; 5075 exitPlayer = true; 5076 delete nextProgram; 5077 } 5078 break; 5048 5079 } 5049 5080 } 5050 5081 … … 5064 5095 if (changeChannel) 5065 5096 EPGChannelUpdate(chanid, channum); 5066 5097 5067 if ( jumpToProgram)5068 activenvp->DiscardVideoFrames(true);5098 if (nvp && jumpToProgram) 5099 nvp->DiscardVideoFrames(true); 5069 5100 5070 5101 menurunning = false; 5071 5102 } -
libs/libmythtv/videooutbase.h
257 257 /// \brief Returns true iff we have at least the minimum number of 258 258 /// decoded frames ready for display. 259 259 bool EnoughPrebufferedFrames(void) { return vbuffers.EnoughPrebufferedFrames(); } 260 260 261 /// \brief Returns if videooutput is embedding 262 bool IsEmbedding(void) { return embedding; } 263 261 264 /** 262 265 * \brief Blocks until it is possible to return a frame for decoding onto. 263 266 * \param with_lock if true frames are properly locked, but this means you -
programs/mythfrontend/playbackbox.cpp
330 330 // theme stuff 331 331 theme->SetWMult(wmult); 332 332 theme->SetHMult(hmult); 333 if (m_player && m_player->GetState() == kState_WatchingLiveTV && 334 theme->LoadTheme(xmldata,"playback-video")) 333 if (m_player && theme->LoadTheme(xmldata,"playback-video")) 335 334 { 336 335 playbackVideoContainer = true; 337 336 previewPixmapEnabled = false; … … 2990 2989 SLOT(togglePlayListItem())); 2991 2990 } 2992 2991 2992 TVState m_tvstate = kState_None; 2993 if (m_player) 2994 m_tvstate = m_player->GetState(); 2995 2993 2996 if (program->recstatus == rsRecording && 2994 (!(m_player && m_player->GetState() == kState_WatchingLiveTV && 2995 m_player->IsSameProgram(curitem)))) 2997 (!(m_player && 2998 (m_tvstate == kState_WatchingLiveTV || 2999 m_tvstate == kState_WatchingRecording) && 3000 m_player->IsSameProgram(curitem)))) 2996 3001 { 2997 3002 popup->addButton(tr("Stop Recording"), this, SLOT(askStop())); 2998 3003 } … … 3682 3687 3683 3688 void PlaybackBox::timeout(void) 3684 3689 { 3690 if (m_player && !m_player->IsEmbedding() && 3691 playbackVideoContainer) 3692 { 3693 exitWin(); 3694 } 3695 3685 3696 if (titleList.count() <= 1) 3686 3697 return; 3687 3698