[lkml]   [1998]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Dropped frames in video capture process
Vassili Leonov wrote:
> I'm testing the driver with the following simple command:
> cp /dev/video /dev/null
> When I don't touch anything - fields are not lost, but as soon as I
> start touching X11 windows, I'm getting several frames dropped. Since
> frames are coming at a rate of 60Hz, and there are 4 buffers, if
> interrupt is not serviced within 64 msec frame would be lost. First of
> all - is this normal for Linux to have a latency over 50msec, or
> something else is wrong on my system (K6,233MHZ).

60Hz is nothing. Every modem does much more. It's definitely not
the interrupt latency. Better look at your driver. May be, it's
not waking up the reader (or at the wrong place).

> Note, it's not enough to service interrupt within 64msec, I also need to
> transfer the data into the application that is reading from the driver.
> The total rate is about 6Mb/sec for the least degree of compression.

That may be your problem. Linux is not a real-time OS. Latency in
user space is undefined. And if there are two task who want to run,
CPU time is spread between them (100Hz resolution).
Are you really sure, that the driver is dropping frames (lost ints)
and not the user space app?

Your could try to play with task priorities or scheduling policies
(man 1 nice, man 2 sched_setscheduler).

Ciao, ET.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:45    [W:0.043 / U:15.048 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site