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:
parent
6cd505ac89
commit
a1c5450be5
10 changed files with 22 additions and 223 deletions
|
@ -121,10 +121,6 @@ int V4L2Camera::configure(StreamConfiguration *streamConfigOut,
|
|||
|
||||
int V4L2Camera::allocBuffers(unsigned int count)
|
||||
{
|
||||
int ret = camera_->allocateBuffers();
|
||||
if (ret)
|
||||
return ret == -EACCES ? -EBUSY : ret;
|
||||
|
||||
Stream *stream = *camera_->streams().begin();
|
||||
|
||||
return bufferAllocator_->allocate(stream);
|
||||
|
@ -134,7 +130,6 @@ void V4L2Camera::freeBuffers()
|
|||
{
|
||||
Stream *stream = *camera_->streams().begin();
|
||||
bufferAllocator_->free(stream);
|
||||
camera_->freeBuffers();
|
||||
}
|
||||
|
||||
FileDescriptor V4L2Camera::getBufferFd(unsigned int index)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue