[{"id":22195,"web_url":"https://patchwork.libcamera.org/comment/22195/","msgid":"<20220225102923.GB1498358@pyrite.rasen.tech>","date":"2022-02-25T10:29:23","subject":"Re: [libcamera-devel] [SimpleCam PATCH 1/2] simple-cam:\n\tprocessRequest: Report timestamp and enhance description","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Wed, Feb 16, 2022 at 12:35:43PM +0000, Kieran Bingham wrote:\n> Report the timestamp of the completed buffers when the processRequest()\n> call handles a request and improve the description to discuss more of\n> the operations that can be done here.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  simple-cam.cpp | 12 +++++++++++-\n>  1 file changed, 11 insertions(+), 1 deletion(-)\n> \n> diff --git a/simple-cam.cpp b/simple-cam.cpp\n> index 71a715a0c27d..e282463c3976 100644\n> --- a/simple-cam.cpp\n> +++ b/simple-cam.cpp\n> @@ -46,8 +46,17 @@ static void requestComplete(Request *request)\n>  \n>  static void processRequest(Request *request)\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> +\t * buffer per request, a request can have a buffer for each stream that\n> +\t * is established when configuring the camera.\n> +\t *\n> +\t * This allows a viewfinder and a still image to be processed at the\n> +\t * same time, or to allow obtaining the RAW capture buffer from the\n> +\t * sensor along with the image as processed by the ISP.\n> +\t */\n>  \tconst Request::BufferMap &buffers = request->buffers();\n> -\n>  \tfor (auto bufferPair : buffers) {\n>  \t\t// (Unused) Stream *stream = bufferPair.first;\n>  \t\tFrameBuffer *buffer = bufferPair.second;\n> @@ -55,6 +64,7 @@ static void processRequest(Request *request)\n>  \n>  \t\t/* Print some information about the buffer which has completed. */\n>  \t\tstd::cout << \" seq: \" << std::setw(6) << std::setfill('0') << metadata.sequence\n> +\t\t\t  << \" timestamp: \" << metadata.timestamp\n>  \t\t\t  << \" bytesused: \";\n>  \n>  \t\tunsigned int nplane = 0;\n> -- \n> 2.32.0\n>","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 78930BE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Feb 2022 10:29:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A35EB61163;\n\tFri, 25 Feb 2022 11:29:31 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 55A57604EE\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Feb 2022 11:29:30 +0100 (CET)","from pyrite.rasen.tech (h175-177-042-148.catv02.itscom.jp\n\t[175.177.42.148])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E6D9FDD;\n\tFri, 25 Feb 2022 11:29:28 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"KPHwgjOE\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1645784969;\n\tbh=8pVcBOBw2PM8jrsPP8EN2qqG2D1ZNfIpTw1IPqAQgsE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=KPHwgjOERYlpXvw9sulUnrQDvTCVP8o2IgU6GJovApRwL/6B3ev4yoD33KOeKAHwX\n\tfEKFbG9/QPo9sDyTSHJVGS9mX8Hw46vnsPEUCRnF8yU3pMUzkxOZotv1U4oCxwHqHW\n\tf89ZW2klxUsn5la2Xoqv8o1rHYiOnVlWnljqQ3E0=","Date":"Fri, 25 Feb 2022 19:29:23 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20220225102923.GB1498358@pyrite.rasen.tech>","References":"<20220216123544.637834-1-kieran.bingham@ideasonboard.com>\n\t<20220216123544.637834-2-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20220216123544.637834-2-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [SimpleCam PATCH 1/2] simple-cam:\n\tprocessRequest: Report timestamp and enhance description","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":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]