From patchwork Sat Oct 10 09:58:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 10044 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 9AA4DBEEE1 for ; Sat, 10 Oct 2020 09:54:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5B29A60C0A; Sat, 10 Oct 2020 11:54:40 +0200 (CEST) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EB20C603C1 for ; Sat, 10 Oct 2020 11:54:37 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 8F8CF40002; Sat, 10 Oct 2020 09:54:37 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Sat, 10 Oct 2020 11:58:30 +0200 Message-Id: <20201010095830.134084-4-jacopo@jmondi.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201010095830.134084-1-jacopo@jmondi.org> References: <20201010095830.134084-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 3/3] android: camera_stream: Add documentation 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" Add a brief documentation block to the CameraStream class. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/android/camera_stream.cpp | 21 +++++++++++++++++++++ src/android/camera_stream.h | 5 ----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp index eac1480530f8..d8e45c2a274d 100644 --- a/src/android/camera_stream.cpp +++ b/src/android/camera_stream.cpp @@ -17,6 +17,27 @@ using namespace libcamera; LOG_DECLARE_CATEGORY(HAL); +/* + * \class CameraStream + * \brief Map a camera3_stream_t to a StreamConfiguration + * + * The CameraStream class maps a camera3_stream_t provided by Android + * camera framework to a libcamera::StreamConfiguration. + * + * The StreamConfiguration is represented by its index as recorded in the + * CameraConfiguration and not by pointer as StreamConfiguration is subject to + * relocation. + * + * A single StreamConfiguration may be used to deliver one or more streams to + * the Android framework. The mapping type between a camera3 stream to a + * StreamConfiguration is described by the CameraStream::Type. + * + * CameraStream handles all the aspects of producing a stream with the size + * and format requested by the camera3 stream from the data produced by + * the associated libcamera::Stream, including the creation of the encoder + * and buffer allocation. + */ + CameraStream::CameraStream(CameraDevice *cameraDevice, Type type, camera3_stream_t *camera3Stream, unsigned int index) : cameraDevice_(cameraDevice), type_(type), diff --git a/src/android/camera_stream.h b/src/android/camera_stream.h index 8df0101c403c..47f3fc61ac2c 100644 --- a/src/android/camera_stream.h +++ b/src/android/camera_stream.h @@ -128,11 +128,6 @@ private: libcamera::CameraConfiguration *config_; Type type_; camera3_stream_t *camera3Stream_; - /* - * The index of the libcamera StreamConfiguration as added during - * configureStreams(). A single libcamera Stream may be used to deliver - * one or more streams to the Android framework. - */ unsigned int index_; std::unique_ptr encoder_;