libcamera: controls: Generate an array of valid values

For each Control that supports enumerated values generate an array
of ControlValue which contains the full list of valid values.

At the expense of a slight increase in memory occupation this change
allows the construction of the ControlInfo associated with a Control
from the values list, defaulting the minimum and maximum values
reported by the ControlInfo.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Jacopo Mondi 2020-10-20 17:43:15 +02:00
parent 7a307fa647
commit ef7a07dd8a
3 changed files with 32 additions and 0 deletions

View file

@ -10,6 +10,7 @@
#ifndef __LIBCAMERA_CONTROL_IDS_H__
#define __LIBCAMERA_CONTROL_IDS_H__
#include <array>
#include <stdint.h>
#include <libcamera/controls.h>