7 #ifndef __LIBCAMERA_FRAMEBUFFER_ALLOCATOR_H__
8 #define __LIBCAMERA_FRAMEBUFFER_ALLOCATOR_H__
32 bool allocated()
const {
return !buffers_.empty(); }
33 const std::vector<std::unique_ptr<FrameBuffer>> &
buffers(
Stream *stream)
const;
36 std::shared_ptr<Camera> camera_;
37 std::map<Stream *, std::vector<std::unique_ptr<FrameBuffer>>> buffers_;
Camera device.
Definition: camera.h:70
FrameBuffer allocator for applications.
Definition: framebuffer_allocator.h:21
int free(Stream *stream)
Free buffers previously allocated for a stream.
Definition: framebuffer_allocator.cpp:115
int allocate(Stream *stream)
Allocate buffers for a configured stream.
Definition: framebuffer_allocator.cpp:88
const std::vector< std::unique_ptr< FrameBuffer > > & buffers(Stream *stream) const
Retrieve the buffers allocated for a stream.
Definition: framebuffer_allocator.cpp:146
bool allocated() const
Check if the allocator has allocated buffers for any stream.
Definition: framebuffer_allocator.h:32
FrameBufferAllocator(std::shared_ptr< Camera > camera)
Construct a FrameBufferAllocator serving a camera.
Definition: framebuffer_allocator.cpp:60
Video stream for a camera.
Definition: stream.h:70