14 #include <libcamera/base/class.h> 31 bool allocated()
const {
return !buffers_.empty(); }
32 const std::vector<std::unique_ptr<FrameBuffer>> &
buffers(
Stream *stream)
const;
37 std::shared_ptr<Camera> camera_;
38 std::map<Stream *, std::vector<std::unique_ptr<FrameBuffer>>> buffers_;
const std::vector< std::unique_ptr< FrameBuffer > > & buffers(Stream *stream) const
Retrieve the buffers allocated for a stream.
Definition: framebuffer_allocator.cpp:148
FrameBuffer allocator for applications.
Definition: framebuffer_allocator.h:22
FrameBufferAllocator(std::shared_ptr< Camera > camera)
Construct a FrameBufferAllocator serving a camera.
Definition: framebuffer_allocator.cpp:61
Video stream for a camera.
Definition: stream.h:75
Top-level libcamera namespace.
Definition: bound_method.h:15
bool allocated() const
Check if the allocator has allocated buffers for any stream.
Definition: framebuffer_allocator.h:31
int free(Stream *stream)
Free buffers previously allocated for a stream.
Definition: framebuffer_allocator.cpp:119
int allocate(Stream *stream)
Allocate buffers for a configured stream.
Definition: framebuffer_allocator.cpp:86