libcamera
v0.3.1+12-19bbca3c
Supporting cameras in Linux since 2019
|
A camera lens based on V4L2 subdevices. More...
Public Member Functions | |
CameraLens (const MediaEntity *entity) | |
Construct a CameraLens. More... | |
~CameraLens () | |
Destroy a CameraLens. | |
int | init () |
Initialize the camera lens instance. More... | |
int | setFocusPosition (int32_t position) |
This function sets the focal point of the lens to a specific position. More... | |
const std::string & | model () const |
Retrieve the lens model name. More... | |
const ControlInfoMap & | controls () const |
Retrieve the V4L2 controls of the lens' subdev. More... | |
Protected Member Functions | |
std::string | logPrefix () const override |
Retrieve a string to be prefixed to the log message. More... | |
Protected Member Functions inherited from libcamera::Loggable | |
LogMessage | _log (const LogCategory *category, LogSeverity severity, const char *fileName=__builtin_FILE(), unsigned int line=__builtin_LINE()) const |
Create a temporary LogMessage object to log a message. More... | |
A camera lens based on V4L2 subdevices.
The CameraLens class eases handling of lens for pipeline handlers by hiding the details of the V4L2 subdevice kernel API and caching lens information.
|
explicit |
Construct a CameraLens.
[in] | entity | The media entity backing the camera lens controller |
Once constructed the instance must be initialized with init().
const ControlInfoMap & libcamera::CameraLens::controls | ( | ) | const |
Retrieve the V4L2 controls of the lens' subdev.
int libcamera::CameraLens::init | ( | ) |
Initialize the camera lens instance.
This function performs the initialisation steps of the CameraLens that may fail. It shall be called once and only once after constructing the instance.
|
overrideprotectedvirtual |
Retrieve a string to be prefixed to the log message.
This function allows classes inheriting from the Loggable class to extend the logger with an object-specific prefix output right before the log message contents.
Implements libcamera::Loggable.
|
inline |
Retrieve the lens model name.
The lens model name is a free-formed string that uniquely identifies the lens model.
int libcamera::CameraLens::setFocusPosition | ( | int32_t | position | ) |
This function sets the focal point of the lens to a specific position.
[in] | position | The focal point of the lens |
This function sets the value of focal point of the lens as in position.