Webcam support in Squeak (for OLPC)

Mauro Carvalho Chehab mchehab at infradead.org
Tue Mar 6 16:35:56 EST 2007


Em Ter, 2007-03-06 às 09:02 -0700, Jonathan Corbet escreveu:
> Diego Gomez Deck <DiegoGomezDeck at consultar.com> wrote:
> 
> > The Squeak V4L code fallback to use read(), but the performance is
> not
> > good.
> 
> I'm curious as to why that is.  The read() interface is not the
> preferred way to go, but it should not perform notably worse than
> using
> mmap(). 
Yes. In thesis, you should lose the meta info provided by the mmap()
method, and lose some time by copying from kernel's buffer into
userspace. Shouldn't be so bad in terms of performance.

> > This situation shots those questions:
> > 
> > - Can the cafe driver capture using MMAP?
> 
> The driver supports the V4L2 streaming interface using in-kernel
> buffers; it does not currently support user-space buffers.

User-space buffers is somewhat not used by userspace apps. Should be ok,
IMO.
> 
> > - In affirmative case, where I can find a piece of code that make it
> > works? (NOTE: The capture.c example provided by the V4L2 api DOESN'T
> > work on the OLPC).
> 
> I've never actually tried capture.c, but a quick glance suggests that
> it
> should work as long as you don't use the -u flag.  Could you tell me
> what problems you have run into (off-list might be best) and we'll
> take
> it from there?
I did some tests with xawtv, using mmap method on OLPC B1 and worked
just fine. It should also work with capture. I've also tested with an
mmap conformance program that we have on v4l-dvb tree, and the mmap api
seemed to be properly implemented.
> 
> Thanks,
> 
> jon 
-- 
Cheers,
Mauro




More information about the Devel mailing list