v4l-utils, v4l_compat and (k)FreeBSD

Juergen Lock nox at jelal.kn-bremen.de
Tue Jun 26 19:12:48 UTC 2012


In article <201206221638.02708.hselasky at c2i.net> you write:
>On Friday 22 June 2012 09:50:37 Gregor Jasny wrote:
>> Hello,
>> 
>> I'm the Debian Maintainer of v4l-utils and upstream contributor to
>> v4l-utils. Some time ago I converted the hand crafted Makefile base
>> build system to autotools which helped portability (iconv, argp, dl) a
>> lot. I looked at the patches against the libv4l/v4l-utils port and
>> changed the v4l-utils development version accordingly. One remaining
>> issue was the dependency of (k)FreeBSD on processed v4l/dvb headers. The
>> v4l_compat port gets synced from time to time but is always behind the
>> latest version.
>> 
>> This makes it impossible to even cnmpile test v4l-utils on the BSDs. So
>> I looked at the diffs between the original V4L headers and the one in
>> v4l_compat and came up with some sed rules and a quilt patch series.
>> 
>
>Hi,
>
>> You can find the bsdify.sh script here:
>> http://git.linuxtv.org/v4l-utils.git/tree/HEAD:/contrib/freebsd
>> 
>
>Your script looks good!
>
>> I also wired the sed and quilt rules into the sync-with-kernel target so
>> the processed files become a part of v4l-utils. So they'll always be on
>> par with the Linux ones.
>> 
>> Unfortunately I won't find time to test v4l-utils with webcamd during
>> the next month. Maybe someone from the FreeBSD multimedia team could
>> step in?
>
>Webcamd does not use these header files as of newer releases. It uses the ones 
>that ship with the Linux kernel sources without any modifications. However, 
>other applications use this port and needs to be tested.
>
I tested the script with the Linux headers from the latest webcamd
port (3.6.0.1 which uses the media tree for_3.6 branch), and found
v4l-utils needed this patch:

--- utils/v4l2-compliance/v4l2-test-input-output.cpp
+++ utils/v4l2-compliance/v4l2-test-input-output.cpp
@@ -156,7 +156,7 @@ int testTuner(struct node *node)
 int testTunerFreq(struct node *node)
 {
 	struct v4l2_frequency freq;
-	enum v4l2_tuner_type last_type = V4L2_TUNER_ANALOG_TV;
+	/* enum v4l2_tuner_type*/ int32_t last_type = V4L2_TUNER_ANALOG_TV;
 	unsigned t;
 	int ret;
 
>> 
>> Note: currently you still need these two patches to compile on (k)FreeBSD:
>> > http://anonscm.debian.org/gitweb/?p=collab-maint/libv4l.git;a=tree;f=debi
>> > an/patches;h=90c8fa7f37eecc508db4b0151e35d5e736474b67;hb=refs/heads/debia
>> > n-0.9.x
>> 
>> I'd love to release v4l-utils 0.10 with proper (k)FreeBSD support.
>
>Thank you! V4L works great in FreeBSD userspace as far as I'm aware!
>
>Koop: How do we go ahead with this one?

 We discussed this yesterday a bit and I think we need the libv4l
port to depend on the webcamd port's patch target to get its Linux
headers, that way the _IOWR etc fixes are included (of which we
discovered two new ones for ca.h today btw), and the generated
headers match what webcamd supports.

 Oh and the sed -i target needs to be changed into sed -i.bak to
work with BSD sed.

 Thanx, :)
	Juergen


More information about the freebsd-multimedia mailing list