Patch Detail
Show a patch.
GET /api/patches/16223/?format=api
{ "id": 16223, "url": "https://patchwork.libcamera.org/api/patches/16223/?format=api", "web_url": "https://patchwork.libcamera.org/patch/16223/", "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": "<20220615162601.48619-2-dse@thaumatec.com>", "date": "2022-06-15T16:25:59", "name": "[libcamera-devel,1/3] Documentation: Update code examples to match Request related changes", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "bd55a3a84246d0fa8c1ac8bb272412ac5555c7ad", "submitter": { "id": 126, "url": "https://patchwork.libcamera.org/api/people/126/?format=api", "name": "Daniel Semkowicz", "email": "dse@thaumatec.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/16223/mbox/", "series": [ { "id": 3176, "url": "https://patchwork.libcamera.org/api/series/3176/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3176", "date": "2022-06-15T16:25:58", "name": "Documentation: Update code examples in Application Writer's Guide", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3176/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/16223/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/16223/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 A826EC3273\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 15 Jun 2022 16:26:45 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 15DC665639;\n\tWed, 15 Jun 2022 18:26:45 +0200 (CEST)", "from mail-wr1-x430.google.com (mail-wr1-x430.google.com\n\t[IPv6:2a00:1450:4864:20::430])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0482B65631\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Jun 2022 18:26:44 +0200 (CEST)", "by mail-wr1-x430.google.com with SMTP id s1so16072259wra.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 15 Jun 2022 09:26:44 -0700 (PDT)", "from localhost.localdomain (ip092042140082.rev.nessus.at.\n\t[92.42.140.82]) by smtp.gmail.com with ESMTPSA id\n\tr17-20020a05600c35d100b0039c8d181ac6sm3135772wmq.26.2022.06.15.09.26.42\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 15 Jun 2022 09:26:43 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1655310405;\n\tbh=X9HxjkGgahIjpIqPOxLoBMPUddryFeMIEMmF7uB1Kbk=;\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=rdQvHCiOe8uDhdIGiPYmMCf09RmuKLsQpUh5PPOmMW8+3Uqjor9M6izraWX4QHSdo\n\t3HIsKaxaOclPqDZ1YnceYX4wSh1E3pbd6Gmcka5tnHo7ZZAgp8KTbedzGNN+c2dBOP\n\tbCaCg7+I/hSH3pnfRfFO+8TIxt4O0MKAmmQyOe+62aEDLhlyU8sWigctx1QmBsOlR/\n\tNtYxpijRuTsNZ0wL/4OVpo29V0Gg1MqP4IqwQbPIaHv7JakdS9ATXE+W4Kg3vLILxI\n\tfs3X8GSGMxOekCiFzPYO6WMMBJfw/52+BAUx/mEXmiyczRDCxGDBq5bc3usYZ0Lx5G\n\taiqWtwZClMLrQ==", "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=hVAZs+2KGFmhbFIx3lcuE8BvVnEh3FH6A/D87gHArzE=;\n\tb=KhI7O/ng6lCmIxkf0coHxJbuD2Grdrpn33Vqjw2SChkZzQjebsoK7wjzGUJIgamQTu\n\tMDfD22fRkSx/VB0AcBwhZcWysbw23pflSUUz1osdQv3NnIRFp4m0LzxIq2ssFALwA7jd\n\tWa5NiXlsoCqNUabDZ/seFC2jbYuWmBddSlnnFnbvmFHd3AyBjTqaXErXbo9fe2AVzrII\n\tY5vnhCRRWM7xt7N7NYsX86aJTkms++SJpje/ehyJzcCOXl7xKXjyd+FxyAqojnuSBC+9\n\tNSmXstntj3nfbxORsac3UhtZTUEbwS3q8364GcTiruwrLa0xz8m2lu5hYRlC48EzSTTg\n\tyL6A==" ], "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=\"KhI7O/ng\"; \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=hVAZs+2KGFmhbFIx3lcuE8BvVnEh3FH6A/D87gHArzE=;\n\tb=xElDaBRajTeMAKzh4IxHErC4JA8nAPUpS/8qSxRsTrFkwlGuJ3bGBAy/u7LGP8kcOs\n\tPIE6jjYao+CD2UlBeVIXLS7+uj/JmQ7w4mbupP+W0BfGXUS3vAWOn7zPK5wFQEoGG3i/\n\to3aMC38OmYn27zpCkFcxfRxtML3lW0TZqWHU23aKNOxgsG2W4+lbJcKJ/1gwguR8dhiv\n\tIRC7PS27Ze2ffLW+utkW6xqs7S4VQD1HRfakfK2ZvyhCbWZFzxuRTsb7BH7MfFWJpGIS\n\tMO7aF/U72l/2O6Y0BfF3ofNNvCbwsEH8HcdHljKMtQS5dfhbQ3fA7qrhq2ubFHQyC3qX\n\t2gbg==", "X-Gm-Message-State": "AJIora/wga0swIkr0PSWKvNqUHSKwrBd2FMICosu+w1DYRMgPNbYalO5\n\tTu3WoUsPxsqw8mWYZBLQGQbRWHPIIcbFxHYF", "X-Google-Smtp-Source": "AGRyM1tHLurMzmC+LZEE3KVPZkK/uvTESdIYnbCkzq8Egj5erWQcjt47rDfzJBkY/pNMA7XZxI5lZA==", "X-Received": "by 2002:a05:6000:18a8:b0:212:ae71:a3f6 with SMTP id\n\tb8-20020a05600018a800b00212ae71a3f6mr549010wri.635.1655310403757; \n\tWed, 15 Jun 2022 09:26:43 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 15 Jun 2022 18:25:59 +0200", "Message-Id": "<20220615162601.48619-2-dse@thaumatec.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20220615162601.48619-1-dse@thaumatec.com>", "References": "<20220615162601.48619-1-dse@thaumatec.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 1/3] Documentation: Update code examples\n\tto match Request related changes", "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": "- Camera::createRequest() now returns unique_ptr instead of raw pointer\n- Request::BufferMap key type is now const\n---\n Documentation/guides/application-developer.rst | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)", "diff": "diff --git a/Documentation/guides/application-developer.rst b/Documentation/guides/application-developer.rst\nindex 16bea9c4..6ab8b7e5 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@@ -410,7 +410,7 @@ images.\n \n .. code:: cpp\n \n- const std::map<Stream *, FrameBuffer *> &buffers = request->buffers();\n+ const std::map<const Stream *, FrameBuffer *> &buffers = request->buffers();\n \n Iterating through the map allows applications to inspect each completed buffer\n in this request, and access the metadata associated to each frame.\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", "1/3" ] }