v4l_compat lacks V4L2_PIX_FMT_JL2005BCD (and others)
Juergen Lock
nox at jelal.kn-bremen.de
Thu Feb 23 19:13:49 UTC 2012
In article <4F4131AA.5080207 at 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
More information about the freebsd-multimedia
mailing list