[Gambas-devel] v4l2 patch for gb.v4l

Benoît Minisini gambas at ...1...
Fri Feb 20 23:27:29 CET 2009


> Hi,
>
> IMHO the v4l code in G2 won't actually work on many cameras, I would
> consider it more of a "demo" than the finished article .. certainly the
> Logitec camera's I've bought recently "all" only work on v4l2. (I only have
> one camera for V4l testing which is ~ 5 years old)
>
> If the patch works on G2, great, however v4l->v4l2 is significant and the
> chances of it introducing "issues" into what should be the "release" code
> might be "high".
>
> I recall we did have a number of issues relating to memory leaks while
> getting this code going - I don't know how many of these were down to G3
> development and how many were exposed / inherent issues ..
>
> (if v4l2 is required in G2, it "might" be a better idea to back-port the
> new v4l2 code ??)
>
> Gareth.
>

The memory leaks were just bugs in the new gb.image component. They should all 
be gone now.

I think the better way of dealing with v4l is using the libv4l library Silvan 
talked about: http://hansdegoede.livejournal.com/3636.html. This library seems 
to be able to use v4l1 and v4l2 indifferently: it provides a v4l1-like API to 
v4l2 device, so you can use the same code for both. You have an API for v4l2-
only devices too, and a library that converts between different device image 
formats.

What do you think about that?

-- 
Benoît




More information about the Devel mailing list