Patch Detail
Show a patch.
GET /api/patches/2143/?format=api
{ "id": 2143, "url": "https://patchwork.libcamera.org/api/patches/2143/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2143/", "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": "<20191008004534.1585142-6-niklas.soderlund@ragnatech.se>", "date": "2019-10-08T00:45:29", "name": "[libcamera-devel,v5,05/10] libcamera: request: Add metadata information", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "8f3a92cd89909aa0856a147c1ad1ce1509d67342", "submitter": { "id": 5, "url": "https://patchwork.libcamera.org/api/people/5/?format=api", "name": "Niklas Söderlund", "email": "niklas.soderlund@ragnatech.se" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2143/mbox/", "series": [ { "id": 527, "url": "https://patchwork.libcamera.org/api/series/527/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=527", "date": "2019-10-08T00:45:24", "name": "libcamera: ipa: Add basic IPA support", "version": 5, "mbox": "https://patchwork.libcamera.org/series/527/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2143/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2143/checks/", "tags": {}, "headers": { "Return-Path": "<niklas.soderlund@ragnatech.se>", "Received": [ "from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net\n\t[195.74.38.229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BBFC361968\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 8 Oct 2019 02:46:44 +0200 (CEST)", "from bismarck.berto.se (unknown [84.172.88.101])\n\tby bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA\n\tid f5565c09-e964-11e9-837a-0050569116f7;\n\tTue, 08 Oct 2019 02:45:43 +0200 (CEST)" ], "X-Halon-ID": "f5565c09-e964-11e9-837a-0050569116f7", "Authorized-sender": "niklas@soderlund.pp.se", "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 8 Oct 2019 02:45:29 +0200", "Message-Id": "<20191008004534.1585142-6-niklas.soderlund@ragnatech.se>", "X-Mailer": "git-send-email 2.23.0", "In-Reply-To": "<20191008004534.1585142-1-niklas.soderlund@ragnatech.se>", "References": "<20191008004534.1585142-1-niklas.soderlund@ragnatech.se>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v5 05/10] libcamera: request: Add metadata\n\tinformation", "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>", "X-List-Received-Date": "Tue, 08 Oct 2019 00:46:45 -0000" }, "content": "A new ControlList container is needed to hold metadata coming out of\nthe IPA. The list of supported controls in this list is expected to\ngrow, so for now do not add a validator for the list.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/request.h | 2 ++\n src/libcamera/request.cpp | 14 ++++++++++++++\n 2 files changed, 16 insertions(+)", "diff": "diff --git a/include/libcamera/request.h b/include/libcamera/request.h\nindex e3db5243aaf3cf30..2d5a5964e99eb75f 100644\n--- a/include/libcamera/request.h\n+++ b/include/libcamera/request.h\n@@ -37,6 +37,7 @@ public:\n \t~Request();\n \n \tControlList &controls() { return *controls_; }\n+\tControlList &metadata() { return *metadata_; }\n \tconst std::map<Stream *, Buffer *> &buffers() const { return bufferMap_; }\n \tint addBuffer(std::unique_ptr<Buffer> buffer);\n \tBuffer *findBuffer(Stream *stream) const;\n@@ -58,6 +59,7 @@ private:\n \tCamera *camera_;\n \tCameraControlValidator *validator_;\n \tControlList *controls_;\n+\tControlList *metadata_;\n \tstd::map<Stream *, Buffer *> bufferMap_;\n \tstd::unordered_set<Buffer *> pending_;\n \ndiff --git a/src/libcamera/request.cpp b/src/libcamera/request.cpp\nindex 19f6d0b9a0aeb03c..23d3ab6f422c406e 100644\n--- a/src/libcamera/request.cpp\n+++ b/src/libcamera/request.cpp\n@@ -65,6 +65,11 @@ Request::Request(Camera *camera, uint64_t cookie)\n \t */\n \tvalidator_ = new CameraControlValidator(camera);\n \tcontrols_ = new ControlList(validator_);\n+\n+\t/**\n+\t * \\todo: Add a validator for metadata controls.\n+\t */\n+\tmetadata_ = new ControlList(nullptr);\n }\n \n Request::~Request()\n@@ -74,6 +79,7 @@ Request::~Request()\n \t\tdelete buffer;\n \t}\n \n+\tdelete metadata_;\n \tdelete controls_;\n \tdelete validator_;\n }\n@@ -161,6 +167,14 @@ Buffer *Request::findBuffer(Stream *stream) const\n \treturn it->second;\n }\n \n+/**\n+ * \\fn Request::metadata()\n+ * \\brief Retrieve the request's metadata\n+ * \\todo Offer a read-only API towards applications while keeping a read/write\n+ * API internally.\n+ * \\return The metadata associated with the request\n+ */\n+\n /**\n * \\fn Request::cookie()\n * \\brief Retrieve the cookie set when the request was created\n", "prefixes": [ "libcamera-devel", "v5", "05/10" ] }