On Tue, 2009-06-30 at 20:19 +0200, Ron wrote: > Is it do-able to backport V4L2 to Gambas stable? > > I find a lot of video cams/devices using this version, and they do not > seem to work with the current component. > > It gets a bit useless as time goes by.... > > Anyone has taken a shot at this yet? > > Kind regards, > Ron_2nd. > > ------------------------------------------------------------------------------ > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user >
Basicly its a problem that gambas2 is v4l1 and now most distros use v4l2 So you need to have v4lcompat and preload it like this for 64bit LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so (application name) for _86 LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so (application name) In code you can try something like this Public Sub Main() DIM myname AS String DIM myarch AS String SHELL "uname -p" TO myarch 'frmMain.Show IF Application.Args.Count <> 2 THEN IF InStr(myarch, "64") <> 0 THEN myname = "LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so " & Application.Name & " v4l" PRINT "Launch program with 64 bit v4l1compat.so" ELSE myname = "LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so " & Application.Name & " v4l" PRINT "Launch program with 32 bit v4l1compat.so" END IF PRINT myname SHELL myname WAIT QUIT ELSE IF Application.Args[1] <> "v4l" THEN QUIT 'else continue frmMain.Show 'this is the form to start. END IF End This will relaunch your program preloading v4lcompat Benniot said it is fixed in version 3 ------------------------------------------------------------------------------ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user