libcamera  v0.2.0+110-fb74bb7d
Supporting cameras in Linux since 2019
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
libcamera Namespace Reference

Top-level libcamera namespace. More...

Namespaces

 controls
 Namespace for libcamera controls.
 
 ipa
 The IPA (Image Processing Algorithm) 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  CameraLens
 A camera lens based on V4L2 subdevices. 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  ColorSpace
 Class to describe a color space. More...
 
class  ConditionVariable
 std::condition_variable wrapper integrating with MutexLocker 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  Converter
 Abstract Base Class for converter. More...
 
class  ConverterFactory
 Registration of ConverterFactory classes and creation of instances. More...
 
class  ConverterFactoryBase
 Base class for converter factories. More...
 
class  Debayer
 Base debayering class. More...
 
class  DebayerCpu
 Class for debayering on the CPU. More...
 
struct  DebayerParams
 Struct to hold the debayer parameters. 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  DmaHeap
 Helper class for dma-heap allocations. 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  Fence
 Synchronization primitive to manage resources. More...
 
class  File
 Interface for I/O operations on files. 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  ipa_control_info_entry
 Description of a serialized ControlInfo entry. More...
 
struct  ipa_control_value_entry
 Description of a serialized ControlValue entry. More...
 
struct  ipa_controls_header
 Serialized control packet header. 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  MediaBusFormatInfo
 Information about media bus formats. 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  Mutex
 std::mutex wrapper with clang thread safety annotation More...
 
class  MutexLocker
 std::unique_lock wrapper with clang thread safety annotation 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  PipelineHandlerFactoryBase
 Base class for pipeline handler factories. 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...
 
class  Rectangle
 Describe a rectangle's position and dimensions. More...
 
class  Request
 A frame capture request. More...
 
class  Semaphore
 General-purpose counting semaphore. More...
 
class  SensorConfiguration
 Camera sensor configuration. More...
 
class  SharedFD
 RAII-style wrapper for file descriptors. More...
 
class  SharedMem
 Helper class to allocate and manage memory shareable between processes. More...
 
class  SharedMemObject
 Helper class to allocate an object in shareable memory. More...
 
class  Signal
 Generic signal and slot communication mechanism. More...
 
class  SignalBase
 
class  Size
 Describe a two-dimensional size. More...
 
class  SizeRange
 Describe a range of sizes. More...
 
class  SoftwareIsp
 Class for the Software ISP. 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...
 
struct  SwIspStats
 Struct that holds the statistics for the Software ISP. More...
 
class  SwStatsCpu
 Class for gathering statistics on the CPU. 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  UniqueFD
 unique_ptr-like wrapper for a file descriptor 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  V4L2M2MConverter
 The V4L2 M2M converter implements the converter interface based on V4L2 M2M device. 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  V4L2SubdeviceCapability
 struct v4l2_subdev_capability object wrapper and helpers More...
 
struct  V4L2SubdeviceFormat
 The V4L2 sub-device image format and sizes. More...
 
class  V4L2VideoDevice
 V4L2VideoDevice object and API. More...
 
class  YamlObject
 A class representing the tree structure of the YAML content. More...
 
class  YamlParser
 A helper class for parsing a YAML file. More...
 

Typedefs

using ControlIdMap = std::unordered_map< unsigned int, const ControlId * >
 A map of numerical control ID to ControlId. More...
 

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  ipa_controls_id_map_type { IPA_CONTROL_ID_MAP_CONTROLS, IPA_CONTROL_ID_MAP_PROPERTIES, IPA_CONTROL_ID_MAP_V4L2 }
 Enumerates the different control id map types. More...
 
enum  LoggingTarget { LoggingTargetNone, LoggingTargetSyslog, LoggingTargetFile, LoggingTargetStream }
 Log destination type. More...
 
enum  Orientation {
  Orientation::Rotate0 = 1, Orientation::Rotate0Mirror, Orientation::Rotate180, Orientation::Rotate180Mirror,
  Orientation::Rotate90Mirror, Orientation::Rotate270, Orientation::Rotate270Mirror, Orientation::Rotate90
}
 The image orientation in a memory buffer. More...
 
enum  StreamRole { StreamRole::Raw, StreamRole::StillCapture, StreamRole::VideoRecording, StreamRole::Viewfinder }
 Identify the role a stream is intended to play. More...
 
enum  Transform : int {
  Transform::Identity = 0, Transform::Rot0 = Identity, Transform::HFlip = 1, Transform::VFlip = 2,
  Transform::HVFlip = HFlip | VFlip, Transform::Rot180 = HVFlip, Transform::Transpose = 4, Transform::Rot270 = HFlip | Transpose,
  Transform::Rot90 = VFlip | Transpose, Transform::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 ColorSpace &lhs, const ColorSpace &rhs)
 Compare color spaces for equality. More...
 
bool operator== (const Point &lhs, const Point &rhs)
 Compare points for equality. More...
 
std::ostream & operator<< (std::ostream &out, const Point &p)
 Insert a text representation of a Point into an output stream. 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...
 
std::ostream & operator<< (std::ostream &out, const Size &s)
 Insert a text representation of a Size into an output stream. More...
 
bool operator== (const SizeRange &lhs, const SizeRange &rhs)
 Compare size ranges for equality. More...
 
std::ostream & operator<< (std::ostream &out, const SizeRange &sr)
 Insert a text representation of a SizeRange into an output stream. More...
 
bool operator== (const Rectangle &lhs, const Rectangle &rhs)
 Compare rectangles for equality. More...
 
std::ostream & operator<< (std::ostream &out, const Rectangle &r)
 Insert a text representation of a Rectangle into an output stream. More...
 
bool operator== (const BayerFormat &lhs, const BayerFormat &rhs)
 Compare two BayerFormats for equality. More...
 
std::ostream & operator<< (std::ostream &out, const BayerFormat &f)
 Insert a text representation of a BayerFormats into an output stream. More...
 
std::ostream & operator<< (std::ostream &out, const V4L2PixelFormat &f)
 Insert a text representation of a V4L2PixelFormat into an output stream. More...
 
std::ostream & operator<< (std::ostream &out, const V4L2SubdeviceFormat &f)
 Insert a text representation of a V4L2SubdeviceFormat into an output stream. More...
 
bool operator== (const V4L2Subdevice::Stream &lhs, const V4L2Subdevice::Stream &rhs)
 Compare streams for equality. More...
 
std::ostream & operator<< (std::ostream &out, const V4L2Subdevice::Stream &stream)
 Insert a text representation of a V4L2Subdevice::Stream into an output stream. More...
 
std::ostream & operator<< (std::ostream &out, const V4L2Subdevice::Route &route)
 Insert a text representation of a V4L2Subdevice::Route into an output stream. More...
 
std::ostream & operator<< (std::ostream &out, const V4L2Subdevice::Routing &routing)
 Insert a text representation of a V4L2Subdevice::Routing into an output stream. More...
 
std::ostream & operator<< (std::ostream &out, const V4L2DeviceFormat &f)
 Insert a text representation of a V4L2DeviceFormat into an output stream. More...
 
int logSetFile (const char *path, bool color)
 Direct logging to a file. More...
 
int logSetStream (std::ostream *stream, bool color)
 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...
 
Orientation orientationFromRotation (int angle, bool *success)
 Return the orientation representing a rotation of the given angle clockwise. More...
 
std::ostream & operator<< (std::ostream &out, const Orientation &orientation)
 Prints human-friendly names for Orientation items. More...
 
std::ostream & operator<< (std::ostream &out, const PixelFormat &f)
 Insert a text representation of a PixelFormat into an output stream. More...
 
std::ostream & operator<< (std::ostream &out, const Request &r)
 Insert a text representation of a Request into an output stream. More...
 
std::ostream & operator<< (std::ostream &out, StreamRole role)
 Insert a text representation of a StreamRole into an output stream. 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 Transformoperator &= (Transform &t0, Transform t1)
 Apply bitwise AND-assignment operator between the bits in the two transforms. More...
 
constexpr Transformoperator|= (Transform &t0, Transform t1)
 Apply bitwise OR-assignment operator between the bits in the two transforms. More...
 
constexpr Transformoperator^= (Transform &t0, Transform t1)
 Apply bitwise XOR-assignment operator between the bits in the two transforms. More...
 
Transform operator* (Transform t0, Transform t1)
 Compose two transforms by applying t0 first then t1. 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...
 
Transform operator/ (const Orientation &o1, const Orientation &o2)
 Return the Transform that applied to o2 gives o1. More...
 
Orientation operator* (const Orientation &o, const Transform &t)
 Apply the Transform t on the orientation o. More...
 
const char * transformToString (Transform t)
 Return a character string describing the transform. More...
 
IPAInterfaceipaCreate ()
 Create an instance of the IPA interface. More...
 

Variables

const struct IPAModuleInfo ipaModuleInfo
 External IPA module interface. More...
 

Detailed Description

Top-level libcamera namespace.

Typedef Documentation

◆ ControlIdMap

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.

Enumeration Type Documentation

◆ ConnectionType

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().

Enumerator
ConnectionTypeAuto 

If the sender and the receiver live in the same thread, ConnectionTypeDirect is used. Otherwise ConnectionTypeQueued is used.

ConnectionTypeDirect 

The receiver is invoked immediately and synchronously in the sender's thread.

ConnectionTypeQueued 

The receiver is invoked asynchronously.

Invoke the receiver asynchronously in its thread when control returns to the thread's event loop. The sender proceeds without waiting for the invocation to complete.

ConnectionTypeBlocking 

The receiver is invoked synchronously.

If the sender and the receiver live in the same thread, this is equivalent to ConnectionTypeDirect. Otherwise, the receiver is invoked asynchronously in its thread when control returns to the thread's event loop. The sender blocks until the receiver signals the completion of the invocation.

◆ ControlType

Define the data type of a Control.

Enumerator
ControlTypeNone 

Invalid type, for empty values

ControlTypeBool 

The control stores a boolean value

ControlTypeByte 

The control stores a byte value as an unsigned 8-bit integer

ControlTypeInteger32 

The control stores a 32-bit integer value

ControlTypeInteger64 

The control stores a 64-bit integer value

ControlTypeFloat 

The control stores a 32-bit floating point value

ControlTypeString 

The control stores a string value as an array of char

◆ ipa_controls_id_map_type

Enumerates the different control id map types.

Each ControlInfoMap and ControlList refers to a control id map that associates the ControlId references to a numerical identifier. During the serialization procedure the raw pointers to the ControlId instances cannot be transported on the wire, hence their numerical id is used to identify them in the serialized data buffer. At deserialization time it is required to associate back to the numerical id the ControlId instance it represents. This enumeration describes which ControlIdMap should be used to perform such operation.

Enumerator
IPA_CONTROL_ID_MAP_CONTROLS 

The numerical control identifier are resolved to a ControlId * using the global controls::controls id map.

IPA_CONTROL_ID_MAP_PROPERTIES 

The numerical control identifier are resolved to a ControlId * using the global properties::properties id map.

IPA_CONTROL_ID_MAP_V4L2 

ControlId for V4L2 defined controls are created by the video device that enumerates them, and are not available across the IPC boundaries. The deserializer shall create new ControlId instances for them as well as store them in a dedicated ControlIdMap. Only lookup by numerical id can be performed on de-serialized ControlInfoMap that represents V4L2 controls.

◆ LoggingTarget

Log destination type.

Enumerator
LoggingTargetNone 

No logging destination.

See also
Logger::logSetTarget
LoggingTargetSyslog 

Log to syslog.

See also
Logger::logSetTarget
LoggingTargetFile 

Log to file.

See also
Logger::logSetFile
LoggingTargetStream 

Log to stream.

See also
Logger::logSetStream

◆ LogSeverity

Log message severity

Enumerator
LogDebug 

Debug message

LogInfo 

Informational message

LogWarning 

Warning message, signals a potential issue

LogError 

Error message, signals an unrecoverable issue

LogFatal 

Fatal message, signals an unrecoverable issue and aborts execution

◆ Orientation

The image orientation in a memory buffer.

The Orientation enumeration describes the orientation of the images produced by the camera pipeline as they get received by the application inside memory buffers.

The image orientation expressed using the Orientation enumeration can be then inferred by applying to a naturally oriented image a multiple of a 90 degrees rotation in the clockwise direction from the origin and then by applying an optional horizontal mirroring.

The enumeration numerical values follow the ones defined by the EXIF Specification version 2.32, Tag 274 "Orientation", while the names of the enumerated values report the rotation and mirroring operations performed.

For example, Orientation::Rotate90Mirror describes the orientation obtained by rotating the image 90 degrees clockwise first and then applying a horizontal mirroring.

Enumerator
Rotate0 
rotate0.svg
Rotate0Mirror 
rotate0Mirror.svg
Rotate180 
rotate180.svg
Rotate180Mirror 
rotate180Mirror.svg
Rotate90Mirror 
rotate90Mirror.svg
Rotate270 
rotate270.svg
Rotate270Mirror 
rotate270Mirror.svg
Rotate90 
rotate90.svg

◆ StreamRole

enum libcamera::StreamRole
strong

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.

Enumerator
Raw 

The stream is intended to capture raw frames from the sensor.

StillCapture 

The stream is intended to capture high-resolution, high-quality still images with low frame rate. The captured frames may be exposed with flash.

VideoRecording 

The stream is intended to capture video for the purpose of recording or streaming. The video stream may produce a high frame rate and may be enhanced with video stabilization.

Viewfinder 

The stream is intended to capture video for the purpose of display on the local screen. Trade-offs between quality and usage of system resources are acceptable.

◆ Transform

enum libcamera::Transform : int
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:

  • bit 0 - presence of a horizontal flip
  • bit 1 - presence of a vertical flip
  • bit 2 - presence of a transposition.

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.

See also
https://en.wikipedia.org/wiki/Examples_of_groups#dihedral_group_of_order_8

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 HVFlip (180 degree rotation).

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).

Function Documentation

◆ _log()

LogMessage libcamera::_log ( const LogCategory category,
LogSeverity  severity,
const char *  fileName,
unsigned int  line 
)

Create a temporary LogMessage object to log a message.

Parameters
[in]categoryThe log message category
[in]severityThe log message severity
[in]fileNameThe file name where the message is logged from
[in]lineThe 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.

Returns
A log message

◆ ipaCreate()

IPAInterface* libcamera::ipaCreate ( )

Create an instance of the IPA interface.

Entry point to the IPA modules.

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.

◆ logSetFile()

int libcamera::logSetFile ( const char *  path,
bool  color 
)

Direct logging to a file.

Parameters
[in]pathFull path to the log file
[in]colorTrue to output colored messages

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.

color controls whether or not the messages will be colored with standard ANSI escape codes. This is done regardless of whether path refers to a standard file or a TTY, the caller is responsible for disabling coloring when not suitable for the log target.

If the function returns an error, the log target is not changed.

Returns
Zero on success, or a negative error code otherwise

◆ logSetLevel()

void libcamera::logSetLevel ( const char *  category,
const char *  level 
)

Set the log level.

Parameters
[in]categoryLogging category
[in]levelLog level

This function sets the log level of category to level. level shall be one of the following strings:

  • "DEBUG"
  • "INFO"
  • "WARN"
  • "ERROR"
  • "FATAL"

"*" is not a valid category for this function.

◆ logSetStream()

int libcamera::logSetStream ( std::ostream *  stream,
bool  color 
)

Direct logging to a stream.

Parameters
[in]streamStream to send log output to
[in]colorTrue to output colored messages

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.

color controls whether or not the messages will be colored with standard ANSI escape codes. This is done regardless of whether stream refers to a standard file or a TTY, the caller is responsible for disabling coloring when not suitable for the log target.

If the function returns an error, the log file is not changed

Returns
Zero on success, or a negative error code otherwise.

◆ logSetTarget()

int libcamera::logSetTarget ( LoggingTarget  target)

Set the logging target.

Parameters
[in]targetLogging 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.

Returns
Zero on success, or a negative error code otherwise.

◆ operator &()

libcamera::operator& ( Transform  t0,
Transform  t1 
)

Apply bitwise AND operator between the bits in the two transforms.

Parameters
[in]t0The first transform
[in]t1The second transform

◆ operator &=()

libcamera::operator&= ( Transform t0,
Transform  t1 
)

Apply bitwise AND-assignment operator between the bits in the two transforms.

Parameters
[in]t0The first transform
[in]t1The second transform

◆ operator!()

libcamera::operator! ( Transform  t)

Return true if the transform is the Identity, otherwise false

Parameters
[in]tThe transform to be tested

◆ operator*() [1/2]

Transform libcamera::operator* ( Transform  t0,
Transform  t1 
)

Compose two transforms by applying t0 first then t1.

Parameters
[in]t0The first transform to apply
[in]t1The second transform to apply

Compose two transforms into a transform that is equivalent to first applying t0 and then applying t1. For example, HFlip * Transpose performs HFlip first and then the Transpose yielding Rot270, as shown below.

A-B B-A B-D
Input image | | -> HFLip -> | | -> Transpose -> | | = Rot270
C-D D-C A-C

Note that composition is generally non-commutative for Transforms, and not the same as XOR-ing the underlying bit representations.

Returns
A Transform equivalent to applying t0 and then t1

◆ operator*() [2/2]

Orientation libcamera::operator* ( const Orientation o,
const Transform t 
)

Apply the Transform t on the orientation o.

Parameters
oThe orientation
tThe transform to apply on o
Returns
The Orientation resulting from applying t on o

◆ operator-()

Transform libcamera::operator- ( Transform  t)

Invert a transform.

Parameters
[in]tThe transform to be inverted

That is, we return the transform such that t * (-t) and (-t) * t both yield the identity transform.

◆ operator/()

Transform libcamera::operator/ ( const Orientation o1,
const Orientation o2 
)

Return the Transform that applied to o2 gives o1.

Parameters
o1The Orientation to obtain
o2The base Orientation

This operation can be used to easily compute the Transform to apply to a base orientation o2 to get the desired orientation o1.

Returns
A Transform that applied to o2 gives o1

◆ operator<()

bool libcamera::operator< ( const Size lhs,
const Size rhs 
)

Compare sizes for smaller than order.

Sizes are compared on three criteria, in the following order.

  • A size with smaller width and smaller height is smaller.
  • A size with smaller area is smaller.
  • A size with smaller width is smaller.
Returns
True if lhs is smaller than rhs, false otherwise

◆ operator<<() [1/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
const Orientation orientation 
)

Prints human-friendly names for Orientation items.

Parameters
[in]outThe output stream
[in]orientationThe Orientation item
Returns
The output stream out

◆ operator<<() [2/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
const PixelFormat f 
)

Insert a text representation of a PixelFormat into an output stream.

Parameters
[in]outThe output stream
[in]fThe PixelFormat
Returns
The output stream out

◆ operator<<() [3/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
const Point p 
)

Insert a text representation of a Point into an output stream.

Parameters
[in]outThe output stream
[in]pThe point
Returns
The output stream out

◆ operator<<() [4/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
const V4L2PixelFormat f 
)

Insert a text representation of a V4L2PixelFormat into an output stream.

Parameters
[in]outThe output stream
[in]fThe V4L2PixelFormat
Returns
The output stream out

◆ operator<<() [5/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
const V4L2SubdeviceFormat f 
)

Insert a text representation of a V4L2SubdeviceFormat into an output stream.

Parameters
[in]outThe output stream
[in]fThe V4L2SubdeviceFormat
Returns
The output stream out

◆ operator<<() [6/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
StreamRole  role 
)

Insert a text representation of a StreamRole into an output stream.

Parameters
[in]outThe output stream
[in]roleThe StreamRole
Returns
The output stream out

◆ operator<<() [7/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
const BayerFormat f 
)

Insert a text representation of a BayerFormats into an output stream.

Parameters
[in]outThe output stream
[in]fThe BayerFormat
Returns
The output stream out

◆ operator<<() [8/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
const Request r 
)

Insert a text representation of a Request into an output stream.

Parameters
[in]outThe output stream
[in]rThe Request
Returns
The output stream out

◆ operator<<() [9/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
const V4L2DeviceFormat f 
)

Insert a text representation of a V4L2DeviceFormat into an output stream.

Parameters
[in]outThe output stream
[in]fThe V4L2DeviceFormat
Returns
The output stream out

◆ operator<<() [10/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
const V4L2Subdevice::Stream stream 
)

Insert a text representation of a V4L2Subdevice::Stream into an output stream.

Parameters
[in]outThe output stream
[in]streamThe V4L2Subdevice::Stream
Returns
The output stream out

◆ operator<<() [11/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
const V4L2Subdevice::Route route 
)

Insert a text representation of a V4L2Subdevice::Route into an output stream.

Parameters
[in]outThe output stream
[in]routeThe V4L2Subdevice::Route
Returns
The output stream out

◆ operator<<() [12/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
const V4L2Subdevice::Routing routing 
)

Insert a text representation of a V4L2Subdevice::Routing into an output stream.

Parameters
[in]outThe output stream
[in]routingThe V4L2Subdevice::Routing
Returns
The output stream out

◆ operator<<() [13/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
const Size s 
)

Insert a text representation of a Size into an output stream.

Parameters
[in]outThe output stream
[in]sThe size
Returns
The output stream out

◆ operator<<() [14/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
const SizeRange sr 
)

Insert a text representation of a SizeRange into an output stream.

Parameters
[in]outThe output stream
[in]srThe size range
Returns
The output stream out

◆ operator<<() [15/15]

std::ostream & libcamera::operator<< ( std::ostream &  out,
const Rectangle r 
)

Insert a text representation of a Rectangle into an output stream.

Parameters
[in]outThe output stream
[in]rThe rectangle
Returns
The output stream out

◆ operator==() [1/7]

bool libcamera::operator== ( const Point lhs,
const Point rhs 
)

Compare points for equality.

Returns
True if the two points are equal, false otherwise

◆ operator==() [2/7]

bool libcamera::operator== ( const BayerFormat lhs,
const BayerFormat rhs 
)

Compare two BayerFormats for equality.

Returns
True if order, bitDepth and packing are equal, or false otherwise

◆ operator==() [3/7]

bool libcamera::operator== ( const ColorSpace lhs,
const ColorSpace rhs 
)

Compare color spaces for equality.

Returns
True if the two color spaces are identical, false otherwise

◆ operator==() [4/7]

bool libcamera::operator== ( const Size lhs,
const Size rhs 
)

Compare sizes for equality.

Returns
True if the two sizes are equal, false otherwise

◆ operator==() [5/7]

bool libcamera::operator== ( const V4L2Subdevice::Stream lhs,
const V4L2Subdevice::Stream rhs 
)

Compare streams for equality.

Returns
True if the two streams are equal, false otherwise

◆ operator==() [6/7]

bool libcamera::operator== ( const SizeRange lhs,
const SizeRange rhs 
)

Compare size ranges for equality.

Returns
True if the two size ranges are equal, false otherwise

◆ operator==() [7/7]

bool libcamera::operator== ( const Rectangle lhs,
const Rectangle rhs 
)

Compare rectangles for equality.

Returns
True if the two rectangles are equal, false otherwise

◆ operator^()

libcamera::operator^ ( Transform  t0,
Transform  t1 
)

Apply bitwise XOR operator between the bits in the two transforms.

Parameters
[in]t0The first transform
[in]t1The second transform

◆ operator^=()

libcamera::operator^= ( Transform t0,
Transform  t1 
)

Apply bitwise XOR-assignment operator between the bits in the two transforms.

Parameters
[in]t0The first transform
[in]t1The second transform

◆ operator|()

libcamera::operator| ( Transform  t0,
Transform  t1 
)

Apply bitwise OR operator between the bits in the two transforms.

Parameters
[in]t0The first transform
[in]t1The second transform

◆ operator|=()

libcamera::operator|= ( Transform t0,
Transform  t1 
)

Apply bitwise OR-assignment operator between the bits in the two transforms.

Parameters
[in]t0The first transform
[in]t1The second transform

◆ operator~()

libcamera::operator~ ( Transform  t)

Return the transform with all the bits inverted individually.

Parameters
[in]tThe 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-).

◆ orientationFromRotation()

Orientation libcamera::orientationFromRotation ( int  angle,
bool *  success 
)

Return the orientation representing a rotation of the given angle clockwise.

Parameters
[in]angleThe angle of rotation in a clockwise sense. Negative values can be used to represent anticlockwise rotations
[out]successSet to true if the angle is a multiple of 90 degrees, otherwise false
Returns
The orientation corresponding to the rotation if success was set to true, otherwise the Rotate0 orientation

◆ transformFromRotation()

Transform libcamera::transformFromRotation ( int  angle,
bool *  success 
)

Return the transform representing a rotation of the given angle clockwise.

Parameters
[in]angleThe angle of rotation in a clockwise sense. Negative values can be used to represent anticlockwise rotations
[out]successSet to true if the angle is a multiple of 90 degrees, otherwise false
Returns
The transform corresponding to the rotation if success was set to true, otherwise the Identity transform

◆ transformToString()

const char * libcamera::transformToString ( Transform  t)

Return a character string describing the transform.

Parameters
[in]tThe transform to be described.

Variable Documentation

◆ ipaModuleInfo

libcamera::ipaModuleInfo
Initial value:
= {
1,
"PipelineHandlerIPU3",
"ipu3",
}
#define IPA_MODULE_API_VERSION
The IPA module API version.

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.

See also
struct IPAModuleInfo

An IPA module must export a struct IPAModuleInfo of this name.