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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user