[mythtv] Constant ringbuffer

Jake Smith myth at thepier.freeserve.co.uk
Fri Oct 22 16:16:37 UTC 2004


I was thinking along the lines of creating a virtual filing system, which
would still contain the concept of a ring buffer, but would have the
functionality to efficiently remap files, i.e. it could create a new file
from the block map of the ring buffer and continue writing to that new file.

This would basically be a specialized filing system, but I don't fancy
writing an FS - and it is premature for me to be really thiking about this,
as I haven't looked at the myth code at all!

I imagine it would impact on quite a lot though, i.e. anything the writes or
reads video.

JAT at this stage - but I've very keen to see this functionality revived in
my new PVR (and to exile old = Tivo)

> Also the UI would need
> to be able to inform the user when MythTV wants to record another
> program using the LiveTV's tuner. I'm guessing you would want to have a
> timeout, so that if you've left LiveTV for say 10 minutes MythTV
> would just take the tuner, without informing the user (otherwise every
> recording on that tuner would need to get user approval.)

To honest, not entirely sure what myth does now when watching LiveTv and
scheduled prog comes along.
Does it warn then? Assuming it does, it would be nice if indication in
menuinng system too, agreed.

> If you go ahead and implement any of these features please keep in mind
> feature 4: allow the user to keep watching the program after Myth has
> taken the tuner for another program, but before the program you are
> watching is over.

I assume, that currrently when schedule change comes along, you loose any
timeslipped LiveTv you have unwatched?
But yes definetely it would be nice if the same solution also solved that
also.


Btw: I've recently learnt that UK Digital Set Top Box - Sky+ (pvr) - cannot
do this - I was quite surprised - I'd almost a number of times been tempted
to go over to the devil and subscribe to it - but now I know I made the
right decision!

--
Jake.

> -----Original Message-----
> From: mythtv-dev-bounces at mythtv.org
> [mailto:mythtv-dev-bounces at mythtv.org]On Behalf Of Daniel Thor
> Kristjansson
> Sent: 22 October 2004 15:14
> To: Development of mythtv
> Subject: RE: [mythtv] Constant ringbuffer
>
>
> On Fri, 22 Oct 2004, Jake Smith wrote:
> ]1) 24/7 recording (have mentioned on another thread). i.e. does not stop
> ]ring buffer when jumping out of LiveTV
> ]2) The ability to record the whole of (as much as in ringbuffer) the
> ]'current' program from an arbitary point. e.g. program has
> started - halfway
> ]3) An extension of 2) ; i) record any program that is in buffer,
> e.g. rewind
> ]to program that has recently '_finished_' and record it. (NB -
> not something
> ]Tivo can do)
>
> Features 2 & 3 should not be too difficult. There are two ways to
> implement it. One would be to simply lock the LiveTV buffer until the
> program is over, and then copy the program out of the LiveTV buffer to a
> new file and insert the right DB entries. The other would be to open the
> new file, seek ahead to where we are currently in the programs stream
> and restart recording there, and then copy the missing bits out of the
> LiveTV buffer in the background. The first method is simpler, but
> the LiveTV buffer must be big enough to contain the whole program. The
> second method may also miss part of the program, and requires switching
> playing buffers, and potentially modifying seek so you can't seek back
> to bits of the program that haven't been copied over yet.
>
> Feature 1 requires some changes in how LiveTV is handled. You would
> need to close the player but not the recorder, and you would need to be
> able to restart the player on the LiveTV buffer. Also the UI would need
> to be able to inform the user when MythTV wants to record another
> program using the LiveTV's tuner. I'm guessing you would want to have a
> timeout, so that if you've left LiveTV for say 10 minutes MythTV
> would just take the tuner, without informing the user (otherwise every
> recording on that tuner would need to get user approval.)
>
> If you go ahead and implement any of these features please keep in mind
> feature 4: allow the user to keep watching the program after Myth has
> taken the tuner for another program, but before the program you are
> watching is over.
>
> ]I'd also appreciate any feedback comments as to feasibility, as
> I too have
> ]been thinking of delving into the ring buffer code etc. with
> this in mind.
> ]I realize there are all sort of complications especially with 2)+3) in
> ]'extracting' (simply copying would be bad solution) the program from the
> ]video buffer.
>
> Copying is the only feasable solution. But it's not so bad because you
> can just mark the recording as having been done with the LiveTV profile,
> and you can transcode later if you want to. I would implement this by
> copying out the relevant bits out of the LiveTV buffer after the
> recording. It's much simpler, and doesn't require coding acrobatics to
> avoid missing chunks in the middle of the program. It also avoids
> switching buffers for LiveTV playing in mid-stream. The downside is that
> it also locks the LiveTV buffer for the length of the program, so you
> might want to be able to create another LiveTV buffer for other tuners.
> Then you could leave the recording, and go back to LiveTV to watch
> another program.
>
> Keep in mind that most Myth developers never watch LiveTV so you need to
> do this yourself, but we will gladly test it.
>
> -- Daniel
>



More information about the mythtv-dev mailing list