[Gambas-devel] Video4Linux2 compile error svn Gambas 3 on Ubuntu Hardy 8.04
Benoît Minisini
gambas at ...1...
Sat Jul 25 16:40:39 CEST 2009
>
> 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'
>
> Code from trunk gambas3 revision ??? (~1860) in v4l2_src.tar.gz
>
> Ron_1st
>
>
> PS:
> I did post about this change here in the list several times
> found:
> [Gambas-devel] unknown V4L2_PIX_FMT_???? formats at 2009-01-24 18:40
> [Gambas-devel] gbv4l2.c missing some V4L2_PIX_FMT_ format declaration
> kubunt 8.04 at 2009-01-28 20:04
> and my patch
> [Gambas-devel] gb.v4l rework the gv4l2.c at 2009-02-22 17:51
> [Gambas-devel] gb.v4l rework the gv4l2.c at 2009-02-22 17:53 (gv4l2c.zip)
> I do not have the mood to reread it all again.
> For me I just put "my" gv4l2.c and see what happens.
> I did start a new v4l2 project but my actual split to seperate parts where
> not welkom at that time.
> I did need support for more as ONE camera and some with sound and/or a
> tuner.
>
>
> Just some old brainstorm:
> dim camdev as new v4ldev("BT878") 'the device from v4l2
> dim tuner1 as new v4ltuner('"DVBT") ' add the tuner
> dim tuner2 as new v4ltuner('"DVBC") ' an other type tuner
> dim sound1 as new v4lsound("bt878snd") ' where sound come from
> tun.channels.load=file("channels.txt") 'I want to see TV5, ARD, RTL
> camdev.tuner=tuner1
> camdev.sound=sound1
> camdev.ctrl.load=file("control.txt") ' my default image/sound settings
> camdev.ctrl.volume=25 ' always use at start now in percent
> camdev.ctrl.brightness=50 ' same for the image
>
> This way you could add those available parts to the device you need.
> The idea was to make a general component usable for webcam and other
> video/tv cards.
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,
--
Benoît
More information about the Devel
mailing list