mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-13 15:29:45 +03:00
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
|
@ -77,8 +77,6 @@ int CameraDevice::open()
|
|||
void CameraDevice::close()
|
||||
{
|
||||
camera_->stop();
|
||||
|
||||
camera_->freeBuffers();
|
||||
camera_->release();
|
||||
|
||||
running_ = false;
|
||||
|
@ -690,16 +688,9 @@ void CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reque
|
|||
|
||||
/* Start the camera if that's the first request we handle. */
|
||||
if (!running_) {
|
||||
int ret = camera_->allocateBuffers();
|
||||
if (ret) {
|
||||
LOG(HAL, Error) << "Failed to allocate buffers";
|
||||
return;
|
||||
}
|
||||
|
||||
ret = camera_->start();
|
||||
int ret = camera_->start();
|
||||
if (ret) {
|
||||
LOG(HAL, Error) << "Failed to start camera";
|
||||
camera_->freeBuffers();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue