libcamera/test
Laurent Pinchart a8c40942b9 libcamera: controls: Improve the API towards applications
Rework the control-related classes to improve the API towards
applications. The goal is to enable writing code similar to

	Request *req = ...;
	ControlList &controls = req->controls();
	controls->set(controls::AwbEnable, false);
	controls->set(controls::ManualExposure, 1000);

	...

	int32_t exposure = controls->get(controls::ManualExposure);

with the get and set operations ensuring type safety for the control
values. This is achieved by creating the following classes:

- Control defines controls and is the main way to reference a control.
  It is a template class to allow methods using it to refer to the
  control type.

- ControlId is the base class of Control. It stores the control ID, name
  and type, and can be used in contexts where a control needs to be
  referenced regardless of its type (for instance in lists of controls).
  This class replaces ControlIdentifier.

- ControlValue is kept as-is.

The ControlList class now exposes two template get() and set() methods
that replace the operator[]. They ensure type safety by infering the
value type from the Control reference that they receive.

The main way to refer to a control is now through the Control class, and
optionally through its base ControlId class. The ControlId enumeration
is removed, replaced by a list of global Control instances. Numerical
control IDs are turned into macros, and are still exposed as they are
required to communicate with IPAs (especially to deserialise control
lists). They should however not be used by applications.

Auto-generation of header and source files is removed for now to keep
the change simple. It will be added back in the future in a more
elaborate form.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
2019-10-04 19:33:08 +03:00
..
camera test: buffer_import: Initialize video_ to nullptr 2019-09-16 22:21:27 +02:00
controls libcamera: controls: Improve the API towards applications 2019-10-04 19:33:08 +03:00
ipa libcamera: ipa_module_info: add license field 2019-07-12 15:52:30 +09:00
ipc test: Get event dispatcher from current thread 2019-08-19 19:06:37 +03:00
libtest libcamera: add IPA proxy 2019-07-12 16:32:29 +09:00
log test: Get event dispatcher from current thread 2019-08-19 19:06:37 +03:00
media_device meson: Create and use a dependency for libcamera and its headers 2019-05-23 13:56:33 +03:00
pipeline libcamera: camera_manager: Construct CameraManager instances manually 2019-08-19 19:07:45 +03:00
process test: process: Extend timeout duration 2019-09-13 09:21:40 +01:00
stream test: Allow self-contained tests to run in parallel 2019-07-04 16:42:08 +02:00
v4l2_subdevice libcamera: v4l2_subdevice: Replace FormatEnum with ImageFormats 2019-06-19 03:06:33 +02:00
v4l2_videodevice test: Get event dispatcher from current thread 2019-08-19 19:06:37 +03:00
camera-sensor.cpp tests: camera-sensor: Test using invalid media bus format 2019-08-11 02:16:21 +02:00
event-dispatcher.cpp libcamera: Switch to the std::chrono API 2019-09-14 15:05:45 +03:00
event-thread.cpp test: event-thread: Fix compilation on Chromium OS 2019-08-19 19:06:37 +03:00
event.cpp test: Get event dispatcher from current thread 2019-08-19 19:06:37 +03:00
geometry.cpp test: geometry: Add tests for Size class comparison operators 2019-04-18 18:13:10 +03:00
list-cameras.cpp libcamera: camera_manager: Construct CameraManager instances manually 2019-08-19 19:07:45 +03:00
meson.build test: Get event dispatcher from current thread 2019-08-19 19:06:37 +03:00
message.cpp libcamera: message: Add user message types 2019-07-16 10:55:27 +03:00
object-invoke.cpp test: Get event dispatcher from current thread 2019-08-19 19:06:37 +03:00
object.cpp test: object: Extend object test to verify parent-child relationships 2019-08-17 18:47:17 +03:00
signal-threads.cpp test: Add test case for signal delivery across threads 2019-07-11 11:57:37 +03:00
signal.cpp test: signal: Extend Signal test with multi-inheritance reeiver 2019-07-11 16:38:18 +03:00
threads.cpp test: Add Thread test cases 2019-07-11 11:57:37 +03:00
timer-thread.cpp test: Simplify tests with parent-child relationships 2019-08-17 18:47:17 +03:00
timer.cpp libcamera: Switch to the std::chrono API 2019-09-14 15:05:45 +03:00