[mythtv-commits] mythtv commit: r6712 by danielk

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Sun Jun 26 15:41:17 UTC 2005


      Author: danielk
        Date: 2005-06-26 15:41:16 +0000 (Sun, 26 Jun 2005)
New Revision: 6712
   Changeset: http://cvs.mythtv.org/trac/changeset/6712

Modified:

   trunk/mythtv/libs/libmythtv/remoteencoder.cpp
   trunk/mythtv/libs/libmythtv/remoteencoder.h
   trunk/mythtv/libs/libmythtv/tv_play.cpp
   trunk/mythtv/libs/libmythtv/tv_play.h

Log:

Various cleanups for tv_play

This is bigger than the tv_rec commit last week. Again, nothing in this
commit should change the functionality of MythTV. The idea is to make
the check signal patch change fewer things unrelated to the check signal
patch.

  1/ Creates SleepTimerInfo class, this simplifies the sleep timer stuff
  2/ The channel key queue was implemented with a fixed 5 char array,
     representing a 4 character null terminated string. I made this
     a QString, greatly simplifying that code.
  3/ I've put the Fast forward and Rewind speed defaults in a vector
     instead of a static array. Allowing more flexibility...
  4/ I've removed the osd instance variable and replaced it's uses with
     a call to GetOSD().
  5/a) StartPlayerAndRecorder is seperated into a StartPlayer and StartRecorder.
     we were always starting just one of them at a time and checking for
     errors anyway.
    b) Added maxWait param to the StartPlayer and StartRecorder, so that we
     don't get stuck forever if there is some backend problem.
    c) Added an isWatchingRecording param to StartPlayer/SetupPlayer, so
     that it doesn't need to check the state. This can be a problem because
     StartPlayer is called from within HandleStateChange().
  6/ Created a separate StartOSD() function that hooks up the closed
     caption handler after the NVP is started.
  7/ Renamed StopPlayerAndRecorder() to StopStuff() adding a stopRingBuffer
     param. The ringbuffer wasn't always stopped on errors conditions, and
     this lets us stop it independently of stopping the player.
  8/ Added InStateChange(), ChangeState(newState) and ForceNextState().
     Instead of calling setting the nextState and setting an changeState
     variable you just call ChangeState() with the new state. 
     InStateChange() functions like checking the changeState variable.
     The nextState is actually a deque now and is protected with a lock,
     this is because state changes are sometimes called without checking
     whether changeState is true, so using a queue means that if the
     state change calls are at least in the right order then things are
     ok. Because of this queue I added a ForceNextState() which functions
     exactly like not having a queue, it erases the queue and forces the
     next state. This is safe for kState_None since there is always a
     transition to kState_None, and so I've used it for shutting things
     down at the end of the event loop.
  9/ Added three macros to support HandleStateChange, TRANSITION(ASTATE,BSTATE),
     SET_NEXT(), and SET_LAST(). TRANSITION, simply checks if we are in the
     transition from state A to state B. SET_NEXT() sets the nextState to the
     desired next state. SET_LAST sets the nextState to our current state,
     this is used when errors occur and we can't change to the desired state.
 10/ Renames Pause() in RemoteEncoder to PauseRecorder(), to make room for
     matching Pause()/Unpause() calls in signal monitoring patch.
 11/ Lots of doxygen documentation, and other little stuff.






More information about the mythtv-commits mailing list