Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: Stop writing video 2MB before disk full [was Drop supportfor multiplevideo dirs?]



On Sun, Oct 05, 2003 at 10:35:41PM +0200, Klaus Schmidinger wrote:
> "M. Fiegert" wrote:
> >
> > Clemens Kirchgatterer schrieb:
> >
> > >Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de> wrote:
> > >
> > >
> > >
> > >>Well, 1-2MB is next to _nothing_ when dealing with video data files.
> > >>So I guess it will have to be a _lot_ more than that.
> > >>Or was this just a typo and it should have read 1-2GB (gigabyte)?
> > >>
> > >>
> > >
> > >i think he really meant only a few MBs. just don't fill the whole disk
> > >completely to let room for small administrative files as the resume file
> > >for example.
> > >
> > Yes, thats exactly the point.
> > If a video has to stop 2MB earlier that is almost unnoticable.
> > But if the disk is completley full, vdr gets real problems and behaves
> > quite strange because of the administrative files like
> > resume, marks, links,....
>
> Sure, 2MB might be enough for such stuff, but 2MB in video data
> is about 4 seconds, which means that VDR would have to check
> the free disk space at a rather high rate. Besides, I'd really

Oh no, please _dont_ do the frequently "df" stuff here :-(

> suggest to leave at least a few hundred MB free. After all, this is
> a disk that has a capacity of several GB - or else it wouldn't be used
> for recording video ;-)

How about the following idea:

1. VDR creates a ("empty") file "/video0/spare" with a user defined
   size ( >= 1GB ... ) if it does not exist anyway

2. If VDR's write() to disk fails with errno==ENOSPC (No space left on device)
   2.1 Stop the current (and maybe any other recordings)
   2.2 Remove the file "/video0/spare"
   2.3 Stop VDR (with fatal exit code)

Problem solved?

> Klaus

Ciao,
Andreas
--
Andreas Kool (akool<nospam>@</nospam>gmx.de * http://akool.bei.t-online.de)


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index