]> git.sesse.net Git - vlc/commit
Rewrite V4L2 controls to keep a list of them (fix #5269)
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 28 Sep 2011 17:44:27 +0000 (20:44 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 1 Oct 2011 17:18:47 +0000 (20:18 +0300)
commitdfe2b31c279489c539416c431166e3bfe92992c2
tree6c4f72cde254b43f2aa9441d575ee345a2b12c2c
parentfd1218a32bd1d9261b4c9fc2eb25643f66a7f638
Rewrite V4L2 controls to keep a list of them (fix #5269)

The V4L2 plug-in is a bit peculiar with dynamically generated object
variables. We need to keep track of which controls/variables we have,
so that we can remove the variables callbacks later. The only other
way to solve this bug, that I could think of, consisted of extending
the VLC variables subsystem (which would be worse in code freeze).

This rewrite also fixes a few other bugs:
 * Support menu with non-zero based minumum choice
 * Support menu with discontinuous choices range
 * Redumdant use the extended controls API as fallback
   (This only makes sense to set more than one control at a time,
    or to set 64-bits and string controls. VLC does none of that.)
 * Unused "controls-update" and "allcontrols" variables.
 * Skipping disabled, read-only and volatile controls.

Support for the legacy control enumeration API (pre-2.6.18 kernel) is
removed; and the code is now independent of the VLC object type (it
could easily be reused for say, a V4L2 video output).
modules/access/v4l2/access.c
modules/access/v4l2/controls.c
modules/access/v4l2/demux.c
modules/access/v4l2/v4l2.h
modules/access/v4l2/video.c