[mythtv] Record now?

Tony Brummett tony at blight.com
Fri Jan 17 14:20:24 EST 2003


On Fri, Jan 17, 2003 at 02:45:49PM +0100, Erik Arendse wrote:
> If nobody else beats me to it I'll probably implement something like this 
> one day as an added option to the current instand recording from the EPG:
> 1) optional: pause live TV
> 2) optional: search in the buffer
> 3) start instant recording
> 4) get show end from EPG, show it and let the user correct it, if no EPG 
> available just suggest a fixed recordlength from starting time on.
> 5) display is locked with message "copying timeshift to new recording"
> 6) mythTV opens a new file, writes the header
> 7) while shifting is still going on, the copy routine copies all needed 
> data to the new file
> 8) when position of copying reaches the position where timeshifting 
> records, the timeshift output is send to the new file and shifting is 
> stopped

I haven't actually looked at the code to see how things really work.
However, at step 5, instead of hanging while the new file is getting
caught up with the ringbuffer, why not something like this so the
user can continue to watch the show:
5) mythTV opens a new file and instantly does a seek() forward the
   size of the ringbuffer.  Playback starts from this point.
6) start up a background "thread" that copies data from the ringbuffer
   into the empty space at the start of the new file.

If you copy the data in reverse-order (from the moment the user said to
record back in time to the oldest time in the ringbuffer), then the user
could even rewind back toward the beginning while it's still recording.

It might be more trouble than it's worth, though.  Especially if steps
5-8 are fast and dosen't appear "hung" for very long.

-- Tony  tony at blight.com


More information about the mythtv-dev mailing list