[{"id":15982,"web_url":"https://patchwork.libcamera.org/comment/15982/","msgid":"<20210329042206.owhebqjkpoxat4es@basti-TUXEDO-Book-XA1510>","date":"2021-03-29T04:22:06","subject":"Re: [libcamera-devel] [RFC PATCH 1/2] libcamera: CameraData: Change\n\tqueuedRequests_ type to std::dequeue","submitter":{"id":78,"url":"https://patchwork.libcamera.org/api/people/78/","name":"Sebastian Fricke","email":"sebastian.fricke@posteo.net"},"content":"Hey Hirokazu,\n\nThank you for the patch.\n\nOn 29.03.2021 11:26, Hirokazu Honda wrote:\n>The type of CameraData::queuedRequests_ is std::list. The more\n>appropriate type is std::dequeue as the requests is reported as\n>complete in the order of queuing and are needed to be removed in\n>the first and last ones.\n\nThis sentence is a little hard to read and contains some incorrect\nEnglish grammar, how about:\n\n```\nA more appropriate type is std::dequeue as requests are reported\nand removed in the order of queuing.\n```\n\n>\n>Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n>---\n> include/libcamera/internal/pipeline_handler.h | 4 ++--\n> src/libcamera/pipeline_handler.cpp            | 4 ++--\n> 2 files changed, 4 insertions(+), 4 deletions(-)\n>\n>diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h\n>index 093b94c6..763da63e 100644\n>--- a/include/libcamera/internal/pipeline_handler.h\n>+++ b/include/libcamera/internal/pipeline_handler.h\n>@@ -7,9 +7,9 @@\n> #ifndef __LIBCAMERA_INTERNAL_PIPELINE_HANDLER_H__\n> #define __LIBCAMERA_INTERNAL_PIPELINE_HANDLER_H__\n>\n>-#include <list>\n> #include <map>\n> #include <memory>\n>+#include <queue>\n> #include <set>\n> #include <string>\n> #include <sys/types.h>\n>@@ -44,7 +44,7 @@ public:\n> \tvirtual ~CameraData() = default;\n>\n> \tPipelineHandler *pipe_;\n>-\tstd::list<Request *> queuedRequests_;\n>+\tstd::deque<Request *> queuedRequests_;\n> \tControlInfoMap controlInfo_;\n> \tControlList properties_;\n>\n>diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n>index 0228d7b2..4cb58084 100644\n>--- a/src/libcamera/pipeline_handler.cpp\n>+++ b/src/libcamera/pipeline_handler.cpp\n>@@ -72,9 +72,9 @@ LOG_DEFINE_CATEGORY(Pipeline)\n>\n> /**\n>  * \\var CameraData::queuedRequests_\n>- * \\brief The list of queued and not yet completed request\n>+ * \\brief The queue of queued and not yet completed request\n\ns/The queue of queued and not yet completed request/\n   The queue of incomplete requests/\n\n>  *\n>- * The list of queued request is used to track requests queued in order to\n>+ * The queue of queued request is used to track requests queued in order to\n>  * ensure completion of all requests when the pipeline handler is stopped.\n\nI think that this sentence contains a lot of redundant phrasing. How\nabout this:\n\n```\nThis queue is used to ensure that all requests are completed when the pipeline\nhandler is stopped.\n```\n\n\nBesides those little improvements of the documentation and commit\ndescription:\n\nReviewed-by: Sebastian Fricke <sebastian.fricke@posteo.net>\n\n>  *\n>  * \\sa PipelineHandler::queueRequest(), PipelineHandler::stop(),\n>-- \n>2.31.0.291.g576ba9dcdaf-goog\n>\n>_______________________________________________\n>libcamera-devel mailing list\n>libcamera-devel@lists.libcamera.org\n>https://lists.libcamera.org/listinfo/libcamera-devel","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 2C15DC32EA\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 29 Mar 2021 04:22:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 764356877D;\n\tMon, 29 Mar 2021 06:22:09 +0200 (CEST)","from mout02.posteo.de (mout02.posteo.de [185.67.36.66])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 26E61602D2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 29 Mar 2021 06:22:08 +0200 (CEST)","from submission (posteo.de [89.146.220.130]) \n\tby mout02.posteo.de (Postfix) with ESMTPS id 832302400FB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 29 Mar 2021 06:22:07 +0200 (CEST)","from customer (localhost [127.0.0.1])\n\tby submission (posteo.de) with ESMTPSA id 4F7ztl0l3vz6tmG;\n\tMon, 29 Mar 2021 06:22:06 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=posteo.net header.i=@posteo.net\n\theader.b=\"mG39Isww\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;\n\tt=1616991727; bh=JI1mWi6kn1BPsjLVqXlEp1/QTthXUCzyUkV9ChC4A9s=;\n\th=Date:From:To:Cc:Subject:From;\n\tb=mG39IswweIJqSay0ape19kjks53JfHYnR3gbWG2j+JAzJ3hdzqphtD8mavk8JXbNN\n\tYO6/Bxiv0VhpZEqkK0G2wooP3AksWqjnvYHN+R9CK5qAro1SuMZaENWKkZ/Mn17uPE\n\thj2fDDx2pf+UBaYwhlnXuLpqIadMZ+8sxUFZuXwcSdkrrFf06U8A41LLfHat6/Fpc3\n\tVvkRMn1zGKDCikzSk9HnFROO2WP03Ci8F8+QjCQ8L+nPHBB+B1gtF9jwkPfTtq8Iq7\n\tgaEE3HKaIftma1215P6gY0oKkiGtL5YbAkbPHVGWa4IsUx59QSLWWMcC9TKqQke32v\n\t4OcSCEpAHshXw==","Date":"Mon, 29 Mar 2021 06:22:06 +0200","From":"Sebastian Fricke <sebastian.fricke@posteo.net>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<20210329042206.owhebqjkpoxat4es@basti-TUXEDO-Book-XA1510>","References":"<20210329022604.110201-1-hiroh@chromium.org>\n\t<20210329022604.110201-2-hiroh@chromium.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20210329022604.110201-2-hiroh@chromium.org>","Subject":"Re: [libcamera-devel] [RFC PATCH 1/2] libcamera: CameraData: Change\n\tqueuedRequests_ type to std::dequeue","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@lists.libcamera.org","Content-Transfer-Encoding":"7bit","Content-Type":"text/plain; charset=\"us-ascii\"; Format=\"flowed\"","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]