libcamera
v0.4.0
Supporting cameras in Linux since 2019
|
A camera sensor. More...
#include <memory>
#include <string>
#include <variant>
#include <vector>
#include <libcamera/base/class.h>
#include <libcamera/control_ids.h>
#include <libcamera/controls.h>
#include <libcamera/geometry.h>
#include <libcamera/orientation.h>
#include <libcamera/transform.h>
#include "libcamera/internal/bayer_format.h"
#include "libcamera/internal/camera_sensor_properties.h"
#include "libcamera/internal/v4l2_subdevice.h"
Go to the source code of this file.
Classes | |
class | libcamera::CameraSensor |
A abstract camera sensor. More... | |
class | libcamera::CameraSensorFactoryBase |
Base class for camera sensor factories. More... | |
class | libcamera::CameraSensorFactory< _CameraSensor > |
Registration of CameraSensorFactory classes and creation of instances. More... | |
Namespaces | |
libcamera | |
Top-level libcamera namespace. | |
Macros | |
#define | REGISTER_CAMERA_SENSOR(sensor, priority) static CameraSensorFactory<sensor> global_##sensor##Factory{ #sensor, priority }; |
Register a camera sensor type to the sensor factory. More... | |
A camera sensor.
#define REGISTER_CAMERA_SENSOR | ( | sensor, | |
priority | |||
) | static CameraSensorFactory<sensor> global_##sensor##Factory{ #sensor, priority }; |
Register a camera sensor type to the sensor factory.
[in] | sensor | Class name of the CameraSensor derived class to register |
[in] | priority | Priority order for factory selection |
Register a CameraSensor subclass with the factory and make it available to try and match sensors. The subclass needs to implement a static match function:
The function tests if the sensor class supports the camera sensor identified by a MediaEntity. If so, it creates a new instance of the sensor class. The return value is a variant that contains
When multiple factories can support the same MediaEntity (as in the match() function of multiple factories returning true for the same entity), the priority argument selects which factory will be used. See CameraSensorFactoryBase::create() for more information.