{"id":16267,"url":"https://patchwork.libcamera.org/api/1.1/patches/16267/?format=json","web_url":"https://patchwork.libcamera.org/patch/16267/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20220617143549.35442-3-dse@thaumatec.com>","date":"2022-06-17T14:35:48","name":"[libcamera-devel,v2,2/3] Documentation: Update code examples to use the Request::reuse() method","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"3b3075621d0a15e4c88e145ca6f1ba0126b35e9e","submitter":{"id":126,"url":"https://patchwork.libcamera.org/api/1.1/people/126/?format=json","name":"Daniel Semkowicz","email":"dse@thaumatec.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/16267/mbox/","series":[{"id":3189,"url":"https://patchwork.libcamera.org/api/1.1/series/3189/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3189","date":"2022-06-17T14:35:46","name":"Documentation: Update code examples in Application Writer's Guide","version":2,"mbox":"https://patchwork.libcamera.org/series/3189/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/16267/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/16267/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 B7E1CC3274\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 17 Jun 2022 14:36:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3610B65640;\n\tFri, 17 Jun 2022 16:36:03 +0200 (CEST)","from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com\n\t[IPv6:2a00:1450:4864:20::62b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EBC8E6563B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 17 Jun 2022 16:36:01 +0200 (CEST)","by mail-ej1-x62b.google.com with SMTP id me5so9188986ejb.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 17 Jun 2022 07:36:01 -0700 (PDT)","from localhost.localdomain (ip092042140082.rev.nessus.at.\n\t[92.42.140.82]) by smtp.gmail.com with ESMTPSA id\n\tu20-20020aa7d554000000b0042a2d9af0f8sm3746189edr.79.2022.06.17.07.36.00\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 17 Jun 2022 07:36:00 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1655476563;\n\tbh=KjH4tmNS63vJcpsSiWI8j5ifpvfdCF5cYnDJT1LX3ak=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=TLXW5mWKgT5n4cP0OLTcJAAbI0aZFf3NWi/+Y941pRzcR+BYijr4G2gJSG5ly7klC\n\t7rqsgGEdSnXzI8QHPnbA0TIf3+KQLJ9RhqKqFZD1+xXNZdanBBgIxNlA4HgNcLYg77\n\tZPRx2c/tkM5wpMc/FHsamg7xzNDSk2uAFJS1q5TxlpF5hc5UnHi2Seg7+Ao7+1M91V\n\tDwAZR2DLvcat5EyCwPk+kYARXqCaFrhNpvAS5iZgO6tHw/8/vhv65pjfvPob08VUAe\n\tVphtqAT6N53bz276jr/oaauMqBlGWkXJH3+6I7eYTNV3zSqgbtOFhRVTHCQ0Jvh9Su\n\tVNGbVLm6NjOMw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=thaumatec-com.20210112.gappssmtp.com; s=20210112;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=w0e7YC6nMwbowNG2N+5NhLg9552WzqKVUgC+4FV5e9E=;\n\tb=pmLe5vO03nAIs3I+ZJEihxykNgUldwtNef5tfjnmWqth5dYwXpGQx/sUaMx7JFYyjB\n\t4RUg9EpTK5NAeEWNiIl48k7I8265U4PmYpFElQzk/56kfhvRC2ooW3BLhujce5mjeEhx\n\tpDKNGPKedAGdaRrfmv4F6AHi9RYI4RPZ+d+zdjHgDzvL86ErU0zsswlj0pEMkrhaTgnr\n\tJgYEtgZzuP8nVRlHAqoGtCucLJjr27DKrA3+VNCqXtWNLbLJmLS6tCJO5yPyzYq9d9eL\n\ttq+xPeR5fNHiGOkWPgb8iwzIQlHqxS/MVDA1y9SYbNk4qa/TLJ/Lt9kd3S3sLPBwCYM6\n\tTGDQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected)\n\theader.d=thaumatec-com.20210112.gappssmtp.com\n\theader.i=@thaumatec-com.20210112.gappssmtp.com header.b=\"pmLe5vO0\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=w0e7YC6nMwbowNG2N+5NhLg9552WzqKVUgC+4FV5e9E=;\n\tb=kDrfgTd6Ff8di63ROp/Wu4OpFx0JkPTbnAvoDdDbbNJbK1qxZJ8fEmntPR1RVFUT7h\n\tlu8qFHnG0uS8JeKDbfoOEXWNyIFtpXNfzj7SlKS1Y9TEuK+LYcsn3mZJjqzTD+7xgp71\n\tV/4W9hfBqZdzJRy9yB+VpkAgka6YTWNdrsZzbULfJM9NuPu635bRnfgCDJ2En2UjF9Co\n\tMLPIPa5GeMbMYF8v9ok6w3EaSsQyi4gLzCrFkEJlEbMASwnsPcA1EiA5/KJn+zNw5cPr\n\tkUJs+LPwHaSnuI0lzSv7EVRubkRhLjz+V5oZCGQJaTaHiYCaI2n/Xas+mvX6GPi/ngZY\n\tWpUA==","X-Gm-Message-State":"AJIora96ztEIPGccCpV1zXTrYsBMO/P7LEyTT0VNnWPR7QjFbeVLqY/R\n\t+BwboacKj6h9nZRtkVtkUPX1TLIMASDJCg==","X-Google-Smtp-Source":"AGRyM1uJoEVwTRJGmUpg9Y6/pNsvQjH9yUExlajnSF4Zub0hWipZnys4vjx8F71aSQeadWDAXOPONw==","X-Received":"by 2002:a17:906:ece3:b0:6f3:da10:138a with SMTP id\n\tqt3-20020a170906ece300b006f3da10138amr9736427ejb.438.1655476561457; \n\tFri, 17 Jun 2022 07:36:01 -0700 (PDT)","To":"libcamera-devel@lists.libcamera.org","Date":"Fri, 17 Jun 2022 16:35:48 +0200","Message-Id":"<20220617143549.35442-3-dse@thaumatec.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20220617143549.35442-1-dse@thaumatec.com>","References":"<20220617143549.35442-1-dse@thaumatec.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 2/3] Documentation: Update code\n\texamples to use the Request::reuse() method","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>","From":"Daniel Semkowicz via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Daniel Semkowicz <dse@thaumatec.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"After introduction of reuse(), there is no need of manual request\nreconfiguration. Furthermore, current example code does not work\nanymore.\n\nSigned-off-by: Daniel Semkowicz <dse@thaumatec.com>\n---\n .../guides/application-developer.rst          | 20 +++----------------\n 1 file changed, 3 insertions(+), 17 deletions(-)","diff":"diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst\nindex 6ab8b7e5..a5f363cf 100644\n--- a/Documentation/guides/application-developer.rst\n+++ b/Documentation/guides/application-developer.rst\n@@ -480,26 +480,12 @@ libcamera repository.\n .. _FileSink class: https://git.libcamera.org/libcamera/libcamera.git/tree/src/cam/file_sink.cpp\n \n With the handling of this request completed, it is possible to re-use the\n-buffers by adding them to a new ``Request`` instance with their matching\n-streams, and finally, queue the new capture request to the camera device:\n+request and the associated buffers and re-queue it to the camera\n+device:\n \n .. code:: cpp\n \n-   request = camera->createRequest();\n-   if (!request)\n-   {\n-       std::cerr << \"Can't create request\" << std::endl;\n-       return;\n-   }\n-\n-   for (auto it = buffers.begin(); it != buffers.end(); ++it)\n-   {\n-       Stream *stream = it->first;\n-       FrameBuffer *buffer = it->second;\n-\n-       request->addBuffer(stream, buffer);\n-   }\n-\n+   request->reuse(Request::ReuseBuffers);\n    camera->queueRequest(request);\n \n Request queueing\n","prefixes":["libcamera-devel","v2","2/3"]}