Files
external_libcamera/include/libcamera/internal/camera_sensor_properties.h
Hirokazu Honda 5148c0aa7e libcamera: camera_sensor: Reference test pattern modes by enum type
The CameraSensor stores TestPatternModes as an int32_t. This prevents
the compiler from verifying the usage against the defined enum types.

Fix references to the TestPatternMode to store the value as the
TestPatternModeEnum type which is defined by the control generator.

Signed-off-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
2021-12-06 17:41:45 +01:00

26 lines
533 B
C++

/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2021, Google Inc.
*
* camera_sensor_properties.h - Database of camera sensor properties
*/
#pragma once
#include <map>
#include <string>
#include <libcamera/control_ids.h>
#include <libcamera/geometry.h>
namespace libcamera {
struct CameraSensorProperties {
static const CameraSensorProperties *get(const std::string &sensor);
Size unitCellSize;
std::map<controls::draft::TestPatternModeEnum, int32_t> testPatternModes;
};
} /* namespace libcamera */