[mythtv-users] Mythtv .19 live watching

chris at cpr.homelinux.net chris at cpr.homelinux.net
Thu Jul 13 06:55:17 UTC 2006


On Wed, Jul 12, 2006 at 01:23:07PM -0400, Michael T. Dean wrote:
>   At that point, Myth could break the current 
> program and let autoexpire delete that portion.  But, that's a lot of 
> logic to write for a "just-in-case"...  And, if the person watching the 
> show later decides it's worth keeping, they lose the entire beginning, 
> so it's not an ideal solution...

The ideal solution is one that conforms with user expectations, not 
one that's easier to program.  

Programs that use ring-buffers traditionally have two ways of 
dealing with buffer overflows: if the data is not important then 
you eat your own tail; if the data is important then Something Bad 
Has Happened and the program should treat the overflow as a 
critical error.  Dealing with that critical error is then a 
completely separate issue.  Using a dynamic buffer doesn't change 
the choice of outcomes -- it simply delays the buffer-full 
condition.

AFAIAC, the live TV buffer is not a "recording" until the user 
manually chooses to make it one.  That would make the ring-buffer 
contents non-critical, and the only reasonable course of action 
would be to eat your tail.  In the case of a dynamic buffer, you 
can allocate more and more storage to delay eating your tail, but 
at some point you have to be prepared to do it.  If you run out of 
storage before the user selects "record" then that's *the user's 
problem* for not selecting "record" earlier.  The fact that 
segmenting the recording to facilitate eating your tail is 
difficult doesn't mean it shouldn't be done.  If anything, it 
should be done early and often, because you don't know what other 
programs are going to allocate or free up space concurrently with 
the live TV buffer.  In other words, you should be ready to eat 
your tail at any time in order to make room for other applications 
(including other MythTV recordings).

When the user decided to convert the buffer into a recording then a 
whole different set of rules applies.  Now it's reasonable to start 
expiring old programs to make room.  Now a buffer-full condition 
becomes critical because it means that you have no disk space left 
AND no programs left to expire.  At that point I would expect the 
recording to stop, and the movie/episode marked for re-record.  
Freeing up storage is then the user's responsibility.

I rarely use live TV in Myth, but would be very upset if MythTV 
started deleting real recordings to make room for an 
infinitely-expanding ring-buffer.  That would be like Microsoft 
Windows killing FireFox to free up memory for Excel -- it's not 
what the user expects, and more importantly it usurps the user's 
authority.



More information about the mythtv-users mailing list