Ragga Muffin wrote: > > Thanks everyone for the advice re which api/driver to use. > > I've started looking into the v4l2 api docs (at www.thedirks.org), the > timestamp feature is especially important in our app. > > However, I'm a bit confused about the multi-buffering. > I understand the module can be loaded with a parameter indicating memory > to reserve for buffers. This isn't actually a paramter reserving memory. What it does is limit the amount of memory a user can request for capture buffers. You definitely don't want a user to request 124MB of capture buffers on a machine with 128MB of memory! Just set this parameter to whatever you think is reasonable - just leave at least 16MB for the kernel and apps. > However, from the docs it seems the app has to take care of > setting up the buffers and then queuing and dequeuing them, right ? Setting up as in requesting, and mmap()ing. The memory allocation is done by the driver. > So my very silly question is, what is accomplished here > compared to setting up the buffering entirely in the user-space > application ? > (which I did with the current app using bttv) Buffering in a user-space app implies coppying the captured buffer into your buffer. This can be quite a high overhead during streaming capture of large images. Using v4l2 buffering allows you to just leave the data in the capture buffer until you are ready to use it. When you are done with the buffer, simply re-queue it. No extra copies required. -justin