Add a set of data types to support controls: - ControlValue stores a control type and value in a generic way - ControlId enumerates all the control identifiers - ControlIdentifier declares the types of a control and map their names - ControlInfo stores runtime information for controls - ControlList contains a set of control info and value pairs The control definitions map is generated from the controls documentation to ensure that the two will always be synchronised. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
36 lines
649 B
C++
36 lines
649 B
C++
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
/*
|
|
* Copyright (C) 2019, Google Inc.
|
|
*
|
|
* control_ids.h : Control ID list
|
|
*/
|
|
|
|
#ifndef __LIBCAMERA_CONTROL_IDS_H__
|
|
#define __LIBCAMERA_CONTROL_IDS_H__
|
|
|
|
#include <functional>
|
|
|
|
namespace libcamera {
|
|
|
|
enum ControlId {
|
|
};
|
|
|
|
} /* namespace libcamera */
|
|
|
|
namespace std {
|
|
|
|
template<>
|
|
struct hash<libcamera::ControlId> {
|
|
using argument_type = libcamera::ControlId;
|
|
using result_type = std::size_t;
|
|
|
|
result_type operator()(const argument_type &key) const noexcept
|
|
{
|
|
return std::hash<std::underlying_type<argument_type>::type>()(key);
|
|
}
|
|
};
|
|
|
|
} /* namespace std */
|
|
|
|
#endif // __LIBCAMERA_CONTROL_IDS_H__
|