On Wed, 2003-06-25 at 18:23, Martin Collins wrote:
> 
> Me too, except mine suddenly started happening at the start of
> every recording and I have not been able to record for a couple of
> months now.

Here's something to check.  Is the startup of the recording incurring
too much overhead/latency?  I ran into an interesting problem with
starting up recordings.

If there was already a file with the same name as I was starting lavrec
with, and it was a largeish file (i.e. hundreds of MB) lavrec would
invariably fail with an audio ring buffer overflow.  The reason is/was
that the filesystem I was writing onto was ext3 and the act of opening
the file for writing (with truncation) was taking so long (clearing
filesystem block bitmaps, etc.) that the audio ring buffer would
overflow before things even got started.

> I guess Andrew Stevens should answer that but I'll have a go since I
> have rummaged throught the source trying to understand it (I didn't
> succeed, mind you). The ring buffer is in shared memory. The application
> sets it up and tells the sound driver where it is. The driver puts the
> sound data in it and signals the app that there is data ready. If the
> app doesn't take the sound data out quick enough it overflows.

That's pretty much what I figured too.

> I tend to agree that the problem is in the Marvel driver.

But it might not be the driver per se.  It might be well within the spec
of the encoder chip to take as long as it is when the picture is not
easily compressible, for example, when the horizontal sync is out, or
the picture goes snowy during a cable outage, etc.  Although even given
that, the driver should sleep and give back resources to the system.

> Lavrec seems
> to go in a loop: get a picture, get some sound, get a picture, etc. If
> for some reason it gets stuck waiting for a picture

In which case it should sleep and get other things running again.

> the ring buffer
> eventually overflows because the sound driver just carries on filling
> it up regardless.

Right.  This is what I suspect is going on every now and then on my
system.

> It might help in your case but in mine it seems the first picture
> never comes so it probably wouldn't help me.

Maybe you have some file opening overhead on your system as well.

> It's treating the symptom
> rather than the cause though.

True enough, if my suspicions are correct.

b.

-- 
Brian J. Murrell <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to