Date: Sat, 19 May 2007 21:24:49 -0000 From: Hans Petter Selasky <hselasky@c2i.net> To: freebsd-current@freebsd.org Cc: Luigi Rizzo <rizzo@icir.org> Subject: Re: Video4Linux header files Message-ID: <200705192324.34663.hselasky@c2i.net> In-Reply-To: <20070519121417.A37468@xorpc.icir.org> References: <200705191730.06964.hselasky@c2i.net> <20070519121417.A37468@xorpc.icir.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 19 May 2007 21:14, Luigi Rizzo wrote: > On Sat, May 19, 2007 at 05:30:06PM +0200, Hans Petter Selasky wrote: > > Hi, > > > > The Video4Linux header files are dual BSD/GNU licensed! How nice! I want > > to put these into the kernel source tree. For example under > > /usr/src/sys/sys . > > > > The reason is that I want to implement a slightly modified version of the > > V4L so that I can have a well known Linux USB Webcam driver working on my > > FreeBSD using my new USB stack. > > > > Does anyone here have any comments on this ? > > the short answer is that in the short term you better rely on a port > e.g. v4lcompat > Ok. > The long answer is this: > There was a long discussion back in january about importing the > headers, and in the end the discussion somewhat stalled due to far > too many intertwined issues and the existence of a partial workaround > in ports/v4lcompat. > > As i recall/see it the problems were the following: > - licensing (at the time it was unclear; now this is solved); > - many v4l*-related programs are broken in various ways, typically > assuming that the existence of the v4l2 headers guarantees that the > OS supports the v4l2 api, so the program doesn't even try to check/use > v4l1 or something else at runtime. > At the moment, several of these ports get away with the problem by > ignoring it or removing v4l* support. Adding the headers in the base > system (which by itself is a desirable goal) requires working with > the maintainers to fix the build on the various os versions > (being ports not versioned, this could be slightly tricky). > - having v4l2 support makes no good to anyone now, since there is > no v4l2 driver available, and many linux v4l2 drivers use > USB2-isochronous transfers which are not supported on the current usb > stack; > - i don't know how problematic is this, but v4l2 headers seem to use > unnamed unions which, last time i tried, conflict with the compiler > setting used to build the kernel. While this is possibly an orthogonal > problem which we may have to address at some point (as unnamed unions > seem to be a common paradigm in linux headers), it is yet another hurdle. Unnamed unions are not so good. I suggest that we terminate unnamed unions with an "u". > > I suppose a suitable plan would be the following, but i have not had > the time to work on it: > > 1. add a v4lcompat build-dependency on the ports potentially affected, > making sure they still build correctly using v4l1 > 2. add v4l1 headers in the base system (possibly changing the v4lcompat > port to not install the headers if they are already in the base system); I want to put a V4L2.0 "videodev.h" under /usr/src/sys/sys/ with some modifications. What do you think about that? > 3. modify the vl4compat port to add the v4l2 headers, again fixing > any breakage in the builds > 4. as in step 2, add the v4l2 headers to the system, changing v4lcompat > as needed where the v4l* headers are in the base OS > Does anyone know which ports use the current Linux compat layer port and the v4lcompat port ? I think it is smarter to look forward. I'm going for V4L2.0 support in the FreeBSD kernel with some modifications. It looks much more coherent than the V4L1.0 support. --HPS PS: The Linux compat port is broken on FreeBSD-current, because "msleep" is being re-defined.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200705192324.34663.hselasky>