[Gambas-devel] Webcam mods (Logitec Quickcam 4000 etc) :: testers wanted ...
Gareth Bult
gareth at ...560...
Mon Jan 19 17:48:33 CET 2009
Ok,
Answering my own question ( :) ) modifying the demo to read;
Picturebox.Picture = hWebCam.Image.Picture works
(from Picturebox.Picture = hWebCam.Picture)
.. is this the way it "should" be done?
I now have the basic V4L2 code integrated and am running two webcams side by side, looks fine in my demo program .. however I notice there is some flicker on the "MyWebCam" demo, and I'm not sure where it's coming from. (again, not seeing it on my demo) I guess this is going to be attributes set on visual components (?) but I can't spot the difference.
Anyway, subject to implementing some of the more trivial properties (width, height etc..) I'm pretty much done.
Just need SVN details for "oddjobz" ..
Gareth.
----- Original Message -----
From: "Gareth Bult" <gareth at ...560...>
To: "mailing list for gambas developers" <gambas-devel at lists.sourceforge.net>
Sent: Monday, 19 January, 2009 3:19:19 PM GMT +00:00 GMT Britain, Ireland, Portugal
Subject: Re: [Gambas-devel] Webcam mods (Logitec Quickcam 4000 etc) :: testers wanted ...
Ok ... now you've remove the "Picture" property from gb.v4l, how to we convert from GB.IMAGE back to "Picture" for use with Gambas Picture objects ???
(these changes break the sample programs too ...)
----- Original Message -----
From: "Benoit Minisini" <gambas at ...1...>
To: "mailing list for gambas developers" <gambas-devel at lists.sourceforge.net>
Sent: Friday, 16 January, 2009 11:14:37 PM GMT +00:00 GMT Britain, Ireland, Portugal
Subject: Re: [Gambas-devel] Webcam mods (Logitec Quickcam 4000 etc) :: testers wanted ...
On vendredi 9 janvier 2009, Gareth Bult wrote:
> Hi,
>
> Attached is my version of CWebcam.c, if anyone can give this a try I would
> very much appreciate it. (against trunk)
>
> Issues;
>
> The current V4L2 assumes that the camera will return an RGB signal that it
> can stuff directly into a "Picture" or "Image" object. - not always the
> case, for example with the Logitec QuickCam 4000 (and I'm sure quite a few
> others) .
>
> As a result, a post-processor is required to convert from the Camera's
> format (in this case yuv420p) to RGB. I've inserted a hook so this (and
> possibly other) post-processing routines can be added. The actual
> conversion routine I've hijacked directly from "Camorama", pretty much no
> tweaking required.
>
> In addition and just to make life interesting, the VIDIOCGMBUF ioctl seems
> to be partially broken, not sure if it's specific to the driver for this
> camera or if it's a wider issue, however it seems to return a fixed buffer
> size and frame count, regardless of the resolution specified. For 320x240
> this is fine, two frames will fit in the allocated space and it works fine.
> However, for 640x480 it returns sufficient memory for 1 frame, but
> specifies two frames in the header - not good! (this breaks gambas pretty
> quickly) So I've included a fix to rewrite the "mbuf" field IF the contents
> are invalid, i.e. if the widthxheightxdepthxframes is greater than the
> allocated size.
>
> I'm hoping that none of this affects standard RGB cameras, again if someone
> could test I would appreciate it.
>
> If you drop this into the v4l/src directory and do a make install, if your
> Logitec wasn't working, running the webcam demo should now work.
>
> .. I'm new to hacking Gambas so if I've done something bad re; memory etc ,
> please let me know...
>
>
> Regards,
> Gareth.
Hi, Gareth:
I have completely redesigned the internal memory image management in Gambas
since revision #1803.
Now there is a gb.image component that will centralize the most possible
function about images. And, especially, the conversion between different
image formats.
The image component can deal with 32 bits RGBA, RGB, BGR and BGRA formats
only, but it can convert between more different formats.
Can you take a quick look at that component to see if the YUV conversion you
inserted in the gb.v4l component worth being put in that component?
I have ported all components to this new design, and so CWebcam.c. Do you want
a svn write access, so that you can commit your changes directly in it? I
will have less work if I don't have to do it myself!
Regards,
--
Benoit Minisini
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gambas-devel mailing list
Gambas-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-devel
--
Managing Director, Encryptec Limited
Tel: 0845 5082719, Mob: 0785 3305393
Email: gareth at ...560...
Statements made are at all times subject to Encryptec's Terms and Conditions of Business, which are available upon request.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Gambas-devel mailing list
Gambas-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-devel
--
Managing Director, Encryptec Limited
Tel: 0845 5082719, Mob: 0785 3305393
Email: gareth at ...560...
Statements made are at all times subject to Encryptec's Terms and Conditions of Business, which are available upon request.
More information about the Devel
mailing list