Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2012 21:20:25 +0100
From:      Koop Mast <kwm@rainbow-runner.nl>
To:        Juergen Lock <nox@jelal.kn-bremen.de>
Cc:        freebsd-multimedia@freebsd.org
Subject:   Re: v4l_compat lacks V4L2_PIX_FMT_JL2005BCD (and others)
Message-ID:  <1330028425.3227.4.camel@crashalot.rainbow-runner.nl>
In-Reply-To: <201202231854.q1NIsgc8088888@triton8.kn-bremen.de>
References:  <4F32E19A.4050208@googlemail.com> <4F3628F4.4000303@freebsd.org> <4F380CD9.8030308@googlemail.com> <201202122003.39874.hselasky@c2i.net> <201202231854.q1NIsgc8088888@triton8.kn-bremen.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2012-02-23 at 19:54 +0100, Juergen Lock wrote:
> In article <4F4131AA.5080207@googlemail.com> you write:
> >On 2/12/12 8:03 PM, Hans Petter Selasky wrote:
> >> On Sunday 12 February 2012 20:02:49 Gregor Jasny wrote:
> >>> I prepared an updated v4l_compat archive based on Linux 3.3-rc3 (diff
> >>> attached). You can download the tarball here:
> >>>
> >>> http://alioth.debian.org/~gjasny-guest/v4l_compat-3.3-rc3.tar.gz
> >>>
> >>> Would it be possible to push this into FreeBSD 9 ports tree?
> >> 
> >> Hi,
> >> 
> >> Looks good, though it should be compile tested with some existing V4L 
> >> applications first, like VLC, mplayer, pwcview ...
> >
> >I prepared another tarball (fixes ivtv header and directory structure):
> >http://alioth.debian.org/~gjasny-guest/v4l_compat-3.3-rc4.tar.gz
> >
> >I successfully build libv4l, webcamd and pwcview with it.
> 
> Hi!
> 
>  I finally got around looking at this and found at least two patches
> are missing in your tarball:
> 
> diff -upr v4l_compat-3.3-rc4/linux/dvb/frontend.h /usr/local/include/linux/dvb/frontend.h
> --- v4l_compat-3.3-rc4/linux/dvb/frontend.h	2012-02-19 16:19:51.000000000 +0100
> +++ /usr/local/include/linux/dvb/frontend.h	2011-09-18 06:15:16.000000000 +0200
> @@ -396,7 +373,13 @@ struct dtv_properties {
>  };
>  
>  #define FE_SET_PROPERTY		   _IOW('o', 82, struct dtv_properties)
> -#define FE_GET_PROPERTY		   _IOR('o', 83, struct dtv_properties)
> +/* 
> + * This is broken on linux as well but they workaround it in the driver.
> + * Since this is impossible to do on FreeBSD fix the header instead.
> + * Detailed and discussion :
> + * http://lists.freebsd.org/pipermail/freebsd-multimedia/2010-April/010958.html
> + */
> +#define FE_GET_PROPERTY		   _IOW('o', 83, struct dtv_properties)
>  
> 
>  /**
> diff -upr v4l_compat-3.3-rc4/linux/input.h /usr/local/include/linux/input.h
> --- v4l_compat-3.3-rc4/linux/input.h	2012-02-19 16:18:52.000000000 +0100
> +++ /usr/local/include/linux/input.h	2011-09-18 06:15:16.000000000 +0200
> @@ -140,8 +140,12 @@ struct input_keymap_entry {
>  #define EVIOCGREP		_IOR('E', 0x03, unsigned int[2])	/* get repeat settings */
>  #define EVIOCSREP		_IOW('E', 0x03, unsigned int[2])	/* set repeat settings */
>  
> -#define EVIOCGKEYCODE		_IOR('E', 0x04, unsigned int[2])        /* get keycode */
> -#define EVIOCGKEYCODE_V2	_IOR('E', 0x04, struct input_keymap_entry)
> +/*
> + * These two need to be _IOWR not _IOR (they're wrong on Linux too but
> + * there the driver doesn't care.)
> + */
> +#define EVIOCGKEYCODE		_IOWR('E', 0x04, unsigned int[2])       /* get keycode */
> +#define EVIOCGKEYCODE_V2	_IOWR('E', 0x04, struct input_keymap_entry)
>  #define EVIOCSKEYCODE		_IOW('E', 0x04, unsigned int[2])        /* set keycode */
>  #define EVIOCSKEYCODE_V2	_IOW('E', 0x04, struct input_keymap_entry)
>  
> 
>  With those applied I build- and runtime-tested successfully (from
> ports) v4l-utils (ir-keytable needs the second patch), vdr (which
> needs the first), and mplayer for dvb and pwcview for v4l2.
> 
>  Thanx! :)
> 	Juergen
> 
> PS: patch also at:
> 
> 	http://people.freebsd.org/~nox/tmp/v4l_compat-3.3-rc4.patch

Hey, Just to note that I will soon sort this mess out. And update the
ports. Gregor is updating to libv4l 0.8.6 enough? Because I use the
headers from v4l-utils in v4l_compat.

-Koop




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1330028425.3227.4.camel>