Patch Detail
Show a patch.
GET /api/patches/16207/?format=api
{ "id": 16207, "url": "https://patchwork.libcamera.org/api/patches/16207/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16207/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20220613082725.16315-1-tommaso.merciai@amarulasolutions.com>", "date": "2022-06-13T08:27:25", "name": "[libcamera-devel] Documentation: fix createRequest unique_ptr", "commit_ref": "f44ce70d9b8859c319e5c814584684ff61e3b6fa", "pull_url": null, "state": "accepted", "archived": false, "hash": "2d0befb9472d86d4876478d63f5769fb595a044c", "submitter": { "id": 125, "url": "https://patchwork.libcamera.org/api/people/125/?format=api", "name": "Tommaso Merciai", "email": "tommaso.merciai@amarulasolutions.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16207/mbox/", "series": [ { "id": 3172, "url": "https://patchwork.libcamera.org/api/series/3172/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3172", "date": "2022-06-13T08:27:25", "name": "[libcamera-devel] Documentation: fix createRequest unique_ptr", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3172/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16207/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16207/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 BEA24BD161\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 13 Jun 2022 08:27:32 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1643465635;\n\tMon, 13 Jun 2022 10:27:32 +0200 (CEST)", "from mail-wm1-x331.google.com (mail-wm1-x331.google.com\n\t[IPv6:2a00:1450:4864:20::331])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6064F601F0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 13 Jun 2022 10:27:30 +0200 (CEST)", "by mail-wm1-x331.google.com with SMTP id n185so2499829wmn.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 13 Jun 2022 01:27:30 -0700 (PDT)", "from tom-ThinkPad-T14s-Gen-2i.station\n\t(net-188-217-51-34.cust.vodafonedsl.it. [188.217.51.34])\n\tby smtp.gmail.com with ESMTPSA id\n\tn8-20020a7bc5c8000000b003974860e15esm12417247wmk.40.2022.06.13.01.27.29\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 13 Jun 2022 01:27:29 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1655108852;\n\tbh=GA4lgZ/8wC4peCqnaPA9xL9eHB8El0m3qo8MlvTJzOk=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:Cc:From;\n\tb=LImvFs3t+Xa6m9jwdenU0Jj32IYBW1G/v6WYpuoymppiLkzRDGTA6MDfdD7QpVlDW\n\tNRYIVKACAN5oSU30PeqzgytDM7Aqw4GBrLQ9oDVI8F8pgqbeNd5L31Vbo59f5T7Zq/\n\tppc/zZgp9i1+EMksWaG/Wfb4ZioyOKgpr4lF4A6++kkwznxNrppyPmmaDNnbOXOe+6\n\tjuT0gz15YsqpFOiVZILtIGCIMb50P2N81a2FyQ+BnZ1EmeCT+9LIhkQbQcyTrjW/qb\n\tG/x7CohrBqTj68+x3+6qfLdPzqFv/AaLaXtfiIBMNV+8SVokVUHN/+7A2mwrK6yOGk\n\t0HMziO/+LvVLA==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=amarulasolutions.com; s=google;\n\th=from:to:cc:subject:date:message-id:mime-version\n\t:content-transfer-encoding;\n\tbh=p1yJOvY6WAQ9oWgcRPdOk58CJtoW5K1gi9Wd7BSK5/w=;\n\tb=W2kTlBXRLIbuTAvTJw9mpPX3lHhzLNaYxX7omBvQCRx6udbjffu7w+uadX17GgHDip\n\tQE36Bb+qpIVkfOaju0Zqw4k2y9kLVsCZ3eb5R2TiYpEdZc3tELhLzhyB6CQSl431jX8s\n\tllF2QzJXjLVf1MT0/YQqPRExOAiOSE9dLN/vk=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=amarulasolutions.com\n\theader.i=@amarulasolutions.com\n\theader.b=\"W2kTlBXR\"; dkim-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:mime-version\n\t:content-transfer-encoding;\n\tbh=p1yJOvY6WAQ9oWgcRPdOk58CJtoW5K1gi9Wd7BSK5/w=;\n\tb=aXQRK69LQDKwpPaGwG91ptXq5qBg3KioE3Fi1s+5+Cd41juHTuueW4BRrmgt951w+Y\n\tck6DOiXhDtdTHaFFRo+kV492MYF+xm3evaBfmZwRM5KDX4dC7dlURy26mH9N+DG25B/T\n\ttkI2v6J+UjKVLl8vvLYPuoVtjOqG26uyuBhVAMOA7ZchW3GafLFHCnaXKU+uarekcR2Y\n\tlO9GYZ4J+/09A0QF60VKogOqMO7wD8m2U1eZCnO89Xs4R6VioBkZmAU37CpkFE4QtInO\n\tHhEub/N27bIK2VlLfYXeZtmQZvtl1ORagNxTqhz32J0CuvP4pIPyOH3j5K5kk7TWXWTA\n\t2j4A==", "X-Gm-Message-State": "AOAM530IS+3atqRUIOQ9d9CkUyB9L8kacjeTRlni4sMJgE4HjsOUpv47\n\tTVt0lfBIZwwkodKEVLiyGWioOA==", "X-Google-Smtp-Source": "ABdhPJyym9sPYRjS9KbUXrAkZD3p0V1FRVv96GJtg6cTU7LOxgyzUUvE0aL8OX/b4Bq0XilOTiksAg==", "X-Received": "by 2002:a05:600c:2241:b0:39c:405f:fba5 with SMTP id\n\ta1-20020a05600c224100b0039c405ffba5mr13271409wmm.75.1655108850046; \n\tMon, 13 Jun 2022 01:27:30 -0700 (PDT)", "To": "", "Date": "Mon, 13 Jun 2022 10:27:25 +0200", "Message-Id": "<20220613082725.16315-1-tommaso.merciai@amarulasolutions.com>", "X-Mailer": "git-send-email 2.25.1", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] Documentation: fix createRequest\n\tunique_ptr", "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": "Tommaso Merciai via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Tommaso Merciai <tommaso.merciai@amarulasolutions.com>", "Cc": "linux-amarula@amarulasolutions.com, libcamera-devel@lists.libcamera.org, \n\tlinuxfancy@googlegroups.com", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "camera->createRequest() function return std::unique_ptr<Request>, then\nmanipulate Request as std::unique_ptr.\nThis solve the following error, during compilation:\n\nerror: cannot convert ‘std::unique_ptr<libcamera::Request>’ to ‘libcamera::Request*’ in initialization\n\nReferences:\n - https://github.com/kbingham/simple-cam/blob/bb97f3bbd96a9d347e1b7f6cb68d94efaf8db574/simple-cam.cpp#L369\n\nSigned-off-by: Tommaso Merciai <tommaso.merciai@amarulasolutions.com>\n---\n Documentation/guides/application-developer.rst | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)", "diff": "diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst\nindex 16bea9c4..8d12a208 100644\n--- a/Documentation/guides/application-developer.rst\n+++ b/Documentation/guides/application-developer.rst\n@@ -308,7 +308,7 @@ the camera.\n \n Stream *stream = streamConfig.stream();\n const std::vector<std::unique_ptr<FrameBuffer>> &buffers = allocator->buffers(stream);\n- std::vector<Request *> requests;\n+ std::vector<std::unique_ptr<Request>> requests;\n \n Proceed to fill the request vector by creating ``Request`` instances from the\n camera device, and associate a buffer for each of them for the ``Stream``.\n@@ -316,7 +316,7 @@ camera device, and associate a buffer for each of them for the ``Stream``.\n .. code:: cpp\n \n for (unsigned int i = 0; i < buffers.size(); ++i) {\n- Request *request = camera->createRequest();\n+ std::unique_ptr<Request> request = camera->createRequest();\n if (!request)\n {\n std::cerr << \"Can't create request\" << std::endl;\n@@ -332,7 +332,7 @@ camera device, and associate a buffer for each of them for the ``Stream``.\n return ret;\n }\n \n- requests.push_back(request);\n+ requests.push_back(std::move(request));\n }\n \n .. TODO: Controls\n@@ -517,8 +517,8 @@ and queue all the previously created requests.\n .. code:: cpp\n \n camera->start();\n- for (Request *request : requests)\n- camera->queueRequest(request);\n+ for (std::unique_ptr<Request> &request : requests)\n+ camera->queueRequest(request.get());\n \n Start an event loop\n ~~~~~~~~~~~~~~~~~~~\n", "prefixes": [ "libcamera-devel" ] }