7#ifndef __LIBCAMERA_FRAMEBUFFER_H__
8#define __LIBCAMERA_FRAMEBUFFER_H__
16#include <libcamera/base/span.h>
39 Span<Plane>
planes() {
return planes_; }
40 Span<const Plane>
planes()
const {
return planes_; }
45 std::vector<Plane> planes_;
54 static constexpr unsigned int kInvalidOffset = std::numeric_limits<unsigned int>::max();
62 const std::vector<Plane> &
planes()
const {
return planes_; }
66 unsigned int cookie()
const {
return cookie_; }
76 std::vector<Plane> planes_;
Utilities to help constructing class interfaces.
#define LIBCAMERA_DECLARE_PRIVATE()
Declare private data for a public class.
#define LIBCAMERA_DISABLE_COPY_AND_MOVE(klass)
Disable copy and move construction and assignment of the klass.
Base class to manage private data through a d-pointer.
Definition: class.h:62
RAII-style wrapper for file descriptors.
Definition: file_descriptor.h:16
Frame buffer data and its associated dynamic metadata.
Definition: framebuffer.h:49
const std::vector< Plane > & planes() const
Retrieve the static plane descriptors.
Definition: framebuffer.h:62
unsigned int cookie() const
Retrieve the cookie.
Definition: framebuffer.h:66
Request * request() const
Retrieve the request this buffer belongs to.
Definition: framebuffer.cpp:274
FrameBuffer(const std::vector< Plane > &planes, unsigned int cookie=0)
Construct a FrameBuffer with an array of planes.
Definition: framebuffer.cpp:215
void cancel()
Marks the buffer as cancelled.
Definition: framebuffer.h:69
void setCookie(unsigned int cookie)
Set the cookie.
Definition: framebuffer.h:67
const FrameMetadata & metadata() const
Retrieve the dynamic metadata.
Definition: framebuffer.h:64
A frame capture request.
Definition: request.h:29
V4L2VideoDevice object and API.
Definition: v4l2_videodevice.h:178
Top-level libcamera namespace.
Definition: backtrace.h:17
A memory region to store a single plane of a frame.
Definition: framebuffer.h:53
unsigned int length
The plane length in bytes.
Definition: framebuffer.h:57
unsigned int offset
The plane offset in bytes.
Definition: framebuffer.h:56
static constexpr unsigned int kInvalidOffset
Invalid offset value, to identify uninitialized planes.
Definition: framebuffer.h:54
FileDescriptor fd
The dmabuf file descriptor.
Definition: framebuffer.h:55