Commit Graph

3 Commits

Author SHA1 Message Date
Eugene Syromyatnikov
c0cf981ec8 xlat: provide fallback definitions for V4L2_CID_* constants
* xlat/v4l2_control_id_bases.in: New file with fallback definitions.
* xlat/v4l2_control_ids.in: Add fallback definitions.
* v4l2.c: Reorder includes, include "xlat/v4l2_control_id_bases.h",
remove legacy V4L2_CID_* constant definitions.
2018-05-06 15:34:41 +00:00
Eugene Syromyatnikov
79377eeaaf xlat: update V4L2_CID_* constants
Synchronise v4l2_control_ids list with the one provided by kernel's
include/uapi/linux/v4l2-controls.h.  A few notes:
 - V4L2_CID_CHROMA_GAIN and V4L2_CID_COLORFX_CBCR moved in accordance
   with their position/values.
 - V4L2_CID_WHITENESS is removed as it has the same value as
   V4L2_CID_GAMMA.
 - V4L2_CID_PRIVATE_BASE is removed.
 - V4L2_CID_HCENTER and V4L2_CID_VCENTER that were removed by Linux
   commit v3.9-rc1~93^2~237, are retained for historical reasons.

* xlat/v4l2_control_ids.in: Update.
2018-05-06 15:34:41 +00:00
Philippe De Muyter
0cc961440b Implement Video4Linux video-input ioctls decoder
Introduce v4l2.c, a decoder for the arguments of the video-input subset
of the v4l2 ioctl's.  This is a combination of
- previous work by Peter Zotov <whitequark@whitequark.org>, found at
https://gist.githubusercontent.com/whitequark/1263207/raw/strace-4.6-v4l2-ioctls.patch
- previous work by William Manley <will@williammanley.net>, found at
http://marc.info/?l=strace&m=139395588520675
- forward port, additions and fixes by Philippe De Muyter <phdm@macqel.be>

As v4l2 is a moving target, I have made v4l2.c compilable with ancient
linux kernels by testing the availability of some macros.  It has been
succesfully compiled on linux 3.10, 3.1, 2.6.31 and 2.6.22, and
succesfully used on linux 3.10 with a camera device.

* configure.ac: Check for availabilty of V4L2_* enum constants.
* Makefile.am (strace_SOURCES): Add v4l2.c.
* defs.h (v4l2_ioctl): New prototype.
* ioctl.c (ioctl_decode): Use v4l2_ioctl.
* v4l2.c: New file.
* xlat/v4l2_*.in: New files.

Signed-off-by: Philippe De Muyter <phdm@macqel.be>
Cc: Peter Zotov <whitequark@whitequark.org>
Cc: William Manley <will@williammanley.net>
2014-11-04 15:27:31 +00:00