From a1c5450be573ebcb1a5acc6453b5fcfdaa9593a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20S=C3=B6derlund?= Date: Mon, 25 Nov 2019 17:51:06 +0100 Subject: libcamera: camera: Remove the prepared state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Laurent Pinchart --- src/v4l2/v4l2_camera.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/v4l2/v4l2_camera.cpp') diff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp index 10db15d6..44cb4e7c 100644 --- a/src/v4l2/v4l2_camera.cpp +++ b/src/v4l2/v4l2_camera.cpp @@ -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) -- cgit v1.2.1