[mythtv-users] Changing end time for a recording while therecording is going on

Tako Schotanus quintesse at palacio-cristal.com
Wed Oct 15 12:00:40 EDT 2003


I know that Linux supports this, I just said "I imagine there might be
problems" because the recording process is quite complex and I don't
know if re-opens the file at any given time. Personally I had been
thinking about adding an extra field to the database to hold the
filename so you could just name it anything you like and not have this
dependency that filename and begin/end times have to be in sync. But
that's on my TODO list (when I have time again ;-).

-Tako

> -----Original Message-----
> From: mythtv-users-bounces at mythtv.org 
> [mailto:mythtv-users-bounces at mythtv.org] On Behalf Of Mike Hicks
> Sent: woensdag 15 oktober 2003 6:45
> To: Discussion about mythtv
> Subject: Re: [mythtv-users] Changing end time for a recording 
> while therecording is going on
> 
> 
> On Sat, 2003-10-11 at 05:51, Tako Schotanus wrote:  
> > Not only that, but the .nuv filename for the recording is 
> based on the
> > begin and end date/times so just changing the end time will confuse
> > MythTV as to which file belong to the recording. When I implemented
> > the "Stop Recording" feature I had to add code that actually renamed
> > the file to mirror the changes I made in the start/end 
> times. It might
> > be necessary to do something similar for a feature like 
> this as well,
> > but I can imagine there might be complication when trying 
> to do so for
> > an in-progress recording.
> 
> In Linux, I believe it is legal to rename a file while it is being
> written/read, as long as you aren't closing it and reopening it.  What
> matters is that your file descriptor still points to the appropriate
> string of blocks on the disk.  The filename is really just a 
> pointer to
> an inode, if I remember right.  If you're worried about it, 
> just make a
> hard link instead...
> 
> Actually, some programs will delete a file just after creating it,
> occasionally as a security measure to prevent other programs from
> accessing the data.  There is no filename, but the file 
> exists until it
> is closed.  I seem to recall an old version of Myth doing 
> something like
> this, because I'd suddenly find my root filesystem totally full, but I
> couldn't find any big file that was causing the problem.  
> (like I said,
> that was an old version, and I don't have that problem anymore)
> 
> -- 
>  _  _  _  _ _  ___    _ _  _  ___ _ _  __   Good Lord, the little
> / \/ \(_)| ' // ._\  / - \(_)/ ./| ' /(__   stoner's got a point.
> \_||_/|_||_|_\\___/  \_-_/|_|\__\|_|_\ __)  
> [ Mike Hicks | http://umn.edu/~hick0088/ | 
> mailto:hick0088 at tc.umn.edu ]
> 



More information about the mythtv-users mailing list