Ticket #146: jumpprev.diff
| File jumpprev.diff, 4.7 KB (added by , 21 years ago) |
|---|
-
libs/libmythtv/tv_play.cpp
130 130 REG_KEY("TV Playback", "NEXTAUDIO", "Switch to the next audio track", "+"); 131 131 REG_KEY("TV Playback", "PREVAUDIO", "Switch to the previous audio track", "-"); 132 132 REG_KEY("TV Playback", "SUBCHANNELSEP", "Separator for HDTV subchannels", "_"); 133 REG_KEY("TV Playback", "JUMPPREV", "Jump to previously played recording", ""); 133 134 134 135 REG_KEY("TV Editing", "CLEARMAP", "Clear editing cut points", "C,Q,Home"); 135 136 REG_KEY("TV Editing", "INVERTMAP", "Invert Begin/End cut points", "I"); … … 504 505 505 506 } 506 507 508 void TV::setLastProgram(ProgramInfo *rcinfo) 509 { 510 lastProgram = rcinfo; 511 } 512 507 513 int TV::Playback(ProgramInfo *rcinfo) 508 514 { 515 jumpToProgram = false; 516 509 517 if (internalState != kState_None) 510 518 return 0; 511 519 … … 1852 1860 { 1853 1861 ClearOSD(); 1854 1862 } 1863 else if (action == "JUMPPREV") 1864 { 1865 nvp->SetBookmark(); 1866 exitPlayer = true; 1867 wantsToQuit = true; 1868 jumpToProgram = true; 1869 } 1855 1870 else if (action == "ESCAPE") 1856 1871 { 1857 1872 if (GetOSD() && ClearOSD()) … … 4230 4245 SetAutoCommercialSkip(action.right(1).toInt()); 4231 4246 else if (action == "QUEUETRANSCODE") 4232 4247 DoQueueTranscode(); 4248 else if (action == "JUMPPREV") 4249 { 4250 nvp->SetBookmark(); 4251 exitPlayer = true; 4252 wantsToQuit = true; 4253 jumpToProgram = true; 4254 } 4233 4255 else 4234 4256 { 4235 4257 cout << "unknown menu action selected: " << action << endl; … … 4303 4325 } 4304 4326 else if (StateIsPlaying(internalState)) 4305 4327 { 4328 if (lastProgram != NULL) 4329 item = new OSDGenericTree(treeMenu, tr("Jump to Previous Recording"), "JUMPPREV"); 4330 4306 4331 item = new OSDGenericTree(treeMenu, tr("Edit Recording"), "TOGGLEEDIT"); 4307 4332 4308 4333 if (JobQueue::IsJobQueuedOrRunning(JOB_TRANSCODE, -
libs/libmythtv/tv_play.h
109 109 OSD *GetOSD(void); 110 110 111 111 bool IsErrored(void) { return errored; } 112 113 void setLastProgram(ProgramInfo *rcinfo); 114 bool getJumpToProgram(void) { return jumpToProgram; } 112 115 public slots: 113 116 void HandleOSDClosed(int osdType); 114 117 … … 339 342 ProgramInfo *playbackinfo; ///< info sent in via Playback() 340 343 QString inputFilename; ///< playbackinfo->pathname 341 344 int playbackLen; ///< initial playbackinfo->CalculateLength() 345 ProgramInfo *lastProgram; ///< last program played with this player 346 bool jumpToProgram; 342 347 343 348 // Video Players 344 349 NuppelVideoPlayer *nvp; -
programs/mythfrontend/playbackbox.cpp
125 125 popup = NULL; 126 126 curitem = NULL; 127 127 delitem = NULL; 128 lastProgram = NULL; 128 129 129 130 // titleView controls showing titles in group list 130 131 titleView = true; … … 1786 1787 state = kKilling; // stop preview playback and don't restart it 1787 1788 playingSomething = true; 1788 1789 1790 tv->setLastProgram(lastProgram); 1791 1789 1792 if (tv->Playback(tvrec)) 1790 1793 { 1791 1794 while (tv->GetState() != kState_None) … … 1795 1798 usleep(100000); 1796 1799 qApp->lock(); 1797 1800 } 1801 while (tv->getJumpToProgram()) 1802 { 1803 ProgramInfo *tmpProgram = new ProgramInfo(*lastProgram); 1804 lastProgram = new ProgramInfo(*tvrec); 1805 tvrec = tmpProgram; 1806 if (tv->Playback(tvrec)) 1807 { 1808 while (tv->GetState() != kState_None) 1809 { 1810 qApp->unlock(); 1811 qApp->processEvents(); 1812 usleep(100000); 1813 qApp->lock(); 1814 } 1815 } 1816 } 1798 1817 } 1799 1818 1819 lastProgram = new ProgramInfo(*rec); 1820 1800 1821 playingSomething = false; 1801 1822 state = kStarting; // restart playback preview 1802 1823 setEnabled(true); -
programs/mythfrontend/playbackbox.h
157 158 ProgramInfo *curitem; 158 159 ProgramInfo *delitem; 159 160 161 ProgramInfo *lastProgram; 162 160 163 void LoadWindow(QDomElement &); 161 164 XMLParse *theme; 162 165 QDomElement xmldata;
