From patchwork Mon Oct 5 10:46:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 9947 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 0EE61C3B5D for ; Mon, 5 Oct 2020 10:47:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3C18563C08; Mon, 5 Oct 2020 12:47:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ZPINYqN+"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8E91E63B27 for ; Mon, 5 Oct 2020 12:47:33 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 822123B for ; Mon, 5 Oct 2020 12:47:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1601894852; bh=CCaTlKEV0E9SkK0dm0A5ARM8Kcy5prtzUvVfNaHRH2c=; h=From:To:Subject:Date:From; b=ZPINYqN+waqHouRfSjuyCWVpD1pBr40wcVgkNgr2oqT1JeYBLFRS9QTzh2+n0BWm4 dxy40Owiq1PsDTyoPhIJu+ID4P46WdTbysR8wqEq8FRkrBg360LF74/xXQGSmuMGgk bqGocDc6lyUGTOtMjOH4UT6Ln1+qzZ2eEqtiJtUQ= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 5 Oct 2020 13:46:34 +0300 Message-Id: <20201005104649.10812-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 00/15] CameraStream refactoring X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, I'm sending this on behalf of Jacopo as his ISP decided that git-send-email should be classified as spam. (From now on 'I' means Jacopo) The series takes what was sent as 'Internal buffers support' but as the need for refactoring CameraStream has become more and more pressing, I decided to bite the bullet and rebase internal buffers support on top of a rework of CameraStream which now lives in its own .cpp and .h files. The rework is not only about moving code but also to refactor the class to make clear the association of an Android camera3_stream_t and the associated libcamera::StreamConfiguration. There's a bit of churn in the series, I'm aware of that, alternating new features with refactoring. I hope it's not confusing. On top of CameraStream rework, internal buffer allocation and handling has been moved to the CameraStream class. Test results are in line with the ones obtained with the last iteration of the 'Internal buffers' series. Jacopo Mondi (15): android: camera_stream: Break out CameraStream android: camera_stream: Add CameraStream::Type android: camera_stream: Delegate Encoder construction android: camera_stream: Construct with Android stream android: camera_device: Move processing to CameraStream android: camera_stream: Retrieve Stream and Configuration android: camera_stream: Fetch format and size from configuration android: camera_device: Return Camera as shared_ptr android: camera_stream: Add FrameBufferAllocator android: camera_stream: Allocate FrameBuffers android: camera_device: Make CameraStream configuration nicer android: camera_stream: Add methods to get/put buffers android: camera_device: Use CameraStream buffers android: camera_device: Add stream mapping log android: camera_device: Clear streams_ at stop time src/android/camera_device.cpp | 190 ++++++++++++----------------- src/android/camera_device.h | 30 ++--- src/android/camera_hal_manager.cpp | 2 +- src/android/camera_stream.cpp | 168 +++++++++++++++++++++++++ src/android/camera_stream.h | 152 +++++++++++++++++++++++ src/android/meson.build | 1 + 6 files changed, 411 insertions(+), 132 deletions(-) create mode 100644 src/android/camera_stream.cpp create mode 100644 src/android/camera_stream.h