{"id":8672,"url":"https://patchwork.libcamera.org/api/patches/8672/?format=json","web_url":"https://patchwork.libcamera.org/patch/8672/","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":"<20200708134417.67747-4-paul.elder@ideasonboard.com>","date":"2020-07-08T13:43:59","name":"[libcamera-devel,v4,03/21] libcamera: StreamConfiguration: Add frameSize field","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"387ebe7b9cda8d0a26c3cc5e6f86dae4e8be4e7a","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/8672/mbox/","series":[{"id":1090,"url":"https://patchwork.libcamera.org/api/series/1090/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1090","date":"2020-07-08T13:43:56","name":"Clean up formats in v4l2-compat and pipeline handlers","version":4,"mbox":"https://patchwork.libcamera.org/series/1090/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/8672/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/8672/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 A7FB0BD792\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  8 Jul 2020 13:44:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7162761130;\n\tWed,  8 Jul 2020 15:44:37 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 77DA760E0D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Jul 2020 15:44:36 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id ABAD151B;\n\tWed,  8 Jul 2020 15:44:34 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"VhHy43TX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1594215876;\n\tbh=4UVpqHMoycrn+HfPAUx7esnwTcyPAFJamfkL8e6JgCo=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=VhHy43TXk3oDg9vWEFYNmvGeUfQtVUUT8RcwrQ4byHRnRV9kKc3BVeoajfDI3yjXV\n\t7++l4DvibvjnH/m9iB0amIbvZHV1tBBtcM05ll5K2ER8pG+EN5cQWSTo4aysytJIv+\n\t6ZPIhmEGlwSg9ek5nBQ+7oVWTEaNPrEaPhQrWR6w=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed,  8 Jul 2020 22:43:59 +0900","Message-Id":"<20200708134417.67747-4-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.27.0","In-Reply-To":"<20200708134417.67747-1-paul.elder@ideasonboard.com>","References":"<20200708134417.67747-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v4 03/21] libcamera: StreamConfiguration:\n\tAdd frameSize field","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":"In addition to the stride field, we want the pipeline handler to be able\nto declare the frame size for the configuration. Add a frameSize field\nto StreamConfiguration for this purpose.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\nNo change in v4\n\nNew in v3\n---\n include/libcamera/stream.h |  1 +\n src/libcamera/stream.cpp   | 17 ++++++++++++++---\n 2 files changed, 15 insertions(+), 3 deletions(-)","diff":"diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h\nindex 1a68bd2..f502b35 100644\n--- a/include/libcamera/stream.h\n+++ b/include/libcamera/stream.h\n@@ -43,6 +43,7 @@ struct StreamConfiguration {\n \tPixelFormat pixelFormat;\n \tSize size;\n \tunsigned int stride;\n+\tunsigned int frameSize;\n \n \tunsigned int bufferCount;\n \ndiff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\nindex 6df5882..6d6e279 100644\n--- a/src/libcamera/stream.cpp\n+++ b/src/libcamera/stream.cpp\n@@ -279,7 +279,8 @@ SizeRange StreamFormats::range(const PixelFormat &pixelformat) const\n  * handlers provide StreamFormats.\n  */\n StreamConfiguration::StreamConfiguration()\n-\t: pixelFormat(0), stride(0), bufferCount(0), stream_(nullptr)\n+\t: pixelFormat(0), stride(0), frameSize(0), bufferCount(0),\n+\t  stream_(nullptr)\n {\n }\n \n@@ -287,8 +288,8 @@ StreamConfiguration::StreamConfiguration()\n  * \\brief Construct a configuration with stream formats\n  */\n StreamConfiguration::StreamConfiguration(const StreamFormats &formats)\n-\t: pixelFormat(0), stride(0), bufferCount(0), stream_(nullptr),\n-\t  formats_(formats)\n+\t: pixelFormat(0), stride(0), frameSize(0), bufferCount(0),\n+\t  stream_(nullptr), formats_(formats)\n {\n }\n \n@@ -315,6 +316,16 @@ StreamConfiguration::StreamConfiguration(const StreamFormats &formats)\n  * the camera is configured.\n  */\n \n+/**\n+ * \\var StreamConfiguration::frameSize\n+ * \\brief Frame size for the stream, in bytes\n+ *\n+ * The frameSize value reports the number of bytes necessary to contain one\n+ * frame of an image buffer for this stream. The value is valid after\n+ * successfully validating the configuration with a call to\n+ * CameraConfiguration::validate().\n+ */\n+\n /**\n  * \\var StreamConfiguration::bufferCount\n  * \\brief Requested number of buffers to allocate for the stream\n","prefixes":["libcamera-devel","v4","03/21"]}