34 UniqueFD allocFromHeap(
const char *name, std::size_t size);
35 UniqueFD allocFromUDmaBuf(
const char *name, std::size_t size);
Helper class for dma-buf allocations.
Definition: dma_buf_allocator.h:18
bool isValid() const
Check if the DmaBufAllocator instance is valid.
Definition: dma_buf_allocator.h:30
DmaBufAllocator(DmaBufAllocatorFlags flags=DmaBufAllocatorFlag::CmaHeap)
Construct a DmaBufAllocator of a given type.
Definition: dma_buf_allocator.cpp:94
DmaBufAllocatorFlag
Type of the dma-buf provider.
Definition: dma_buf_allocator.h:20
@ CmaHeap
Allocate from a CMA dma-heap, providing physically-contiguous memory.
~DmaBufAllocator()
Destroy the DmaBufAllocator instance.
UniqueFD alloc(const char *name, std::size_t size)
Allocate a dma-buf from the DmaBufAllocator.
Definition: dma_buf_allocator.cpp:197
Type-safe container for enum-based bitfields.
Definition: flags.h:16
unique_ptr-like wrapper for a file descriptor
Definition: unique_fd.h:18
bool isValid() const
Check if the UniqueFD owns a valid file descriptor.
Definition: unique_fd.h:61
#define LIBCAMERA_FLAGS_ENABLE_OPERATORS(_enum)
Enable bitwise operations on the enum enumeration.
Top-level libcamera namespace.
Definition: backtrace.h:17
File descriptor wrapper that owns a file descriptor.