libcamera: libcamera::FrameMetadata Struct Reference

libcamera v0.5.1 Supporting cameras in Linux since 2019

Loading...
Searching...
No Matches
libcamera::FrameMetadata Struct Reference

Metadata related to a captured frame. More...

## Classes
struct | Plane
| Per-plane frame metadata. More...

## Public Types
enum | Status { FrameSuccess , FrameError , FrameCancelled }
| Define the frame completion status. More...

## Public Member Functions
Span< Plane > | planes ()
| Retrieve the array of per-plane metadata.
Span< const Plane > | planes () const
| Retrieve the array of per-plane metadata.

## Public Attributes
Status | status
| Status of the frame.
unsigned int | sequence
| Frame sequence number.
uint64_t | timestamp
| Time when the frame was captured.

## Friends
class | FrameBuffer

## Detailed Description

Metadata related to a captured frame.

The FrameMetadata structure stores all metadata related to a captured frame, as stored in a FrameBuffer, such as capture status, timestamp and bytes used.

## Member Enumeration Documentation

## ◆ Status

enum libcamera::FrameMetadata::Status

Define the frame completion status.

Enumerator
FrameSuccess | The frame has been captured with success and contains valid data. All fields of the FrameMetadata structure are valid.
FrameError | An error occurred during capture of the frame. The frame data may be partly or fully invalid. The sequence and timestamp fields of the FrameMetadata structure is valid, the other fields may be invalid.
FrameCancelled | Capture stopped before the frame completed. The frame data is not valid. All fields of the FrameMetadata structure but the status field are invalid.

## Member Function Documentation

## ◆ planes() [1/2]

Span< Plane > libcamera::FrameMetadata::planes | ( |  | ) |
| inline

Retrieve the array of per-plane metadata.

Returns
  The array of per-plane metadata

## ◆ planes() [2/2]

Span< const Plane > libcamera::FrameMetadata::planes | ( |  | ) | const
| inline

Retrieve the array of per-plane metadata.

Returns
  The array of per-plane metadata

## Member Data Documentation

## ◆ sequence

unsigned int libcamera::FrameMetadata::sequence

Frame sequence number.

The sequence number is a monotonically increasing number assigned to the frames captured by the stream. The value is increased by one for each frame. Gaps in the sequence numbers indicate dropped frames.

## ◆ status

Status libcamera::FrameMetadata::status

Status of the frame.

The validity of other fields of the FrameMetadata structure depends on the status value.

## ◆ timestamp

uint64_t libcamera::FrameMetadata::timestamp

Time when the frame was captured.

The timestamp is expressed as a number of nanoseconds relative to the system clock since an unspecified time point.

Todo
  Be more precise on what timestamps refer to.

The documentation for this struct was generated from the following files:

- include/libcamera/framebuffer.h
- src/libcamera/framebuffer.cpp