[vlc-commits] Rewrite V4L2 controls to keep a list of them (fix #5269)

Rémi Denis-Courmont git at videolan.org
Sat Oct 1 19:19:48 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Sep 28 20:44:27 2011 +0300| [dfe2b31c279489c539416c431166e3bfe92992c2] | committer: Rémi Denis-Courmont

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).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dfe2b31c279489c539416c431166e3bfe92992c2
---

 modules/access/v4l2/access.c   |    1 +
 modules/access/v4l2/controls.c |  878 ++++++++++++++++------------------------
 modules/access/v4l2/demux.c    |    1 +
 modules/access/v4l2/v4l2.h     |   12 +-
 modules/access/v4l2/video.c    |    2 +-
 5 files changed, 369 insertions(+), 525 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=dfe2b31c279489c539416c431166e3bfe92992c2


More information about the vlc-commits mailing list