]> granicus.if.org Git - strace/commit
Implement Video4Linux video-input ioctls decoder
authorPhilippe De Muyter <phdm@macqel.be>
Mon, 3 Nov 2014 20:27:40 +0000 (21:27 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 4 Nov 2014 15:27:31 +0000 (15:27 +0000)
commit0cc961440b527ff8c16954fc411a1529072edb92
treedf149d0a7e21506c474d2387f591e76a18d449e5
parent749c2218e100f33619ecd1ce507466f72700e653
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>
21 files changed:
Makefile.am
configure.ac
defs.h
ioctl.c
v4l2.c [new file with mode: 0644]
xlat/v4l2_buf_flags.in [new file with mode: 0644]
xlat/v4l2_buf_types.in [new file with mode: 0644]
xlat/v4l2_capture_modes.in [new file with mode: 0644]
xlat/v4l2_colorspaces.in [new file with mode: 0644]
xlat/v4l2_control_classes.in [new file with mode: 0644]
xlat/v4l2_control_flags.in [new file with mode: 0644]
xlat/v4l2_control_ids.in [new file with mode: 0644]
xlat/v4l2_control_types.in [new file with mode: 0644]
xlat/v4l2_device_capabilities_flags.in [new file with mode: 0644]
xlat/v4l2_fields.in [new file with mode: 0644]
xlat/v4l2_format_description_flags.in [new file with mode: 0644]
xlat/v4l2_frameinterval_types.in [new file with mode: 0644]
xlat/v4l2_framesize_types.in [new file with mode: 0644]
xlat/v4l2_input_types.in [new file with mode: 0644]
xlat/v4l2_memories.in [new file with mode: 0644]
xlat/v4l2_streaming_capabilities.in [new file with mode: 0644]