From patchwork Mon May 10 09:58:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 12238 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id B0A89BF829 for ; Mon, 10 May 2021 09:59:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 384B86892C; Mon, 10 May 2021 11:59:13 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="SWNr9P/Y"; dkim-atps=neutral Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B3B046891D for ; Mon, 10 May 2021 11:59:09 +0200 (CEST) Received: by mail-wr1-x435.google.com with SMTP id l2so15934191wrm.9 for ; Mon, 10 May 2021 02:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FEqthfD1opOlgUQvReBRoIm1vl+hGBwXG6rHSbk0IFg=; b=SWNr9P/YXuB8jE68PEZuscFw1BmuUJ8jKD3Ss64BBlJEWXoVTpg3KQvy97T7R6CNaK D1/PKx5PtnZyd1Jh6WKphZhummuXlQiDJVEx8A3J4VAYF540xV42RAW9jOkE9HC07E8o YYoH/NM9BagcEuaC0fBJkEI0tZKcWyoOZrozqHTneUYzWdm09PYzgzeuDNS3FmWmtGkA 7v37ISwN8/SufaI2J8djevgg/L7iOwEZ0ERyK0w7tlUPxnpgxSYRz5lQY3dAptkphS0W gqB54fWeYAvOjIgK4YOp7eurBid1d6yuG4VAJ/ZX4ZGYFwq+05+t7YUoQnojmvMxu/oW aBLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FEqthfD1opOlgUQvReBRoIm1vl+hGBwXG6rHSbk0IFg=; b=mYAIX3jrCA4GZwPj/nVxgCajuravVM5FENNuRtRF/O+KY2PEO9FRZTaymVw+zrIpfp 8cOoJSRT+Q6Mqh83nbf+zpu2uZsG1hjK+4KoALUd6L3ucyxokLfyKKoF+bRSdJFO+W0R kaxAeEy3kTkoA8C0RrBLlkwQLI7vYGwkfP1dsqFMKUYcVSsA1yJJccUmoIjONQ0PUraj yBCfUoqiGcxkXA2vn/rjIOvqDoYlWBBNhVDjFuFRPJJR1yaWIgr91lqs0zeIeq99QnOm ugxBumIzPHqXpaGS2/UQjyOt+WoooZBtVdhz0ocVtkCZQ011wacB7+/8i2qAsPKC5XBs XCSA== X-Gm-Message-State: AOAM532Kx0aRZGhRLS1/hLF1US07P8UTzqAVFrzfCrY6tRtkcrfUVRCi koSZDlpLQ5hCg+5ALWMEG3M3C43IjqapgQ== X-Google-Smtp-Source: ABdhPJwnXSZnIYD8rj4ZkZ3f7VT7gMti1lplX2dyhn3WrLtc+AuPMhH9t9pCQ4zP9l1zVkRsB0CGKg== X-Received: by 2002:adf:e9d0:: with SMTP id l16mr29531308wrn.191.1620640749275; Mon, 10 May 2021 02:59:09 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:e710:3ec:6dad:dc2]) by smtp.gmail.com with ESMTPSA id y17sm24767917wrw.90.2021.05.10.02.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 02:59:08 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Mon, 10 May 2021 10:58:14 +0100 Message-Id: <20210510095814.3732400-6-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510095814.3732400-1-naush@raspberrypi.com> References: <20210510095814.3732400-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 5/6] ipa: raspberrypi: Add a Merge method to RPiController::Metadata X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add a new Merge method to the Metadata class. This will merge all unique key/value pairs from a source metadata map to the destination map. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman Reviewed-by: Laurent Pinchart --- src/ipa/raspberrypi/controller/metadata.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ipa/raspberrypi/controller/metadata.hpp b/src/ipa/raspberrypi/controller/metadata.hpp index 3a97a5f5c502..fd6aac880bad 100644 --- a/src/ipa/raspberrypi/controller/metadata.hpp +++ b/src/ipa/raspberrypi/controller/metadata.hpp @@ -73,6 +73,12 @@ public: return *this; } + void Merge(Metadata &other) + { + std::scoped_lock lock(mutex_, other.mutex_); + data_.merge(other.data_); + } + template T *GetLocked(std::string const &tag) {