[Gambas-devel] V4L2 for Gambas ...

Benoit Minisini gambas at ...1...
Sat Jan 17 01:16:45 CET 2009


On samedi 17 janvier 2009, Benoit Minisini wrote:
> On samedi 17 janvier 2009, Gareth Bult wrote:
> > Hi,
> >
> > After plugging in a new camera and finding it only supports V4L2 and
> > hence doesn't work (at all) with the Gambas V4L interface, I sat down and
> > re-coded a component from scratch for V4L2. This is now working and
> > includes conversion routines for non-RGB devices. (the #2 API is actually
> > quite different to #1)
> >
> > To get a clean start, I've called it "VideoDevice2" and apart from that
> > (and a few properties I'm still in the process of implementing) it's a
> > drop in replacement for the current "VideoDevice" object.
> >
> > Question:: should I submit this as a new module / new object type, or
> > should I try to integrate it into VideoDevice such that people don't need
> > to worry about whether they are using V4L or V4L2 ? (i.e. so a new object
> > type is not needed?)
> >
> > Gareth.
>
> Is V4L2 compatible with V4L? I mean, do all V4L features exist in V4L2?
>
> Apparently no user library is needed to use V4L or V4L2, so you can use
> both API in the same module, with the same interface.
>
> If V4L can be entirely replaced by V4L2, then you can just use V4L2, and
> drop the old code.
>
> Otherwise, you must think how you can know when you must use V4L, and when
> you must use V4L2. If you can't decide, then add an optional argument to
> the VideoDevice constructor that will tell which API to use.
>
> Regards,

To answer more clearly to your question: do not create a new module, just work 
in the current gb.v4l.

-- 
Benoit Minisini




More information about the Devel mailing list