{"id":22469,"url":"https://patchwork.libcamera.org/api/1.1/patches/22469/?format=json","web_url":"https://patchwork.libcamera.org/patch/22469/","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":"<20250108111030.3257931-3-naush@raspberrypi.com>","date":"2025-01-08T11:09:34","name":"[v3,2/4] ipa: rpi: Add erase()/eraseLocked() to RPiController::Metadata","commit_ref":"a45de8e81b1b8a8f3ae2bfe531062ee294082a12","pull_url":null,"state":"accepted","archived":false,"hash":"e08b7914fe5f4944e2a942f354c3d9ae1064c154","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/1.1/people/34/?format=json","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/22469/mbox/","series":[{"id":4934,"url":"https://patchwork.libcamera.org/api/1.1/series/4934/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4934","date":"2025-01-08T11:09:32","name":"Raspberry Pi: Various changes","version":3,"mbox":"https://patchwork.libcamera.org/series/4934/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/22469/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/22469/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 D665AC32F0\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  8 Jan 2025 11:10:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 76C3568500;\n\tWed,  8 Jan 2025 12:10:40 +0100 (CET)","from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com\n\t[IPv6:2a00:1450:4864:20::32c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C1F65684E1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  8 Jan 2025 12:10:36 +0100 (CET)","by mail-wm1-x32c.google.com with SMTP id\n\t5b1f17b1804b1-436284cdbe0so25955605e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 08 Jan 2025 03:10:36 -0800 (PST)","from NAUSH-P-DELL.pitowers.org ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-436e2ddefcbsm17141325e9.22.2025.01.08.03.10.35\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 08 Jan 2025 03:10:35 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"L5d962O+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1736334636; x=1736939436;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=IIG4zUWJV+wv/nFX9HY32UphHg0iL6nIDLZ67W++gCA=;\n\tb=L5d962O+VwoWD9mfZopcXn4VoDUHl2YpuyQdlpYt5BHyYIfbTAZbLgcKDaRWvIQ1ga\n\tSiUgyvq//9GqE5FJu+OP5dhfX1YHQHyWPqDUjauocCindJ52PEwykSUM1Po9aIpyCzza\n\tsaWRFPtC8kWHlg0DRIIaAm3s0jVoeXVuS76rS8uP6dHS+QqkIY/r3+BA8QeStxe0IWe2\n\tfNd+J7AE0+uri4QRP9r/Iu4Op8i4TcrY7WoO6n+MFFgIGCDYbQ9kkZ4ZYxakkCcq3QkD\n\tIqSgNtVcLmCpE08RflYIuqbad15kOZwu5roigcWQiGSUnz5bjwuYFGzuJfxye9gYMK3J\n\tTXdQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1736334636; x=1736939436;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=IIG4zUWJV+wv/nFX9HY32UphHg0iL6nIDLZ67W++gCA=;\n\tb=T3qxEe1i2Wvvmn5YEhRtWsJzWnWKXDfMipkMNe7swBY+NFp+PV8zl3tVFudD6lHAGP\n\tU0ZI3owprXbyNwsqnciNshhXPEN8qikXCai7ogjw1pSZtXfCnaSpXZuuIqdt28mAgTD6\n\tCXhMC1yFJb7PXmK5jsz5hr80ZFioj+PafFN340O4N8RZDIUWIvlYtBA5y5zXKm8VT7Ug\n\tP5IoybyGuLEzQGiVozv5dA8XtxHQtfT00SoUoftSSQLTs4h0SIJUsz2MofhqxQ43MQkg\n\tsa0D6AStTsoOdeDSRaEucqwKVc5dJ6iQU6CPEZ+rbNoP1SZA6UvX1ufyZ1B5ht3RWK/K\n\tkkbA==","X-Gm-Message-State":"AOJu0Yxug8XycxOXoHE7cedikhXp3R3mLfyqtQEwI7OM5SffywAv5SEf\n\tHosPVAixH+W3hWaky+wQwB546y7C4U/IARYTZW7w59uoSjvhOnWh6zPafM/dACaNopsVSKf/QgH\n\tFvDY=","X-Gm-Gg":"ASbGncvBlZOGHKo1YQTVVIGgEQV/n4VdtFeIiwvIxmRn5jLjfUQ56ShKc/Yj/dpmzDq\n\tHWITFHhOM0U9uyBvBfu7Jee9tqEYIUw8k822Y6BYT+n5IL7BMK5LOcvpdLF6FkjVLSDpMankMsR\n\tV3Z06Amd+F/n/+ObfbNtGNjXKwVmb1IaVJ93keou062A0MWs3RVzIFtFk/ZkEr/P+PJTK+tgZj2\n\tYsbIr8xgFW4O4nbh4ehOVUNbz0G3uyBdD4i19a/1TKICggYvYFgdGVEZjJkY55cBZKFPhB9TxX+","X-Google-Smtp-Source":"AGHT+IH3P3RDTRHseoRuftKm7KXGgRY+qvE2re28yc3zFXBL8DE70VTR53pUHytM1klzg30fzmMEuA==","X-Received":"by 2002:a05:600c:4f14:b0:42c:aeee:e604 with SMTP id\n\t5b1f17b1804b1-436e27170d3mr7420615e9.8.1736334635889; \n\tWed, 08 Jan 2025 03:10:35 -0800 (PST)","From":"Naushir Patuck <naush@raspberrypi.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Naushir Patuck <naush@raspberrypi.com>,\n\tDavid Plowman <david.plowman@raspberrypi.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Subject":"[PATCH v3 2/4] ipa: rpi: Add erase()/eraseLocked() to\n\tRPiController::Metadata","Date":"Wed,  8 Jan 2025 11:09:34 +0000","Message-ID":"<20250108111030.3257931-3-naush@raspberrypi.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20250108111030.3257931-1-naush@raspberrypi.com>","References":"<20250108111030.3257931-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"These functions erase a key/value pair from the metadata object.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/rpi/controller/metadata.h | 14 ++++++++++++++\n 1 file changed, 14 insertions(+)","diff":"diff --git a/src/ipa/rpi/controller/metadata.h b/src/ipa/rpi/controller/metadata.h\nindex b884490918c7..77d3b0745059 100644\n--- a/src/ipa/rpi/controller/metadata.h\n+++ b/src/ipa/rpi/controller/metadata.h\n@@ -91,6 +91,12 @@ public:\n \t\tdata_.insert(other.data_.begin(), other.data_.end());\n \t}\n \n+\tvoid erase(std::string const &tag)\n+\t{\n+\t\tstd::scoped_lock lock(mutex_);\n+\t\teraseLocked(tag);\n+\t}\n+\n \ttemplate<typename T>\n \tT *getLocked(std::string const &tag)\n \t{\n@@ -111,6 +117,14 @@ public:\n \t\tdata_[tag] = std::forward<T>(value);\n \t}\n \n+\tvoid eraseLocked(std::string const &tag)\n+\t{\n+\t\tauto it = data_.find(tag);\n+\t\tif (it == data_.end())\n+\t\t\treturn;\n+\t\tdata_.erase(it);\n+\t}\n+\n \t/*\n \t * Note: use of (lowercase) lock and unlock means you can create scoped\n \t * locks with the standard lock classes.\n","prefixes":["v3","2/4"]}