[Gambas-devel] v4l2 patch for gb.v4l

Ron_1st ronstk at ...124...
Fri Feb 20 11:01:03 CET 2009

On Friday 20 February 2009, Gareth Bult wrote:
> Erm, which version of Gambas is the patch against?
> (SVN already has full V4L2 support ... ????)
> ----- Original Message -----
> From: "Silvan Calarco" <silvan.calarco at ...531...>
> To: "Gambas-devel" <gambas-devel at lists.sourceforge.net>
> Sent: Friday, 20 February, 2009 3:32:01 AM GMT +00:00 GMT Britain, Ireland, Portugal
> Subject: [Gambas-devel] v4l2 patch for gb.v4l
> Hello.
> attached is a patch I wrote for a customer who needs support for a v4l2 webcam 
> (it's a Logitech QuickCam 9000 Pro) in gambas. 
> The patch integrates the example code from v4l2 api documentation 
> (http://v4l2spec.bytesex.org/spec/capture-example.html) in a way that should 
> be backwards compatibile (v4l1). The patch is at a basic and ugly level and 
> only supports YUYV to BGR24 pixel format conversion (the function is taken 
> from libv4l though the library could be used for most pixel formats support), 
> but with some work it might be of wider interest so I'm posting it here.
> Silvan
> -- 
> mambaSoft di Calarco Silvan
> Web: http://www.mambasoft.it
> mambaSoft Store @ http://shop.mambasoft.it
> openmamba GNU/Linux development @ http://www.openmamba.org
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel

Still the problems with unknown v4l2 formats.
The include for the inserted videodev.h should be in the C source that needs it, 
not the gambas component that uses the C code generated object.
This way the gambas commponent can't replaced by some other component code
because the .c is more or less corrupt IMHO.

The best would be not to check fantasy formats not supported and tell the
value used in the case into the error message.

Best regards,


 A: Delete the text you reply on.
 Q: What to do to get my post on top?
 A: Because it messes up the order in which people normally read text. 
 Q: Why is top-posting such a bad thing? 
 A: Top-posting. 
 Q: What is the most annoying thing in e-mail? 

More information about the Devel mailing list