libcamera v0.0.0+3240-f2a18172-dirty (2021-12-20T12:33:54+00:00)
Supporting cameras in Linux since 2019
|
Top-level libcamera namespace. More...
Namespaces | |
namespace | controls |
Namespace for libcamera controls. | |
namespace | ipa |
The IPA namespace. | |
namespace | properties |
Namespace for libcamera properties. | |
Classes | |
class | Backtrace |
Representation of a call stack backtrace. More... | |
class | BayerFormat |
Class to represent a raw image Bayer format. More... | |
class | BoundMethodArgs |
class | BoundMethodBase |
class | BoundMethodFunctor |
class | BoundMethodMember |
class | BoundMethodPack |
class | BoundMethodPack< void, Args... > |
class | BoundMethodPackBase |
class | BoundMethodStatic |
class | ByteStreamBuffer |
Wrap a memory buffer and provide sequential data read and write. More... | |
class | Camera |
Camera device. More... | |
class | CameraConfiguration |
Hold configuration for streams of the camera. More... | |
class | CameraControlValidator |
A control validator for Camera instances. More... | |
class | CameraManager |
Provide access and manage all cameras in the system. More... | |
class | CameraSensor |
A camera sensor based on V4L2 subdevices. More... | |
struct | CameraSensorProperties |
Database of camera sensor properties. More... | |
class | Control |
Describe a control and its intrinsic properties. More... | |
class | ControlId |
Control static metadata. More... | |
class | ControlInfo |
Describe the limits of valid values for a Control. More... | |
class | ControlInfoMap |
A map of ControlId to ControlInfo. More... | |
class | ControlList |
Associate a list of ControlId with their values for an object. More... | |
class | ControlSerializer |
Serializer and deserializer for control-related classes. More... | |
class | ControlValidator |
Interface for the control validator. More... | |
class | ControlValue |
Abstract type representing the value of a control. More... | |
class | DelayedControls |
Helper to deal with controls that take effect with a delay. More... | |
class | DeviceEnumerator |
Enumerate, store and search media devices. More... | |
class | DeviceMatch |
Description of a media device search pattern. More... | |
class | EventDispatcher |
Interface to manage the libcamera events and timers. More... | |
class | EventDispatcherPoll |
A poll-based event dispatcher. More... | |
class | EventNotifier |
Notify of activity on a file descriptor. More... | |
class | Extensible |
Base class to manage private data through a d-pointer. More... | |
class | File |
Interface for I/O operations on files. More... | |
class | FileDescriptor |
RAII-style wrapper for file descriptors. More... | |
class | Flags |
Type-safe container for enum-based bitfields. More... | |
class | FrameBuffer |
Frame buffer data and its associated dynamic metadata. More... | |
class | FrameBufferAllocator |
FrameBuffer allocator for applications. More... | |
struct | FrameMetadata |
Metadata related to a captured frame. More... | |
class | InvokeMessage |
A message carrying a method invocation across threads. More... | |
struct | IPABuffer |
Buffer information for the IPA interface. More... | |
struct | IPACameraSensorInfo |
Report the image sensor characteristics. More... | |
class | IPADataSerializer |
IPA Data Serializer. More... | |
class | IPAInterface |
C++ Interface for IPA implementation. More... | |
class | IPAManager |
Manager for IPA modules. More... | |
class | IPAModule |
Wrapper around IPA module shared object. More... | |
struct | IPAModuleInfo |
Information of an IPA module. More... | |
class | IPAProxy |
IPA Proxy. More... | |
struct | IPASettings |
IPA interface initialization settings. More... | |
struct | IPAStream |
Stream configuration for the IPA interface. More... | |
class | IPCMessage |
IPC message to be passed through IPC message pipe. More... | |
class | IPCPipe |
IPC message pipe for IPA isolation. More... | |
class | IPCUnixSocket |
IPC mechanism based on Unix sockets. More... | |
class | LogCategory |
A category of log message. More... | |
class | Loggable |
Base class to support log message extensions. More... | |
class | Logger |
Message logger. More... | |
class | LogMessage |
Internal log message representation. More... | |
class | LogOutput |
Log output. More... | |
class | MappedBuffer |
Provide an interface to support managing memory mapped buffers. More... | |
class | MappedFrameBuffer |
Map a FrameBuffer using the MappedBuffer interface. More... | |
class | MediaDevice |
The MediaDevice represents a Media Controller device with its full graph of connected objects. More... | |
class | MediaEntity |
The MediaEntity represents an entity in the media graph. More... | |
class | MediaLink |
The MediaLink represents a link between two pads in the media graph. More... | |
class | MediaObject |
Base class for all media objects. More... | |
class | MediaPad |
The MediaPad represents a pad of an entity in the media graph. More... | |
class | Message |
A message that can be posted to a Thread. More... | |
class | MessageQueue |
A queue of posted messages. More... | |
class | Object |
Base object to support automatic signal disconnection. More... | |
class | PipelineHandler |
Create and manage cameras based on a set of media devices. More... | |
class | PipelineHandlerFactory |
Registration of PipelineHandler classes and creation of instances. More... | |
class | PixelFormat |
libcamera image pixel format More... | |
class | PixelFormatInfo |
Information about pixel formats. More... | |
class | Point |
Describe a point in two-dimensional space. More... | |
class | Process |
Process object. More... | |
class | ProcessManager |
Manager of processes. More... | |
class | PubKey |
Public key wrapper for signature verification. More... | |
struct | Rectangle |
Describe a rectangle's position and dimensions. More... | |
class | Request |
A frame capture request. More... | |
class | Semaphore |
General-purpose counting semaphore. More... | |
class | Signal |
Generic signal and slot communication mechanism. More... | |
class | SignalBase |
struct | Size |
Describe a two-dimensional size. More... | |
struct | SizeRange |
Describe a range of sizes. More... | |
class | Stream |
Video stream for a camera. More... | |
struct | StreamConfiguration |
Configuration parameters for a stream. More... | |
class | StreamFormats |
Hold information about supported stream formats. More... | |
class | Thread |
A thread of execution. More... | |
class | ThreadData |
Thread-local internal data. More... | |
class | ThreadMain |
Thread wrapper for the main thread. More... | |
class | Timer |
Single-shot timer interface. More... | |
class | V4L2BufferCache |
Hot cache of associations between V4L2 buffer indexes and FrameBuffer. More... | |
struct | V4L2Capability |
struct v4l2_capability object wrapper and helpers More... | |
class | V4L2Device |
Base class for V4L2VideoDevice and V4L2Subdevice. More... | |
class | V4L2DeviceFormat |
The V4L2 video device image format and sizes. More... | |
class | V4L2M2MDevice |
Memory-to-Memory video device. More... | |
class | V4L2PixelFormat |
V4L2 pixel format FourCC wrapper. More... | |
class | V4L2Subdevice |
A V4L2 subdevice as exposed by the Linux kernel. More... | |
struct | V4L2SubdeviceFormat |
The V4L2 sub-device image format and sizes. More... | |
class | V4L2VideoDevice |
V4L2VideoDevice object and API. More... | |
Typedefs | |
using | Mutex = std::mutex |
An alias for std::mutex. | |
using | MutexLocker = std::unique_lock< std::mutex > |
An alias for std::unique_lock<std::mutex> | |
using | ControlIdMap = std::unordered_map< unsigned int, const ControlId * > |
A map of numerical control ID to ControlId. More... | |
using | StreamRoles = std::vector< StreamRole > |
A vector of StreamRole. | |
Enumerations | |
enum | ConnectionType { ConnectionTypeAuto , ConnectionTypeDirect , ConnectionTypeQueued , ConnectionTypeBlocking } |
Connection type for asynchronous communication. More... | |
enum | LogSeverity { LogInvalid = -1 , LogDebug = 0 , LogInfo , LogWarning , LogError , LogFatal } |
enum | ControlType { ControlTypeNone , ControlTypeBool , ControlTypeByte , ControlTypeInteger32 , ControlTypeInteger64 , ControlTypeFloat , ControlTypeString , ControlTypeRectangle , ControlTypeSize } |
Define the data type of a Control. More... | |
enum | LoggingTarget { LoggingTargetNone , LoggingTargetSyslog , LoggingTargetFile , LoggingTargetStream } |
Log destination type. More... | |
enum | StreamRole { Raw , StillCapture , VideoRecording , Viewfinder } |
Identify the role a stream is intended to play. More... | |
enum class | Transform : int { Identity = 0 , Rot0 = Identity , HFlip = 1 , VFlip = 2 , HVFlip = HFlip | VFlip , Rot180 = HVFlip , Transpose = 4 , Rot270 = HFlip | Transpose , Rot90 = VFlip | Transpose , Rot180Transpose = HFlip | VFlip | Transpose } |
Enum to represent a 2D plane transform. More... | |
Functions | |
LogMessage | _log (const LogCategory *category, LogSeverity severity, const char *fileName, unsigned int line) |
Create a temporary LogMessage object to log a message. More... | |
bool | operator== (const Point &lhs, const Point &rhs) |
Compare points for equality. More... | |
bool | operator== (const Size &lhs, const Size &rhs) |
Compare sizes for equality. More... | |
bool | operator< (const Size &lhs, const Size &rhs) |
Compare sizes for smaller than order. More... | |
bool | operator== (const SizeRange &lhs, const SizeRange &rhs) |
Compare size ranges for equality. More... | |
bool | operator== (const Rectangle &lhs, const Rectangle &rhs) |
Compare rectangles for equality. More... | |
bool | operator== (const BayerFormat &lhs, const BayerFormat &rhs) |
Compare two BayerFormats for equality. More... | |
int | logSetFile (const char *path) |
Direct logging to a file. More... | |
int | logSetStream (std::ostream *stream) |
Direct logging to a stream. More... | |
int | logSetTarget (LoggingTarget target) |
Set the logging target. More... | |
void | logSetLevel (const char *category, const char *level) |
Set the log level. More... | |
constexpr Transform | operator& (Transform t0, Transform t1) |
Apply bitwise AND operator between the bits in the two transforms. More... | |
constexpr Transform | operator| (Transform t0, Transform t1) |
Apply bitwise OR operator between the bits in the two transforms. More... | |
constexpr Transform | operator^ (Transform t0, Transform t1) |
Apply bitwise XOR operator between the bits in the two transforms. More... | |
constexpr Transform & | operator&= (Transform &t0, Transform t1) |
Apply bitwise AND-assignment operator between the bits in the two transforms. More... | |
constexpr Transform & | operator|= (Transform &t0, Transform t1) |
Apply bitwise OR-assignment operator between the bits in the two transforms. More... | |
constexpr Transform & | operator^= (Transform &t0, Transform t1) |
Apply bitwise XOR-assignment operator between the bits in the two transforms. More... | |
Transform | operator* (Transform t1, Transform t0) |
Compose two transforms together. More... | |
Transform | operator- (Transform t) |
Invert a transform. More... | |
constexpr bool | operator! (Transform t) |
Return true if the transform is the Identity , otherwise false More... | |
constexpr Transform | operator~ (Transform t) |
Return the transform with all the bits inverted individually. More... | |
Transform | transformFromRotation (int angle, bool *success) |
Return the transform representing a rotation of the given angle clockwise. More... | |
const char * | transformToString (Transform t) |
Return a character string describing the transform. More... | |
IPAInterface * | ipaCreate () |
Create an instance of the IPA interface. More... | |
Variables | |
const struct IPAModuleInfo | ipaModuleInfo |
External IPA module interface. More... | |
Top-level libcamera namespace.
A map of numerical control ID to ControlId.
The map is used by ControlList instances to access controls by numerical IDs. A global map of all libcamera controls is provided by controls::controls.
Connection type for asynchronous communication.
This enumeration describes the possible types of asynchronous communication between a sender and a receiver. It applies to Signal::emit() and Object::invokeMethod().
Define the data type of a Control.
Log destination type.
Enumerator | |
---|---|
LoggingTargetNone | No logging destination.
|
LoggingTargetSyslog | Log to syslog.
|
LoggingTargetFile | Log to file.
|
LoggingTargetStream | Log to stream.
|
Identify the role a stream is intended to play.
The StreamRole describes how an application intends to use a stream. Roles are specified by applications and passed to cameras, that then select the most appropriate streams and their default configurations.
|
strong |
Enum to represent a 2D plane transform.
The Transform can take 8 distinct values, representing the usual 2D plane transforms listed below. Each of these transforms can be constructed out of 3 basic operations, namely a horizontal flip (mirror), a vertical flip, and a transposition (about the main diagonal). The transforms are encoded such that a single bit indicates the presence of each of the 3 basic operations:
We regard these 3 basic operations as being applied in a specific order: first the two flip operations (actually they commute, so the order between them is unimportant) and finally any transpose operation.
Functions are provided to manipulate directly the bits within the transform encoding, but there are also higher-level functions to invert and compose transforms. Transforms are composed according to the usual mathematical convention such that the right transform is applied first, and the left transform is applied second.
Finally, we have a total of 8 distinct transformations, as follows (a couple of them have additional synonyms for convenience). We illustrate each with its nominal effect on a rectangle with vertices labelled A, B, C and D.
The set of 2D plane transforms is also known as the symmetry group of a square, described in the link. Note that the group can be generated by only 2 elements (the horizontal flip and a 90 degree rotation, for example), however, the encoding used here makes the presence of the vertical flip explicit.
Enumerator | |
---|---|
Identity | Identity transform. A-B A-B
Input image | | goes to output image | |
C-D C-D
Numeric value: 0 (no bits set). |
Rot0 | Synonym for Transform::Identity (zero degree rotation). |
HFlip | Horizontal flip. A-B B-A
Input image | | goes to output image | |
C-D D-C
Numeric value: 1 (horizontal flip bit set only). |
VFlip | Vertical flip. A-B C-D
Input image | | goes to output image | |
C-D A-B
Numeric value: 2 (vertical flip bit set only). |
HVFlip | Horizontal and vertical flip (identical to a 180 degree rotation). A-B D-C
Input image | | goes to output image | |
C-D B-A
Numeric value: 3 (horizontal and vertical flip bits set). |
Rot180 | Synonym for |
Transpose | Transpose (about the main diagonal). A-B A-C
Input image | | goes to output image | |
C-D B-D
Numeric value: 4 (transpose bit set only). |
Rot270 | Rotation by 270 degrees clockwise (90 degrees anticlockwise). A-B B-D
Input image | | goes to output image | |
C-D A-C
Numeric value: 5 (transpose and horizontal flip bits set). |
Rot90 | Rotation by 90 degrees clockwise (270 degrees anticlockwise). A-B C-A
Input image | | goes to output image | |
C-D D-B
Numeric value: 6 (transpose and vertical flip bits set). |
Rot180Transpose | Rotation by 180 degrees followed by transpose (alternatively, transposition about the "opposite diagonal"). A-B D-B
Input image | | goes to output image | |
C-D C-A
Numeric value: 7 (all bits set). |
LogMessage libcamera::_log | ( | const LogCategory * | category, |
LogSeverity | severity, | ||
const char * | fileName, | ||
unsigned int | line | ||
) |
Create a temporary LogMessage object to log a message.
[in] | category | The log message category |
[in] | severity | The log message severity |
[in] | fileName | The file name where the message is logged from |
[in] | line | The line number where the message is logged from |
This function is used as a backend by the LOG() macro to create a log message for locations not inheriting from the Loggable class.
IPAInterface * libcamera::ipaCreate | ( | ) |
Create an instance of the IPA interface.
This function is the entry point of the IPA module. It is called by the IPA manager to create an instance of the IPA interface for each camera. When matched against with a pipeline handler, the IPAManager will construct an IPA instance for each associated Camera.
int libcamera::logSetFile | ( | const char * | path | ) |
Direct logging to a file.
[in] | path | Full path to the log file |
This function directs the log output to the file identified by path. The previous log target, if any, is closed, and all new log messages will be written to the new log file.
If the function returns an error, the log target is not changed.
void libcamera::logSetLevel | ( | const char * | category, |
const char * | level | ||
) |
Set the log level.
[in] | category | Logging category |
[in] | level | Log level |
This function sets the log level of category to level. level shall be one of the following strings:
"*" is not a valid category for this function.
int libcamera::logSetStream | ( | std::ostream * | stream | ) |
Direct logging to a stream.
[in] | stream | Stream to send log output to |
This function directs the log output to stream. The previous log target, if any, is closed, and all new log messages will be written to the new log stream.
If the function returns an error, the log file is not changed
int libcamera::logSetTarget | ( | LoggingTarget | target | ) |
Set the logging target.
[in] | target | Logging destination |
This function sets the logging output to the target specified by target. The allowed values of target are LoggingTargetNone and LoggingTargetSyslog. LoggingTargetNone will send the log output to nowhere, and LoggingTargetSyslog will send the log output to syslog. The previous log target, if any, is closed, and all new log messages will be written to the new log destination.
LoggingTargetFile and LoggingTargetStream are not valid values for target. Use logSetFile() and logSetStream() instead, respectively.
If the function returns an error, the log file is not changed.
|
constexpr |
Return true
if the transform is the Identity
, otherwise false
[in] | t | The transform to be tested |
Apply bitwise AND operator between the bits in the two transforms.
[in] | t0 | The first transform |
[in] | t1 | The second transform |
Apply bitwise AND-assignment operator between the bits in the two transforms.
[in] | t0 | The first transform |
[in] | t1 | The second transform |
Compose two transforms together.
[in] | t1 | The second transform |
[in] | t0 | The first transform |
Composing transforms follows the usual mathematical convention for composing functions. That is, when performing t1 * t0
, t0 is applied first, and then t1. For example, Transpose * HFlip
performs HFlip
first and then the Transpose
yielding Rot270
, as shown below.
Note that composition is generally non-commutative for Transforms, and not the same as XOR-ing the underlying bit representations.
Invert a transform.
[in] | t | The transform to be inverted |
That is, we return the transform such that t * (-t)
and (-t) * t
both yield the identity transform.
Compare sizes for smaller than order.
Sizes are compared on three criteria, in the following order.
bool libcamera::operator== | ( | const BayerFormat & | lhs, |
const BayerFormat & | rhs | ||
) |
Compare two BayerFormats for equality.
Compare points for equality.
Compare rectangles for equality.
Compare sizes for equality.
Compare size ranges for equality.
Apply bitwise XOR operator between the bits in the two transforms.
[in] | t0 | The first transform |
[in] | t1 | The second transform |
Apply bitwise XOR-assignment operator between the bits in the two transforms.
[in] | t0 | The first transform |
[in] | t1 | The second transform |
Apply bitwise OR operator between the bits in the two transforms.
[in] | t0 | The first transform |
[in] | t1 | The second transform |
Apply bitwise OR-assignment operator between the bits in the two transforms.
[in] | t0 | The first transform |
[in] | t1 | The second transform |
|
constexpr |
Return the transform with all the bits inverted individually.
[in] | t | The transform of which the bits will be inverted |
This inverts the bits that encode the transform in a bitwise manner. Note that this is not the proper inverse of transform t (for which use operator-).
Transform libcamera::transformFromRotation | ( | int | angle, |
bool * | success | ||
) |
Return the transform representing a rotation of the given angle clockwise.
[in] | angle | The angle of rotation in a clockwise sense. Negative values can be used to represent anticlockwise rotations |
[out] | success | Set to true if the angle is a multiple of 90 degrees, otherwise false |
true
, otherwise the Identity
transform const char * libcamera::transformToString | ( | Transform | t | ) |
Return a character string describing the transform.
[in] | t | The transform to be described. |
libcamera::ipaModuleInfo |
External IPA module interface.
Information of an IPA module.
The IPAModuleInfo is required to match an IPA module construction against the intented pipeline handler with the module. The API and pipeline handler versions must match the corresponding IPA interface and pipeline handler.
An IPA module must export a struct IPAModuleInfo of this name.