[libcamera-devel] [PATCH v6 5/6] ipa: raspberrypi: Add a Merge method to RPiController::Metadata

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue May 11 01:51:45 CEST 2021


Hi Naush,

Thank you for the patch.

On Mon, May 10, 2021 at 10:58:14AM +0100, Naushir Patuck wrote:
> 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 <naush at raspberrypi.com>
> Reviewed-by: David Plowman <david.plowman at raspberrypi.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

> ---
>  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<typename T>
>  	T *GetLocked(std::string const &tag)
>  	{

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list