From a58a94e4c21465ede803c48162f1f791188a17f4 Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Tue, 8 Dec 2020 09:43:56 +0100 Subject: libcamera: Introduce camera sensor properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce a database of camera sensor properties, which contains information on the camera sensor which are not possible, or desirable, to retrieve from the device at run time. The camera sensor database is accessed through a static function and is indexed using the camera sensor model as reported by properties::Model. Signed-off-by: Jacopo Mondi Reviewed-by: Niklas Söderlund Reviewed-by: Laurent Pinchart --- .../libcamera/internal/camera_sensor_properties.h | 24 ++++++++++++++++++++++ include/libcamera/internal/meson.build | 1 + 2 files changed, 25 insertions(+) create mode 100644 include/libcamera/internal/camera_sensor_properties.h (limited to 'include') diff --git a/include/libcamera/internal/camera_sensor_properties.h b/include/libcamera/internal/camera_sensor_properties.h new file mode 100644 index 00000000..f5e242cb --- /dev/null +++ b/include/libcamera/internal/camera_sensor_properties.h @@ -0,0 +1,24 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2021, Google Inc. + * + * camera_sensor_properties.h - Database of camera sensor properties + */ +#ifndef __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__ +#define __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__ + +#include + +#include + +namespace libcamera { + +struct CameraSensorProperties { + static const CameraSensorProperties *get(const std::string &sensor); + + Size unitCellSize; +}; + +} /* namespace libcamera */ + +#endif /* __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__ */ diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build index 1fe3918c..6cff1b90 100644 --- a/include/libcamera/internal/meson.build +++ b/include/libcamera/internal/meson.build @@ -15,6 +15,7 @@ libcamera_internal_headers = files([ 'byte_stream_buffer.h', 'camera_controls.h', 'camera_sensor.h', + 'camera_sensor_properties.h', 'control_serializer.h', 'control_validator.h', 'delayed_controls.h', -- cgit v1.2.1