summaryrefslogtreecommitdiff
path: root/src/libcamera/framebuffer_allocator.cpp
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-11-25 17:51:06 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-01-12 16:10:38 +0100
commita1c5450be573ebcb1a5acc6453b5fcfdaa9593a4 (patch)
tree5377b161d97616930a1031dc01a6d3fdbd694d20 /src/libcamera/framebuffer_allocator.cpp
parent6cd505ac89a6ee41865a2ecb32ed5f344544295d (diff)
libcamera: camera: Remove the prepared state
With the FrameBuffer rework completed there is no reason to keep the camera prepared state around as buffer allocations are now decoupled from the camera state. Remove the camera state simplifying the API. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/framebuffer_allocator.cpp')
-rw-r--r--src/libcamera/framebuffer_allocator.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libcamera/framebuffer_allocator.cpp b/src/libcamera/framebuffer_allocator.cpp
index 57789b24..207a13bd 100644
--- a/src/libcamera/framebuffer_allocator.cpp
+++ b/src/libcamera/framebuffer_allocator.cpp
@@ -116,8 +116,7 @@ FrameBufferAllocator::~FrameBufferAllocator()
*/
int FrameBufferAllocator::allocate(Stream *stream)
{
- if (camera_->state_ != Camera::CameraConfigured &&
- camera_->state_ != Camera::CameraPrepared) {
+ if (camera_->state_ != Camera::CameraConfigured) {
LOG(Allocator, Error)
<< "Camera must be in the configured state to allocate buffers";
return -EACCES;
@@ -163,7 +162,7 @@ int FrameBufferAllocator::allocate(Stream *stream)
*/
int FrameBufferAllocator::free(Stream *stream)
{
- if (camera_->state_ != Camera::CameraConfigured && camera_->state_ != Camera::CameraPrepared) {
+ if (camera_->state_ != Camera::CameraConfigured) {
LOG(Allocator, Error)
<< "Camera must be in the configured state to free buffers";
return -EACCES;