[Gambas-devel] Video4Linux2 compile error svn Gambas 3 on Ubuntu Hardy 8.04

Benoît Minisini gambas at ...1...
Sun Jul 26 20:37:38 CEST 2009


> On Saturday 25 July 2009, Benoît Minisini wrote:
> > > O yes, you can get it :)
> > >
> > > The biggest change is in the gv4l2.c file
> > >
> > > gv4l2.c is after adding my code
> > > gv4l2.c.org is the version made by gareth in the past
> > >
> > > The effective problem is the case statement.
> > >
> > > #ifdef V4L2_PIX_FMT_SBGGR16
> > > 		case V4L2_PIX_FMT_SBGGR16: 	gv4l2_debug("SBGGR16"); break;
> > > #endif
> > >
> > > 		case V4L2_PIX_FMT_MJPEG: 	gv4l2_debug("MJPEG"); 	break;
> > >
> > > The V4L2_PIX_FMT_SBGGR16 constant is not in every videodev2.h released
> > > in time. Ubuntu use a older version then Gareth(Mmandriva) and Gareth
> > > has his file included in his code and added a line to the 'CWebcam.h'
> > > file. This file is invalid for the runtime version for the distribution
> > > the user is using. For my solution that line must be marked as comment.
> > >
> > > The difference consist of two changes.
> > > 1) I marked blocks of not supported formats as comment
> > > 2) For some formats I surround the format with a IFDEF/ENDIF to switch
> > > of the case line if the format is not specified in videodev2.h file.
> > >
> > > The best solution IMHO is to comment( or remove) all the case lines for
> > > not supported formats.
> > > Gareth was against the delete as it is valuable info about those
> > > formats exists for later maintenance, I agree with that too
> > > Best regards,
> >
> > Thanks, I committed your changes. I put between #if 0 ... #endif some
> > lines of codes in CWebcam.c, in the function CWEBCAM_source, because they
> > were dirty and I thought they were doing nothing real. If I was wrong,
> > please tell me, but please clean up this part of the code.
> >
> > > So there are only two files involved in my change:
> > > 1) 'CWebcam.h', 2) 'gv4l2.c'
>
> You did use to much files :(
>
> > > Code from trunk gambas3 revision ??? (~1860) in v4l2_src.tar.gz
> > >
> > > Ron_1st
>
> ----8<----
>
> > I have no news from Gareth for a long time. But if you can enhance the
> > component in a sane, beautiful and powerful way, don't hesitate! :-)
> >
> > Just explain things in detail, as I don't know anything about v4l,
> > camera, tuner, etc. I will be able to give you advices about the
> > component interface.
> >
> > Best regards,
>
> Hello Benoit,
>
> You did merge to much in the v4l code.
>
> The only files involved are gbv4l2.c and Cwebcam.h
>
> gbv4l2.c :
>   These correct only the compile pass for the unsupported V4L2_PIX_FMT_????
> case lines.
>
> Cwebcam.h :
>   Does remove the wrong 'include videodev.h' included by Gareth from alien
> distribution. It does work on his system but for ubuntu (or other
> distributions) it contains invalid declarations. (Users should use the
> version delivered by there distribution and not a grab somewhere on the
> web)
>
> CWebcam.c was my working file and has code from v4l2 documentation as
> prework for v4l2 support and should not be replaced at all.
>
> Sorry if I was misleading but I mentioned the 2 files involved.
>
>
>
> Best regards,
>
> Ron_1st
>

OK, I will revert CWebcam.c.

Don't you want a svn write account so that you can commit your changes 
directly? It will be far easier for both of us.


-- 
Benoît




More information about the Devel mailing list