From patchwork Tue Feb 26 02:18:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 622 Return-Path: Received: from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net [195.74.38.229]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 905E0610B2 for ; Tue, 26 Feb 2019 03:19:15 +0100 (CET) X-Halon-ID: e124c262-396c-11e9-985a-005056917f90 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (unknown [89.233.230.99]) by bin-vsp-out-02.atm.binero.net (Halon) with ESMTPA id e124c262-396c-11e9-985a-005056917f90; Tue, 26 Feb 2019 03:19:13 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Tue, 26 Feb 2019 03:18:49 +0100 Message-Id: <20190226021857.28255-1-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/8] libcamera: improve validation of camera operations X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Feb 2019 02:19:16 -0000 Hi, This series fix a few bugs in the camera as well as introduce a state machine to better keep track on what applications can do with a camera at any given point in its life cycle. As well as add a few new checks to catch problems early. See individual patches for detailed descriptions. Some of these patches could be posted separately but as they all conflict with etch other I chose to keep them all together. If necessary or requested I might break some parts out or merge parts of this series as the review process progress and allows. Niklas Söderlund (8): libcamera: camera: fix bug in error check for streamConfiguration() libcamera: align the documentation for numeric error codes libcamera: camera: document return values for application facing functions cam: fix order camera is operated on libcamera: camera: add state machine to control access from applications libcamera: store stream pointers in sets instead of a vectors libcamera: camera: ensure streams belong to camera libcamera: camera: make sure camera is configured before starting include/libcamera/camera.h | 25 ++-- src/cam/main.cpp | 28 ++-- src/libcamera/buffer.cpp | 6 +- src/libcamera/camera.cpp | 159 +++++++++++++++-------- src/libcamera/camera_manager.cpp | 2 +- src/libcamera/device_enumerator.cpp | 7 +- src/libcamera/include/pipeline_handler.h | 2 +- src/libcamera/media_device.cpp | 8 +- src/libcamera/media_object.cpp | 5 +- src/libcamera/pipeline/ipu3/ipu3.cpp | 6 +- src/libcamera/pipeline/uvcvideo.cpp | 6 +- src/libcamera/pipeline/vimc.cpp | 6 +- src/libcamera/pipeline_handler.cpp | 10 +- src/libcamera/request.cpp | 2 +- src/libcamera/v4l2_device.cpp | 16 +-- src/libcamera/v4l2_subdevice.cpp | 10 +- 16 files changed, 179 insertions(+), 119 deletions(-)