{"id":10044,"url":"https://patchwork.libcamera.org/api/patches/10044/?format=json","web_url":"https://patchwork.libcamera.org/patch/10044/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20201010095830.134084-4-jacopo@jmondi.org>","date":"2020-10-10T09:58:30","name":"[libcamera-devel,v2,3/3] android: camera_stream: Add documentation","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"cf7b556e39b57b20d17a0a70b623a08aa7810fd9","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/10044/mbox/","series":[{"id":1372,"url":"https://patchwork.libcamera.org/api/series/1372/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1372","date":"2020-10-10T09:58:27","name":"android: Introduce CameraWorker","version":2,"mbox":"https://patchwork.libcamera.org/series/1372/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/10044/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/10044/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 9AA4DBEEE1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 10 Oct 2020 09:54:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5B29A60C0A;\n\tSat, 10 Oct 2020 11:54:40 +0200 (CEST)","from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EB20C603C1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 10 Oct 2020 11:54:37 +0200 (CEST)","from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 8F8CF40002;\n\tSat, 10 Oct 2020 09:54:37 +0000 (UTC)"],"X-Originating-IP":"93.34.118.233","From":"Jacopo Mondi <jacopo@jmondi.org>","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\n\tdocumentation","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Add a brief documentation block to the CameraStream class.\n\nSigned-off-by: Jacopo Mondi <jacopo@jmondi.org>\n---\n src/android/camera_stream.cpp | 21 +++++++++++++++++++++\n src/android/camera_stream.h   |  5 -----\n 2 files changed, 21 insertions(+), 5 deletions(-)","diff":"diff --git a/src/android/camera_stream.cpp b/src/android/camera_stream.cpp\nindex eac1480530f8..d8e45c2a274d 100644\n--- a/src/android/camera_stream.cpp\n+++ b/src/android/camera_stream.cpp\n@@ -17,6 +17,27 @@ using namespace libcamera;\n \n LOG_DECLARE_CATEGORY(HAL);\n \n+/*\n+ * \\class CameraStream\n+ * \\brief Map a camera3_stream_t to a StreamConfiguration\n+ *\n+ * The CameraStream class maps a camera3_stream_t provided by Android\n+ * camera framework to a libcamera::StreamConfiguration.\n+ *\n+ * The StreamConfiguration is represented by its index as recorded in the\n+ * CameraConfiguration and not by pointer as StreamConfiguration is subject to\n+ * relocation.\n+ *\n+ * A single StreamConfiguration may be used to deliver one or more streams to\n+ * the Android framework. The mapping type between a camera3 stream to a\n+ * StreamConfiguration is described by the CameraStream::Type.\n+ *\n+ * CameraStream handles all the aspects of producing a stream with the size\n+ * and format requested by the camera3 stream from the data produced by\n+ * the associated libcamera::Stream, including the creation of the encoder\n+ * and buffer allocation.\n+ */\n+\n CameraStream::CameraStream(CameraDevice *cameraDevice, Type type,\n \t\t\t   camera3_stream_t *camera3Stream, unsigned int index)\n \t: cameraDevice_(cameraDevice), type_(type),\ndiff --git a/src/android/camera_stream.h b/src/android/camera_stream.h\nindex 8df0101c403c..47f3fc61ac2c 100644\n--- a/src/android/camera_stream.h\n+++ b/src/android/camera_stream.h\n@@ -128,11 +128,6 @@ private:\n \tlibcamera::CameraConfiguration *config_;\n \tType type_;\n \tcamera3_stream_t *camera3Stream_;\n-\t/*\n-\t * The index of the libcamera StreamConfiguration as added during\n-\t * configureStreams(). A single libcamera Stream may be used to deliver\n-\t * one or more streams to the Android framework.\n-\t */\n \tunsigned int index_;\n \n \tstd::unique_ptr<Encoder> encoder_;\n","prefixes":["libcamera-devel","v2","3/3"]}