{"id":15368,"url":"https://patchwork.libcamera.org/api/patches/15368/?format=json","web_url":"https://patchwork.libcamera.org/patch/15368/","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":"<20220216123544.637834-3-kieran.bingham@ideasonboard.com>","date":"2022-02-16T12:35:44","name":"[libcamera-devel,SimpleCam,2/2] simple-cam: processRequest: Report Request metadata","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"8075564ca388a02eb5337ba7a71a31720f1c71a3","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":{"id":11,"url":"https://patchwork.libcamera.org/api/users/11/?format=json","username":"kbingham","first_name":"Kieran","last_name":"Bingham","email":"kieran.bingham@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/patch/15368/mbox/","series":[{"id":2933,"url":"https://patchwork.libcamera.org/api/series/2933/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2933","date":"2022-02-16T12:35:42","name":"Extend Request metadata reporting","version":1,"mbox":"https://patchwork.libcamera.org/series/2933/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/15368/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/15368/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 C07F4BE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 16 Feb 2022 12:35:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9DF4E61140;\n\tWed, 16 Feb 2022 13:35:51 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3791661121\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 16 Feb 2022 13:35:49 +0100 (CET)","from Monstersaurus.ksquared.org.uk.beta.tailscale.net\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D06B5484;\n\tWed, 16 Feb 2022 13:35:48 +0100 (CET)"],"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=\"vuOQlH6+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1645014949;\n\tbh=o/S6asNw/vtJ1/G6uP6l+lwKSO6icCX6NWJk4FdGOwM=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=vuOQlH6++Br6tHY9uYrXiCP6aPdaNrc1Nru9bvLMHZYGzF4yfPg4vX4qB8f7zW+6j\n\tFd31uE9kzMniF2/x4VpI9Cc1lofmOLggV9OIVc+E6M8ncTPYU0B5LoqmHBEr7Es3Gv\n\tukNB0f8bgTjWS9gTE+z/MehZ806+wZld+3C18tK8=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Wed, 16 Feb 2022 12:35:44 +0000","Message-Id":"<20220216123544.637834-3-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.32.0","In-Reply-To":"<20220216123544.637834-1-kieran.bingham@ideasonboard.com>","References":"<20220216123544.637834-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [SimpleCam PATCH 2/2] simple-cam: processRequest:\n\tReport Request metadata","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>","Cc":"Nejc Galof <galof.nejc@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The completed Request can contain extra data associated with the\ncompleted capture to report IPA state or properties of the capture to\nthe application.\n\nProcess and report any metadata that is associated with the request\nwhen it completes, to demonstrate the extra metadata available to be\nprocessed.\n\nNow that there is substantially more information than one line per\ncompleted request, start each completed Request with a blank line to\nseparate from previous completions and report the state of the Request\nitself with its .toString() helper.\n\nSuggested-by: Nejc Galof <galof.nejc@gmail.com>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n simple-cam.cpp | 23 +++++++++++++++++++++++\n 1 file changed, 23 insertions(+)","diff":"diff --git a/simple-cam.cpp b/simple-cam.cpp\nindex e282463c3976..4de1b7de9ced 100644\n--- a/simple-cam.cpp\n+++ b/simple-cam.cpp\n@@ -46,6 +46,29 @@ static void requestComplete(Request *request)\n \n static void processRequest(Request *request)\n {\n+\tstd::cout << std::endl\n+\t\t  << \"Request completed: \" << request->toString() << std::endl;\n+\n+\t/*\n+\t * When a request has completed, it is populated with a metadata control\n+\t * list that allows an application to determine various properties of\n+\t * the completed request. This can include the timestamp of the Sensor\n+\t * capture, or its gain and exposure values, or properties from the IPA\n+\t * such as the state of the 3A algorithms.\n+\t *\n+\t * ControlValue types have a toString, so to examine each request, print\n+\t * all the metadata for inspection. A custom application can parse each\n+\t * of these items and process them according to its needs.\n+\t */\n+\tconst ControlList &requestMetadata = request->metadata();\n+\tfor (const auto &ctrl : requestMetadata) {\n+\t\tconst ControlId *id = controls::controls.at(ctrl.first);\n+\t\tconst ControlValue &value = ctrl.second;\n+\n+\t\tstd::cout << \"\\t\" << id->name() << \" = \" << value.toString()\n+\t\t\t  << std::endl;\n+\t}\n+\n \t/*\n \t * Each buffer has its own FrameMetadata to describe its state, or the\n \t * usage of each buffer. While in our simple capture we only provide one\n","prefixes":["libcamera-devel","SimpleCam","2/2"]}