summaryrefslogtreecommitdiff
path: root/src/android
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/android
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/android')
-rw-r--r--src/android/camera_device.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 49321db0..a98fd744 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -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;
}