libcamera: framebuffer_allocator: Lift camera restrictions on allocator
The Camera class currently requires the allocator to have no allocated buffer before the camera is reconfigured, and the allocator to be destroyed before the camera is released. There's no basis for these restrictions anymore, remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -113,8 +113,6 @@ private:
|
||||
friend class FrameBufferAllocator;
|
||||
int exportFrameBuffers(Stream *stream,
|
||||
std::vector<std::unique_ptr<FrameBuffer>> *buffers);
|
||||
/* \todo Remove allocator_ from the exposed API */
|
||||
FrameBufferAllocator *allocator_;
|
||||
};
|
||||
|
||||
} /* namespace libcamera */
|
||||
|
||||
@@ -20,8 +20,7 @@ class Stream;
|
||||
class FrameBufferAllocator
|
||||
{
|
||||
public:
|
||||
static FrameBufferAllocator *create(std::shared_ptr<Camera> camera);
|
||||
|
||||
FrameBufferAllocator(std::shared_ptr<Camera> camera);
|
||||
FrameBufferAllocator(const Camera &) = delete;
|
||||
FrameBufferAllocator &operator=(const Camera &) = delete;
|
||||
|
||||
@@ -34,8 +33,6 @@ public:
|
||||
const std::vector<std::unique_ptr<FrameBuffer>> &buffers(Stream *stream) const;
|
||||
|
||||
private:
|
||||
FrameBufferAllocator(std::shared_ptr<Camera> camera);
|
||||
|
||||
std::shared_ptr<Camera> camera_;
|
||||
std::map<Stream *, std::vector<std::unique_ptr<FrameBuffer>>> buffers_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user