[{"id":17740,"web_url":"https://patchwork.libcamera.org/comment/17740/","msgid":"<20210625022852.GA2599@pyrite.rasen.tech>","date":"2021-06-25T02:28:52","subject":"Re: [libcamera-devel] [PATCH 04/16] libcamera: Rename libcamera\n\tpkg-config generation","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 02:35:27AM +0100, Kieran Bingham wrote:\n> The libcamera library is moved to the first positional argument of the\n> pkg-config generator to automatically populate the name and filebase\n> values for the package.\n> \n> As part of this, the shared library name is adjusted to the full library\n> name 'libcamera', without relying upon the automatic 'lib' prefix which\n> better represents the component and naming of the library.\n> \n> As a result of this, the pkgconfig file is now named 'libcamera.pc' as\n> opposed to 'camera.pc', and applications desiring to reference libcamera\n> will need to search for 'libcamera' as a dependency rather than\n> 'camera'.\n> \n> The library itself is still created and installed as 'libcamera.so'.\n> \n> An example meson.build file would need to be adjusted as the following:\n> \n> -      dependency('camera', required : true),\n> +      dependency('libcamera', required : true),\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/libcamera/meson.build | 7 +++----\n>  1 file changed, 3 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index e4c60e736697..387d20843203 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -135,8 +135,9 @@ libcamera_deps = [\n>  # runtime if the library is running from an installed location by checking\n>  # for the presence or abscence of the dynamic tag.\n>  \n> -libcamera = shared_library('camera',\n> +libcamera = shared_library('libcamera',\n>                             libcamera_sources,\n> +                           name_prefix : '',\n>                             install : true,\n>                             include_directories : includes,\n>                             build_rpath : '/',\n> @@ -157,10 +158,8 @@ libcamera_dep = declare_dependency(sources : [\n>                                     link_with : libcamera)\n>  \n>  pkg_mod = import('pkgconfig')\n> -pkg_mod.generate(libraries: libcamera,\n> +pkg_mod.generate(libcamera,\n>                   version : '1.0',\n> -                 name : 'libcamera',\n> -                 filebase : 'camera',\n>                   description : 'Complex Camera Support Library',\n>                   subdirs : 'libcamera')\n>  \n> -- \n> 2.30.2\n>","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 C0197C321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 02:29:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 24925684CB;\n\tFri, 25 Jun 2021 04:29:03 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 256A360508\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 04:29:01 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 90DE8501;\n\tFri, 25 Jun 2021 04:28:59 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"SnsaPr5L\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624588140;\n\tbh=Q8y6fyS53NCprOO7wm3fmN+jmWDNV3Bp3ysfJQg2iOs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=SnsaPr5L54Yzv0A7DimdfsJZOKlFamikkBN6A7qH+vPubs4xGv3E8Lco+Jj+b/UOL\n\tAqSwXHxFBaQ6GwqVMrl4fFjj0yghDMzAxq7qNxvEk4NxbhX7qNBpQBHM1a/7DZs2G2\n\t0HiGL9DTlaWa+9QHA+YL5q0tkY51jhIr2kWo+vVc=","Date":"Fri, 25 Jun 2021 11:28:52 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210625022852.GA2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-5-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-5-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 04/16] libcamera: Rename libcamera\n\tpkg-config generation","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17741,"web_url":"https://patchwork.libcamera.org/comment/17741/","msgid":"<20210625022950.GB2599@pyrite.rasen.tech>","date":"2021-06-25T02:29:50","subject":"Re: [libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so\n\tpkg-config file generation","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 02:35:26AM +0100, Kieran Bingham wrote:\n> The pkg-config file for the main libcamera.so is generated\n> at the top level meson.build.\n> \n> Move this to the actual core libcamera build structure to be\n> consistent and keep it next to the library construction.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  meson.build               | 8 --------\n>  src/libcamera/meson.build | 8 ++++++++\n>  2 files changed, 8 insertions(+), 8 deletions(-)\n> \n> diff --git a/meson.build b/meson.build\n> index 4d7d936f09e2..6eed0d8c4a44 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -164,14 +164,6 @@ run_command('ln', '-fsT', meson.source_root(), meson.build_root() / 'source')\n>  \n>  configure_file(output : 'config.h', configuration : config_h)\n>  \n> -pkg_mod = import('pkgconfig')\n> -pkg_mod.generate(libraries : libcamera,\n> -                 version : '1.0',\n> -                 name : 'libcamera',\n> -                 filebase : 'camera',\n> -                 description : 'Complex Camera Support Library',\n> -                 subdirs : 'libcamera')\n> -\n>  # Check for python installation and modules.\n>  py_mod = import('python')\n>  py_mod.find_installation('python3', modules: py_modules)\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index d9b5bfae69fd..e4c60e736697 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -156,4 +156,12 @@ libcamera_dep = declare_dependency(sources : [\n>                                     include_directories : libcamera_includes,\n>                                     link_with : libcamera)\n>  \n> +pkg_mod = import('pkgconfig')\n> +pkg_mod.generate(libraries: libcamera,\n> +                 version : '1.0',\n> +                 name : 'libcamera',\n> +                 filebase : 'camera',\n> +                 description : 'Complex Camera Support Library',\n> +                 subdirs : 'libcamera')\n> +\n>  subdir('proxy/worker')\n> -- \n> 2.30.2\n>","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 2E724C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 02:30:00 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DDB5F684CB;\n\tFri, 25 Jun 2021 04:29:59 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4AC5B60508\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 04:29:58 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DD64F501;\n\tFri, 25 Jun 2021 04:29:56 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ceNwXXni\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624588198;\n\tbh=C0zJw2JU5/yRdH7FRBPBku6ttObaPAvuemJQFcowgow=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ceNwXXniV1ZhFW6ttAPl6RQZJ/gMPMKfaNfzqcRJ08f+Ck4Qyv9qzjCHlmJRHn33Y\n\tgmzODBJJiR8ltETaiGjf9fKxqiTqlk8gfUvbu3S0O8v8DNnf20bBLGjwQh+GCddrPB\n\tw2eiDrpM2NqSRaoTaAkSdwpas7TOTwG1NrtjaIcE=","Date":"Fri, 25 Jun 2021 11:29:50 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210625022950.GB2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-4-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-4-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so\n\tpkg-config file generation","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17742,"web_url":"https://patchwork.libcamera.org/comment/17742/","msgid":"<20210625023243.GC2599@pyrite.rasen.tech>","date":"2021-06-25T02:32:43","subject":"Re: [libcamera-devel] [PATCH 01/16] android: Split HAL to its own\n\tshared library","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 02:35:24AM +0100, Kieran Bingham wrote:\n> The libcamera Android HAL implementation should not be an integral part\n> of libcamera, but a support library that utilises the libcamera public\n> API.\n> \n> Move the implementation to its own distinct library.\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/android/cros/meson.build |  2 +-\n>  src/android/meson.build      | 16 +++++++++++++++-\n>  src/libcamera/meson.build    | 13 -------------\n>  src/meson.build              |  8 ++------\n>  4 files changed, 18 insertions(+), 21 deletions(-)\n> \n> diff --git a/src/android/cros/meson.build b/src/android/cros/meson.build\n> index 13ec8f0aecc7..c2bda70838e2 100644\n> --- a/src/android/cros/meson.build\n> +++ b/src/android/cros/meson.build\n> @@ -15,4 +15,4 @@ cros_hal_info = static_library('cros_hal_info',\n>                                 include_directories : [android_includes,\n>                                                        libcamera_includes])\n>  \n> -libcamera_objects += cros_hal_info.extract_objects('camera3_hal.cpp')\n> +android_objects += cros_hal_info.extract_objects('camera3_hal.cpp')\n> diff --git a/src/android/meson.build b/src/android/meson.build\n> index 6270fb201338..feda3e0998bd 100644\n> --- a/src/android/meson.build\n> +++ b/src/android/meson.build\n> @@ -4,6 +4,7 @@ android_deps = [\n>      dependency('libexif', required : get_option('android')),\n>      dependency('libjpeg', required : get_option('android')),\n>      dependency('yaml-0.1', required : get_option('android')),\n> +    libcamera_dep,\n>  ]\n>  \n>  android_enabled = true\n> @@ -36,8 +37,11 @@ endif\n>  \n>  android_deps += [libyuv_dep]\n>  \n> +android_cpp_args = []\n> +android_objects = []\n> +\n>  if get_option('android_platform') == 'cros'\n> -   libcamera_cpp_args += [ '-DOS_CHROMEOS']\n> +    android_cpp_args += ['-DOS_CHROMEOS']\n>  endif\n>  \n>  subdir('cros')\n> @@ -69,3 +73,13 @@ android_camera_metadata = static_library('camera_metadata',\n>                                           android_camera_metadata_sources,\n>                                           c_args : '-Wno-shadow',\n>                                           include_directories : android_includes)\n> +\n> +libcamera_hal = shared_library('libcamera-hal',\n> +                               android_hal_sources,\n> +                               name_prefix : '',\n> +                               link_with : android_camera_metadata,\n> +                               install : true,\n> +                               cpp_args : android_cpp_args,\n> +                               objects : android_objects,\n> +                               include_directories : android_includes,\n> +                               dependencies : android_deps)\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 7e19a1774a59..d9b5bfae69fd 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -130,16 +130,6 @@ libcamera_deps = [\n>      dependency('threads'),\n>  ]\n>  \n> -libcamera_link_with = []\n> -\n> -if android_enabled\n> -    libcamera_sources += android_hal_sources\n> -    includes += android_includes\n> -    libcamera_link_with += android_camera_metadata\n> -\n> -    libcamera_deps += android_deps\n> -endif\n> -\n>  # We add '/' to the build_rpath as a 'safe' path to act as a boolean flag.\n>  # The build_rpath is stripped at install time by meson, so we determine at\n>  # runtime if the library is running from an installed location by checking\n> @@ -148,10 +138,7 @@ endif\n>  libcamera = shared_library('camera',\n>                             libcamera_sources,\n>                             install : true,\n> -                           link_with : libcamera_link_with,\n> -                           cpp_args : libcamera_cpp_args,\n>                             include_directories : includes,\n> -                           objects : libcamera_objects,\n>                             build_rpath : '/',\n>                             dependencies : libcamera_deps)\n>  \n> diff --git a/src/meson.build b/src/meson.build\n> index 573966055aa2..e0ea9c3570af 100644\n> --- a/src/meson.build\n> +++ b/src/meson.build\n> @@ -25,14 +25,10 @@ else\n>      ipa_sign_module = false\n>  endif\n>  \n> -libcamera_cpp_args = []\n> -libcamera_objects = []\n> +# libcamera must be built first as a dependency to the other components.\n> +subdir('libcamera')\n>  \n> -# The 'android' subdir must be processed first, and the build targets\n> -# are included directly into the libcamera library when this is enabled.\n>  subdir('android')\n> -\n> -subdir('libcamera')\n>  subdir('ipa')\n>  \n>  subdir('lc-compliance')\n> -- \n> 2.30.2\n>","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 4B1E8C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 02:32:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BC499684CE;\n\tFri, 25 Jun 2021 04:32:52 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9A24A684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 04:32:51 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1151F501;\n\tFri, 25 Jun 2021 04:32:49 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mGU3987d\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624588371;\n\tbh=y1VSz8i729ZKAXUCXLTg652NKY30JzYvQwA/JOO36KQ=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=mGU3987dM+aH3As+brIcvvS5GaRcbvXGH0D9GhOhr3s4OjrpLb71uvMWGANTeVGGb\n\tVylvPakJ4X1khv8iCuWrXIT+L1GmLcKAuCLQ082r0Ir8VYxs0eoRgRq19sia4N8b9S\n\tU2Oxgwg8Z8XZ61yV0dIK3jYIcETZ02w+FDXPHlng=","Date":"Fri, 25 Jun 2021 11:32:43 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210625023243.GC2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-2-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-2-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 01/16] android: Split HAL to its own\n\tshared library","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17744,"web_url":"https://patchwork.libcamera.org/comment/17744/","msgid":"<CAO5uPHNS-EA_Uz8PiKLxQ230SpiQic8rvuJxEXjckmwqm=1aCA@mail.gmail.com>","date":"2021-06-25T02:59:07","subject":"Re: [libcamera-devel] [PATCH 02/16] android: cros: Simplify\n\tintegration","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Kieran, thank you for the patch.\n\nOn Fri, Jun 25, 2021 at 10:35 AM Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> The ChromeOS specific Android HAL support was overly-complex to support\n> linking an additional library, and then passing the built object into\n> the libcamera.so build.\n>\n> Now that it has its own distinct libcamera-hal.so, simplify the CrOS\n> integration to build directly into that library.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n> ---\n>  src/android/cros/meson.build | 11 +++--------\n>  src/android/meson.build      | 13 +++----------\n>  2 files changed, 6 insertions(+), 18 deletions(-)\n>\n> diff --git a/src/android/cros/meson.build b/src/android/cros/meson.build\n> index c2bda70838e2..35995dd814a2 100644\n> --- a/src/android/cros/meson.build\n> +++ b/src/android/cros/meson.build\n> @@ -4,15 +4,10 @@ if get_option('android_platform') != 'cros'\n>     subdir_done()\n>  endif\n>\n> -cros_hal_info_sources = files([\n> +android_hal_sources += files([\n>      'camera3_hal.cpp',\n>  ])\n>\n> -cros_hal_info = static_library('cros_hal_info',\n> -                               cros_hal_info_sources,\n> -                               dependencies : dependency('libcros_camera'),\n> -                               c_args : '-Wno-shadow',\n> -                               include_directories : [android_includes,\n> -                                                      libcamera_includes])\n> +android_deps += dependency('libcros_camera')\n>\n> -android_objects += cros_hal_info.extract_objects('camera3_hal.cpp')\n> +android_cpp_args += ['-DOS_CHROMEOS']\n> diff --git a/src/android/meson.build b/src/android/meson.build\n> index feda3e0998bd..bd58ef964c2a 100644\n> --- a/src/android/meson.build\n> +++ b/src/android/meson.build\n> @@ -37,15 +37,6 @@ endif\n>\n>  android_deps += [libyuv_dep]\n>\n> -android_cpp_args = []\n> -android_objects = []\n> -\n> -if get_option('android_platform') == 'cros'\n> -    android_cpp_args += ['-DOS_CHROMEOS']\n> -endif\n> -\n> -subdir('cros')\n> -\n>  android_hal_sources = files([\n>      'camera3_hal.cpp',\n>      'camera_capabilities.cpp',\n> @@ -63,6 +54,9 @@ android_hal_sources = files([\n>      'yuv/post_processor_yuv.cpp'\n>  ])\n>\n> +android_cpp_args = []\n> +\n> +subdir('cros')\n>  subdir('mm')\n>\n>  android_camera_metadata_sources = files([\n> @@ -80,6 +74,5 @@ libcamera_hal = shared_library('libcamera-hal',\n>                                 link_with : android_camera_metadata,\n>                                 install : true,\n>                                 cpp_args : android_cpp_args,\n> -                               objects : android_objects,\n>                                 include_directories : android_includes,\n>                                 dependencies : android_deps)\n> --\n> 2.30.2\n>","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 3D709C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 02:59:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A4E53684C9;\n\tFri, 25 Jun 2021 04:59:19 +0200 (CEST)","from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com\n\t[IPv6:2a00:1450:4864:20::52b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B5C2B60508\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 04:59:17 +0200 (CEST)","by mail-ed1-x52b.google.com with SMTP id s6so11387593edu.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jun 2021 19:59:17 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"Maulqr/j\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=p4XBAHXQpc1EHEIIvpegkcjIHX8ujAzUkAgGfAyROq8=;\n\tb=Maulqr/jWC7qyL61gdiDmVGgUGMov9TLneBhjFtN76AWk8t9x5UAZM27Sb4MR/9En+\n\tMaA/kdkpHw3nQagLIp/Q+qdgmYqUeV4zfG9SHiVtVpv69ELrm7R1BLFQrIMQXIlX9yHV\n\tV4LGkrbjflcKqSQwHnqTe4ABUKXej0jj7nWBg=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=p4XBAHXQpc1EHEIIvpegkcjIHX8ujAzUkAgGfAyROq8=;\n\tb=mfgx2uPDmrsqTd5BsH7mCThosBdM3NkednPBda9PMFUUPj95Ivz3MjoKtGPERuidlR\n\t70muAcu6TzSZsjJznlh4/A712UoUgtrMByzKHhrAdH7eG2LL66DTUvJIJQa2SClHbBXj\n\tf6vxpJwsvXLsTNYwsN95TdpHJjpQwRvKqDMhLJQ7oWPtsQrKBrBFsmYD1pUvfvu6ZrYi\n\tShD9G9JqiGdnwCmwpb9YSrAiZxAILn/PDm1bjUf4PwCOZbRWFMh786CFsDY4BxysQcqz\n\tBd0lskDJvpesE6u/uwx6rczs1mVHHv34//6rXR0QFTwIMDQoYg0JTzt5VS+0HkuiTC0g\n\t/zow==","X-Gm-Message-State":"AOAM531ptD4L5faI9sPDeuxw8XG7ekrmim6UR20sUNGgOT2LFDJGDQfT\n\tBbsAW2I6QtSQfsduEIqNS978IefZDBTWNQ2MgdnZYA==","X-Google-Smtp-Source":"ABdhPJzi/r3005Z8va5hYGURZoEdWXzLmCenN7VM4bWp5fcj/ZixFgry5+gHybS1VpuKfhD0mOKIPyiqtgPRxUxglXw=","X-Received":"by 2002:aa7:c88c:: with SMTP id\n\tp12mr11480439eds.244.1624589957371; \n\tThu, 24 Jun 2021 19:59:17 -0700 (PDT)","MIME-Version":"1.0","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-3-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20210625013539.625803-3-kieran.bingham@ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Fri, 25 Jun 2021 11:59:07 +0900","Message-ID":"<CAO5uPHNS-EA_Uz8PiKLxQ230SpiQic8rvuJxEXjckmwqm=1aCA@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 02/16] android: cros: Simplify\n\tintegration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17745,"web_url":"https://patchwork.libcamera.org/comment/17745/","msgid":"<20210625025939.GD2599@pyrite.rasen.tech>","date":"2021-06-25T02:59:39","subject":"Re: [libcamera-devel] [PATCH 02/16] android: cros: Simplify\n\tintegration","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 02:35:25AM +0100, Kieran Bingham wrote:\n> The ChromeOS specific Android HAL support was overly-complex to support\n> linking an additional library, and then passing the built object into\n> the libcamera.so build.\n> \n> Now that it has its own distinct libcamera-hal.so, simplify the CrOS\n> integration to build directly into that library.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/android/cros/meson.build | 11 +++--------\n>  src/android/meson.build      | 13 +++----------\n>  2 files changed, 6 insertions(+), 18 deletions(-)\n> \n> diff --git a/src/android/cros/meson.build b/src/android/cros/meson.build\n> index c2bda70838e2..35995dd814a2 100644\n> --- a/src/android/cros/meson.build\n> +++ b/src/android/cros/meson.build\n> @@ -4,15 +4,10 @@ if get_option('android_platform') != 'cros'\n>     subdir_done()\n>  endif\n>  \n> -cros_hal_info_sources = files([\n> +android_hal_sources += files([\n>      'camera3_hal.cpp',\n>  ])\n>  \n> -cros_hal_info = static_library('cros_hal_info',\n> -                               cros_hal_info_sources,\n> -                               dependencies : dependency('libcros_camera'),\n> -                               c_args : '-Wno-shadow',\n> -                               include_directories : [android_includes,\n> -                                                      libcamera_includes])\n> +android_deps += dependency('libcros_camera')\n>  \n> -android_objects += cros_hal_info.extract_objects('camera3_hal.cpp')\n> +android_cpp_args += ['-DOS_CHROMEOS']\n> diff --git a/src/android/meson.build b/src/android/meson.build\n> index feda3e0998bd..bd58ef964c2a 100644\n> --- a/src/android/meson.build\n> +++ b/src/android/meson.build\n> @@ -37,15 +37,6 @@ endif\n>  \n>  android_deps += [libyuv_dep]\n>  \n> -android_cpp_args = []\n> -android_objects = []\n> -\n> -if get_option('android_platform') == 'cros'\n> -    android_cpp_args += ['-DOS_CHROMEOS']\n> -endif\n> -\n> -subdir('cros')\n> -\n>  android_hal_sources = files([\n>      'camera3_hal.cpp',\n>      'camera_capabilities.cpp',\n> @@ -63,6 +54,9 @@ android_hal_sources = files([\n>      'yuv/post_processor_yuv.cpp'\n>  ])\n>  \n> +android_cpp_args = []\n> +\n> +subdir('cros')\n>  subdir('mm')\n>  \n>  android_camera_metadata_sources = files([\n> @@ -80,6 +74,5 @@ libcamera_hal = shared_library('libcamera-hal',\n>                                 link_with : android_camera_metadata,\n>                                 install : true,\n>                                 cpp_args : android_cpp_args,\n> -                               objects : android_objects,\n>                                 include_directories : android_includes,\n>                                 dependencies : android_deps)\n> -- \n> 2.30.2\n>","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 55D83C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 02:59:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 17866684CB;\n\tFri, 25 Jun 2021 04:59:48 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DA5C460508\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 04:59:46 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 912F5501;\n\tFri, 25 Jun 2021 04:59:45 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ac+q0L5R\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624589986;\n\tbh=QklTBb/3RrBIE2w/ZOZVXPipAEmdKDMoESvGE0vXYbw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ac+q0L5RXd/cbAQnB342QbVyv3/hZOpu8uACfGy3Ivi2lTK63iMhW6wTyFkLCON1q\n\tcATN44TRfYrJ1bEeIuKm6ehjoFywkrDkRi3FqMl5eGK5PKDq/DUJSPLRY/GpDkfRMD\n\tMa4ybIdPoQv+01NSiSK85Chraiu3jVrquUhHJTZ8=","Date":"Fri, 25 Jun 2021 11:59:39 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210625025939.GD2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-3-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-3-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 02/16] android: cros: Simplify\n\tintegration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17746,"web_url":"https://patchwork.libcamera.org/comment/17746/","msgid":"<CAO5uPHO_UcFTA_g6WsjQ6P6iDkv=JphA8rOG-nCd5TFn5PoitA@mail.gmail.com>","date":"2021-06-25T03:06:40","subject":"Re: [libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so\n\tpkg-config file generation","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Kieran, thank you for the patch.\n\nOn Fri, Jun 25, 2021 at 11:30 AM <paul.elder@ideasonboard.com> wrote:\n>\n> Hi Kieran,\n>\n> On Fri, Jun 25, 2021 at 02:35:26AM +0100, Kieran Bingham wrote:\n> > The pkg-config file for the main libcamera.so is generated\n> > at the top level meson.build.\n> >\n> > Move this to the actual core libcamera build structure to be\n> > consistent and keep it next to the library construction.\n> >\n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n>\n> > ---\n> >  meson.build               | 8 --------\n> >  src/libcamera/meson.build | 8 ++++++++\n> >  2 files changed, 8 insertions(+), 8 deletions(-)\n> >\n> > diff --git a/meson.build b/meson.build\n> > index 4d7d936f09e2..6eed0d8c4a44 100644\n> > --- a/meson.build\n> > +++ b/meson.build\n> > @@ -164,14 +164,6 @@ run_command('ln', '-fsT', meson.source_root(), meson.build_root() / 'source')\n> >\n> >  configure_file(output : 'config.h', configuration : config_h)\n> >\n> > -pkg_mod = import('pkgconfig')\n> > -pkg_mod.generate(libraries : libcamera,\n> > -                 version : '1.0',\n> > -                 name : 'libcamera',\n> > -                 filebase : 'camera',\n> > -                 description : 'Complex Camera Support Library',\n> > -                 subdirs : 'libcamera')\n> > -\n> >  # Check for python installation and modules.\n> >  py_mod = import('python')\n> >  py_mod.find_installation('python3', modules: py_modules)\n> > diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> > index d9b5bfae69fd..e4c60e736697 100644\n> > --- a/src/libcamera/meson.build\n> > +++ b/src/libcamera/meson.build\n> > @@ -156,4 +156,12 @@ libcamera_dep = declare_dependency(sources : [\n> >                                     include_directories : libcamera_includes,\n> >                                     link_with : libcamera)\n> >\n> > +pkg_mod = import('pkgconfig')\n> > +pkg_mod.generate(libraries: libcamera,\n> > +                 version : '1.0',\n> > +                 name : 'libcamera',\n> > +                 filebase : 'camera',\n\nThis is not related to this change, but why is filebase camera, not libcamera?\n\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n\n> > +                 description : 'Complex Camera Support Library',\n> > +                 subdirs : 'libcamera')\n> > +\n> >  subdir('proxy/worker')\n> > --\n> > 2.30.2\n> >","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 6FB5AC321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:06:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EF222684D1;\n\tFri, 25 Jun 2021 05:06:52 +0200 (CEST)","from mail-ej1-x636.google.com (mail-ej1-x636.google.com\n\t[IPv6:2a00:1450:4864:20::636])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5BDA4684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:06:51 +0200 (CEST)","by mail-ej1-x636.google.com with SMTP id ot9so11787048ejb.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jun 2021 20:06:51 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"RtJto2Ka\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=x22IVkfzOw9o0oorj4uXSMIWDm//VSx8+VUOCl93ugo=;\n\tb=RtJto2Ka2JGniVAQabLNQ0NFs+O2/sHYqccroOa7Sk+sJxrpLRCsdeFJjEyQDq0cc/\n\tniiwU61Ao/zroeQx+/05dN48EIG5kAvb23y6O0RAVGJ10a/q9UH7GcQjgq8OU1wO8dO9\n\tZ0GHMAMnF1PRRL/T4X3NlS74PE5g700DBW5lk=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=x22IVkfzOw9o0oorj4uXSMIWDm//VSx8+VUOCl93ugo=;\n\tb=F0TitDxe0mHxAuI/9WxmFlBzt4kD6ilTeyyteBVvZNcRBzQJ87mbYiFzcm2BBlsoTE\n\tgdCe3j8wXpiDsNV/FpP9dGZfl6X16YiztEO8yOjZ+BfJqO7h26V05i1Jb7CTuZbRy9/s\n\t9QqiMNBn4QPDu2jciF3CZyB5xd6ynXlgJfWFTKBzb8iFNn5zd0GVfDw8lI9BZ++6H19D\n\tFoQwfbkS/L1C8cfoAuOK4ZPYFfjs1ofbF5dFJ0MIsCJA/EkVIIrgqca2ixgE/YzF9UXI\n\t9q+llhhFY7n3qU1dFFNVr0x7QezC/Pw4dEkWthNo/1RN11EibBnWhVSY3ynSg1OK73ru\n\tdeAQ==","X-Gm-Message-State":"AOAM533a+aOUUw4A2wIcHNnM2RoVi97C8nv7uCqDJVYFp8hnMZ7lpneG\n\tZcn9M7ORRELahisCxvlItMTh/pnD8mh+sZgDm2BUcQ==","X-Google-Smtp-Source":"ABdhPJz9OWfniFEn85zZYL2RUdytRSxyGOpXWYQxx2oaIVxtCthWNszI9c4mNBrTtO2i7D0k/h7509WyLHmKskGQ+KY=","X-Received":"by 2002:a17:906:a20b:: with SMTP id\n\tr11mr8352839ejy.221.1624590411001; \n\tThu, 24 Jun 2021 20:06:51 -0700 (PDT)","MIME-Version":"1.0","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-4-kieran.bingham@ideasonboard.com>\n\t<20210625022950.GB2599@pyrite.rasen.tech>","In-Reply-To":"<20210625022950.GB2599@pyrite.rasen.tech>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Fri, 25 Jun 2021 12:06:40 +0900","Message-ID":"<CAO5uPHO_UcFTA_g6WsjQ6P6iDkv=JphA8rOG-nCd5TFn5PoitA@mail.gmail.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so\n\tpkg-config file generation","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17747,"web_url":"https://patchwork.libcamera.org/comment/17747/","msgid":"<CAO5uPHPuxoTGjFpSAo5TP7sh5M3bjRgxFLBUVBeRo-MFeZz0_A@mail.gmail.com>","date":"2021-06-25T03:08:08","subject":"Re: [libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so\n\tpkg-config file generation","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 12:06 PM Hirokazu Honda <hiroh@chromium.org> wrote:\n>\n> Hi Kieran, thank you for the patch.\n>\n> On Fri, Jun 25, 2021 at 11:30 AM <paul.elder@ideasonboard.com> wrote:\n> >\n> > Hi Kieran,\n> >\n> > On Fri, Jun 25, 2021 at 02:35:26AM +0100, Kieran Bingham wrote:\n> > > The pkg-config file for the main libcamera.so is generated\n> > > at the top level meson.build.\n> > >\n> > > Move this to the actual core libcamera build structure to be\n> > > consistent and keep it next to the library construction.\n> > >\n> > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >\n> > Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> >\n> > > ---\n> > >  meson.build               | 8 --------\n> > >  src/libcamera/meson.build | 8 ++++++++\n> > >  2 files changed, 8 insertions(+), 8 deletions(-)\n> > >\n> > > diff --git a/meson.build b/meson.build\n> > > index 4d7d936f09e2..6eed0d8c4a44 100644\n> > > --- a/meson.build\n> > > +++ b/meson.build\n> > > @@ -164,14 +164,6 @@ run_command('ln', '-fsT', meson.source_root(), meson.build_root() / 'source')\n> > >\n> > >  configure_file(output : 'config.h', configuration : config_h)\n> > >\n> > > -pkg_mod = import('pkgconfig')\n> > > -pkg_mod.generate(libraries : libcamera,\n> > > -                 version : '1.0',\n> > > -                 name : 'libcamera',\n> > > -                 filebase : 'camera',\n> > > -                 description : 'Complex Camera Support Library',\n> > > -                 subdirs : 'libcamera')\n> > > -\n> > >  # Check for python installation and modules.\n> > >  py_mod = import('python')\n> > >  py_mod.find_installation('python3', modules: py_modules)\n> > > diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> > > index d9b5bfae69fd..e4c60e736697 100644\n> > > --- a/src/libcamera/meson.build\n> > > +++ b/src/libcamera/meson.build\n> > > @@ -156,4 +156,12 @@ libcamera_dep = declare_dependency(sources : [\n> > >                                     include_directories : libcamera_includes,\n> > >                                     link_with : libcamera)\n> > >\n> > > +pkg_mod = import('pkgconfig')\n> > > +pkg_mod.generate(libraries: libcamera,\n> > > +                 version : '1.0',\n> > > +                 name : 'libcamera',\n> > > +                 filebase : 'camera',\n>\n> This is not related to this change, but why is filebase camera, not libcamera?\n>\n\nNever mind. This is resolved in the next patch.\n\n> Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n>\n> > > +                 description : 'Complex Camera Support Library',\n> > > +                 subdirs : 'libcamera')\n> > > +\n> > >  subdir('proxy/worker')\n> > > --\n> > > 2.30.2\n> > >","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 DF059C321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:08:19 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9E3F1684CE;\n\tFri, 25 Jun 2021 05:08:19 +0200 (CEST)","from mail-ed1-x532.google.com (mail-ed1-x532.google.com\n\t[IPv6:2a00:1450:4864:20::532])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DC9F6684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:08:18 +0200 (CEST)","by mail-ed1-x532.google.com with SMTP id h2so11484543edt.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jun 2021 20:08:18 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"gyG53JEa\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=RTPTVCXIlmDQZpz1EFzDnccISlxoAzsLRH7NdVQm4co=;\n\tb=gyG53JEa+1QPkBDYhsLXTpongUWpDs+hd6hvMLmqVH8sBG+4SQWcCZ0dDoHzlzehpB\n\t7D+yNZCwtH8lL9kWD23NLrPG2qQyxMk2c4GSe02hH3TyRNhgbc9sC84zT8+mqtC0gkFA\n\ttmQRHgmIAvfQkBFOL7F33nnkGOuGymjDDzgLI=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=RTPTVCXIlmDQZpz1EFzDnccISlxoAzsLRH7NdVQm4co=;\n\tb=LGA2oSYLSmtn6OiERdKR057xlevImrY/krq4DlU5PA3boBhWJOgAUvD4Y0Zgt7xP4A\n\t9YdUqndqKcBWSTBTHu/UXe9D/+TlLdDCla7nFxgXpO6NNJvCF9RH/6Y6+rgAQ43Q8R7b\n\tX/AMMqQJd5zYQ00z6bKVSkpf43de1BXZ6i2uvbdvl4BvwsriM/VOddXMe9CDZOdKLew3\n\tmU4d1ssvTjFur1DnjNKsbXAicbF2DU8ggueAZDcjRipxe1Rt9Yx11b7SQdrp4iyWVa/t\n\tX4Yge6bQvQ/3YDQqO1tu7NPEp054+K0kCSNQs+B4OW60K51rspAiPRWST5EamDKsuI+a\n\tsaHA==","X-Gm-Message-State":"AOAM531B226/AUigJjPxyBSGYuTs7AgC8OZ0zuJQ8Zm5A94N+5xnfqFe\n\t5KXaJ8rABE8UnDj/mKvbMkgRDrTOWf5XEZMVMnznCA==","X-Google-Smtp-Source":"ABdhPJyyXEU/oY8haMpG5Lw9o6h7mdCXY78N3ocVKie+D/KO/vRGOBkRC7A/MF7/iVYKWT6F/tf+Pdl1X3ajpxEFKV0=","X-Received":"by 2002:a05:6402:3548:: with SMTP id\n\tf8mr11577896edd.116.1624590498674; \n\tThu, 24 Jun 2021 20:08:18 -0700 (PDT)","MIME-Version":"1.0","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-4-kieran.bingham@ideasonboard.com>\n\t<20210625022950.GB2599@pyrite.rasen.tech>\n\t<CAO5uPHO_UcFTA_g6WsjQ6P6iDkv=JphA8rOG-nCd5TFn5PoitA@mail.gmail.com>","In-Reply-To":"<CAO5uPHO_UcFTA_g6WsjQ6P6iDkv=JphA8rOG-nCd5TFn5PoitA@mail.gmail.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Fri, 25 Jun 2021 12:08:08 +0900","Message-ID":"<CAO5uPHPuxoTGjFpSAo5TP7sh5M3bjRgxFLBUVBeRo-MFeZz0_A@mail.gmail.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so\n\tpkg-config file generation","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17748,"web_url":"https://patchwork.libcamera.org/comment/17748/","msgid":"<CAO5uPHOmVKz5LxV53vo5mx74FtoK5bpC954HRm6U5ZbAgUzhaw@mail.gmail.com>","date":"2021-06-25T03:09:15","subject":"Re: [libcamera-devel] [PATCH 04/16] libcamera: Rename libcamera\n\tpkg-config generation","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Kieran, thank you for the patch.\n\nOn Fri, Jun 25, 2021 at 11:29 AM <paul.elder@ideasonboard.com> wrote:\n>\n> Hi Kieran,\n>\n> On Fri, Jun 25, 2021 at 02:35:27AM +0100, Kieran Bingham wrote:\n> > The libcamera library is moved to the first positional argument of the\n> > pkg-config generator to automatically populate the name and filebase\n> > values for the package.\n> >\n> > As part of this, the shared library name is adjusted to the full library\n> > name 'libcamera', without relying upon the automatic 'lib' prefix which\n> > better represents the component and naming of the library.\n> >\n> > As a result of this, the pkgconfig file is now named 'libcamera.pc' as\n> > opposed to 'camera.pc', and applications desiring to reference libcamera\n> > will need to search for 'libcamera' as a dependency rather than\n> > 'camera'.\n> >\n> > The library itself is still created and installed as 'libcamera.so'.\n> >\n> > An example meson.build file would need to be adjusted as the following:\n> >\n> > -      dependency('camera', required : true),\n> > +      dependency('libcamera', required : true),\n> >\n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n>\n\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n\n> > ---\n> >  src/libcamera/meson.build | 7 +++----\n> >  1 file changed, 3 insertions(+), 4 deletions(-)\n> >\n> > diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> > index e4c60e736697..387d20843203 100644\n> > --- a/src/libcamera/meson.build\n> > +++ b/src/libcamera/meson.build\n> > @@ -135,8 +135,9 @@ libcamera_deps = [\n> >  # runtime if the library is running from an installed location by checking\n> >  # for the presence or abscence of the dynamic tag.\n> >\n> > -libcamera = shared_library('camera',\n> > +libcamera = shared_library('libcamera',\n> >                             libcamera_sources,\n> > +                           name_prefix : '',\n> >                             install : true,\n> >                             include_directories : includes,\n> >                             build_rpath : '/',\n> > @@ -157,10 +158,8 @@ libcamera_dep = declare_dependency(sources : [\n> >                                     link_with : libcamera)\n> >\n> >  pkg_mod = import('pkgconfig')\n> > -pkg_mod.generate(libraries: libcamera,\n> > +pkg_mod.generate(libcamera,\n> >                   version : '1.0',\n> > -                 name : 'libcamera',\n> > -                 filebase : 'camera',\n> >                   description : 'Complex Camera Support Library',\n> >                   subdirs : 'libcamera')\n> >\n> > --\n> > 2.30.2\n> >","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 51002C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:09:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0D6B9684CE;\n\tFri, 25 Jun 2021 05:09:28 +0200 (CEST)","from mail-ej1-x635.google.com (mail-ej1-x635.google.com\n\t[IPv6:2a00:1450:4864:20::635])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6EF46684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:09:26 +0200 (CEST)","by mail-ej1-x635.google.com with SMTP id bg14so12758314ejb.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jun 2021 20:09:26 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"JzbTFMWg\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=WpgPUS8pUWkdP399o/53wNjQxxCPtJqWGVwvdGprfDI=;\n\tb=JzbTFMWgiI+vG+1pgx+Zn3XH2HsppDKiX2yNwvlmWK3Xxo9D41qCD1JQJhOjYBevi6\n\tcCVPZfYeCtO1WAQRPujksdf6hH7P/YL+8ZTnfNYnaYyW/KcmfsG2xRvtBdtjmd+xSo9i\n\tVwESDfbDL/GwlLzd/gMZt17GoWXwHgYWTuKaY=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=WpgPUS8pUWkdP399o/53wNjQxxCPtJqWGVwvdGprfDI=;\n\tb=HWqWqtZUYbvycZ2kU/7Gss7WGYX/06K/ofONSwUOD7uL03Xk5pKVbBNlxsJWE8FQHH\n\tXxzIlJ1hGl8gcdZ6evfqLHF+u9gTuJgjqc7t8R/wJ8AWgBRhm+3HUaWoBkbOvqbzL9AM\n\te5Websd9vTF8CxOVqG2eSH/Apk/VgBSFBUTnJ8qMVqh2iEsS7M1y8AjExtomEGTJVVSa\n\tO8lU9FiQxnKCnctzolt3PWT9ClTxxkO+m0TVHbuJ2QTfTJiD9OsHQiw4b2EEYHcaHSLA\n\t2a93EnZle2crWJpczDQ2OBi4c0NfFFpY0i2ABSuT8H56Bw53rceRTweYd2HPpoHjQzqg\n\t+c0Q==","X-Gm-Message-State":"AOAM533eSsboZXBalMW7KoVuHejvNqsJepCWivrROCQVjcuvVFKJyeQp\n\tRpCElAQRz34mZpxQBqC/vJGH2Ummi787OngwRUzeLA==","X-Google-Smtp-Source":"ABdhPJwsfXKmmLpSulqoonmF21+ouOtM1erR/Ztft0fLYhJd0jSD6HjWxi2yz+ICgl9oUm3odatmhAAh2cU9S7p/MSQ=","X-Received":"by 2002:a17:907:20da:: with SMTP id\n\tqq26mr8290958ejb.42.1624590566163; \n\tThu, 24 Jun 2021 20:09:26 -0700 (PDT)","MIME-Version":"1.0","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-5-kieran.bingham@ideasonboard.com>\n\t<20210625022852.GA2599@pyrite.rasen.tech>","In-Reply-To":"<20210625022852.GA2599@pyrite.rasen.tech>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Fri, 25 Jun 2021 12:09:15 +0900","Message-ID":"<CAO5uPHOmVKz5LxV53vo5mx74FtoK5bpC954HRm6U5ZbAgUzhaw@mail.gmail.com>","To":"Paul Elder <paul.elder@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 04/16] libcamera: Rename libcamera\n\tpkg-config generation","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17749,"web_url":"https://patchwork.libcamera.org/comment/17749/","msgid":"<20210625031107.GE2599@pyrite.rasen.tech>","date":"2021-06-25T03:11:07","subject":"Re: [libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so\n\tpkg-config file generation","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Hiro,\n\nOn Fri, Jun 25, 2021 at 12:06:40PM +0900, Hirokazu Honda wrote:\n> Hi Kieran, thank you for the patch.\n> \n> On Fri, Jun 25, 2021 at 11:30 AM <paul.elder@ideasonboard.com> wrote:\n> >\n> > Hi Kieran,\n> >\n> > On Fri, Jun 25, 2021 at 02:35:26AM +0100, Kieran Bingham wrote:\n> > > The pkg-config file for the main libcamera.so is generated\n> > > at the top level meson.build.\n> > >\n> > > Move this to the actual core libcamera build structure to be\n> > > consistent and keep it next to the library construction.\n> > >\n> > > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >\n> > Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> >\n> > > ---\n> > >  meson.build               | 8 --------\n> > >  src/libcamera/meson.build | 8 ++++++++\n> > >  2 files changed, 8 insertions(+), 8 deletions(-)\n> > >\n> > > diff --git a/meson.build b/meson.build\n> > > index 4d7d936f09e2..6eed0d8c4a44 100644\n> > > --- a/meson.build\n> > > +++ b/meson.build\n> > > @@ -164,14 +164,6 @@ run_command('ln', '-fsT', meson.source_root(), meson.build_root() / 'source')\n> > >\n> > >  configure_file(output : 'config.h', configuration : config_h)\n> > >\n> > > -pkg_mod = import('pkgconfig')\n> > > -pkg_mod.generate(libraries : libcamera,\n> > > -                 version : '1.0',\n> > > -                 name : 'libcamera',\n> > > -                 filebase : 'camera',\n> > > -                 description : 'Complex Camera Support Library',\n> > > -                 subdirs : 'libcamera')\n> > > -\n> > >  # Check for python installation and modules.\n> > >  py_mod = import('python')\n> > >  py_mod.find_installation('python3', modules: py_modules)\n> > > diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> > > index d9b5bfae69fd..e4c60e736697 100644\n> > > --- a/src/libcamera/meson.build\n> > > +++ b/src/libcamera/meson.build\n> > > @@ -156,4 +156,12 @@ libcamera_dep = declare_dependency(sources : [\n> > >                                     include_directories : libcamera_includes,\n> > >                                     link_with : libcamera)\n> > >\n> > > +pkg_mod = import('pkgconfig')\n> > > +pkg_mod.generate(libraries: libcamera,\n> > > +                 version : '1.0',\n> > > +                 name : 'libcamera',\n> > > +                 filebase : 'camera',\n> \n> This is not related to this change, but why is filebase camera, not libcamera?\n\nMy understanding is that this patch is for moving this section directly\nwithout modification, while the next patch changes the filebase from\ncamera to libcamera.\n\n\nPaul\n\n> \n> Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n> \n> > > +                 description : 'Complex Camera Support Library',\n> > > +                 subdirs : 'libcamera')\n> > > +\n> > >  subdir('proxy/worker')\n> > > --\n> > > 2.30.2\n> > >","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 343A6C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:11:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 864FA684CE;\n\tFri, 25 Jun 2021 05:11:16 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 23E4C684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:11:15 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 10E46501;\n\tFri, 25 Jun 2021 05:11:12 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"hQwHDHPt\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624590674;\n\tbh=pY9B0FZlERSrlpOd4Qndo1GSvYqTgsvkrm15ynou1r4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=hQwHDHPtsGF6ij2hVtFliNM3+qC2pyMnpXhcRnoGQGJ8kIRexm8LIeCPDpJ2rr/O2\n\th15yBcKhpGPmstVuscdyQ5smDlsAARQQENo71VyFjoR6cQIifWyTwcKOAM4qRf0V7N\n\t2RN0+OIFMhNCxYmJg5fK2SJQIrVNO9BOmzjZLBWo=","Date":"Fri, 25 Jun 2021 12:11:07 +0900","From":"paul.elder@ideasonboard.com","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<20210625031107.GE2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-4-kieran.bingham@ideasonboard.com>\n\t<20210625022950.GB2599@pyrite.rasen.tech>\n\t<CAO5uPHO_UcFTA_g6WsjQ6P6iDkv=JphA8rOG-nCd5TFn5PoitA@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<CAO5uPHO_UcFTA_g6WsjQ6P6iDkv=JphA8rOG-nCd5TFn5PoitA@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so\n\tpkg-config file generation","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17750,"web_url":"https://patchwork.libcamera.org/comment/17750/","msgid":"<20210625031826.GF2599@pyrite.rasen.tech>","date":"2021-06-25T03:18:26","subject":"Re: [libcamera-devel] [PATCH 05/16] libcamera: Separate source and\n\tbuild path helpers","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 02:35:28AM +0100, Kieran Bingham wrote:\n> The libcameraSourcePath and libcameraBuildPath helper functions are\n> internal and specific to libcamera needs while operating with the meson\n> build system.\n> \n> In preparation for the upcoming move of utils to a common library, move\n> these helpers out of utils and into their own build unit.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  include/libcamera/internal/meson.build    |   1 +\n>  include/libcamera/internal/source-paths.h |  19 ++++\n>  src/libcamera/meson.build                 |   1 +\n>  src/libcamera/source-paths.cpp            | 129 ++++++++++++++++++++++\n>  src/libcamera/utils.cpp                   | 102 -----------------\n>  5 files changed, 150 insertions(+), 102 deletions(-)\n>  create mode 100644 include/libcamera/internal/source-paths.h\n>  create mode 100644 src/libcamera/source-paths.cpp\n> \n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index f019cfb3b0de..e5088177fe8e 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -39,6 +39,7 @@ libcamera_internal_headers = files([\n>      'process.h',\n>      'pub_key.h',\n>      'semaphore.h',\n> +    'source-paths.h',\n>      'sysfs.h',\n>      'thread.h',\n>      'timer.h',\n> diff --git a/include/libcamera/internal/source-paths.h b/include/libcamera/internal/source-paths.h\n> new file mode 100644\n> index 000000000000..2591ebb1081b\n> --- /dev/null\n> +++ b/include/libcamera/internal/source-paths.h\n> @@ -0,0 +1,19 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2021, Google Inc.\n> + *\n> + * source-paths.h - Identify libcamera source and build paths\n> + */\n> +#ifndef __LIBCAMERA_INTERNAL_SOURCE_PATHS_H__\n> +#define __LIBCAMERA_INTERNAL_SOURCE_PATHS_H__\n> +\n> +#include <string>\n> +\n> +namespace libcamera::utils {\n> +\n> +std::string libcameraBuildPath();\n> +std::string libcameraSourcePath();\n> +\n> +} /* namespace libcamera::utils */\n> +\n> +#endif /* __LIBCAMERA_INTERNAL_SOURCE_PATHS_H__ */\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 387d20843203..e792094f5798 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -46,6 +46,7 @@ libcamera_sources = files([\n>      'request.cpp',\n>      'semaphore.cpp',\n>      'signal.cpp',\n> +    'source-paths.cpp',\n>      'stream.cpp',\n>      'sysfs.cpp',\n>      'thread.cpp',\n> diff --git a/src/libcamera/source-paths.cpp b/src/libcamera/source-paths.cpp\n> new file mode 100644\n> index 000000000000..b39f5f853e39\n> --- /dev/null\n> +++ b/src/libcamera/source-paths.cpp\n> @@ -0,0 +1,129 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2021, Google Inc.\n> + *\n> + * source-paths.cpp - Identify libcamera source and build paths\n> + */\n> +\n> +#include \"libcamera/internal/source-paths.h\"\n> +\n> +#include <dlfcn.h>\n> +#include <elf.h>\n> +#include <link.h>\n> +#include <sys/stat.h>\n> +\n> +#include \"libcamera/internal/utils.h\"\n> +\n> +/**\n> + * \\file source-paths.h\n> + * \\brief Identify the build and source path of a not-yet-installed library\n> + */\n> +\n> +/* musl doesn't declare _DYNAMIC in link.h, declare it manually. */\n> +extern ElfW(Dyn) _DYNAMIC[];\n> +\n> +namespace libcamera::utils {\n> +\n> +/**\n> + * \\brief Check if libcamera is installed or not\n> + *\n> + * Utilise the build_rpath dynamic tag which is stripped out by meson at\n> + * install time to determine at runtime if the library currently executing\n> + * has been installed or not.\n> + *\n> + * \\return True if libcamera is installed, false otherwise\n> + */\n> +bool isLibcameraInstalled()\n> +{\n> +\t/*\n> +\t * DT_RUNPATH (DT_RPATH when the linker uses old dtags) is removed on\n> +\t * install.\n> +\t */\n> +\tfor (const ElfW(Dyn) *dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn) {\n> +\t\tif (dyn->d_tag == DT_RUNPATH || dyn->d_tag == DT_RPATH)\n> +\t\t\treturn false;\n> +\t}\n> +\n> +\treturn true;\n> +}\n> +\n> +/**\n> + * \\brief Retrieve the path to the build directory\n> + *\n> + * During development, it is useful to run libcamera binaries directly from the\n> + * build directory without installing them. This function helps components that\n> + * need to locate resources in the build tree, such as IPA modules or IPA proxy\n> + * workers, by providing them with the path to the root of the build directory.\n> + * Callers can then use it to complement or override searches in system-wide\n> + * directories.\n> + *\n> + * If libcamera has been installed, the build directory path is not available\n> + * and this function returns an empty string.\n> + *\n> + * \\return The path to the build directory if running from a build, or an empty\n> + * string otherwise\n> + */\n> +std::string libcameraBuildPath()\n> +{\n> +\tif (isLibcameraInstalled())\n> +\t\treturn std::string();\n> +\n> +\tDl_info info;\n> +\n> +\t/* Look up our own symbol. */\n> +\tint ret = dladdr(reinterpret_cast<void *>(libcameraBuildPath), &info);\n> +\tif (ret == 0)\n> +\t\treturn std::string();\n> +\n> +\tstd::string path = dirname(info.dli_fname) + \"/../../\";\n> +\n> +\tchar *real = realpath(path.c_str(), nullptr);\n> +\tif (!real)\n> +\t\treturn std::string();\n> +\n> +\tpath = real;\n> +\tfree(real);\n> +\n> +\treturn path + \"/\";\n> +}\n> +\n> +/**\n> + * \\brief Retrieve the path to the source directory\n> + *\n> + * During development, it is useful to run libcamera binaries directly from the\n> + * build directory without installing them. This function helps components that\n> + * need to locate resources in the source tree, such as IPA configuration\n> + * files, by providing them with the path to the root of the source directory.\n> + * Callers can then use it to complement or override searches in system-wide\n> + * directories.\n> + *\n> + * If libcamera has been installed, the source directory path is not available\n> + * and this function returns an empty string.\n> + *\n> + * \\return The path to the source directory if running from a build directory,\n> + * or an empty string otherwise\n> + */\n> +std::string libcameraSourcePath()\n> +{\n> +\tstd::string path = libcameraBuildPath();\n> +\tif (path.empty())\n> +\t\treturn std::string();\n> +\n> +\tpath += \"source\";\n> +\n> +\tchar *real = realpath(path.c_str(), nullptr);\n> +\tif (!real)\n> +\t\treturn std::string();\n> +\n> +\tpath = real;\n> +\tfree(real);\n> +\n> +\tstruct stat statbuf;\n> +\tint ret = stat(path.c_str(), &statbuf);\n> +\tif (ret < 0 || (statbuf.st_mode & S_IFMT) != S_IFDIR)\n> +\t\treturn std::string();\n> +\n> +\treturn path + \"/\";\n> +}\n> +\n> +} /* namespace libcamera::utils */\n> diff --git a/src/libcamera/utils.cpp b/src/libcamera/utils.cpp\n> index 49b8fc9e211f..42f82d6158dd 100644\n> --- a/src/libcamera/utils.cpp\n> +++ b/src/libcamera/utils.cpp\n> @@ -351,108 +351,6 @@ std::string toAscii(const std::string &str)\n>  \treturn ret;\n>  }\n>  \n> -/**\n> - * \\brief Check if libcamera is installed or not\n> - *\n> - * Utilise the build_rpath dynamic tag which is stripped out by meson at\n> - * install time to determine at runtime if the library currently executing\n> - * has been installed or not.\n> - *\n> - * \\return True if libcamera is installed, false otherwise\n> - */\n> -bool isLibcameraInstalled()\n> -{\n> -\t/*\n> -\t * DT_RUNPATH (DT_RPATH when the linker uses old dtags) is removed on\n> -\t * install.\n> -\t */\n> -\tfor (const ElfW(Dyn) *dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn) {\n> -\t\tif (dyn->d_tag == DT_RUNPATH || dyn->d_tag == DT_RPATH)\n> -\t\t\treturn false;\n> -\t}\n> -\n> -\treturn true;\n> -}\n> -\n> -/**\n> - * \\brief Retrieve the path to the build directory\n> - *\n> - * During development, it is useful to run libcamera binaries directly from the\n> - * build directory without installing them. This function helps components that\n> - * need to locate resources in the build tree, such as IPA modules or IPA proxy\n> - * workers, by providing them with the path to the root of the build directory.\n> - * Callers can then use it to complement or override searches in system-wide\n> - * directories.\n> - *\n> - * If libcamera has been installed, the build directory path is not available\n> - * and this function returns an empty string.\n> - *\n> - * \\return The path to the build directory if running from a build, or an empty\n> - * string otherwise\n> - */\n> -std::string libcameraBuildPath()\n> -{\n> -\tif (isLibcameraInstalled())\n> -\t\treturn std::string();\n> -\n> -\tDl_info info;\n> -\n> -\t/* Look up our own symbol. */\n> -\tint ret = dladdr(reinterpret_cast<void *>(libcameraBuildPath), &info);\n> -\tif (ret == 0)\n> -\t\treturn std::string();\n> -\n> -\tstd::string path = dirname(info.dli_fname) + \"/../../\";\n> -\n> -\tchar *real = realpath(path.c_str(), nullptr);\n> -\tif (!real)\n> -\t\treturn std::string();\n> -\n> -\tpath = real;\n> -\tfree(real);\n> -\n> -\treturn path + \"/\";\n> -}\n> -\n> -/**\n> - * \\brief Retrieve the path to the source directory\n> - *\n> - * During development, it is useful to run libcamera binaries directly from the\n> - * build directory without installing them. This function helps components that\n> - * need to locate resources in the source tree, such as IPA configuration\n> - * files, by providing them with the path to the root of the source directory.\n> - * Callers can then use it to complement or override searches in system-wide\n> - * directories.\n> - *\n> - * If libcamera has been installed, the source directory path is not available\n> - * and this function returns an empty string.\n> - *\n> - * \\return The path to the source directory if running from a build directory,\n> - * or an empty string otherwise\n> - */\n> -std::string libcameraSourcePath()\n> -{\n> -\tstd::string path = libcameraBuildPath();\n> -\tif (path.empty())\n> -\t\treturn std::string();\n> -\n> -\tpath += \"source\";\n> -\n> -\tchar *real = realpath(path.c_str(), nullptr);\n> -\tif (!real)\n> -\t\treturn std::string();\n> -\n> -\tpath = real;\n> -\tfree(real);\n> -\n> -\tstruct stat statbuf;\n> -\tint ret = stat(path.c_str(), &statbuf);\n> -\tif (ret < 0 || (statbuf.st_mode & S_IFMT) != S_IFDIR)\n> -\t\treturn std::string();\n> -\n> -\treturn path + \"/\";\n> -}\n> -\n>  /**\n>   * \\fn alignDown(unsigned int value, unsigned int alignment)\n>   * \\brief Align \\a value down to \\a alignment\n> -- \n> 2.30.2\n>","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 295ACC321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:18:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 84436684CB;\n\tFri, 25 Jun 2021 05:18:34 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D8E8760508\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:18:33 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C088E501;\n\tFri, 25 Jun 2021 05:18:31 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"m+j/WRdA\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624591112;\n\tbh=O+EZDtm5S+9JXhZ0lLqYgVQ2loc2irC7xpMMmaPImNM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=m+j/WRdACR8fpWXjrIR7ectuew+mTciChgbnVA6OUk3cIgQLuE10+8Be88RWuv34c\n\tIu0IpgthFFV1Be5tuQk9h4DD9dlB5+qlSkCZNnVJrYmejft6tcBui852VN2IrF2W12\n\tkdRXb39RCHeZy5U3bTQaVSd5yyfmYrWx7KNrpfXU=","Date":"Fri, 25 Jun 2021 12:18:26 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210625031826.GF2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-6-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-6-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 05/16] libcamera: Separate source and\n\tbuild path helpers","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17751,"web_url":"https://patchwork.libcamera.org/comment/17751/","msgid":"<YNVK8Rmgu4Sa3cDJ@pendragon.ideasonboard.com>","date":"2021-06-25T03:18:09","subject":"Re: [libcamera-devel] [PATCH 04/16] libcamera: Rename libcamera\n\tpkg-config generation","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Fri, Jun 25, 2021 at 02:35:27AM +0100, Kieran Bingham wrote:\n> The libcamera library is moved to the first positional argument of the\n> pkg-config generator to automatically populate the name and filebase\n> values for the package.\n> \n> As part of this, the shared library name is adjusted to the full library\n> name 'libcamera', without relying upon the automatic 'lib' prefix which\n> better represents the component and naming of the library.\n> \n> As a result of this, the pkgconfig file is now named 'libcamera.pc' as\n> opposed to 'camera.pc', and applications desiring to reference libcamera\n> will need to search for 'libcamera' as a dependency rather than\n> 'camera'.\n> \n> The library itself is still created and installed as 'libcamera.so'.\n> \n> An example meson.build file would need to be adjusted as the following:\n> \n> -      dependency('camera', required : true),\n> +      dependency('libcamera', required : true),\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  src/libcamera/meson.build | 7 +++----\n>  1 file changed, 3 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index e4c60e736697..387d20843203 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -135,8 +135,9 @@ libcamera_deps = [\n>  # runtime if the library is running from an installed location by checking\n>  # for the presence or abscence of the dynamic tag.\n>  \n> -libcamera = shared_library('camera',\n> +libcamera = shared_library('libcamera',\n>                             libcamera_sources,\n> +                           name_prefix : '',\n\nWhile I like the end-result for pkg-config, I'm not too fond of this\nparticular change as we work around the normal usage of shared_library()\nhere to change the name of the .pc file. Could we keep this unchanged,\nand set filebase to 'libcamera' below instead ?\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>                             install : true,\n>                             include_directories : includes,\n>                             build_rpath : '/',\n> @@ -157,10 +158,8 @@ libcamera_dep = declare_dependency(sources : [\n>                                     link_with : libcamera)\n>  \n>  pkg_mod = import('pkgconfig')\n> -pkg_mod.generate(libraries: libcamera,\n> +pkg_mod.generate(libcamera,\n>                   version : '1.0',\n> -                 name : 'libcamera',\n> -                 filebase : 'camera',\n>                   description : 'Complex Camera Support Library',\n>                   subdirs : 'libcamera')\n>","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 499B4C321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:18:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 072C5684D1;\n\tFri, 25 Jun 2021 05:18:43 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3A145684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:18:41 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id BF030501;\n\tFri, 25 Jun 2021 05:18:40 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"EaUBI1v3\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624591120;\n\tbh=IZ1oium4LUs0I1DJ2f6pqgZfl8E4BR42Zcv5GodQfoM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=EaUBI1v3Wej6r8sj4WG7tc2xSNb/hDT/v7f4NPl0l6QuLYFo3fLprG28rfTVSkWHb\n\tv82MpGo2doKueMX3cXQ5e1i09tqswg0jkzlvq9I1gx4171V25MBFsQbB1hSLlbpV+4\n\tvq89cQ0ujwxbgrxBPtjMy6i+rpHi7faVh7eao/jY=","Date":"Fri, 25 Jun 2021 06:18:09 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YNVK8Rmgu4Sa3cDJ@pendragon.ideasonboard.com>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-5-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-5-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 04/16] libcamera: Rename libcamera\n\tpkg-config generation","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17752,"web_url":"https://patchwork.libcamera.org/comment/17752/","msgid":"<YNVLBqCeewL9oTiV@pendragon.ideasonboard.com>","date":"2021-06-25T03:18:30","subject":"Re: [libcamera-devel] [PATCH 02/16] android: cros: Simplify\n\tintegration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Fri, Jun 25, 2021 at 02:35:25AM +0100, Kieran Bingham wrote:\n> The ChromeOS specific Android HAL support was overly-complex to support\n> linking an additional library, and then passing the built object into\n> the libcamera.so build.\n> \n> Now that it has its own distinct libcamera-hal.so, simplify the CrOS\n> integration to build directly into that library.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  src/android/cros/meson.build | 11 +++--------\n>  src/android/meson.build      | 13 +++----------\n>  2 files changed, 6 insertions(+), 18 deletions(-)\n> \n> diff --git a/src/android/cros/meson.build b/src/android/cros/meson.build\n> index c2bda70838e2..35995dd814a2 100644\n> --- a/src/android/cros/meson.build\n> +++ b/src/android/cros/meson.build\n> @@ -4,15 +4,10 @@ if get_option('android_platform') != 'cros'\n>     subdir_done()\n>  endif\n>  \n> -cros_hal_info_sources = files([\n> +android_hal_sources += files([\n>      'camera3_hal.cpp',\n>  ])\n>  \n> -cros_hal_info = static_library('cros_hal_info',\n> -                               cros_hal_info_sources,\n> -                               dependencies : dependency('libcros_camera'),\n> -                               c_args : '-Wno-shadow',\n> -                               include_directories : [android_includes,\n> -                                                      libcamera_includes])\n> +android_deps += dependency('libcros_camera')\n>  \n> -android_objects += cros_hal_info.extract_objects('camera3_hal.cpp')\n> +android_cpp_args += ['-DOS_CHROMEOS']\n> diff --git a/src/android/meson.build b/src/android/meson.build\n> index feda3e0998bd..bd58ef964c2a 100644\n> --- a/src/android/meson.build\n> +++ b/src/android/meson.build\n> @@ -37,15 +37,6 @@ endif\n>  \n>  android_deps += [libyuv_dep]\n>  \n> -android_cpp_args = []\n> -android_objects = []\n> -\n> -if get_option('android_platform') == 'cros'\n> -    android_cpp_args += ['-DOS_CHROMEOS']\n> -endif\n> -\n> -subdir('cros')\n> -\n>  android_hal_sources = files([\n>      'camera3_hal.cpp',\n>      'camera_capabilities.cpp',\n> @@ -63,6 +54,9 @@ android_hal_sources = files([\n>      'yuv/post_processor_yuv.cpp'\n>  ])\n>  \n> +android_cpp_args = []\n> +\n> +subdir('cros')\n>  subdir('mm')\n>  \n>  android_camera_metadata_sources = files([\n> @@ -80,6 +74,5 @@ libcamera_hal = shared_library('libcamera-hal',\n>                                 link_with : android_camera_metadata,\n>                                 install : true,\n>                                 cpp_args : android_cpp_args,\n> -                               objects : android_objects,\n>                                 include_directories : android_includes,\n>                                 dependencies : android_deps)","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 E666BC321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:19:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A26E6684CE;\n\tFri, 25 Jun 2021 05:19:02 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 54C95684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:19:01 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EBD65501;\n\tFri, 25 Jun 2021 05:19:00 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"SB2uwFbz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624591141;\n\tbh=DjvlWoPZAKlNfkM142AiWHaBbogxJoP6efceKXnaAIU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=SB2uwFbzhVlQF3Qdm1VEJGnIwORurbrUjD8Kk6qQMostRqAlORLSWzoD/600G4nxn\n\twX1psjZThypJ3YMqWHxPqHU+Jje649iFk8cgRuMN6dDMhLpNHtzddfXhEBGfWTpQ7E\n\tCs3wQcRCsbJ3DaxcwEWbHTbMFipMMXPWT7iCLuF8=","Date":"Fri, 25 Jun 2021 06:18:30 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YNVLBqCeewL9oTiV@pendragon.ideasonboard.com>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-3-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-3-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 02/16] android: cros: Simplify\n\tintegration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17753,"web_url":"https://patchwork.libcamera.org/comment/17753/","msgid":"<YNVLGPxZqAezsv8H@pendragon.ideasonboard.com>","date":"2021-06-25T03:18:48","subject":"Re: [libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so\n\tpkg-config file generation","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Fri, Jun 25, 2021 at 02:35:26AM +0100, Kieran Bingham wrote:\n> The pkg-config file for the main libcamera.so is generated\n> at the top level meson.build.\n> \n> Move this to the actual core libcamera build structure to be\n> consistent and keep it next to the library construction.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  meson.build               | 8 --------\n>  src/libcamera/meson.build | 8 ++++++++\n>  2 files changed, 8 insertions(+), 8 deletions(-)\n> \n> diff --git a/meson.build b/meson.build\n> index 4d7d936f09e2..6eed0d8c4a44 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -164,14 +164,6 @@ run_command('ln', '-fsT', meson.source_root(), meson.build_root() / 'source')\n>  \n>  configure_file(output : 'config.h', configuration : config_h)\n>  \n> -pkg_mod = import('pkgconfig')\n> -pkg_mod.generate(libraries : libcamera,\n> -                 version : '1.0',\n> -                 name : 'libcamera',\n> -                 filebase : 'camera',\n> -                 description : 'Complex Camera Support Library',\n> -                 subdirs : 'libcamera')\n> -\n>  # Check for python installation and modules.\n>  py_mod = import('python')\n>  py_mod.find_installation('python3', modules: py_modules)\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index d9b5bfae69fd..e4c60e736697 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -156,4 +156,12 @@ libcamera_dep = declare_dependency(sources : [\n>                                     include_directories : libcamera_includes,\n>                                     link_with : libcamera)\n>  \n> +pkg_mod = import('pkgconfig')\n> +pkg_mod.generate(libraries: libcamera,\n> +                 version : '1.0',\n> +                 name : 'libcamera',\n> +                 filebase : 'camera',\n> +                 description : 'Complex Camera Support Library',\n> +                 subdirs : 'libcamera')\n> +\n>  subdir('proxy/worker')","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 459F9C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:19:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 05595684C9;\n\tFri, 25 Jun 2021 05:19:21 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D277B684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:19:19 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 65076501;\n\tFri, 25 Jun 2021 05:19:19 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"YL+DYZJV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624591159;\n\tbh=EfN5zEBWkdQtDiuyPfaLx0LNxIYzcp+/IoTk+TTdj0s=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=YL+DYZJVAJPbnYNI+PQTvhsOYZjO+TB79cvy6lipK+sjd3TVBC52JL/auOX7hypAI\n\twN4QDNLqD88GTdS32lfkbxAgsvnSHQ0DQjF/XGcNcSUYp2JL39uUzPIkPDRy1AH8a6\n\tvzJ7M6W03BtO3DHA5FVePZgw9vXBBIFcsKsgWS68=","Date":"Fri, 25 Jun 2021 06:18:48 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YNVLGPxZqAezsv8H@pendragon.ideasonboard.com>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-4-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-4-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so\n\tpkg-config file generation","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17754,"web_url":"https://patchwork.libcamera.org/comment/17754/","msgid":"<YNVLeF2ZhIcAJGyZ@pendragon.ideasonboard.com>","date":"2021-06-25T03:20:24","subject":"Re: [libcamera-devel] [PATCH 02/16] android: cros: Simplify\n\tintegration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Jun 25, 2021 at 06:18:31AM +0300, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> Thank you for the patch.\n> \n> On Fri, Jun 25, 2021 at 02:35:25AM +0100, Kieran Bingham wrote:\n> > The ChromeOS specific Android HAL support was overly-complex to support\n> > linking an additional library, and then passing the built object into\n> > the libcamera.so build.\n> > \n> > Now that it has its own distinct libcamera-hal.so, simplify the CrOS\n> > integration to build directly into that library.\n> > \n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> > ---\n> >  src/android/cros/meson.build | 11 +++--------\n> >  src/android/meson.build      | 13 +++----------\n> >  2 files changed, 6 insertions(+), 18 deletions(-)\n> > \n> > diff --git a/src/android/cros/meson.build b/src/android/cros/meson.build\n> > index c2bda70838e2..35995dd814a2 100644\n> > --- a/src/android/cros/meson.build\n> > +++ b/src/android/cros/meson.build\n> > @@ -4,15 +4,10 @@ if get_option('android_platform') != 'cros'\n> >     subdir_done()\n> >  endif\n> >  \n> > -cros_hal_info_sources = files([\n> > +android_hal_sources += files([\n> >      'camera3_hal.cpp',\n> >  ])\n> >  \n> > -cros_hal_info = static_library('cros_hal_info',\n> > -                               cros_hal_info_sources,\n> > -                               dependencies : dependency('libcros_camera'),\n> > -                               c_args : '-Wno-shadow',\n\nBTW, we're losing -Wno-shadow. I suppose that's fine as there's no .c\nfile, but have you compiled this on CrOS to ensure there's no breakage ?\n\n> > -                               include_directories : [android_includes,\n> > -                                                      libcamera_includes])\n> > +android_deps += dependency('libcros_camera')\n> >  \n> > -android_objects += cros_hal_info.extract_objects('camera3_hal.cpp')\n> > +android_cpp_args += ['-DOS_CHROMEOS']\n> > diff --git a/src/android/meson.build b/src/android/meson.build\n> > index feda3e0998bd..bd58ef964c2a 100644\n> > --- a/src/android/meson.build\n> > +++ b/src/android/meson.build\n> > @@ -37,15 +37,6 @@ endif\n> >  \n> >  android_deps += [libyuv_dep]\n> >  \n> > -android_cpp_args = []\n> > -android_objects = []\n> > -\n> > -if get_option('android_platform') == 'cros'\n> > -    android_cpp_args += ['-DOS_CHROMEOS']\n> > -endif\n> > -\n> > -subdir('cros')\n> > -\n> >  android_hal_sources = files([\n> >      'camera3_hal.cpp',\n> >      'camera_capabilities.cpp',\n> > @@ -63,6 +54,9 @@ android_hal_sources = files([\n> >      'yuv/post_processor_yuv.cpp'\n> >  ])\n> >  \n> > +android_cpp_args = []\n> > +\n> > +subdir('cros')\n> >  subdir('mm')\n> >  \n> >  android_camera_metadata_sources = files([\n> > @@ -80,6 +74,5 @@ libcamera_hal = shared_library('libcamera-hal',\n> >                                 link_with : android_camera_metadata,\n> >                                 install : true,\n> >                                 cpp_args : android_cpp_args,\n> > -                               objects : android_objects,\n> >                                 include_directories : android_includes,\n> >                                 dependencies : android_deps)","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 BE42FC321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:20:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7B654684C9;\n\tFri, 25 Jun 2021 05:20:57 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C518B684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:20:55 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 57CC0501;\n\tFri, 25 Jun 2021 05:20:55 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"aNIa5QUj\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624591255;\n\tbh=m1pQYiemGwTt7vFNhN8SpbxrOyG6AOIryqvRqyjiLXc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=aNIa5QUj+HGIFOoDFG6gBIumDJ1Upz4y27IVrwbyT4VvNY74CMEORrtQ0ZV7/Qttx\n\tsJk9cUtQD62nihBcbx8B991o3WdJ7teBwaGjW8fCoiaLzWUoYq7H1FRLxvYTFQcxhB\n\tNH0DbbF97/1Jsvrj+Y7hhNc5eBp4W4i1UP2nr4Xc=","Date":"Fri, 25 Jun 2021 06:20:24 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YNVLeF2ZhIcAJGyZ@pendragon.ideasonboard.com>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-3-kieran.bingham@ideasonboard.com>\n\t<YNVLBqCeewL9oTiV@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<YNVLBqCeewL9oTiV@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 02/16] android: cros: Simplify\n\tintegration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17755,"web_url":"https://patchwork.libcamera.org/comment/17755/","msgid":"<CAO5uPHMjV7Tms-hrk5wsjYsD1ku+V9bQM-LFznowpEKMeCw1_A@mail.gmail.com>","date":"2021-06-25T03:22:07","subject":"Re: [libcamera-devel] [PATCH 05/16] libcamera: Separate source and\n\tbuild path helpers","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Kieran, thank you for the patch.\n\nOn Fri, Jun 25, 2021 at 10:35 AM Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> The libcameraSourcePath and libcameraBuildPath helper functions are\n> internal and specific to libcamera needs while operating with the meson\n> build system.\n>\n> In preparation for the upcoming move of utils to a common library, move\n> these helpers out of utils and into their own build unit.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  include/libcamera/internal/meson.build    |   1 +\n>  include/libcamera/internal/source-paths.h |  19 ++++\n>  src/libcamera/meson.build                 |   1 +\n>  src/libcamera/source-paths.cpp            | 129 ++++++++++++++++++++++\n>  src/libcamera/utils.cpp                   | 102 -----------------\n>  5 files changed, 150 insertions(+), 102 deletions(-)\n>  create mode 100644 include/libcamera/internal/source-paths.h\n>  create mode 100644 src/libcamera/source-paths.cpp\n>\n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index f019cfb3b0de..e5088177fe8e 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -39,6 +39,7 @@ libcamera_internal_headers = files([\n>      'process.h',\n>      'pub_key.h',\n>      'semaphore.h',\n> +    'source-paths.h',\n\nAccording to coding style guide\n(https://libcamera.org/coding-style.html), there is no rule about a\nfile name.\nBut it seems like we use the snake case for file names. So,\nsource_paths.h and source_paths.cpp?\n\n>      'sysfs.h',\n>      'thread.h',\n>      'timer.h',\n> diff --git a/include/libcamera/internal/source-paths.h b/include/libcamera/internal/source-paths.h\n> new file mode 100644\n> index 000000000000..2591ebb1081b\n> --- /dev/null\n> +++ b/include/libcamera/internal/source-paths.h\n> @@ -0,0 +1,19 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2021, Google Inc.\n> + *\n> + * source-paths.h - Identify libcamera source and build paths\n> + */\n> +#ifndef __LIBCAMERA_INTERNAL_SOURCE_PATHS_H__\n> +#define __LIBCAMERA_INTERNAL_SOURCE_PATHS_H__\n> +\n> +#include <string>\n> +\n> +namespace libcamera::utils {\n> +\n> +std::string libcameraBuildPath();\n> +std::string libcameraSourcePath();\n> +\n> +} /* namespace libcamera::utils */\n> +\n> +#endif /* __LIBCAMERA_INTERNAL_SOURCE_PATHS_H__ */\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 387d20843203..e792094f5798 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -46,6 +46,7 @@ libcamera_sources = files([\n>      'request.cpp',\n>      'semaphore.cpp',\n>      'signal.cpp',\n> +    'source-paths.cpp',\n>      'stream.cpp',\n>      'sysfs.cpp',\n>      'thread.cpp',\n> diff --git a/src/libcamera/source-paths.cpp b/src/libcamera/source-paths.cpp\n> new file mode 100644\n> index 000000000000..b39f5f853e39\n> --- /dev/null\n> +++ b/src/libcamera/source-paths.cpp\n> @@ -0,0 +1,129 @@\n> +/* SPDX-License-Identifier: LGPL-2.1-or-later */\n> +/*\n> + * Copyright (C) 2021, Google Inc.\n> + *\n> + * source-paths.cpp - Identify libcamera source and build paths\n> + */\n> +\n> +#include \"libcamera/internal/source-paths.h\"\n> +\n> +#include <dlfcn.h>\n> +#include <elf.h>\n> +#include <link.h>\n> +#include <sys/stat.h>\n> +\n> +#include \"libcamera/internal/utils.h\"\n> +\n> +/**\n> + * \\file source-paths.h\n> + * \\brief Identify the build and source path of a not-yet-installed library\n> + */\n> +\n> +/* musl doesn't declare _DYNAMIC in link.h, declare it manually. */\n> +extern ElfW(Dyn) _DYNAMIC[];\n> +\n> +namespace libcamera::utils {\n> +\n> +/**\n> + * \\brief Check if libcamera is installed or not\n> + *\n> + * Utilise the build_rpath dynamic tag which is stripped out by meson at\n> + * install time to determine at runtime if the library currently executing\n> + * has been installed or not.\n> + *\n> + * \\return True if libcamera is installed, false otherwise\n> + */\n> +bool isLibcameraInstalled()\n> +{\n> +       /*\n> +        * DT_RUNPATH (DT_RPATH when the linker uses old dtags) is removed on\n> +        * install.\n> +        */\n> +       for (const ElfW(Dyn) *dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn) {\n> +               if (dyn->d_tag == DT_RUNPATH || dyn->d_tag == DT_RPATH)\n> +                       return false;\n> +       }\n> +\n> +       return true;\n> +}\n> +\n\nisLIbcameraInstalled() should be put in anonymous namespace as it is\nused only in .cc file.\n\nWith these nits,\nReviewed-by: Hirokazu Honda<hiroh@chromium.org>\n> +/**\n> + * \\brief Retrieve the path to the build directory\n> + *\n> + * During development, it is useful to run libcamera binaries directly from the\n> + * build directory without installing them. This function helps components that\n> + * need to locate resources in the build tree, such as IPA modules or IPA proxy\n> + * workers, by providing them with the path to the root of the build directory.\n> + * Callers can then use it to complement or override searches in system-wide\n> + * directories.\n> + *\n> + * If libcamera has been installed, the build directory path is not available\n> + * and this function returns an empty string.\n> + *\n> + * \\return The path to the build directory if running from a build, or an empty\n> + * string otherwise\n> + */\n> +std::string libcameraBuildPath()\n> +{\n> +       if (isLibcameraInstalled())\n> +               return std::string();\n> +\n> +       Dl_info info;\n> +\n> +       /* Look up our own symbol. */\n> +       int ret = dladdr(reinterpret_cast<void *>(libcameraBuildPath), &info);\n> +       if (ret == 0)\n> +               return std::string();\n> +\n> +       std::string path = dirname(info.dli_fname) + \"/../../\";\n> +\n> +       char *real = realpath(path.c_str(), nullptr);\n> +       if (!real)\n> +               return std::string();\n> +\n> +       path = real;\n> +       free(real);\n> +\n> +       return path + \"/\";\n> +}\n> +\n> +/**\n> + * \\brief Retrieve the path to the source directory\n> + *\n> + * During development, it is useful to run libcamera binaries directly from the\n> + * build directory without installing them. This function helps components that\n> + * need to locate resources in the source tree, such as IPA configuration\n> + * files, by providing them with the path to the root of the source directory.\n> + * Callers can then use it to complement or override searches in system-wide\n> + * directories.\n> + *\n> + * If libcamera has been installed, the source directory path is not available\n> + * and this function returns an empty string.\n> + *\n> + * \\return The path to the source directory if running from a build directory,\n> + * or an empty string otherwise\n> + */\n> +std::string libcameraSourcePath()\n> +{\n> +       std::string path = libcameraBuildPath();\n> +       if (path.empty())\n> +               return std::string();\n> +\n> +       path += \"source\";\n> +\n> +       char *real = realpath(path.c_str(), nullptr);\n> +       if (!real)\n> +               return std::string();\n> +\n> +       path = real;\n> +       free(real);\n> +\n> +       struct stat statbuf;\n> +       int ret = stat(path.c_str(), &statbuf);\n> +       if (ret < 0 || (statbuf.st_mode & S_IFMT) != S_IFDIR)\n> +               return std::string();\n> +\n> +       return path + \"/\";\n> +}\n> +\n> +} /* namespace libcamera::utils */\n> diff --git a/src/libcamera/utils.cpp b/src/libcamera/utils.cpp\n> index 49b8fc9e211f..42f82d6158dd 100644\n> --- a/src/libcamera/utils.cpp\n> +++ b/src/libcamera/utils.cpp\n> @@ -351,108 +351,6 @@ std::string toAscii(const std::string &str)\n>         return ret;\n>  }\n>\n> -/**\n> - * \\brief Check if libcamera is installed or not\n> - *\n> - * Utilise the build_rpath dynamic tag which is stripped out by meson at\n> - * install time to determine at runtime if the library currently executing\n> - * has been installed or not.\n> - *\n> - * \\return True if libcamera is installed, false otherwise\n> - */\n> -bool isLibcameraInstalled()\n> -{\n> -       /*\n> -        * DT_RUNPATH (DT_RPATH when the linker uses old dtags) is removed on\n> -        * install.\n> -        */\n> -       for (const ElfW(Dyn) *dyn = _DYNAMIC; dyn->d_tag != DT_NULL; ++dyn) {\n> -               if (dyn->d_tag == DT_RUNPATH || dyn->d_tag == DT_RPATH)\n> -                       return false;\n> -       }\n> -\n> -       return true;\n> -}\n> -\n> -/**\n> - * \\brief Retrieve the path to the build directory\n> - *\n> - * During development, it is useful to run libcamera binaries directly from the\n> - * build directory without installing them. This function helps components that\n> - * need to locate resources in the build tree, such as IPA modules or IPA proxy\n> - * workers, by providing them with the path to the root of the build directory.\n> - * Callers can then use it to complement or override searches in system-wide\n> - * directories.\n> - *\n> - * If libcamera has been installed, the build directory path is not available\n> - * and this function returns an empty string.\n> - *\n> - * \\return The path to the build directory if running from a build, or an empty\n> - * string otherwise\n> - */\n> -std::string libcameraBuildPath()\n> -{\n> -       if (isLibcameraInstalled())\n> -               return std::string();\n> -\n> -       Dl_info info;\n> -\n> -       /* Look up our own symbol. */\n> -       int ret = dladdr(reinterpret_cast<void *>(libcameraBuildPath), &info);\n> -       if (ret == 0)\n> -               return std::string();\n> -\n> -       std::string path = dirname(info.dli_fname) + \"/../../\";\n> -\n> -       char *real = realpath(path.c_str(), nullptr);\n> -       if (!real)\n> -               return std::string();\n> -\n> -       path = real;\n> -       free(real);\n> -\n> -       return path + \"/\";\n> -}\n> -\n> -/**\n> - * \\brief Retrieve the path to the source directory\n> - *\n> - * During development, it is useful to run libcamera binaries directly from the\n> - * build directory without installing them. This function helps components that\n> - * need to locate resources in the source tree, such as IPA configuration\n> - * files, by providing them with the path to the root of the source directory.\n> - * Callers can then use it to complement or override searches in system-wide\n> - * directories.\n> - *\n> - * If libcamera has been installed, the source directory path is not available\n> - * and this function returns an empty string.\n> - *\n> - * \\return The path to the source directory if running from a build directory,\n> - * or an empty string otherwise\n> - */\n> -std::string libcameraSourcePath()\n> -{\n> -       std::string path = libcameraBuildPath();\n> -       if (path.empty())\n> -               return std::string();\n> -\n> -       path += \"source\";\n> -\n> -       char *real = realpath(path.c_str(), nullptr);\n> -       if (!real)\n> -               return std::string();\n> -\n> -       path = real;\n> -       free(real);\n> -\n> -       struct stat statbuf;\n> -       int ret = stat(path.c_str(), &statbuf);\n> -       if (ret < 0 || (statbuf.st_mode & S_IFMT) != S_IFDIR)\n> -               return std::string();\n> -\n> -       return path + \"/\";\n> -}\n> -\n>  /**\n>   * \\fn alignDown(unsigned int value, unsigned int alignment)\n>   * \\brief Align \\a value down to \\a alignment\n> --\n> 2.30.2\n>","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 370E4C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:22:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E66FE684CE;\n\tFri, 25 Jun 2021 05:22:19 +0200 (CEST)","from mail-ed1-x530.google.com (mail-ed1-x530.google.com\n\t[IPv6:2a00:1450:4864:20::530])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8B6B4684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:22:18 +0200 (CEST)","by mail-ed1-x530.google.com with SMTP id h17so11460108edw.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jun 2021 20:22:18 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"aemPSESV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=Dfcwvax1axBTl27FDfIQnpOae79rYfeI2IcpfAUoQcs=;\n\tb=aemPSESVo+2DMCWiqiWPJ3KZkBAtK49Bdhz2YVmkXfPE/5SniToYQzRG4abqRkT3Vx\n\tNu+MUKGKwewaUx4/dtUZZWblU+Kc1lpOu28FmpMAt3c1XE66vBVK47YQc1+/Niupx6Kg\n\tSx8659+g2uG/mTmGoSv6gU/93FKSLRz4/ZWjA=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=Dfcwvax1axBTl27FDfIQnpOae79rYfeI2IcpfAUoQcs=;\n\tb=GuH2k6H+3H20iAvX4pYKy+Ih3+3whJ9uwVrpX+gxX8wtL25SChTDSlBf4e8XYzl4Y4\n\tlrOa00X8BJH7yziUX6FTSnskVot6R7VpR+WOd+o2Q6MUjyYg+vXyhHOHeCW97OUiAGIc\n\tDixSSUg3VLsReqBorF7H/21XP6u6cyszOzRzTDXdPR+zKXpIiJXlj4TPiqyaLT21nBav\n\tR0p3gv8z2UPyRLlJgC4o7+Zi+M0UIDm2l+m2W7iJNban4h+E9c1g9JMOSnzb64vBuczM\n\tCpbjo2FvfU6djE959XNr6KbVS5wpMh7AAvqrj/5jAOcyIhrYfJ140VvED6vcZM0/iwcC\n\tAApg==","X-Gm-Message-State":"AOAM531Quu2HGNzoWccwlvedqNwc1pda3QEe4CRsx9MP9RfdSMwTZZEB\n\t3lt4JNFeN4NmHRVPaeZwQ2I08QUtHG5+9fnhVDt7Lg==","X-Google-Smtp-Source":"ABdhPJyEovChoTT59eUAz7WmHayjei1LIC8Itrk0a5eRaFzuYWx83ArbcnK4uJtVX0yi6RQXJ++GPu1tlW6Po3/8V1I=","X-Received":"by 2002:a05:6402:2885:: with SMTP id\n\teg5mr11705374edb.73.1624591338174; \n\tThu, 24 Jun 2021 20:22:18 -0700 (PDT)","MIME-Version":"1.0","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-6-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20210625013539.625803-6-kieran.bingham@ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Fri, 25 Jun 2021 12:22:07 +0900","Message-ID":"<CAO5uPHMjV7Tms-hrk5wsjYsD1ku+V9bQM-LFznowpEKMeCw1_A@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 05/16] libcamera: Separate source and\n\tbuild path helpers","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17757,"web_url":"https://patchwork.libcamera.org/comment/17757/","msgid":"<CAO5uPHNUVZMhxDi18eC2kPUA+fA0V3iNvid3LLHUU0P+g6D=MQ@mail.gmail.com>","date":"2021-06-25T03:32:42","subject":"Re: [libcamera-devel] [PATCH 06/16] libcamera/base: Introduce new\n\tbase library","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Kieran, thank you for the patch.\n\nOn Fri, Jun 25, 2021 at 10:35 AM Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> The libcamera-base.so will feature internal support functionality\n> that is utilised by libcamera, and can be shared in other places.\n>\n> This new library provides a layer beneath libcamera which provides\n> common abstractions to internal objects.\n>\n> A pkg-config file is generated and named libcamera-base.pc which allows\n> components such as external IPA modules to link directly to this library\n> if they need. Normal applications will reference this library through\n> the Requires: statement provided by the libcamera.pc package\n> configuration, and linkage will be handled automatically through the\n> pkg-config mechanisms.\n>\n\nI would comment that this patch doesn't move anything to libcamera-base.so.\n\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  Documentation/meson.build          |  2 ++\n>  include/libcamera/base/meson.build |  9 +++++++++\n>  include/libcamera/meson.build      |  1 +\n>  src/libcamera/base/meson.build     | 27 +++++++++++++++++++++++++++\n>  src/libcamera/meson.build          |  4 ++++\n>  5 files changed, 43 insertions(+)\n>  create mode 100644 include/libcamera/base/meson.build\n>  create mode 100644 src/libcamera/base/meson.build\n>\n> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> index 9ecf4dfcf79f..808076e056d0 100644\n> --- a/Documentation/meson.build\n> +++ b/Documentation/meson.build\n> @@ -27,6 +27,8 @@ if doxygen.found() and dot.found()\n>                        libcamera_ipa_interfaces,\n>                        libcamera_public_headers,\n>                        libcamera_sources,\n> +                      libcamera_base_headers,\n> +                      libcamera_base_sources,\n>                        libipa_headers,\n>                        libipa_sources,\n>                    ],\n> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n> new file mode 100644\n> index 000000000000..0a7a57b81191\n> --- /dev/null\n> +++ b/include/libcamera/base/meson.build\n> @@ -0,0 +1,9 @@\n> +# SPDX-License-Identifier: CC0-1.0\n> +\n> +libcamera_base_include_dir = libcamera_include_dir / 'base'\n> +\n> +libcamera_base_headers = files([\n> +])\n> +\n> +install_headers(libcamera_base_headers,\n> +                subdir: libcamera_base_include_dir)\n> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> index 086c958b0a53..1fa1bf4a4e78 100644\n> --- a/include/libcamera/meson.build\n> +++ b/include/libcamera/meson.build\n> @@ -25,6 +25,7 @@ include_dir = libcamera_include_dir / 'libcamera'\n>\n>  subdir('internal')\n>  subdir('ipa')\n> +subdir('base')\n\nnit: can we put subdir('base') to before subdir ('internal'). Or base\nwill be dependent on internal and ipa?\n\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n>\n>  install_headers(libcamera_public_headers,\n>                  subdir : include_dir)\n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> new file mode 100644\n> index 000000000000..3d58fea36ef5\n> --- /dev/null\n> +++ b/src/libcamera/base/meson.build\n> @@ -0,0 +1,27 @@\n> +# SPDX-License-Identifier: CC0-1.0\n> +\n> +libcamera_base_sources = files([\n> +])\n> +\n> +libcamera_base_deps = [\n> +]\n> +\n> +libcamera_base_lib = shared_library('libcamera-base',\n> +                                    [libcamera_base_sources, libcamera_base_headers],\n> +                                    name_prefix : '',\n> +                                    install : true,\n> +                                    cpp_args : libcamera_cpp_args,\n> +                                    include_directories : libcamera_includes,\n> +                                    dependencies : libcamera_base_deps)\n> +\n> +libcamera_base = declare_dependency(sources : [\n> +                                        libcamera_base_headers,\n> +                                    ],\n> +                                    include_directories : libcamera_includes,\n> +                                    link_with : libcamera_base_lib)\n> +\n> +pkg_mod = import('pkgconfig')\n> +pkg_mod.generate(libcamera_base_lib,\n> +                 version : '1.0',\n> +                 description : 'Camera support base utility library',\n> +                 subdirs : 'libcamera')\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index e792094f5798..eaf3cec8cba7 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -67,6 +67,7 @@ includes = [\n>      libcamera_includes,\n>  ]\n>\n> +subdir('base')\n>  subdir('ipa')\n>  subdir('pipeline')\n>  subdir('proxy')\n> @@ -128,6 +129,7 @@ libcamera_deps = [\n>      libgnutls,\n>      liblttng,\n>      libudev,\n> +    libcamera_base,\n>      dependency('threads'),\n>  ]\n>\n> @@ -156,10 +158,12 @@ libcamera_dep = declare_dependency(sources : [\n>                                         libcamera_generated_ipa_headers,\n>                                     ],\n>                                     include_directories : libcamera_includes,\n> +                                   dependencies: libcamera_base,\n>                                     link_with : libcamera)\n>\n>  pkg_mod = import('pkgconfig')\n>  pkg_mod.generate(libcamera,\n> +                 libraries : libcamera_base_lib,\n>                   version : '1.0',\n>                   description : 'Complex Camera Support Library',\n>                   subdirs : 'libcamera')\n> --\n> 2.30.2\n>","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 80444C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:32:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 03524684CB;\n\tFri, 25 Jun 2021 05:32:55 +0200 (CEST)","from mail-ej1-x636.google.com (mail-ej1-x636.google.com\n\t[IPv6:2a00:1450:4864:20::636])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5BCAA60508\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:32:53 +0200 (CEST)","by mail-ej1-x636.google.com with SMTP id bg14so12822187ejb.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jun 2021 20:32:53 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"nOkX/5JH\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=v1MKlV4jwtBkOthIkmCxV8aIQ/hI7ze0+ehGMU6PfxE=;\n\tb=nOkX/5JHp42aaXYg6q0mkYG9nEowphuM8D9uaMC99uDwIMC+IxMkS/J304hxUh666i\n\tRQpVY29ZQLObfC7/9awLX00t6/4YBBjiNVJMzgZHVlEjuPZ8ntCo35iqCVOZCSJ03v10\n\t3szljGCHUwwiJBh6AEMVX40de4LnILVxOIrcg=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=v1MKlV4jwtBkOthIkmCxV8aIQ/hI7ze0+ehGMU6PfxE=;\n\tb=oKbmIXn1aV9eiZNQXWGTXunef9I0+6MsdI7ufq6YT7sE3C5GxMVOeTfHjohxzfrz9n\n\tG9fQlmq3hdPBgctWLucpZudcOUltfsOQCtk4zT0UMYEoWCQkTc6X9XPGq+w4QojyiAMd\n\tIKBhgsS6vk4Ldg7SwuH2HQJ5oOuPzFO598gOfP7cTrSjgZ7txTjXL6BagZn5BPb3M3Xe\n\tvSUWrLeGL6cafYosBDYmfcBYlRiJGlnTd6i4H0u4I9ldwuFe9pSf/z4XzTyTA30UNi0w\n\twdvJQ0izgkuG2V2oHUBtuMOfSSpuYdrQgl9tYf1TFRaPHS2xNUMN/c8TT0oHCpDTlWxQ\n\tHwaw==","X-Gm-Message-State":"AOAM531HQ45oWad8BIF7hF1wj0WN1uKjlIpbi4ikUntRRXHK0PfE9q5j\n\tEyDp6DgI7I5ZeD413RktabWj/uBGTx8Yr7aF+kbDbV6Cy9lu4A==","X-Google-Smtp-Source":"ABdhPJyd78J8lSQs4gAUCkZ2QpLPCGcLGNGcRJywtBvGSWVsSfzOTIacucC4YYXvUnVixsQ8Wx2+/5yHO7KFZk+QF6U=","X-Received":"by 2002:a17:907:20da:: with SMTP id\n\tqq26mr8367678ejb.42.1624591973000; \n\tThu, 24 Jun 2021 20:32:53 -0700 (PDT)","MIME-Version":"1.0","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-7-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20210625013539.625803-7-kieran.bingham@ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Fri, 25 Jun 2021 12:32:42 +0900","Message-ID":"<CAO5uPHNUVZMhxDi18eC2kPUA+fA0V3iNvid3LLHUU0P+g6D=MQ@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 06/16] libcamera/base: Introduce new\n\tbase library","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17758,"web_url":"https://patchwork.libcamera.org/comment/17758/","msgid":"<CAO5uPHMhqOnZjAUDf1ZL3c7uAhkazo2K5cT2H-PcJ=3r7gjpTw@mail.gmail.com>","date":"2021-06-25T03:36:01","subject":"Re: [libcamera-devel] [PATCH 07/16] libcamera/base: Move utils to\n\tthe base library","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Kieran, thank you for the patch.\n\nOn Fri, Jun 25, 2021 at 10:35 AM Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> Move the utils functionality to the libcamera/base library.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n\n> ---\n>  include/libcamera/base/meson.build                 | 1 +\n>  include/libcamera/{internal => base}/utils.h       | 8 ++++----\n>  include/libcamera/internal/log.h                   | 2 +-\n>  include/libcamera/internal/meson.build             | 1 -\n>  include/libcamera/internal/thread.h                | 3 ++-\n>  src/android/camera_device.cpp                      | 3 ++-\n>  src/android/jpeg/exif.cpp                          | 3 ++-\n>  src/ipa/ipu3/ipu3_agc.h                            | 4 ++--\n>  src/ipa/raspberrypi/cam_helper.hpp                 | 3 ++-\n>  src/ipa/raspberrypi/controller/agc_algorithm.hpp   | 3 ++-\n>  src/ipa/raspberrypi/controller/agc_status.h        | 2 +-\n>  src/ipa/raspberrypi/controller/camera_mode.h       | 2 +-\n>  src/ipa/raspberrypi/controller/device_status.h     | 2 +-\n>  src/ipa/raspberrypi/controller/rpi/agc.hpp         | 2 +-\n>  src/ipa/raspberrypi/controller/rpi/lux.hpp         | 2 +-\n>  src/libcamera/base/meson.build                     | 2 +-\n>  src/libcamera/{ => base}/utils.cpp                 | 8 ++++----\n>  src/libcamera/camera_manager.cpp                   | 3 ++-\n>  src/libcamera/camera_sensor.cpp                    | 3 ++-\n>  src/libcamera/controls.cpp                         | 3 ++-\n>  src/libcamera/event_dispatcher_poll.cpp            | 3 ++-\n>  src/libcamera/ipa_manager.cpp                      | 3 ++-\n>  src/libcamera/ipa_module.cpp                       | 3 ++-\n>  src/libcamera/ipa_proxy.cpp                        | 3 ++-\n>  src/libcamera/log.cpp                              | 3 ++-\n>  src/libcamera/meson.build                          | 1 -\n>  src/libcamera/object.cpp                           | 3 ++-\n>  src/libcamera/pipeline/ipu3/imgu.cpp               | 3 ++-\n>  src/libcamera/pipeline/ipu3/ipu3.cpp               | 3 ++-\n>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++-\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp           | 3 ++-\n>  src/libcamera/pipeline/simple/converter.cpp        | 3 ++-\n>  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp       | 3 ++-\n>  src/libcamera/pipeline/vimc/vimc.cpp               | 3 ++-\n>  src/libcamera/pipeline_handler.cpp                 | 3 ++-\n>  src/libcamera/process.cpp                          | 3 ++-\n>  src/libcamera/source-paths.cpp                     | 2 +-\n>  src/libcamera/stream.cpp                           | 3 ++-\n>  src/libcamera/timer.cpp                            | 3 ++-\n>  src/libcamera/v4l2_device.cpp                      | 3 ++-\n>  src/libcamera/v4l2_subdevice.cpp                   | 3 ++-\n>  src/v4l2/v4l2_camera_proxy.cpp                     | 3 ++-\n>  src/v4l2/v4l2_compat_manager.cpp                   | 3 ++-\n>  test/camera-sensor.cpp                             | 3 ++-\n>  test/file-descriptor.cpp                           | 2 +-\n>  test/ipc/unixsocket_ipc.cpp                        | 3 ++-\n>  test/log/log_process.cpp                           | 3 ++-\n>  test/pixel-format.cpp                              | 2 +-\n>  test/process/process_test.cpp                      | 3 ++-\n>  test/signal-threads.cpp                            | 3 ++-\n>  test/utils.cpp                                     | 2 +-\n>  test/v4l2_subdevice/list_formats.cpp               | 3 ++-\n>  test/v4l2_videodevice/formats.cpp                  | 3 ++-\n>  53 files changed, 94 insertions(+), 59 deletions(-)\n>  rename include/libcamera/{internal => base}/utils.h (97%)\n>  rename src/libcamera/{ => base}/utils.cpp (98%)\n>\n> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n> index 0a7a57b81191..9f0ba6b0e10c 100644\n> --- a/include/libcamera/base/meson.build\n> +++ b/include/libcamera/base/meson.build\n> @@ -3,6 +3,7 @@\n>  libcamera_base_include_dir = libcamera_include_dir / 'base'\n>\n>  libcamera_base_headers = files([\n> +    'utils.h',\n>  ])\n>\n>  install_headers(libcamera_base_headers,\n> diff --git a/include/libcamera/internal/utils.h b/include/libcamera/base/utils.h\n> similarity index 97%\n> rename from include/libcamera/internal/utils.h\n> rename to include/libcamera/base/utils.h\n> index 15beb0f44172..d1aaff65211a 100644\n> --- a/include/libcamera/internal/utils.h\n> +++ b/include/libcamera/base/utils.h\n> @@ -4,8 +4,8 @@\n>   *\n>   * utils.h - Miscellaneous utility functions\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_UTILS_H__\n> -#define __LIBCAMERA_INTERNAL_UTILS_H__\n> +#ifndef __LIBCAMERA_BASE_UTILS_H__\n> +#define __LIBCAMERA_BASE_UTILS_H__\n>\n>  #include <algorithm>\n>  #include <chrono>\n> @@ -23,7 +23,7 @@\n>\n>  /* uClibc and uClibc-ng don't provide O_TMPFILE */\n>  #ifndef O_TMPFILE\n> -#define O_TMPFILE      (020000000 | O_DIRECTORY)\n> +#define O_TMPFILE (020000000 | O_DIRECTORY)\n>  #endif\n>\n>  #endif\n> @@ -352,4 +352,4 @@ std::basic_ostream<CharT, Traits> &operator<<(std::basic_ostream<CharT, Traits>\n>\n>  } /* namespace libcamera */\n>\n> -#endif /* __LIBCAMERA_INTERNAL_UTILS_H__ */\n> +#endif /* __LIBCAMERA_BASE_UTILS_H__ */\n> diff --git a/include/libcamera/internal/log.h b/include/libcamera/internal/log.h\n> index b8efb161407c..9c2beab6a33a 100644\n> --- a/include/libcamera/internal/log.h\n> +++ b/include/libcamera/internal/log.h\n> @@ -12,7 +12,7 @@\n>\n>  #include <libcamera/class.h>\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index e5088177fe8e..c84f9822ef6e 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -43,7 +43,6 @@ libcamera_internal_headers = files([\n>      'sysfs.h',\n>      'thread.h',\n>      'timer.h',\n> -    'utils.h',\n>      'v4l2_device.h',\n>      'v4l2_pixelformat.h',\n>      'v4l2_subdevice.h',\n> diff --git a/include/libcamera/internal/thread.h b/include/libcamera/internal/thread.h\n> index 25d0308d05b4..9662e28bb581 100644\n> --- a/include/libcamera/internal/thread.h\n> +++ b/include/libcamera/internal/thread.h\n> @@ -14,8 +14,9 @@\n>\n>  #include <libcamera/signal.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  namespace libcamera {\n>\n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index 4bd125d7020a..6243c07e231e 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -20,9 +20,10 @@\n>  #include <libcamera/formats.h>\n>  #include <libcamera/property_ids.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  #include \"system/graphics.h\"\n>\n> diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp\n> index 922086cdf6bc..747f1cfaa8ac 100644\n> --- a/src/android/jpeg/exif.cpp\n> +++ b/src/android/jpeg/exif.cpp\n> @@ -14,8 +14,9 @@\n>  #include <tuple>\n>  #include <uchar.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  using namespace libcamera;\n>\n> diff --git a/src/ipa/ipu3/ipu3_agc.h b/src/ipa/ipu3/ipu3_agc.h\n> index a5a78233cb6d..60c7a84f2d98 100644\n> --- a/src/ipa/ipu3/ipu3_agc.h\n> +++ b/src/ipa/ipu3/ipu3_agc.h\n> @@ -12,9 +12,9 @@\n>\n>  #include <linux/intel-ipu3.h>\n>\n> -#include <libcamera/geometry.h>\n> +#include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/geometry.h>\n>\n>  #include \"libipa/algorithm.h\"\n>\n> diff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp\n> index f53f5c39b01c..221898ceb40d 100644\n> --- a/src/ipa/raspberrypi/cam_helper.hpp\n> +++ b/src/ipa/raspberrypi/cam_helper.hpp\n> @@ -15,7 +15,8 @@\n>  #include \"controller/metadata.hpp\"\n>  #include \"md_parser.hpp\"\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>\n>  namespace RPiController {\n> diff --git a/src/ipa/raspberrypi/controller/agc_algorithm.hpp b/src/ipa/raspberrypi/controller/agc_algorithm.hpp\n> index 134bbcda50ce..61595ea2b006 100644\n> --- a/src/ipa/raspberrypi/controller/agc_algorithm.hpp\n> +++ b/src/ipa/raspberrypi/controller/agc_algorithm.hpp\n> @@ -6,7 +6,8 @@\n>   */\n>  #pragma once\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"algorithm.hpp\"\n>\n>  namespace RPiController {\n> diff --git a/src/ipa/raspberrypi/controller/agc_status.h b/src/ipa/raspberrypi/controller/agc_status.h\n> index 5d50e177f0dc..20cb1b624b33 100644\n> --- a/src/ipa/raspberrypi/controller/agc_status.h\n> +++ b/src/ipa/raspberrypi/controller/agc_status.h\n> @@ -6,7 +6,7 @@\n>   */\n>  #pragma once\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>\n>  // The AGC algorithm should post the following structure into the image's\n>  // \"agc.status\" metadata.\n> diff --git a/src/ipa/raspberrypi/controller/camera_mode.h b/src/ipa/raspberrypi/controller/camera_mode.h\n> index 2aa2335dcf90..6588823020e3 100644\n> --- a/src/ipa/raspberrypi/controller/camera_mode.h\n> +++ b/src/ipa/raspberrypi/controller/camera_mode.h\n> @@ -8,7 +8,7 @@\n>\n>  #include <libcamera/transform.h>\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>\n>  // Description of a \"camera mode\", holding enough information for control\n>  // algorithms to adapt their behaviour to the different modes of the camera,\n> diff --git a/src/ipa/raspberrypi/controller/device_status.h b/src/ipa/raspberrypi/controller/device_status.h\n> index 131b4cd344ee..f74235248b12 100644\n> --- a/src/ipa/raspberrypi/controller/device_status.h\n> +++ b/src/ipa/raspberrypi/controller/device_status.h\n> @@ -6,7 +6,7 @@\n>   */\n>  #pragma once\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>\n>  // Definition of \"device metadata\" which stores things like shutter time and\n>  // analogue gain that downstream control algorithms will want to know.\n> diff --git a/src/ipa/raspberrypi/controller/rpi/agc.hpp b/src/ipa/raspberrypi/controller/rpi/agc.hpp\n> index 750789482b49..85067dc64614 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/agc.hpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/agc.hpp\n> @@ -9,7 +9,7 @@\n>  #include <vector>\n>  #include <mutex>\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>\n>  #include \"../agc_algorithm.hpp\"\n>  #include \"../agc_status.h\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/lux.hpp b/src/ipa/raspberrypi/controller/rpi/lux.hpp\n> index 45c844393e62..3ebd35d1e382 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/lux.hpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/lux.hpp\n> @@ -8,7 +8,7 @@\n>\n>  #include <mutex>\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>\n>  #include \"../lux_status.h\"\n>  #include \"../algorithm.hpp\"\n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> index 3d58fea36ef5..6d9ec37414f8 100644\n> --- a/src/libcamera/base/meson.build\n> +++ b/src/libcamera/base/meson.build\n> @@ -1,6 +1,7 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>\n>  libcamera_base_sources = files([\n> +    'utils.cpp',\n>  ])\n>\n>  libcamera_base_deps = [\n> @@ -10,7 +11,6 @@ libcamera_base_lib = shared_library('libcamera-base',\n>                                      [libcamera_base_sources, libcamera_base_headers],\n>                                      name_prefix : '',\n>                                      install : true,\n> -                                    cpp_args : libcamera_cpp_args,\n>                                      include_directories : libcamera_includes,\n>                                      dependencies : libcamera_base_deps)\n>\n> diff --git a/src/libcamera/utils.cpp b/src/libcamera/base/utils.cpp\n> similarity index 98%\n> rename from src/libcamera/utils.cpp\n> rename to src/libcamera/base/utils.cpp\n> index 42f82d6158dd..d0c0a93980b1 100644\n> --- a/src/libcamera/utils.cpp\n> +++ b/src/libcamera/base/utils.cpp\n> @@ -5,7 +5,7 @@\n>   * utils.cpp - Miscellaneous utility functions\n>   */\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>\n>  #include <dlfcn.h>\n>  #include <elf.h>\n> @@ -20,7 +20,7 @@\n>  #include <unistd.h>\n>\n>  /**\n> - * \\file utils.h\n> + * \\file base/utils.h\n>   * \\brief Miscellaneous utility functions\n>   */\n>\n> @@ -44,8 +44,8 @@ namespace utils {\n>   */\n>  const char *basename(const char *path)\n>  {\n> -       const char *base = strrchr(path, '/');\n> -       return base ? base + 1 : path;\n> +       const char *base = strrchr(path, '/');\n> +       return base ? base + 1 : path;\n>  }\n>\n>  /**\n> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> index 1ecf2b07d5a3..a3784db6e697 100644\n> --- a/src/libcamera/camera_manager.cpp\n> +++ b/src/libcamera/camera_manager.cpp\n> @@ -12,13 +12,14 @@\n>\n>  #include <libcamera/camera.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/process.h\"\n>  #include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file camera_manager.h\n> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> index 3e135353f1d7..94dcf4f9cf48 100644\n> --- a/src/libcamera/camera_sensor.cpp\n> +++ b/src/libcamera/camera_sensor.cpp\n> @@ -18,11 +18,12 @@\n>\n>  #include <libcamera/property_ids.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/bayer_format.h\"\n>  #include \"libcamera/internal/camera_sensor_properties.h\"\n>  #include \"libcamera/internal/formats.h\"\n>  #include \"libcamera/internal/sysfs.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file camera_sensor.h\n> diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\n> index 5aef4e7145bd..7df372ad3b6c 100644\n> --- a/src/libcamera/controls.cpp\n> +++ b/src/libcamera/controls.cpp\n> @@ -12,9 +12,10 @@\n>  #include <string>\n>  #include <string.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/control_validator.h\"\n>  #include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file controls.h\n> diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/event_dispatcher_poll.cpp\n> index 456c6def075b..0b6aee187063 100644\n> --- a/src/libcamera/event_dispatcher_poll.cpp\n> +++ b/src/libcamera/event_dispatcher_poll.cpp\n> @@ -16,11 +16,12 @@\n>  #include <sys/eventfd.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/thread.h\"\n>  #include \"libcamera/internal/timer.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file event_dispatcher_poll.h\n> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n> index 93d02d947c46..263cacd64737 100644\n> --- a/src/libcamera/ipa_manager.cpp\n> +++ b/src/libcamera/ipa_manager.cpp\n> @@ -12,12 +12,13 @@\n>  #include <string.h>\n>  #include <sys/types.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/file.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/ipa_proxy.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file ipa_manager.h\n> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\n> index f53e529b0380..a4e7fb861138 100644\n> --- a/src/libcamera/ipa_module.cpp\n> +++ b/src/libcamera/ipa_module.cpp\n> @@ -23,10 +23,11 @@\n>\n>  #include <libcamera/span.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/file.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file ipa_module.h\n> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> index b70fde581eeb..ca980ec705a6 100644\n> --- a/src/libcamera/ipa_proxy.cpp\n> +++ b/src/libcamera/ipa_proxy.cpp\n> @@ -12,9 +12,10 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file ipa_proxy.h\n> diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp\n> index 74829a56916e..5ff0e9017648 100644\n> --- a/src/libcamera/log.cpp\n> +++ b/src/libcamera/log.cpp\n> @@ -23,8 +23,9 @@\n>\n>  #include <libcamera/logging.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file log.h\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index eaf3cec8cba7..ac401c25d498 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -52,7 +52,6 @@ libcamera_sources = files([\n>      'thread.cpp',\n>      'timer.cpp',\n>      'transform.cpp',\n> -    'utils.cpp',\n>      'v4l2_device.cpp',\n>      'v4l2_pixelformat.cpp',\n>      'v4l2_subdevice.cpp',\n> diff --git a/src/libcamera/object.cpp b/src/libcamera/object.cpp\n> index 5e6b73f9af84..51cac64ea313 100644\n> --- a/src/libcamera/object.cpp\n> +++ b/src/libcamera/object.cpp\n> @@ -11,11 +11,12 @@\n>\n>  #include <libcamera/signal.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/message.h\"\n>  #include \"libcamera/internal/semaphore.h\"\n>  #include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file object.h\n> diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp\n> index 4eb3f7b730a9..32d143a862b2 100644\n> --- a/src/libcamera/pipeline/ipu3/imgu.cpp\n> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp\n> @@ -16,9 +16,10 @@\n>  #include <libcamera/formats.h>\n>  #include <libcamera/stream.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  namespace libcamera {\n>\n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 6c93bc6d161d..6b43ad2fb2b1 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -20,6 +20,8 @@\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/delayed_controls.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n> @@ -27,7 +29,6 @@\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  #include \"cio2.h\"\n>  #include \"frames.h\"\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 4e26a1930228..082eb1ee1c23 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -24,6 +24,8 @@\n>  #include <libcamera/property_ids.h>\n>  #include <libcamera/request.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include <linux/bcm2835-isp.h>\n>  #include <linux/videodev2.h>\n>\n> @@ -35,7 +37,6 @@\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>\n>  #include \"dma_heaps.h\"\n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 6699839c4623..c625d7248f5c 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -24,6 +24,8 @@\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/delayed_controls.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n> @@ -31,7 +33,6 @@\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>\n> diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp\n> index 68644ef6477f..589f185b1bf1 100644\n> --- a/src/libcamera/pipeline/simple/converter.cpp\n> +++ b/src/libcamera/pipeline/simple/converter.cpp\n> @@ -15,9 +15,10 @@\n>  #include <libcamera/signal.h>\n>  #include <libcamera/stream.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>\n>  namespace libcamera {\n> diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n> index 12a85b2407db..d8c17dccae53 100644\n> --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n> +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n> @@ -19,12 +19,13 @@\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/sysfs.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>\n>  namespace libcamera {\n> diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\n> index 8bbac0085c9b..025ca56205f8 100644\n> --- a/src/libcamera/pipeline/vimc/vimc.cpp\n> +++ b/src/libcamera/pipeline/vimc/vimc.cpp\n> @@ -23,13 +23,14 @@\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>\n> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n> index e507a8bba8a6..6fb2a743c3c2 100644\n> --- a/src/libcamera/pipeline_handler.cpp\n> +++ b/src/libcamera/pipeline_handler.cpp\n> @@ -13,11 +13,12 @@\n>  #include <libcamera/camera.h>\n>  #include <libcamera/camera_manager.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/tracepoints.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file pipeline_handler.h\n> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> index 40a434a6b0c2..35091f60c1e9 100644\n> --- a/src/libcamera/process.cpp\n> +++ b/src/libcamera/process.cpp\n> @@ -20,9 +20,10 @@\n>  #include <unistd.h>\n>  #include <vector>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file process.h\n> diff --git a/src/libcamera/source-paths.cpp b/src/libcamera/source-paths.cpp\n> index b39f5f853e39..2a59105e8283 100644\n> --- a/src/libcamera/source-paths.cpp\n> +++ b/src/libcamera/source-paths.cpp\n> @@ -12,7 +12,7 @@\n>  #include <link.h>\n>  #include <sys/stat.h>\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>\n>  /**\n>   * \\file source-paths.h\n> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n> index f7bafcf8fc97..d5d68427e658 100644\n> --- a/src/libcamera/stream.cpp\n> +++ b/src/libcamera/stream.cpp\n> @@ -15,8 +15,9 @@\n>\n>  #include <libcamera/request.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file stream.h\n> diff --git a/src/libcamera/timer.cpp b/src/libcamera/timer.cpp\n> index c242113a782e..9496671edffc 100644\n> --- a/src/libcamera/timer.cpp\n> +++ b/src/libcamera/timer.cpp\n> @@ -11,11 +11,12 @@\n>\n>  #include <libcamera/camera_manager.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/message.h\"\n>  #include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file timer.h\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 5660e6ea5839..facb53e13169 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -16,10 +16,11 @@\n>  #include <sys/syscall.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/sysfs.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file v4l2_device.h\n> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n> index 721ff5a92a2b..2c56cfafbce4 100644\n> --- a/src/libcamera/v4l2_subdevice.cpp\n> +++ b/src/libcamera/v4l2_subdevice.cpp\n> @@ -19,10 +19,11 @@\n>\n>  #include <libcamera/geometry.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/media_object.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  /**\n>   * \\file v4l2_subdevice.h\n> diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\n> index f8bfe595e90e..a5a25507462e 100644\n> --- a/src/v4l2/v4l2_camera_proxy.cpp\n> +++ b/src/v4l2/v4l2_camera_proxy.cpp\n> @@ -20,9 +20,10 @@\n>  #include <libcamera/formats.h>\n>  #include <libcamera/object.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/formats.h\"\n>  #include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  #include \"v4l2_camera.h\"\n>  #include \"v4l2_camera_file.h\"\n> diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp\n> index 96dbcdf28f04..27de6c50ff4e 100644\n> --- a/src/v4l2/v4l2_compat_manager.cpp\n> +++ b/src/v4l2/v4l2_compat_manager.cpp\n> @@ -22,8 +22,9 @@\n>  #include <libcamera/camera.h>\n>  #include <libcamera/camera_manager.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  #include \"v4l2_camera_file.h\"\n>\n> diff --git a/test/camera-sensor.cpp b/test/camera-sensor.cpp\n> index 8c7fd1d2d444..a8dcad8215e5 100644\n> --- a/test/camera-sensor.cpp\n> +++ b/test/camera-sensor.cpp\n> @@ -10,10 +10,11 @@\n>\n>  #include <linux/media-bus-format.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/media_device.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>\n>  #include \"test.h\"\n> diff --git a/test/file-descriptor.cpp b/test/file-descriptor.cpp\n> index aa3c896fb937..85b077a25c32 100644\n> --- a/test/file-descriptor.cpp\n> +++ b/test/file-descriptor.cpp\n> @@ -13,7 +13,7 @@\n>\n>  #include <libcamera/file_descriptor.h>\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/ipc/unixsocket_ipc.cpp b/test/ipc/unixsocket_ipc.cpp\n> index 3049eaa8bb2a..161d09b98719 100644\n> --- a/test/ipc/unixsocket_ipc.cpp\n> +++ b/test/ipc/unixsocket_ipc.cpp\n> @@ -15,6 +15,8 @@\n>  #include <sys/wait.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>  #include \"libcamera/internal/ipc_pipe.h\"\n> @@ -22,7 +24,6 @@\n>  #include \"libcamera/internal/process.h\"\n>  #include \"libcamera/internal/thread.h\"\n>  #include \"libcamera/internal/timer.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> index c0a1a012d366..413d9207ea68 100644\n> --- a/test/log/log_process.cpp\n> +++ b/test/log/log_process.cpp\n> @@ -16,12 +16,13 @@\n>\n>  #include <libcamera/logging.h>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/process.h\"\n>  #include \"libcamera/internal/thread.h\"\n>  #include \"libcamera/internal/timer.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/pixel-format.cpp b/test/pixel-format.cpp\n> index c4a08f468ade..0f364f833ed1 100644\n> --- a/test/pixel-format.cpp\n> +++ b/test/pixel-format.cpp\n> @@ -10,7 +10,7 @@\n>  #include <libcamera/formats.h>\n>  #include <libcamera/pixel_format.h>\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> index 1279d8c17598..a5155bae3162 100644\n> --- a/test/process/process_test.cpp\n> +++ b/test/process/process_test.cpp\n> @@ -9,11 +9,12 @@\n>  #include <unistd.h>\n>  #include <vector>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/process.h\"\n>  #include \"libcamera/internal/thread.h\"\n>  #include \"libcamera/internal/timer.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/signal-threads.cpp b/test/signal-threads.cpp\n> index 3c5f3792e385..8a96b5d2abb3 100644\n> --- a/test/signal-threads.cpp\n> +++ b/test/signal-threads.cpp\n> @@ -9,9 +9,10 @@\n>  #include <iostream>\n>  #include <thread>\n>\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/message.h\"\n>  #include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/utils.h\"\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/utils.cpp b/test/utils.cpp\n> index f170ae4c2f35..9cd2cd070cb9 100644\n> --- a/test/utils.cpp\n> +++ b/test/utils.cpp\n> @@ -14,7 +14,7 @@\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/span.h>\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/v4l2_subdevice/list_formats.cpp b/test/v4l2_subdevice/list_formats.cpp\n> index 74ec81a8560c..9cbd7b9439c3 100644\n> --- a/test/v4l2_subdevice/list_formats.cpp\n> +++ b/test/v4l2_subdevice/list_formats.cpp\n> @@ -10,7 +10,8 @@\n>\n>  #include <libcamera/geometry.h>\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>\n>  #include \"v4l2_subdevice_test.h\"\n> diff --git a/test/v4l2_videodevice/formats.cpp b/test/v4l2_videodevice/formats.cpp\n> index 255446fe758a..6c05262201fa 100644\n> --- a/test/v4l2_videodevice/formats.cpp\n> +++ b/test/v4l2_videodevice/formats.cpp\n> @@ -8,7 +8,8 @@\n>  #include <iostream>\n>  #include <limits.h>\n>\n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>\n>  #include \"v4l2_videodevice_test.h\"\n> --\n> 2.30.2\n>","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 462C8C321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:36:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A097B684D1;\n\tFri, 25 Jun 2021 05:36:13 +0200 (CEST)","from mail-ed1-x532.google.com (mail-ed1-x532.google.com\n\t[IPv6:2a00:1450:4864:20::532])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F104A684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:36:11 +0200 (CEST)","by mail-ed1-x532.google.com with SMTP id t3so11492911edc.7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jun 2021 20:36:11 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"GeEBabRX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=MK5Tn5HO1mX0ec4FpT2gLbcOathmi+TwjQf52kz80wY=;\n\tb=GeEBabRXBI0460YyZfkdToHRAfyXBESCfBce09SeiMhJp8JFc2uiaACgZmdSOuTvyK\n\tjBTnpsnIpQmBC3xjS7Vjtvze97oLAAEdwdgr9N4RU0Fsx8LOKqJKkriiL7/tqv+xntK0\n\tR3/JetXhJXfmKqo+hFOaxDcTQyCKcvK3b+iMg=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=MK5Tn5HO1mX0ec4FpT2gLbcOathmi+TwjQf52kz80wY=;\n\tb=UoNqtF2x2q02A5qdRN3k5uKJktv7dshrvHrlhOmVx4uiK1d+1Jor+/+ZVUuBk4mHqx\n\tfEO57tSA861BDZC+7HgM4oieezt310vZ7SJ/83qg5NR38nUBTf4gA0+Ytz0mYbAWHEs2\n\txqsT4o3SxYXX/V6qMYvDgwxa0hst8GJl2zuLKfo/hl70NGmfpLEMfBAPowyIJOvDnZH+\n\tzsNzkU/Zo6CtUJ+A3uaCoOS74z32dfyjAel8spVWDrvR0LGtIrKc53McI30HAa2nqRFi\n\tSNHstQb9XaW32OZIxiOGhh+38SH8n6dDS9mxs7hVS7abxKdLmYDN0HeFKG9Jk+wCW5aX\n\tBtpg==","X-Gm-Message-State":"AOAM532I3a833yR/EugzE7Jt5BywVVv2jQXuw1DjXbV5RcH9xJsH0okn\n\tzZv1GeIAUoLaGvTSrBpQFaehXfBVMxungLICU8Ee9Q==","X-Google-Smtp-Source":"ABdhPJzB8ksoIOp+xDhzPhtkjlEt5Q91TLwXCkWI4v35DUQJxiO4pd9kbsUGAwjE7OgE+3L1bdyH83VPd2wz58bisSQ=","X-Received":"by 2002:a05:6402:290b:: with SMTP id\n\tee11mr11401941edb.325.1624592171408; \n\tThu, 24 Jun 2021 20:36:11 -0700 (PDT)","MIME-Version":"1.0","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-8-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20210625013539.625803-8-kieran.bingham@ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Fri, 25 Jun 2021 12:36:01 +0900","Message-ID":"<CAO5uPHMhqOnZjAUDf1ZL3c7uAhkazo2K5cT2H-PcJ=3r7gjpTw@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 07/16] libcamera/base: Move utils to\n\tthe base library","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17759,"web_url":"https://patchwork.libcamera.org/comment/17759/","msgid":"<CAO5uPHOOo_H4GCNhq0m9RRnAyHh0DZvd6RWJyqE2oTJLQzctYQ@mail.gmail.com>","date":"2021-06-25T03:38:38","subject":"Re: [libcamera-devel] [PATCH 08/16] libcamera/base: Move class\n\thelpers to the base library","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 10:35 AM Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> Move the class support infrastructure to the base library.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  include/libcamera/{ => base}/class.h            | 0\n>  include/libcamera/base/meson.build              | 1 +\n>  include/libcamera/buffer.h                      | 3 ++-\n>  include/libcamera/camera.h                      | 3 ++-\n>  include/libcamera/camera_manager.h              | 3 ++-\n>  include/libcamera/controls.h                    | 3 ++-\n>  include/libcamera/framebuffer_allocator.h       | 2 +-\n>  include/libcamera/internal/buffer.h             | 3 ++-\n>  include/libcamera/internal/byte_stream_buffer.h | 3 ++-\n>  include/libcamera/internal/camera_sensor.h      | 3 ++-\n>  include/libcamera/internal/file.h               | 3 ++-\n>  include/libcamera/internal/log.h                | 3 +--\n>  include/libcamera/internal/media_object.h       | 2 +-\n>  include/libcamera/internal/pipeline_handler.h   | 3 ++-\n>  include/libcamera/internal/v4l2_subdevice.h     | 3 ++-\n>  include/libcamera/internal/v4l2_videodevice.h   | 3 ++-\n>  include/libcamera/meson.build                   | 1 -\n>  include/libcamera/request.h                     | 3 ++-\n>  src/android/camera_buffer.h                     | 3 ++-\n>  src/android/camera_capabilities.h               | 3 ++-\n>  src/android/camera_hal_config.h                 | 2 +-\n>  src/libcamera/{ => base}/class.cpp              | 2 +-\n>  src/libcamera/base/meson.build                  | 1 +\n>  src/libcamera/meson.build                       | 1 -\n>  24 files changed, 35 insertions(+), 22 deletions(-)\n>  rename include/libcamera/{ => base}/class.h (100%)\n>  rename src/libcamera/{ => base}/class.cpp (99%)\n>\n> diff --git a/include/libcamera/class.h b/include/libcamera/base/class.h\n> similarity index 100%\n> rename from include/libcamera/class.h\n> rename to include/libcamera/base/class.h\n\nShall we change a header guard from __LIBCAMERA_CLASS_H__ to\n__LIBCAMERA_BASE_CLASS_H__?\n\n> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n> index 9f0ba6b0e10c..2db756c504c9 100644\n> --- a/include/libcamera/base/meson.build\n> +++ b/include/libcamera/base/meson.build\n> @@ -3,6 +3,7 @@\n>  libcamera_base_include_dir = libcamera_include_dir / 'base'\n>\n>  libcamera_base_headers = files([\n> +    'class.h',\n>      'utils.h',\n>  ])\n>\n> diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\n> index e0af00900409..323d1cba41a9 100644\n> --- a/include/libcamera/buffer.h\n> +++ b/include/libcamera/buffer.h\n> @@ -10,7 +10,8 @@\n>  #include <stdint.h>\n>  #include <vector>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/file_descriptor.h>\n>\n>  namespace libcamera {\n> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> index d71641805c0a..ea0914009c2b 100644\n> --- a/include/libcamera/camera.h\n> +++ b/include/libcamera/camera.h\n> @@ -12,7 +12,8 @@\n>  #include <stdint.h>\n>  #include <string>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/controls.h>\n>  #include <libcamera/object.h>\n>  #include <libcamera/request.h>\n> diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h\n> index c2f0b786da8e..5deede035115 100644\n> --- a/include/libcamera/camera_manager.h\n> +++ b/include/libcamera/camera_manager.h\n> @@ -12,7 +12,8 @@\n>  #include <sys/types.h>\n>  #include <vector>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/object.h>\n>  #include <libcamera/signal.h>\n>\n> diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\n> index 1c9b37e617bc..f62b6cf055d6 100644\n> --- a/include/libcamera/controls.h\n> +++ b/include/libcamera/controls.h\n> @@ -14,7 +14,8 @@\n>  #include <unordered_map>\n>  #include <vector>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/span.h>\n>\n> diff --git a/include/libcamera/framebuffer_allocator.h b/include/libcamera/framebuffer_allocator.h\n> index 0c85631a1da2..cbc9ce101889 100644\n> --- a/include/libcamera/framebuffer_allocator.h\n> +++ b/include/libcamera/framebuffer_allocator.h\n> @@ -11,7 +11,7 @@\n>  #include <memory>\n>  #include <vector>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/include/libcamera/internal/buffer.h b/include/libcamera/internal/buffer.h\n> index 9da1fbd12c27..91dd24969385 100644\n> --- a/include/libcamera/internal/buffer.h\n> +++ b/include/libcamera/internal/buffer.h\n> @@ -10,7 +10,8 @@\n>  #include <sys/mman.h>\n>  #include <vector>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/span.h>\n>\n> diff --git a/include/libcamera/internal/byte_stream_buffer.h b/include/libcamera/internal/byte_stream_buffer.h\n> index 866cb9b0b2a6..7eefb1a71f07 100644\n> --- a/include/libcamera/internal/byte_stream_buffer.h\n> +++ b/include/libcamera/internal/byte_stream_buffer.h\n> @@ -11,7 +11,8 @@\n>  #include <stdint.h>\n>  #include <type_traits>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/span.h>\n>\n>  namespace libcamera {\n> diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\n> index e133ebf45bf7..7bc540619721 100644\n> --- a/include/libcamera/internal/camera_sensor.h\n> +++ b/include/libcamera/internal/camera_sensor.h\n> @@ -11,7 +11,8 @@\n>  #include <string>\n>  #include <vector>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/controls.h>\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/ipa/core_ipa_interface.h>\n> diff --git a/include/libcamera/internal/file.h b/include/libcamera/internal/file.h\n> index f0b313a5faae..44621ceb4c19 100644\n> --- a/include/libcamera/internal/file.h\n> +++ b/include/libcamera/internal/file.h\n> @@ -11,7 +11,8 @@\n>  #include <string>\n>  #include <sys/types.h>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/span.h>\n>\n>  namespace libcamera {\n> diff --git a/include/libcamera/internal/log.h b/include/libcamera/internal/log.h\n> index 9c2beab6a33a..82e55a623e04 100644\n> --- a/include/libcamera/internal/log.h\n> +++ b/include/libcamera/internal/log.h\n> @@ -10,8 +10,7 @@\n>  #include <chrono>\n>  #include <sstream>\n>\n> -#include <libcamera/class.h>\n> -\n> +#include <libcamera/base/class.h>\n>  #include <libcamera/base/utils.h>\n>\n>  namespace libcamera {\n> diff --git a/include/libcamera/internal/media_object.h b/include/libcamera/internal/media_object.h\n> index 1c82c27928a8..2f5d33e1903e 100644\n> --- a/include/libcamera/internal/media_object.h\n> +++ b/include/libcamera/internal/media_object.h\n> @@ -12,7 +12,7 @@\n>\n>  #include <linux/media.h>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h\n> index 31dadf285a58..8beb6b76dd3f 100644\n> --- a/include/libcamera/internal/pipeline_handler.h\n> +++ b/include/libcamera/internal/pipeline_handler.h\n> @@ -15,7 +15,8 @@\n>  #include <sys/types.h>\n>  #include <vector>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/controls.h>\n>  #include <libcamera/object.h>\n>  #include <libcamera/stream.h>\n> diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h\n> index d2b9ca55439e..d07dd6b444d0 100644\n> --- a/include/libcamera/internal/v4l2_subdevice.h\n> +++ b/include/libcamera/internal/v4l2_subdevice.h\n> @@ -11,7 +11,8 @@\n>  #include <string>\n>  #include <vector>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/geometry.h>\n>\n>  #include \"libcamera/internal/formats.h\"\n> diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\n> index 7938343bba8d..227d015e8937 100644\n> --- a/include/libcamera/internal/v4l2_videodevice.h\n> +++ b/include/libcamera/internal/v4l2_videodevice.h\n> @@ -16,8 +16,9 @@\n>\n>  #include <linux/videodev2.h>\n>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/buffer.h>\n> -#include <libcamera/class.h>\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/pixel_format.h>\n>  #include <libcamera/signal.h>\n> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> index 1fa1bf4a4e78..7cba3de6ca96 100644\n> --- a/include/libcamera/meson.build\n> +++ b/include/libcamera/meson.build\n> @@ -5,7 +5,6 @@ libcamera_public_headers = files([\n>      'buffer.h',\n>      'camera.h',\n>      'camera_manager.h',\n> -    'class.h',\n>      'compiler.h',\n>      'controls.h',\n>      'file_descriptor.h',\n> diff --git a/include/libcamera/request.h b/include/libcamera/request.h\n> index 5596901ddd8e..00c646fea7f2 100644\n> --- a/include/libcamera/request.h\n> +++ b/include/libcamera/request.h\n> @@ -13,7 +13,8 @@\n>  #include <string>\n>  #include <unordered_set>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/controls.h>\n>  #include <libcamera/signal.h>\n>\n> diff --git a/src/android/camera_buffer.h b/src/android/camera_buffer.h\n> index c88124b2b3f3..e850c4e36668 100644\n> --- a/src/android/camera_buffer.h\n> +++ b/src/android/camera_buffer.h\n> @@ -9,7 +9,8 @@\n>\n>  #include <hardware/camera3.h>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/span.h>\n>\n>  class CameraBuffer final : public libcamera::Extensible\n> diff --git a/src/android/camera_capabilities.h b/src/android/camera_capabilities.h\n> index f511607bbd90..4f5be82595d6 100644\n> --- a/src/android/camera_capabilities.h\n> +++ b/src/android/camera_capabilities.h\n> @@ -11,8 +11,9 @@\n>  #include <memory>\n>  #include <vector>\n>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/camera.h>\n> -#include <libcamera/class.h>\n>  #include <libcamera/formats.h>\n>  #include <libcamera/geometry.h>\n>\n> diff --git a/src/android/camera_hal_config.h b/src/android/camera_hal_config.h\n> index 97dc69c1def5..a79d5d6c42dc 100644\n> --- a/src/android/camera_hal_config.h\n> +++ b/src/android/camera_hal_config.h\n> @@ -10,7 +10,7 @@\n>  #include <map>\n>  #include <string>\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n>\n>  struct CameraConfigData {\n>         int facing = -1;\n> diff --git a/src/libcamera/class.cpp b/src/libcamera/base/class.cpp\n> similarity index 99%\n> rename from src/libcamera/class.cpp\n> rename to src/libcamera/base/class.cpp\n> index 28c35633d7db..165beafc243d 100644\n> --- a/src/libcamera/class.cpp\n> +++ b/src/libcamera/base/class.cpp\n> @@ -5,7 +5,7 @@\n>   * class.cpp - Utilities and helpers for classes\n>   */\n>\n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n>\n>  /**\n>   * \\file class.h\n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> index 6d9ec37414f8..302a288685d3 100644\n> --- a/src/libcamera/base/meson.build\n> +++ b/src/libcamera/base/meson.build\n> @@ -1,6 +1,7 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>\n>  libcamera_base_sources = files([\n> +    'class.cpp',\n>      'utils.cpp',\n>  ])\n>\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index ac401c25d498..a341004c0c19 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -10,7 +10,6 @@ libcamera_sources = files([\n>      'camera_manager.cpp',\n>      'camera_sensor.cpp',\n>      'camera_sensor_properties.cpp',\n> -    'class.cpp',\n>      'controls.cpp',\n>      'control_serializer.cpp',\n>      'control_validator.cpp',\n> --\n> 2.30.2\n>","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 1C05EC321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:38:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 85F3B684CE;\n\tFri, 25 Jun 2021 05:38:49 +0200 (CEST)","from mail-ed1-x536.google.com (mail-ed1-x536.google.com\n\t[IPv6:2a00:1450:4864:20::536])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BC197684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:38:48 +0200 (CEST)","by mail-ed1-x536.google.com with SMTP id m14so11512704edp.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jun 2021 20:38:48 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"Wsn/sV9D\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=U5P6fhSQ2b3y17TB/ZEVnstB1z8ZmHsA1jo1yoSVDuA=;\n\tb=Wsn/sV9DgVkt/uVCrTbA181/rra0oZCzztB/ye49QaAxNhhMBEpxXjczCTjEMb7x1z\n\tdfAMycBB4bxX1s4mXjXk2qbFuAVIdGLATf47F4dqsTm6YItjPZesQNfHtnEojfvwYwtO\n\trJr2N/ksz9yKSIOGgU73iGo/4JqktVZ0xMI9g=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=U5P6fhSQ2b3y17TB/ZEVnstB1z8ZmHsA1jo1yoSVDuA=;\n\tb=l/eVTCJWC1qVEs0/lr45I3xeNjaqSHBjiQ1vzr2ipxkPJXmsLbvIkJw5vfbR1yB1e9\n\t5tcGWYMO7mpF5rs85h3SXV1bqYSVFALEL6KFQNa9/RLZvDJsiLWta3sixum9NvA7qK+s\n\tkGbuF1ZmPnN0zqZJSV9qAa6H9QkPT8yhcnxR2vylH6px/q+nPpXnxQEAHjJjtD3im58v\n\tIJHc40GSOIx11ueDcRLaSTjc6SQHcbCLF34ElnjEfgI8kgvwWqRvDsxlHXZnc/H/zmlv\n\ty+WQPL1aWfee0/FQKWGuSM7QOE+Hu1jB7QBNvyH6bT2893Yu0jFrdoNhL6MjZR734+13\n\tFXNQ==","X-Gm-Message-State":"AOAM5302MmvXXo8zfK3uuwJ9vkS+oPIYmnfLjfQ09PwF+66C9PtiUWPk\n\tgC/TShwTxxJOsHHyke57/emP/9gi8j/3JGN/WnDTlQ==","X-Google-Smtp-Source":"ABdhPJx4tpGYeuX+6ZqgOCLoncIrDIrPdWp/pcD3SxDMiTRCY6U+VxlconLSKdqa5nGaL6dVttpO+9mDUwb2DBf4Vk0=","X-Received":"by 2002:a05:6402:2885:: with SMTP id\n\teg5mr11770584edb.73.1624592328392; \n\tThu, 24 Jun 2021 20:38:48 -0700 (PDT)","MIME-Version":"1.0","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-9-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20210625013539.625803-9-kieran.bingham@ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Fri, 25 Jun 2021 12:38:38 +0900","Message-ID":"<CAO5uPHOOo_H4GCNhq0m9RRnAyHh0DZvd6RWJyqE2oTJLQzctYQ@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 08/16] libcamera/base: Move class\n\thelpers to the base library","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17761,"web_url":"https://patchwork.libcamera.org/comment/17761/","msgid":"<20210625034549.GG2599@pyrite.rasen.tech>","date":"2021-06-25T03:45:49","subject":"Re: [libcamera-devel] [PATCH 06/16] libcamera/base: Introduce new\n\tbase library","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 02:35:29AM +0100, Kieran Bingham wrote:\n> The libcamera-base.so will feature internal support functionality\n> that is utilised by libcamera, and can be shared in other places.\n> \n> This new library provides a layer beneath libcamera which provides\n> common abstractions to internal objects.\n> \n> A pkg-config file is generated and named libcamera-base.pc which allows\n> components such as external IPA modules to link directly to this library\n> if they need. Normal applications will reference this library through\n> the Requires: statement provided by the libcamera.pc package\n> configuration, and linkage will be handled automatically through the\n> pkg-config mechanisms.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  Documentation/meson.build          |  2 ++\n>  include/libcamera/base/meson.build |  9 +++++++++\n>  include/libcamera/meson.build      |  1 +\n>  src/libcamera/base/meson.build     | 27 +++++++++++++++++++++++++++\n>  src/libcamera/meson.build          |  4 ++++\n>  5 files changed, 43 insertions(+)\n>  create mode 100644 include/libcamera/base/meson.build\n>  create mode 100644 src/libcamera/base/meson.build\n> \n> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> index 9ecf4dfcf79f..808076e056d0 100644\n> --- a/Documentation/meson.build\n> +++ b/Documentation/meson.build\n> @@ -27,6 +27,8 @@ if doxygen.found() and dot.found()\n>                        libcamera_ipa_interfaces,\n>                        libcamera_public_headers,\n>                        libcamera_sources,\n> +                      libcamera_base_headers,\n> +                      libcamera_base_sources,\n>                        libipa_headers,\n>                        libipa_sources,\n>                    ],\n> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n> new file mode 100644\n> index 000000000000..0a7a57b81191\n> --- /dev/null\n> +++ b/include/libcamera/base/meson.build\n> @@ -0,0 +1,9 @@\n> +# SPDX-License-Identifier: CC0-1.0\n> +\n> +libcamera_base_include_dir = libcamera_include_dir / 'base'\n> +\n> +libcamera_base_headers = files([\n> +])\n> +\n> +install_headers(libcamera_base_headers,\n> +                subdir: libcamera_base_include_dir)\n> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> index 086c958b0a53..1fa1bf4a4e78 100644\n> --- a/include/libcamera/meson.build\n> +++ b/include/libcamera/meson.build\n> @@ -25,6 +25,7 @@ include_dir = libcamera_include_dir / 'libcamera'\n>  \n>  subdir('internal')\n>  subdir('ipa')\n> +subdir('base')\n>  \n>  install_headers(libcamera_public_headers,\n>                  subdir : include_dir)\n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> new file mode 100644\n> index 000000000000..3d58fea36ef5\n> --- /dev/null\n> +++ b/src/libcamera/base/meson.build\n> @@ -0,0 +1,27 @@\n> +# SPDX-License-Identifier: CC0-1.0\n> +\n> +libcamera_base_sources = files([\n> +])\n> +\n> +libcamera_base_deps = [\n> +]\n> +\n> +libcamera_base_lib = shared_library('libcamera-base',\n> +                                    [libcamera_base_sources, libcamera_base_headers],\n> +                                    name_prefix : '',\n> +                                    install : true,\n> +                                    cpp_args : libcamera_cpp_args,\n> +                                    include_directories : libcamera_includes,\n> +                                    dependencies : libcamera_base_deps)\n> +\n> +libcamera_base = declare_dependency(sources : [\n> +                                        libcamera_base_headers,\n> +                                    ],\n> +                                    include_directories : libcamera_includes,\n> +                                    link_with : libcamera_base_lib)\n> +\n> +pkg_mod = import('pkgconfig')\n> +pkg_mod.generate(libcamera_base_lib,\n> +                 version : '1.0',\n> +                 description : 'Camera support base utility library',\n> +                 subdirs : 'libcamera')\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index e792094f5798..eaf3cec8cba7 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -67,6 +67,7 @@ includes = [\n>      libcamera_includes,\n>  ]\n>  \n> +subdir('base')\n>  subdir('ipa')\n>  subdir('pipeline')\n>  subdir('proxy')\n> @@ -128,6 +129,7 @@ libcamera_deps = [\n>      libgnutls,\n>      liblttng,\n>      libudev,\n> +    libcamera_base,\n>      dependency('threads'),\n>  ]\n>  \n> @@ -156,10 +158,12 @@ libcamera_dep = declare_dependency(sources : [\n>                                         libcamera_generated_ipa_headers,\n>                                     ],\n>                                     include_directories : libcamera_includes,\n> +                                   dependencies: libcamera_base,\n>                                     link_with : libcamera)\n>  \n>  pkg_mod = import('pkgconfig')\n>  pkg_mod.generate(libcamera,\n> +                 libraries : libcamera_base_lib,\n>                   version : '1.0',\n>                   description : 'Complex Camera Support Library',\n>                   subdirs : 'libcamera')\n> -- \n> 2.30.2\n>","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 A10A3C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:45:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 63EEF684CA;\n\tFri, 25 Jun 2021 05:45:57 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 77B2C60508\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:45:56 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0234F501;\n\tFri, 25 Jun 2021 05:45:54 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"P5fsN240\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624592756;\n\tbh=dB/sa9F7JCUtLxZNnJLGRynz18zu9i0gbTj8Xi/5C9g=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=P5fsN240/HRh/YkRIBKIdnc3tiCVDGgtfBMJZnJExtVyj6iheDOS9KxGeMoT0l1AF\n\t7AGUCVojsy6i9B0vAjzB3o2QfA+YrtsWE12JlvjYx8g7TOkgJIy7Nfn1UQ3wGwSOc3\n\tMvDP8gnVWRPNIcWCD+5OUzLHoHtcPuY4XLrmYCAc=","Date":"Fri, 25 Jun 2021 12:45:49 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210625034549.GG2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-7-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-7-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 06/16] libcamera/base: Introduce new\n\tbase library","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17763,"web_url":"https://patchwork.libcamera.org/comment/17763/","msgid":"<CAO5uPHP34TLhBUo6xAPpJU_QQVn-WZNHmkR3NX_TxtcZhRAMjg@mail.gmail.com>","date":"2021-06-25T03:48:02","subject":"Re: [libcamera-devel] [PATCH 11/16] libcamera/base: Move\n\tevent_notifier to base","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Kieran, thank you for the patch.\n\nOn Fri, Jun 25, 2021 at 10:35 AM Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> Move the event notifier, and associated header updates.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  include/libcamera/{internal => base}/event_notifier.h | 0\n>  include/libcamera/base/meson.build                    | 1 +\n>  include/libcamera/internal/meson.build                | 1 -\n>  src/libcamera/base/event_dispatcher_poll.cpp          | 3 +--\n>  src/libcamera/{ => base}/event_notifier.cpp           | 6 +++---\n>  src/libcamera/base/meson.build                        | 1 +\n>  src/libcamera/device_enumerator_udev.cpp              | 2 +-\n>  src/libcamera/ipc_unixsocket.cpp                      | 3 +--\n>  src/libcamera/meson.build                             | 1 -\n>  src/libcamera/process.cpp                             | 3 +--\n>  src/libcamera/v4l2_device.cpp                         | 2 +-\n>  src/libcamera/v4l2_videodevice.cpp                    | 2 +-\n>  test/event-thread.cpp                                 | 3 +--\n>  test/event.cpp                                        | 3 +--\n>  test/ipa/ipa_interface_test.cpp                       | 2 +-\n>  15 files changed, 14 insertions(+), 19 deletions(-)\n>  rename include/libcamera/{internal => base}/event_notifier.h (100%)\n>  rename src/libcamera/{ => base}/event_notifier.cpp (98%)\n>\n> diff --git a/include/libcamera/internal/event_notifier.h b/include/libcamera/base/event_notifier.h\n> similarity index 100%\n\nShall we update a header guard?\n\n> rename from include/libcamera/internal/event_notifier.h\n> rename to include/libcamera/base/event_notifier.h\n> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n> index 6fc6c138a5fd..83c664affc88 100644\n> --- a/include/libcamera/base/meson.build\n> +++ b/include/libcamera/base/meson.build\n> @@ -7,6 +7,7 @@ libcamera_base_headers = files([\n>      'class.h',\n>      'event_dispatcher.h',\n>      'event_dispatcher_poll.h',\n> +    'event_notifier.h',\n>      'file.h',\n>      'log.h',\n>      'message.h',\n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index b10285edac27..61af16bfe05d 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -22,7 +22,6 @@ libcamera_internal_headers = files([\n>      'device_enumerator.h',\n>      'device_enumerator_sysfs.h',\n>      'device_enumerator_udev.h',\n> -    'event_notifier.h',\n>      'formats.h',\n>      'ipa_manager.h',\n>      'ipa_module.h',\n> diff --git a/src/libcamera/base/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp\n> index d76ca7fc2c32..5839373a5281 100644\n> --- a/src/libcamera/base/event_dispatcher_poll.cpp\n> +++ b/src/libcamera/base/event_dispatcher_poll.cpp\n> @@ -16,13 +16,12 @@\n>  #include <sys/eventfd.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/log.h>\n>  #include <libcamera/base/thread.h>\n>  #include <libcamera/base/timer.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/event_notifier.h\"\n> -\n>  /**\n>   * \\file base/event_dispatcher_poll.h\n>   */\n> diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/base/event_notifier.cpp\n> similarity index 98%\n> rename from src/libcamera/event_notifier.cpp\n> rename to src/libcamera/base/event_notifier.cpp\n> index 784016a9f907..fd93c0878c6f 100644\n> --- a/src/libcamera/event_notifier.cpp\n> +++ b/src/libcamera/base/event_notifier.cpp\n> @@ -5,14 +5,14 @@\n>   * event_notifier.cpp - File descriptor event notifier\n>   */\n>\n> -#include \"libcamera/internal/event_notifier.h\"\n> -\n> -#include <libcamera/camera_manager.h>\n> +#include <libcamera/base/event_notifier.h>\n>\n>  #include <libcamera/base/event_dispatcher.h>\n>  #include <libcamera/base/message.h>\n>  #include <libcamera/base/thread.h>\n>\n> +#include <libcamera/camera_manager.h>\n> +\n>  /**\n>   * \\file event_notifier.h\n>   * \\brief File descriptor event notifier\n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> index fb8ed79acd8e..a8b04cfc8a5f 100644\n> --- a/src/libcamera/base/meson.build\n> +++ b/src/libcamera/base/meson.build\n> @@ -5,6 +5,7 @@ libcamera_base_sources = files([\n>      'bound_method.cpp',\n>      'event_dispatcher.cpp',\n>      'event_dispatcher_poll.cpp',\n> +    'event_notifier.cpp',\n>      'file.cpp',\n>      'log.cpp',\n>      'message.cpp',\n> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n> index 4b842773fcd6..37a2c5aa55db 100644\n> --- a/src/libcamera/device_enumerator_udev.cpp\n> +++ b/src/libcamera/device_enumerator_udev.cpp\n> @@ -17,9 +17,9 @@\n>  #include <sys/sysmacros.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/log.h>\n>\n> -#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>\n>  namespace libcamera {\n> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n> index 1466597077d4..f23eb783bcb5 100644\n> --- a/src/libcamera/ipc_unixsocket.cpp\n> +++ b/src/libcamera/ipc_unixsocket.cpp\n> @@ -12,10 +12,9 @@\n>  #include <sys/socket.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/log.h>\n>\n> -#include \"libcamera/internal/event_notifier.h\"\n> -\n>  /**\n>   * \\file ipc_unixsocket.h\n>   * \\brief IPC mechanism based on Unix sockets\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 58eee14aed97..1f163cfe1225 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -15,7 +15,6 @@ libcamera_sources = files([\n>      'delayed_controls.cpp',\n>      'device_enumerator.cpp',\n>      'device_enumerator_sysfs.cpp',\n> -    'event_notifier.cpp',\n>      'file_descriptor.cpp',\n>      'formats.cpp',\n>      'framebuffer_allocator.cpp',\n> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> index 463380299a65..4fe4ad570b74 100644\n> --- a/src/libcamera/process.cpp\n> +++ b/src/libcamera/process.cpp\n> @@ -20,11 +20,10 @@\n>  #include <unistd.h>\n>  #include <vector>\n>\n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/event_notifier.h\"\n> -\n>  /**\n>   * \\file process.h\n>   * \\brief Process object\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 334b9b78b812..98d93a12a7be 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -16,10 +16,10 @@\n>  #include <sys/syscall.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/sysfs.h\"\n>\n>  /**\n> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> index dc23510bc5aa..3d2d99b46e4e 100644\n> --- a/src/libcamera/v4l2_videodevice.cpp\n> +++ b/src/libcamera/v4l2_videodevice.cpp\n> @@ -21,11 +21,11 @@\n>\n>  #include <linux/version.h>\n>\n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/log.h>\n>\n>  #include <libcamera/file_descriptor.h>\n>\n> -#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/media_object.h\"\n>\n> diff --git a/test/event-thread.cpp b/test/event-thread.cpp\n> index 05c5d26d3611..575261664c2f 100644\n> --- a/test/event-thread.cpp\n> +++ b/test/event-thread.cpp\n> @@ -10,11 +10,10 @@\n>  #include <string.h>\n>  #include <unistd.h>\n>\n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/thread.h>\n>  #include <libcamera/base/timer.h>\n>\n> -#include \"libcamera/internal/event_notifier.h\"\n> -\n>  #include \"test.h\"\n>\n>  using namespace std;\n> diff --git a/test/event.cpp b/test/event.cpp\n> index aa79da99c286..c2274344b7f0 100644\n> --- a/test/event.cpp\n> +++ b/test/event.cpp\n> @@ -10,11 +10,10 @@\n>  #include <unistd.h>\n>\n>  #include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/thread.h>\n>  #include <libcamera/base/timer.h>\n>\n> -#include \"libcamera/internal/event_notifier.h\"\n> -\n>  #include \"test.h\"\n>\n>  using namespace std;\n> diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp\n> index 656d86552d85..ee9f26510784 100644\n> --- a/test/ipa/ipa_interface_test.cpp\n> +++ b/test/ipa/ipa_interface_test.cpp\n> @@ -15,11 +15,11 @@\n>  #include <libcamera/ipa/vimc_ipa_proxy.h>\n>\n>  #include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/thread.h>\n>  #include <libcamera/base/timer.h>\n>\n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> --\n> 2.30.2\n>","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 795FCC321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:48:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 38ACB684CE;\n\tFri, 25 Jun 2021 05:48:13 +0200 (CEST)","from mail-ed1-x534.google.com (mail-ed1-x534.google.com\n\t[IPv6:2a00:1450:4864:20::534])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6FBCC60508\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:48:12 +0200 (CEST)","by mail-ed1-x534.google.com with SMTP id q14so11536346eds.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jun 2021 20:48:12 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"EMLyCKb2\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=inlodqpeheuGJsh/HgvAEtAagC/kyefcLrVtM/edRz4=;\n\tb=EMLyCKb2pNQIZ8pblHLj20vcNn4ivVOWtGRVFxTvDO43Psz/t7TxhSbYFg+H4Cq8TW\n\tpFhNMtKJt4bNXzuy47S3TiCBftx26cS2G7429NjQL/RM3iT4UpFHsZO7Xv7fhc4K+IFy\n\tXpo7AXzAJngdqSMZHCDDebVddhJKPs+EHD42s=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=inlodqpeheuGJsh/HgvAEtAagC/kyefcLrVtM/edRz4=;\n\tb=C1qUvNLsRdyCsu+O200pC73qzcuhagiump2wc5mezzo5GRCMcYCfzNycT1+qZiBCZf\n\tvjYb1WzgPOyyibcjlKpg1mHro3jnWvA7Cv1zUrHRjA0gC3RYzsaW0NKy7OG+UA+hkt3C\n\ttegFFDwMxtvrzMToLuwSt+oCfyvSfRntXbw57Yg9l9eFoeJMbXtJvgjLh6tJu1rQaY5I\n\tyqRfErRH6uaeIvuQp+JmOFLAPvEE7RfTq2q4BCHJGUbThyNeGyWepNns9XWO9Fv2tV92\n\tHpvgrRTBWCvWW5MH7KDm+WFNBUJIhzcmAZQ8UJhONaSL1uA7vj8JQ+jwNr3uxZrAj+Tv\n\tDMFg==","X-Gm-Message-State":"AOAM532MbzzVTcMc6ii/n9zq+v+RMvNcwc4X4U4iVqSmyXo7nBEzRegD\n\tB9VaLpC7y56Q5QnHr7DfXwGX2w0CmBcnYIdxi/SOUg==","X-Google-Smtp-Source":"ABdhPJylKMI2+MG6oFFNSC7oziaQITd4huvxSrwXKPGDqe/bzsPT3dMMIqieAsF3qe9DTXCz+HlCpVsWxxxySJ0h8qw=","X-Received":"by 2002:a05:6402:3548:: with SMTP id\n\tf8mr11736602edd.116.1624592892185; \n\tThu, 24 Jun 2021 20:48:12 -0700 (PDT)","MIME-Version":"1.0","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-12-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20210625013539.625803-12-kieran.bingham@ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Fri, 25 Jun 2021 12:48:02 +0900","Message-ID":"<CAO5uPHP34TLhBUo6xAPpJU_QQVn-WZNHmkR3NX_TxtcZhRAMjg@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 11/16] libcamera/base: Move\n\tevent_notifier to base","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17764,"web_url":"https://patchwork.libcamera.org/comment/17764/","msgid":"<20210625041053.GH2599@pyrite.rasen.tech>","date":"2021-06-25T04:10:53","subject":"Re: [libcamera-devel] [PATCH 07/16] libcamera/base: Move utils to\n\tthe base library","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 02:35:30AM +0100, Kieran Bingham wrote:\n> Move the utils functionality to the libcamera/base library.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  include/libcamera/base/meson.build                 | 1 +\n>  include/libcamera/{internal => base}/utils.h       | 8 ++++----\n>  include/libcamera/internal/log.h                   | 2 +-\n>  include/libcamera/internal/meson.build             | 1 -\n>  include/libcamera/internal/thread.h                | 3 ++-\n>  src/android/camera_device.cpp                      | 3 ++-\n>  src/android/jpeg/exif.cpp                          | 3 ++-\n>  src/ipa/ipu3/ipu3_agc.h                            | 4 ++--\n>  src/ipa/raspberrypi/cam_helper.hpp                 | 3 ++-\n>  src/ipa/raspberrypi/controller/agc_algorithm.hpp   | 3 ++-\n>  src/ipa/raspberrypi/controller/agc_status.h        | 2 +-\n>  src/ipa/raspberrypi/controller/camera_mode.h       | 2 +-\n>  src/ipa/raspberrypi/controller/device_status.h     | 2 +-\n>  src/ipa/raspberrypi/controller/rpi/agc.hpp         | 2 +-\n>  src/ipa/raspberrypi/controller/rpi/lux.hpp         | 2 +-\n>  src/libcamera/base/meson.build                     | 2 +-\n>  src/libcamera/{ => base}/utils.cpp                 | 8 ++++----\n>  src/libcamera/camera_manager.cpp                   | 3 ++-\n>  src/libcamera/camera_sensor.cpp                    | 3 ++-\n>  src/libcamera/controls.cpp                         | 3 ++-\n>  src/libcamera/event_dispatcher_poll.cpp            | 3 ++-\n>  src/libcamera/ipa_manager.cpp                      | 3 ++-\n>  src/libcamera/ipa_module.cpp                       | 3 ++-\n>  src/libcamera/ipa_proxy.cpp                        | 3 ++-\n>  src/libcamera/log.cpp                              | 3 ++-\n>  src/libcamera/meson.build                          | 1 -\n>  src/libcamera/object.cpp                           | 3 ++-\n>  src/libcamera/pipeline/ipu3/imgu.cpp               | 3 ++-\n>  src/libcamera/pipeline/ipu3/ipu3.cpp               | 3 ++-\n>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++-\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp           | 3 ++-\n>  src/libcamera/pipeline/simple/converter.cpp        | 3 ++-\n>  src/libcamera/pipeline/uvcvideo/uvcvideo.cpp       | 3 ++-\n>  src/libcamera/pipeline/vimc/vimc.cpp               | 3 ++-\n>  src/libcamera/pipeline_handler.cpp                 | 3 ++-\n>  src/libcamera/process.cpp                          | 3 ++-\n>  src/libcamera/source-paths.cpp                     | 2 +-\n>  src/libcamera/stream.cpp                           | 3 ++-\n>  src/libcamera/timer.cpp                            | 3 ++-\n>  src/libcamera/v4l2_device.cpp                      | 3 ++-\n>  src/libcamera/v4l2_subdevice.cpp                   | 3 ++-\n>  src/v4l2/v4l2_camera_proxy.cpp                     | 3 ++-\n>  src/v4l2/v4l2_compat_manager.cpp                   | 3 ++-\n>  test/camera-sensor.cpp                             | 3 ++-\n>  test/file-descriptor.cpp                           | 2 +-\n>  test/ipc/unixsocket_ipc.cpp                        | 3 ++-\n>  test/log/log_process.cpp                           | 3 ++-\n>  test/pixel-format.cpp                              | 2 +-\n>  test/process/process_test.cpp                      | 3 ++-\n>  test/signal-threads.cpp                            | 3 ++-\n>  test/utils.cpp                                     | 2 +-\n>  test/v4l2_subdevice/list_formats.cpp               | 3 ++-\n>  test/v4l2_videodevice/formats.cpp                  | 3 ++-\n>  53 files changed, 94 insertions(+), 59 deletions(-)\n>  rename include/libcamera/{internal => base}/utils.h (97%)\n>  rename src/libcamera/{ => base}/utils.cpp (98%)\n> \n> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n> index 0a7a57b81191..9f0ba6b0e10c 100644\n> --- a/include/libcamera/base/meson.build\n> +++ b/include/libcamera/base/meson.build\n> @@ -3,6 +3,7 @@\n>  libcamera_base_include_dir = libcamera_include_dir / 'base'\n>  \n>  libcamera_base_headers = files([\n> +    'utils.h',\n>  ])\n>  \n>  install_headers(libcamera_base_headers,\n> diff --git a/include/libcamera/internal/utils.h b/include/libcamera/base/utils.h\n> similarity index 97%\n> rename from include/libcamera/internal/utils.h\n> rename to include/libcamera/base/utils.h\n> index 15beb0f44172..d1aaff65211a 100644\n> --- a/include/libcamera/internal/utils.h\n> +++ b/include/libcamera/base/utils.h\n> @@ -4,8 +4,8 @@\n>   *\n>   * utils.h - Miscellaneous utility functions\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_UTILS_H__\n> -#define __LIBCAMERA_INTERNAL_UTILS_H__\n> +#ifndef __LIBCAMERA_BASE_UTILS_H__\n> +#define __LIBCAMERA_BASE_UTILS_H__\n>  \n>  #include <algorithm>\n>  #include <chrono>\n> @@ -23,7 +23,7 @@\n>  \n>  /* uClibc and uClibc-ng don't provide O_TMPFILE */\n>  #ifndef O_TMPFILE\n> -#define O_TMPFILE\t(020000000 | O_DIRECTORY)\n> +#define O_TMPFILE (020000000 | O_DIRECTORY)\n>  #endif\n>  \n>  #endif\n> @@ -352,4 +352,4 @@ std::basic_ostream<CharT, Traits> &operator<<(std::basic_ostream<CharT, Traits>\n>  \n>  } /* namespace libcamera */\n>  \n> -#endif /* __LIBCAMERA_INTERNAL_UTILS_H__ */\n> +#endif /* __LIBCAMERA_BASE_UTILS_H__ */\n> diff --git a/include/libcamera/internal/log.h b/include/libcamera/internal/log.h\n> index b8efb161407c..9c2beab6a33a 100644\n> --- a/include/libcamera/internal/log.h\n> +++ b/include/libcamera/internal/log.h\n> @@ -12,7 +12,7 @@\n>  \n>  #include <libcamera/class.h>\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index e5088177fe8e..c84f9822ef6e 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -43,7 +43,6 @@ libcamera_internal_headers = files([\n>      'sysfs.h',\n>      'thread.h',\n>      'timer.h',\n> -    'utils.h',\n>      'v4l2_device.h',\n>      'v4l2_pixelformat.h',\n>      'v4l2_subdevice.h',\n> diff --git a/include/libcamera/internal/thread.h b/include/libcamera/internal/thread.h\n> index 25d0308d05b4..9662e28bb581 100644\n> --- a/include/libcamera/internal/thread.h\n> +++ b/include/libcamera/internal/thread.h\n> @@ -14,8 +14,9 @@\n>  \n>  #include <libcamera/signal.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/message.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  namespace libcamera {\n>  \n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index 4bd125d7020a..6243c07e231e 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -20,9 +20,10 @@\n>  #include <libcamera/formats.h>\n>  #include <libcamera/property_ids.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  #include \"system/graphics.h\"\n>  \n> diff --git a/src/android/jpeg/exif.cpp b/src/android/jpeg/exif.cpp\n> index 922086cdf6bc..747f1cfaa8ac 100644\n> --- a/src/android/jpeg/exif.cpp\n> +++ b/src/android/jpeg/exif.cpp\n> @@ -14,8 +14,9 @@\n>  #include <tuple>\n>  #include <uchar.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  using namespace libcamera;\n>  \n> diff --git a/src/ipa/ipu3/ipu3_agc.h b/src/ipa/ipu3/ipu3_agc.h\n> index a5a78233cb6d..60c7a84f2d98 100644\n> --- a/src/ipa/ipu3/ipu3_agc.h\n> +++ b/src/ipa/ipu3/ipu3_agc.h\n> @@ -12,9 +12,9 @@\n>  \n>  #include <linux/intel-ipu3.h>\n>  \n> -#include <libcamera/geometry.h>\n> +#include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/geometry.h>\n>  \n>  #include \"libipa/algorithm.h\"\n>  \n> diff --git a/src/ipa/raspberrypi/cam_helper.hpp b/src/ipa/raspberrypi/cam_helper.hpp\n> index f53f5c39b01c..221898ceb40d 100644\n> --- a/src/ipa/raspberrypi/cam_helper.hpp\n> +++ b/src/ipa/raspberrypi/cam_helper.hpp\n> @@ -15,7 +15,8 @@\n>  #include \"controller/metadata.hpp\"\n>  #include \"md_parser.hpp\"\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n>  namespace RPiController {\n> diff --git a/src/ipa/raspberrypi/controller/agc_algorithm.hpp b/src/ipa/raspberrypi/controller/agc_algorithm.hpp\n> index 134bbcda50ce..61595ea2b006 100644\n> --- a/src/ipa/raspberrypi/controller/agc_algorithm.hpp\n> +++ b/src/ipa/raspberrypi/controller/agc_algorithm.hpp\n> @@ -6,7 +6,8 @@\n>   */\n>  #pragma once\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"algorithm.hpp\"\n>  \n>  namespace RPiController {\n> diff --git a/src/ipa/raspberrypi/controller/agc_status.h b/src/ipa/raspberrypi/controller/agc_status.h\n> index 5d50e177f0dc..20cb1b624b33 100644\n> --- a/src/ipa/raspberrypi/controller/agc_status.h\n> +++ b/src/ipa/raspberrypi/controller/agc_status.h\n> @@ -6,7 +6,7 @@\n>   */\n>  #pragma once\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  // The AGC algorithm should post the following structure into the image's\n>  // \"agc.status\" metadata.\n> diff --git a/src/ipa/raspberrypi/controller/camera_mode.h b/src/ipa/raspberrypi/controller/camera_mode.h\n> index 2aa2335dcf90..6588823020e3 100644\n> --- a/src/ipa/raspberrypi/controller/camera_mode.h\n> +++ b/src/ipa/raspberrypi/controller/camera_mode.h\n> @@ -8,7 +8,7 @@\n>  \n>  #include <libcamera/transform.h>\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  // Description of a \"camera mode\", holding enough information for control\n>  // algorithms to adapt their behaviour to the different modes of the camera,\n> diff --git a/src/ipa/raspberrypi/controller/device_status.h b/src/ipa/raspberrypi/controller/device_status.h\n> index 131b4cd344ee..f74235248b12 100644\n> --- a/src/ipa/raspberrypi/controller/device_status.h\n> +++ b/src/ipa/raspberrypi/controller/device_status.h\n> @@ -6,7 +6,7 @@\n>   */\n>  #pragma once\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  // Definition of \"device metadata\" which stores things like shutter time and\n>  // analogue gain that downstream control algorithms will want to know.\n> diff --git a/src/ipa/raspberrypi/controller/rpi/agc.hpp b/src/ipa/raspberrypi/controller/rpi/agc.hpp\n> index 750789482b49..85067dc64614 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/agc.hpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/agc.hpp\n> @@ -9,7 +9,7 @@\n>  #include <vector>\n>  #include <mutex>\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  #include \"../agc_algorithm.hpp\"\n>  #include \"../agc_status.h\"\n> diff --git a/src/ipa/raspberrypi/controller/rpi/lux.hpp b/src/ipa/raspberrypi/controller/rpi/lux.hpp\n> index 45c844393e62..3ebd35d1e382 100644\n> --- a/src/ipa/raspberrypi/controller/rpi/lux.hpp\n> +++ b/src/ipa/raspberrypi/controller/rpi/lux.hpp\n> @@ -8,7 +8,7 @@\n>  \n>  #include <mutex>\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  #include \"../lux_status.h\"\n>  #include \"../algorithm.hpp\"\n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> index 3d58fea36ef5..6d9ec37414f8 100644\n> --- a/src/libcamera/base/meson.build\n> +++ b/src/libcamera/base/meson.build\n> @@ -1,6 +1,7 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>  \n>  libcamera_base_sources = files([\n> +    'utils.cpp',\n>  ])\n>  \n>  libcamera_base_deps = [\n> @@ -10,7 +11,6 @@ libcamera_base_lib = shared_library('libcamera-base',\n>                                      [libcamera_base_sources, libcamera_base_headers],\n>                                      name_prefix : '',\n>                                      install : true,\n> -                                    cpp_args : libcamera_cpp_args,\n>                                      include_directories : libcamera_includes,\n>                                      dependencies : libcamera_base_deps)\n>  \n> diff --git a/src/libcamera/utils.cpp b/src/libcamera/base/utils.cpp\n> similarity index 98%\n> rename from src/libcamera/utils.cpp\n> rename to src/libcamera/base/utils.cpp\n> index 42f82d6158dd..d0c0a93980b1 100644\n> --- a/src/libcamera/utils.cpp\n> +++ b/src/libcamera/base/utils.cpp\n> @@ -5,7 +5,7 @@\n>   * utils.cpp - Miscellaneous utility functions\n>   */\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  #include <dlfcn.h>\n>  #include <elf.h>\n> @@ -20,7 +20,7 @@\n>  #include <unistd.h>\n>  \n>  /**\n> - * \\file utils.h\n> + * \\file base/utils.h\n>   * \\brief Miscellaneous utility functions\n>   */\n>  \n> @@ -44,8 +44,8 @@ namespace utils {\n>   */\n>  const char *basename(const char *path)\n>  {\n> -       const char *base = strrchr(path, '/');\n> -       return base ? base + 1 : path;\n> +\tconst char *base = strrchr(path, '/');\n> +\treturn base ? base + 1 : path;\n>  }\n>  \n>  /**\n> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> index 1ecf2b07d5a3..a3784db6e697 100644\n> --- a/src/libcamera/camera_manager.cpp\n> +++ b/src/libcamera/camera_manager.cpp\n> @@ -12,13 +12,14 @@\n>  \n>  #include <libcamera/camera.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/process.h\"\n>  #include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file camera_manager.h\n> diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp\n> index 3e135353f1d7..94dcf4f9cf48 100644\n> --- a/src/libcamera/camera_sensor.cpp\n> +++ b/src/libcamera/camera_sensor.cpp\n> @@ -18,11 +18,12 @@\n>  \n>  #include <libcamera/property_ids.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/bayer_format.h\"\n>  #include \"libcamera/internal/camera_sensor_properties.h\"\n>  #include \"libcamera/internal/formats.h\"\n>  #include \"libcamera/internal/sysfs.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file camera_sensor.h\n> diff --git a/src/libcamera/controls.cpp b/src/libcamera/controls.cpp\n> index 5aef4e7145bd..7df372ad3b6c 100644\n> --- a/src/libcamera/controls.cpp\n> +++ b/src/libcamera/controls.cpp\n> @@ -12,9 +12,10 @@\n>  #include <string>\n>  #include <string.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/control_validator.h\"\n>  #include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file controls.h\n> diff --git a/src/libcamera/event_dispatcher_poll.cpp b/src/libcamera/event_dispatcher_poll.cpp\n> index 456c6def075b..0b6aee187063 100644\n> --- a/src/libcamera/event_dispatcher_poll.cpp\n> +++ b/src/libcamera/event_dispatcher_poll.cpp\n> @@ -16,11 +16,12 @@\n>  #include <sys/eventfd.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/thread.h\"\n>  #include \"libcamera/internal/timer.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file event_dispatcher_poll.h\n> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n> index 93d02d947c46..263cacd64737 100644\n> --- a/src/libcamera/ipa_manager.cpp\n> +++ b/src/libcamera/ipa_manager.cpp\n> @@ -12,12 +12,13 @@\n>  #include <string.h>\n>  #include <sys/types.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/file.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/ipa_proxy.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file ipa_manager.h\n> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\n> index f53e529b0380..a4e7fb861138 100644\n> --- a/src/libcamera/ipa_module.cpp\n> +++ b/src/libcamera/ipa_module.cpp\n> @@ -23,10 +23,11 @@\n>  \n>  #include <libcamera/span.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/file.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file ipa_module.h\n> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> index b70fde581eeb..ca980ec705a6 100644\n> --- a/src/libcamera/ipa_proxy.cpp\n> +++ b/src/libcamera/ipa_proxy.cpp\n> @@ -12,9 +12,10 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file ipa_proxy.h\n> diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp\n> index 74829a56916e..5ff0e9017648 100644\n> --- a/src/libcamera/log.cpp\n> +++ b/src/libcamera/log.cpp\n> @@ -23,8 +23,9 @@\n>  \n>  #include <libcamera/logging.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file log.h\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index eaf3cec8cba7..ac401c25d498 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -52,7 +52,6 @@ libcamera_sources = files([\n>      'thread.cpp',\n>      'timer.cpp',\n>      'transform.cpp',\n> -    'utils.cpp',\n>      'v4l2_device.cpp',\n>      'v4l2_pixelformat.cpp',\n>      'v4l2_subdevice.cpp',\n> diff --git a/src/libcamera/object.cpp b/src/libcamera/object.cpp\n> index 5e6b73f9af84..51cac64ea313 100644\n> --- a/src/libcamera/object.cpp\n> +++ b/src/libcamera/object.cpp\n> @@ -11,11 +11,12 @@\n>  \n>  #include <libcamera/signal.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/message.h\"\n>  #include \"libcamera/internal/semaphore.h\"\n>  #include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file object.h\n> diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp\n> index 4eb3f7b730a9..32d143a862b2 100644\n> --- a/src/libcamera/pipeline/ipu3/imgu.cpp\n> +++ b/src/libcamera/pipeline/ipu3/imgu.cpp\n> @@ -16,9 +16,10 @@\n>  #include <libcamera/formats.h>\n>  #include <libcamera/stream.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  namespace libcamera {\n>  \n> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> index 6c93bc6d161d..6b43ad2fb2b1 100644\n> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp\n> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp\n> @@ -20,6 +20,8 @@\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/delayed_controls.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n> @@ -27,7 +29,6 @@\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  #include \"cio2.h\"\n>  #include \"frames.h\"\n> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> index 4e26a1930228..082eb1ee1c23 100644\n> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n> @@ -24,6 +24,8 @@\n>  #include <libcamera/property_ids.h>\n>  #include <libcamera/request.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include <linux/bcm2835-isp.h>\n>  #include <linux/videodev2.h>\n>  \n> @@ -35,7 +37,6 @@\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n>  #include \"dma_heaps.h\"\n> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> index 6699839c4623..c625d7248f5c 100644\n> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n> @@ -24,6 +24,8 @@\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/delayed_controls.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n> @@ -31,7 +33,6 @@\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n> diff --git a/src/libcamera/pipeline/simple/converter.cpp b/src/libcamera/pipeline/simple/converter.cpp\n> index 68644ef6477f..589f185b1bf1 100644\n> --- a/src/libcamera/pipeline/simple/converter.cpp\n> +++ b/src/libcamera/pipeline/simple/converter.cpp\n> @@ -15,9 +15,10 @@\n>  #include <libcamera/signal.h>\n>  #include <libcamera/stream.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n>  namespace libcamera {\n> diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n> index 12a85b2407db..d8c17dccae53 100644\n> --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n> +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp\n> @@ -19,12 +19,13 @@\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  #include \"libcamera/internal/sysfs.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n>  namespace libcamera {\n> diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp\n> index 8bbac0085c9b..025ca56205f8 100644\n> --- a/src/libcamera/pipeline/vimc/vimc.cpp\n> +++ b/src/libcamera/pipeline/vimc/vimc.cpp\n> @@ -23,13 +23,14 @@\n>  #include <libcamera/request.h>\n>  #include <libcamera/stream.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n> diff --git a/src/libcamera/pipeline_handler.cpp b/src/libcamera/pipeline_handler.cpp\n> index e507a8bba8a6..6fb2a743c3c2 100644\n> --- a/src/libcamera/pipeline_handler.cpp\n> +++ b/src/libcamera/pipeline_handler.cpp\n> @@ -13,11 +13,12 @@\n>  #include <libcamera/camera.h>\n>  #include <libcamera/camera_manager.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/tracepoints.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file pipeline_handler.h\n> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> index 40a434a6b0c2..35091f60c1e9 100644\n> --- a/src/libcamera/process.cpp\n> +++ b/src/libcamera/process.cpp\n> @@ -20,9 +20,10 @@\n>  #include <unistd.h>\n>  #include <vector>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file process.h\n> diff --git a/src/libcamera/source-paths.cpp b/src/libcamera/source-paths.cpp\n> index b39f5f853e39..2a59105e8283 100644\n> --- a/src/libcamera/source-paths.cpp\n> +++ b/src/libcamera/source-paths.cpp\n> @@ -12,7 +12,7 @@\n>  #include <link.h>\n>  #include <sys/stat.h>\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  /**\n>   * \\file source-paths.h\n> diff --git a/src/libcamera/stream.cpp b/src/libcamera/stream.cpp\n> index f7bafcf8fc97..d5d68427e658 100644\n> --- a/src/libcamera/stream.cpp\n> +++ b/src/libcamera/stream.cpp\n> @@ -15,8 +15,9 @@\n>  \n>  #include <libcamera/request.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file stream.h\n> diff --git a/src/libcamera/timer.cpp b/src/libcamera/timer.cpp\n> index c242113a782e..9496671edffc 100644\n> --- a/src/libcamera/timer.cpp\n> +++ b/src/libcamera/timer.cpp\n> @@ -11,11 +11,12 @@\n>  \n>  #include <libcamera/camera_manager.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/message.h\"\n>  #include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file timer.h\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 5660e6ea5839..facb53e13169 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -16,10 +16,11 @@\n>  #include <sys/syscall.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/sysfs.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file v4l2_device.h\n> diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp\n> index 721ff5a92a2b..2c56cfafbce4 100644\n> --- a/src/libcamera/v4l2_subdevice.cpp\n> +++ b/src/libcamera/v4l2_subdevice.cpp\n> @@ -19,10 +19,11 @@\n>  \n>  #include <libcamera/geometry.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/media_object.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  /**\n>   * \\file v4l2_subdevice.h\n> diff --git a/src/v4l2/v4l2_camera_proxy.cpp b/src/v4l2/v4l2_camera_proxy.cpp\n> index f8bfe595e90e..a5a25507462e 100644\n> --- a/src/v4l2/v4l2_camera_proxy.cpp\n> +++ b/src/v4l2/v4l2_camera_proxy.cpp\n> @@ -20,9 +20,10 @@\n>  #include <libcamera/formats.h>\n>  #include <libcamera/object.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/formats.h\"\n>  #include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  #include \"v4l2_camera.h\"\n>  #include \"v4l2_camera_file.h\"\n> diff --git a/src/v4l2/v4l2_compat_manager.cpp b/src/v4l2/v4l2_compat_manager.cpp\n> index 96dbcdf28f04..27de6c50ff4e 100644\n> --- a/src/v4l2/v4l2_compat_manager.cpp\n> +++ b/src/v4l2/v4l2_compat_manager.cpp\n> @@ -22,8 +22,9 @@\n>  #include <libcamera/camera.h>\n>  #include <libcamera/camera_manager.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  #include \"v4l2_camera_file.h\"\n>  \n> diff --git a/test/camera-sensor.cpp b/test/camera-sensor.cpp\n> index 8c7fd1d2d444..a8dcad8215e5 100644\n> --- a/test/camera-sensor.cpp\n> +++ b/test/camera-sensor.cpp\n> @@ -10,10 +10,11 @@\n>  \n>  #include <linux/media-bus-format.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/camera_sensor.h\"\n>  #include \"libcamera/internal/device_enumerator.h\"\n>  #include \"libcamera/internal/media_device.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>  \n>  #include \"test.h\"\n> diff --git a/test/file-descriptor.cpp b/test/file-descriptor.cpp\n> index aa3c896fb937..85b077a25c32 100644\n> --- a/test/file-descriptor.cpp\n> +++ b/test/file-descriptor.cpp\n> @@ -13,7 +13,7 @@\n>  \n>  #include <libcamera/file_descriptor.h>\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/ipc/unixsocket_ipc.cpp b/test/ipc/unixsocket_ipc.cpp\n> index 3049eaa8bb2a..161d09b98719 100644\n> --- a/test/ipc/unixsocket_ipc.cpp\n> +++ b/test/ipc/unixsocket_ipc.cpp\n> @@ -15,6 +15,8 @@\n>  #include <sys/wait.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/ipa_data_serializer.h\"\n>  #include \"libcamera/internal/ipc_pipe.h\"\n> @@ -22,7 +24,6 @@\n>  #include \"libcamera/internal/process.h\"\n>  #include \"libcamera/internal/thread.h\"\n>  #include \"libcamera/internal/timer.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/log/log_process.cpp b/test/log/log_process.cpp\n> index c0a1a012d366..413d9207ea68 100644\n> --- a/test/log/log_process.cpp\n> +++ b/test/log/log_process.cpp\n> @@ -16,12 +16,13 @@\n>  \n>  #include <libcamera/logging.h>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/log.h\"\n>  #include \"libcamera/internal/process.h\"\n>  #include \"libcamera/internal/thread.h\"\n>  #include \"libcamera/internal/timer.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/pixel-format.cpp b/test/pixel-format.cpp\n> index c4a08f468ade..0f364f833ed1 100644\n> --- a/test/pixel-format.cpp\n> +++ b/test/pixel-format.cpp\n> @@ -10,7 +10,7 @@\n>  #include <libcamera/formats.h>\n>  #include <libcamera/pixel_format.h>\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/process/process_test.cpp b/test/process/process_test.cpp\n> index 1279d8c17598..a5155bae3162 100644\n> --- a/test/process/process_test.cpp\n> +++ b/test/process/process_test.cpp\n> @@ -9,11 +9,12 @@\n>  #include <unistd.h>\n>  #include <vector>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/event_dispatcher.h\"\n>  #include \"libcamera/internal/process.h\"\n>  #include \"libcamera/internal/thread.h\"\n>  #include \"libcamera/internal/timer.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/signal-threads.cpp b/test/signal-threads.cpp\n> index 3c5f3792e385..8a96b5d2abb3 100644\n> --- a/test/signal-threads.cpp\n> +++ b/test/signal-threads.cpp\n> @@ -9,9 +9,10 @@\n>  #include <iostream>\n>  #include <thread>\n>  \n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/message.h\"\n>  #include \"libcamera/internal/thread.h\"\n> -#include \"libcamera/internal/utils.h\"\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/utils.cpp b/test/utils.cpp\n> index f170ae4c2f35..9cd2cd070cb9 100644\n> --- a/test/utils.cpp\n> +++ b/test/utils.cpp\n> @@ -14,7 +14,7 @@\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/span.h>\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/v4l2_subdevice/list_formats.cpp b/test/v4l2_subdevice/list_formats.cpp\n> index 74ec81a8560c..9cbd7b9439c3 100644\n> --- a/test/v4l2_subdevice/list_formats.cpp\n> +++ b/test/v4l2_subdevice/list_formats.cpp\n> @@ -10,7 +10,8 @@\n>  \n>  #include <libcamera/geometry.h>\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/v4l2_subdevice.h\"\n>  \n>  #include \"v4l2_subdevice_test.h\"\n> diff --git a/test/v4l2_videodevice/formats.cpp b/test/v4l2_videodevice/formats.cpp\n> index 255446fe758a..6c05262201fa 100644\n> --- a/test/v4l2_videodevice/formats.cpp\n> +++ b/test/v4l2_videodevice/formats.cpp\n> @@ -8,7 +8,8 @@\n>  #include <iostream>\n>  #include <limits.h>\n>  \n> -#include \"libcamera/internal/utils.h\"\n> +#include <libcamera/base/utils.h>\n> +\n>  #include \"libcamera/internal/v4l2_videodevice.h\"\n>  \n>  #include \"v4l2_videodevice_test.h\"\n> -- \n> 2.30.2\n>","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 1B213C321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 04:11:05 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4BBFB684CB;\n\tFri, 25 Jun 2021 06:11:02 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F2B6D60508\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 06:11:00 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 41A60501;\n\tFri, 25 Jun 2021 06:10:58 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"DX6GJJcc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624594260;\n\tbh=0YSzXuK3Ej2wXYRVEMuxQKZfyWRc5UF2Pc/JwpJPFzo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=DX6GJJcc+UjFEFglGlMFOPmEfD5ZoNsR4J4+2CRe2aWjvB7PsEJocCHTJjMTcmO5J\n\tX4zTKKYqn7F9VPhKcKkKg9377rkRerl5eyzPBIoF0Cnt29CpnDoXsEzBW2aeLCHgvB\n\tZjLPkWvzFlhiBeDveQNcGc13ugGyUB7Gz83NCySU=","Date":"Fri, 25 Jun 2021 13:10:53 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210625041053.GH2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-8-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-8-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 07/16] libcamera/base: Move utils to\n\tthe base library","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17767,"web_url":"https://patchwork.libcamera.org/comment/17767/","msgid":"<20210625041804.GI2599@pyrite.rasen.tech>","date":"2021-06-25T04:18:04","subject":"Re: [libcamera-devel] [PATCH 08/16] libcamera/base: Move class\n\thelpers to the base library","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 02:35:31AM +0100, Kieran Bingham wrote:\n> Move the class support infrastructure to the base library.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  include/libcamera/{ => base}/class.h            | 0\n>  include/libcamera/base/meson.build              | 1 +\n>  include/libcamera/buffer.h                      | 3 ++-\n>  include/libcamera/camera.h                      | 3 ++-\n>  include/libcamera/camera_manager.h              | 3 ++-\n>  include/libcamera/controls.h                    | 3 ++-\n>  include/libcamera/framebuffer_allocator.h       | 2 +-\n>  include/libcamera/internal/buffer.h             | 3 ++-\n>  include/libcamera/internal/byte_stream_buffer.h | 3 ++-\n>  include/libcamera/internal/camera_sensor.h      | 3 ++-\n>  include/libcamera/internal/file.h               | 3 ++-\n>  include/libcamera/internal/log.h                | 3 +--\n>  include/libcamera/internal/media_object.h       | 2 +-\n>  include/libcamera/internal/pipeline_handler.h   | 3 ++-\n>  include/libcamera/internal/v4l2_subdevice.h     | 3 ++-\n>  include/libcamera/internal/v4l2_videodevice.h   | 3 ++-\n>  include/libcamera/meson.build                   | 1 -\n>  include/libcamera/request.h                     | 3 ++-\n>  src/android/camera_buffer.h                     | 3 ++-\n>  src/android/camera_capabilities.h               | 3 ++-\n>  src/android/camera_hal_config.h                 | 2 +-\n>  src/libcamera/{ => base}/class.cpp              | 2 +-\n>  src/libcamera/base/meson.build                  | 1 +\n>  src/libcamera/meson.build                       | 1 -\n>  24 files changed, 35 insertions(+), 22 deletions(-)\n>  rename include/libcamera/{ => base}/class.h (100%)\n>  rename src/libcamera/{ => base}/class.cpp (99%)\n> \n> diff --git a/include/libcamera/class.h b/include/libcamera/base/class.h\n> similarity index 100%\n> rename from include/libcamera/class.h\n> rename to include/libcamera/base/class.h\n> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n> index 9f0ba6b0e10c..2db756c504c9 100644\n> --- a/include/libcamera/base/meson.build\n> +++ b/include/libcamera/base/meson.build\n> @@ -3,6 +3,7 @@\n>  libcamera_base_include_dir = libcamera_include_dir / 'base'\n>  \n>  libcamera_base_headers = files([\n> +    'class.h',\n>      'utils.h',\n>  ])\n>  \n> diff --git a/include/libcamera/buffer.h b/include/libcamera/buffer.h\n> index e0af00900409..323d1cba41a9 100644\n> --- a/include/libcamera/buffer.h\n> +++ b/include/libcamera/buffer.h\n> @@ -10,7 +10,8 @@\n>  #include <stdint.h>\n>  #include <vector>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/file_descriptor.h>\n>  \n>  namespace libcamera {\n> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h\n> index d71641805c0a..ea0914009c2b 100644\n> --- a/include/libcamera/camera.h\n> +++ b/include/libcamera/camera.h\n> @@ -12,7 +12,8 @@\n>  #include <stdint.h>\n>  #include <string>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/controls.h>\n>  #include <libcamera/object.h>\n>  #include <libcamera/request.h>\n> diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h\n> index c2f0b786da8e..5deede035115 100644\n> --- a/include/libcamera/camera_manager.h\n> +++ b/include/libcamera/camera_manager.h\n> @@ -12,7 +12,8 @@\n>  #include <sys/types.h>\n>  #include <vector>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/object.h>\n>  #include <libcamera/signal.h>\n>  \n> diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h\n> index 1c9b37e617bc..f62b6cf055d6 100644\n> --- a/include/libcamera/controls.h\n> +++ b/include/libcamera/controls.h\n> @@ -14,7 +14,8 @@\n>  #include <unordered_map>\n>  #include <vector>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/span.h>\n>  \n> diff --git a/include/libcamera/framebuffer_allocator.h b/include/libcamera/framebuffer_allocator.h\n> index 0c85631a1da2..cbc9ce101889 100644\n> --- a/include/libcamera/framebuffer_allocator.h\n> +++ b/include/libcamera/framebuffer_allocator.h\n> @@ -11,7 +11,7 @@\n>  #include <memory>\n>  #include <vector>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/include/libcamera/internal/buffer.h b/include/libcamera/internal/buffer.h\n> index 9da1fbd12c27..91dd24969385 100644\n> --- a/include/libcamera/internal/buffer.h\n> +++ b/include/libcamera/internal/buffer.h\n> @@ -10,7 +10,8 @@\n>  #include <sys/mman.h>\n>  #include <vector>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/buffer.h>\n>  #include <libcamera/span.h>\n>  \n> diff --git a/include/libcamera/internal/byte_stream_buffer.h b/include/libcamera/internal/byte_stream_buffer.h\n> index 866cb9b0b2a6..7eefb1a71f07 100644\n> --- a/include/libcamera/internal/byte_stream_buffer.h\n> +++ b/include/libcamera/internal/byte_stream_buffer.h\n> @@ -11,7 +11,8 @@\n>  #include <stdint.h>\n>  #include <type_traits>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/span.h>\n>  \n>  namespace libcamera {\n> diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h\n> index e133ebf45bf7..7bc540619721 100644\n> --- a/include/libcamera/internal/camera_sensor.h\n> +++ b/include/libcamera/internal/camera_sensor.h\n> @@ -11,7 +11,8 @@\n>  #include <string>\n>  #include <vector>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/controls.h>\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/ipa/core_ipa_interface.h>\n> diff --git a/include/libcamera/internal/file.h b/include/libcamera/internal/file.h\n> index f0b313a5faae..44621ceb4c19 100644\n> --- a/include/libcamera/internal/file.h\n> +++ b/include/libcamera/internal/file.h\n> @@ -11,7 +11,8 @@\n>  #include <string>\n>  #include <sys/types.h>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/span.h>\n>  \n>  namespace libcamera {\n> diff --git a/include/libcamera/internal/log.h b/include/libcamera/internal/log.h\n> index 9c2beab6a33a..82e55a623e04 100644\n> --- a/include/libcamera/internal/log.h\n> +++ b/include/libcamera/internal/log.h\n> @@ -10,8 +10,7 @@\n>  #include <chrono>\n>  #include <sstream>\n>  \n> -#include <libcamera/class.h>\n> -\n> +#include <libcamera/base/class.h>\n>  #include <libcamera/base/utils.h>\n>  \n>  namespace libcamera {\n> diff --git a/include/libcamera/internal/media_object.h b/include/libcamera/internal/media_object.h\n> index 1c82c27928a8..2f5d33e1903e 100644\n> --- a/include/libcamera/internal/media_object.h\n> +++ b/include/libcamera/internal/media_object.h\n> @@ -12,7 +12,7 @@\n>  \n>  #include <linux/media.h>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h\n> index 31dadf285a58..8beb6b76dd3f 100644\n> --- a/include/libcamera/internal/pipeline_handler.h\n> +++ b/include/libcamera/internal/pipeline_handler.h\n> @@ -15,7 +15,8 @@\n>  #include <sys/types.h>\n>  #include <vector>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/controls.h>\n>  #include <libcamera/object.h>\n>  #include <libcamera/stream.h>\n> diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h\n> index d2b9ca55439e..d07dd6b444d0 100644\n> --- a/include/libcamera/internal/v4l2_subdevice.h\n> +++ b/include/libcamera/internal/v4l2_subdevice.h\n> @@ -11,7 +11,8 @@\n>  #include <string>\n>  #include <vector>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/geometry.h>\n>  \n>  #include \"libcamera/internal/formats.h\"\n> diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\n> index 7938343bba8d..227d015e8937 100644\n> --- a/include/libcamera/internal/v4l2_videodevice.h\n> +++ b/include/libcamera/internal/v4l2_videodevice.h\n> @@ -16,8 +16,9 @@\n>  \n>  #include <linux/videodev2.h>\n>  \n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/buffer.h>\n> -#include <libcamera/class.h>\n>  #include <libcamera/geometry.h>\n>  #include <libcamera/pixel_format.h>\n>  #include <libcamera/signal.h>\n> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> index 1fa1bf4a4e78..7cba3de6ca96 100644\n> --- a/include/libcamera/meson.build\n> +++ b/include/libcamera/meson.build\n> @@ -5,7 +5,6 @@ libcamera_public_headers = files([\n>      'buffer.h',\n>      'camera.h',\n>      'camera_manager.h',\n> -    'class.h',\n>      'compiler.h',\n>      'controls.h',\n>      'file_descriptor.h',\n> diff --git a/include/libcamera/request.h b/include/libcamera/request.h\n> index 5596901ddd8e..00c646fea7f2 100644\n> --- a/include/libcamera/request.h\n> +++ b/include/libcamera/request.h\n> @@ -13,7 +13,8 @@\n>  #include <string>\n>  #include <unordered_set>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/controls.h>\n>  #include <libcamera/signal.h>\n>  \n> diff --git a/src/android/camera_buffer.h b/src/android/camera_buffer.h\n> index c88124b2b3f3..e850c4e36668 100644\n> --- a/src/android/camera_buffer.h\n> +++ b/src/android/camera_buffer.h\n> @@ -9,7 +9,8 @@\n>  \n>  #include <hardware/camera3.h>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/span.h>\n>  \n>  class CameraBuffer final : public libcamera::Extensible\n> diff --git a/src/android/camera_capabilities.h b/src/android/camera_capabilities.h\n> index f511607bbd90..4f5be82595d6 100644\n> --- a/src/android/camera_capabilities.h\n> +++ b/src/android/camera_capabilities.h\n> @@ -11,8 +11,9 @@\n>  #include <memory>\n>  #include <vector>\n>  \n> +#include <libcamera/base/class.h>\n> +\n>  #include <libcamera/camera.h>\n> -#include <libcamera/class.h>\n>  #include <libcamera/formats.h>\n>  #include <libcamera/geometry.h>\n>  \n> diff --git a/src/android/camera_hal_config.h b/src/android/camera_hal_config.h\n> index 97dc69c1def5..a79d5d6c42dc 100644\n> --- a/src/android/camera_hal_config.h\n> +++ b/src/android/camera_hal_config.h\n> @@ -10,7 +10,7 @@\n>  #include <map>\n>  #include <string>\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n>  \n>  struct CameraConfigData {\n>  \tint facing = -1;\n> diff --git a/src/libcamera/class.cpp b/src/libcamera/base/class.cpp\n> similarity index 99%\n> rename from src/libcamera/class.cpp\n> rename to src/libcamera/base/class.cpp\n> index 28c35633d7db..165beafc243d 100644\n> --- a/src/libcamera/class.cpp\n> +++ b/src/libcamera/base/class.cpp\n> @@ -5,7 +5,7 @@\n>   * class.cpp - Utilities and helpers for classes\n>   */\n>  \n> -#include <libcamera/class.h>\n> +#include <libcamera/base/class.h>\n>  \n>  /**\n>   * \\file class.h\n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> index 6d9ec37414f8..302a288685d3 100644\n> --- a/src/libcamera/base/meson.build\n> +++ b/src/libcamera/base/meson.build\n> @@ -1,6 +1,7 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>  \n>  libcamera_base_sources = files([\n> +    'class.cpp',\n>      'utils.cpp',\n>  ])\n>  \n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index ac401c25d498..a341004c0c19 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -10,7 +10,6 @@ libcamera_sources = files([\n>      'camera_manager.cpp',\n>      'camera_sensor.cpp',\n>      'camera_sensor_properties.cpp',\n> -    'class.cpp',\n>      'controls.cpp',\n>      'control_serializer.cpp',\n>      'control_validator.cpp',\n> -- \n> 2.30.2\n>","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 0E31AC321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 04:18:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7C8D7684CE;\n\tFri, 25 Jun 2021 06:18:13 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4229B684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 06:18:12 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C6098501;\n\tFri, 25 Jun 2021 06:18:10 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Wr1G+pqz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624594692;\n\tbh=TeC779KlezZLCy6Q46BHcIXwO+vm0zQmHrMshDcoG74=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Wr1G+pqzz57ePH5O87FGIxbNUsi80Yq1hI04pMEoDFHL+GPWfRceLIVQO8iGFTi9I\n\tg8QjcKiuumszcIgd2N0G5q1oGU+hkLueFDEeCH2xCnMFqJdS7le1288m78EHzODYP7\n\tpk6jTSq2eI2U7DIQEt1YDA+74zpzHDWAobH9wlrQ=","Date":"Fri, 25 Jun 2021 13:18:04 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210625041804.GI2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-9-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-9-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 08/16] libcamera/base: Move class\n\thelpers to the base library","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17770,"web_url":"https://patchwork.libcamera.org/comment/17770/","msgid":"<20210625043910.GL2599@pyrite.rasen.tech>","date":"2021-06-25T04:39:10","subject":"Re: [libcamera-devel] [PATCH 11/16] libcamera/base: Move\n\tevent_notifier to base","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 02:35:34AM +0100, Kieran Bingham wrote:\n> Move the event notifier, and associated header updates.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  include/libcamera/{internal => base}/event_notifier.h | 0\n>  include/libcamera/base/meson.build                    | 1 +\n>  include/libcamera/internal/meson.build                | 1 -\n>  src/libcamera/base/event_dispatcher_poll.cpp          | 3 +--\n>  src/libcamera/{ => base}/event_notifier.cpp           | 6 +++---\n>  src/libcamera/base/meson.build                        | 1 +\n>  src/libcamera/device_enumerator_udev.cpp              | 2 +-\n>  src/libcamera/ipc_unixsocket.cpp                      | 3 +--\n>  src/libcamera/meson.build                             | 1 -\n>  src/libcamera/process.cpp                             | 3 +--\n>  src/libcamera/v4l2_device.cpp                         | 2 +-\n>  src/libcamera/v4l2_videodevice.cpp                    | 2 +-\n>  test/event-thread.cpp                                 | 3 +--\n>  test/event.cpp                                        | 3 +--\n>  test/ipa/ipa_interface_test.cpp                       | 2 +-\n>  15 files changed, 14 insertions(+), 19 deletions(-)\n>  rename include/libcamera/{internal => base}/event_notifier.h (100%)\n>  rename src/libcamera/{ => base}/event_notifier.cpp (98%)\n> \n> diff --git a/include/libcamera/internal/event_notifier.h b/include/libcamera/base/event_notifier.h\n> similarity index 100%\n> rename from include/libcamera/internal/event_notifier.h\n> rename to include/libcamera/base/event_notifier.h\n\nWith the updated header guard the Hiro suggested,\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n> index 6fc6c138a5fd..83c664affc88 100644\n> --- a/include/libcamera/base/meson.build\n> +++ b/include/libcamera/base/meson.build\n> @@ -7,6 +7,7 @@ libcamera_base_headers = files([\n>      'class.h',\n>      'event_dispatcher.h',\n>      'event_dispatcher_poll.h',\n> +    'event_notifier.h',\n>      'file.h',\n>      'log.h',\n>      'message.h',\n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index b10285edac27..61af16bfe05d 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -22,7 +22,6 @@ libcamera_internal_headers = files([\n>      'device_enumerator.h',\n>      'device_enumerator_sysfs.h',\n>      'device_enumerator_udev.h',\n> -    'event_notifier.h',\n>      'formats.h',\n>      'ipa_manager.h',\n>      'ipa_module.h',\n> diff --git a/src/libcamera/base/event_dispatcher_poll.cpp b/src/libcamera/base/event_dispatcher_poll.cpp\n> index d76ca7fc2c32..5839373a5281 100644\n> --- a/src/libcamera/base/event_dispatcher_poll.cpp\n> +++ b/src/libcamera/base/event_dispatcher_poll.cpp\n> @@ -16,13 +16,12 @@\n>  #include <sys/eventfd.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/log.h>\n>  #include <libcamera/base/thread.h>\n>  #include <libcamera/base/timer.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/event_notifier.h\"\n> -\n>  /**\n>   * \\file base/event_dispatcher_poll.h\n>   */\n> diff --git a/src/libcamera/event_notifier.cpp b/src/libcamera/base/event_notifier.cpp\n> similarity index 98%\n> rename from src/libcamera/event_notifier.cpp\n> rename to src/libcamera/base/event_notifier.cpp\n> index 784016a9f907..fd93c0878c6f 100644\n> --- a/src/libcamera/event_notifier.cpp\n> +++ b/src/libcamera/base/event_notifier.cpp\n> @@ -5,14 +5,14 @@\n>   * event_notifier.cpp - File descriptor event notifier\n>   */\n>  \n> -#include \"libcamera/internal/event_notifier.h\"\n> -\n> -#include <libcamera/camera_manager.h>\n> +#include <libcamera/base/event_notifier.h>\n>  \n>  #include <libcamera/base/event_dispatcher.h>\n>  #include <libcamera/base/message.h>\n>  #include <libcamera/base/thread.h>\n>  \n> +#include <libcamera/camera_manager.h>\n> +\n>  /**\n>   * \\file event_notifier.h\n>   * \\brief File descriptor event notifier\n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> index fb8ed79acd8e..a8b04cfc8a5f 100644\n> --- a/src/libcamera/base/meson.build\n> +++ b/src/libcamera/base/meson.build\n> @@ -5,6 +5,7 @@ libcamera_base_sources = files([\n>      'bound_method.cpp',\n>      'event_dispatcher.cpp',\n>      'event_dispatcher_poll.cpp',\n> +    'event_notifier.cpp',\n>      'file.cpp',\n>      'log.cpp',\n>      'message.cpp',\n> diff --git a/src/libcamera/device_enumerator_udev.cpp b/src/libcamera/device_enumerator_udev.cpp\n> index 4b842773fcd6..37a2c5aa55db 100644\n> --- a/src/libcamera/device_enumerator_udev.cpp\n> +++ b/src/libcamera/device_enumerator_udev.cpp\n> @@ -17,9 +17,9 @@\n>  #include <sys/sysmacros.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/log.h>\n>  \n> -#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  \n>  namespace libcamera {\n> diff --git a/src/libcamera/ipc_unixsocket.cpp b/src/libcamera/ipc_unixsocket.cpp\n> index 1466597077d4..f23eb783bcb5 100644\n> --- a/src/libcamera/ipc_unixsocket.cpp\n> +++ b/src/libcamera/ipc_unixsocket.cpp\n> @@ -12,10 +12,9 @@\n>  #include <sys/socket.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/log.h>\n>  \n> -#include \"libcamera/internal/event_notifier.h\"\n> -\n>  /**\n>   * \\file ipc_unixsocket.h\n>   * \\brief IPC mechanism based on Unix sockets\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 58eee14aed97..1f163cfe1225 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -15,7 +15,6 @@ libcamera_sources = files([\n>      'delayed_controls.cpp',\n>      'device_enumerator.cpp',\n>      'device_enumerator_sysfs.cpp',\n> -    'event_notifier.cpp',\n>      'file_descriptor.cpp',\n>      'formats.cpp',\n>      'framebuffer_allocator.cpp',\n> diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp\n> index 463380299a65..4fe4ad570b74 100644\n> --- a/src/libcamera/process.cpp\n> +++ b/src/libcamera/process.cpp\n> @@ -20,11 +20,10 @@\n>  #include <unistd.h>\n>  #include <vector>\n>  \n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/event_notifier.h\"\n> -\n>  /**\n>   * \\file process.h\n>   * \\brief Process object\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 334b9b78b812..98d93a12a7be 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -16,10 +16,10 @@\n>  #include <sys/syscall.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/sysfs.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\n> index dc23510bc5aa..3d2d99b46e4e 100644\n> --- a/src/libcamera/v4l2_videodevice.cpp\n> +++ b/src/libcamera/v4l2_videodevice.cpp\n> @@ -21,11 +21,11 @@\n>  \n>  #include <linux/version.h>\n>  \n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/log.h>\n>  \n>  #include <libcamera/file_descriptor.h>\n>  \n> -#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/media_device.h\"\n>  #include \"libcamera/internal/media_object.h\"\n>  \n> diff --git a/test/event-thread.cpp b/test/event-thread.cpp\n> index 05c5d26d3611..575261664c2f 100644\n> --- a/test/event-thread.cpp\n> +++ b/test/event-thread.cpp\n> @@ -10,11 +10,10 @@\n>  #include <string.h>\n>  #include <unistd.h>\n>  \n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/thread.h>\n>  #include <libcamera/base/timer.h>\n>  \n> -#include \"libcamera/internal/event_notifier.h\"\n> -\n>  #include \"test.h\"\n>  \n>  using namespace std;\n> diff --git a/test/event.cpp b/test/event.cpp\n> index aa79da99c286..c2274344b7f0 100644\n> --- a/test/event.cpp\n> +++ b/test/event.cpp\n> @@ -10,11 +10,10 @@\n>  #include <unistd.h>\n>  \n>  #include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/thread.h>\n>  #include <libcamera/base/timer.h>\n>  \n> -#include \"libcamera/internal/event_notifier.h\"\n> -\n>  #include \"test.h\"\n>  \n>  using namespace std;\n> diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp\n> index 656d86552d85..ee9f26510784 100644\n> --- a/test/ipa/ipa_interface_test.cpp\n> +++ b/test/ipa/ipa_interface_test.cpp\n> @@ -15,11 +15,11 @@\n>  #include <libcamera/ipa/vimc_ipa_proxy.h>\n>  \n>  #include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/event_notifier.h>\n>  #include <libcamera/base/thread.h>\n>  #include <libcamera/base/timer.h>\n>  \n>  #include \"libcamera/internal/device_enumerator.h\"\n> -#include \"libcamera/internal/event_notifier.h\"\n>  #include \"libcamera/internal/ipa_manager.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> -- \n> 2.30.2\n>","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 83A89C321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 04:39:20 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D743E684CE;\n\tFri, 25 Jun 2021 06:39:19 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EEA53684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 06:39:17 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1E87F501;\n\tFri, 25 Jun 2021 06:39:15 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"hLNFS9x3\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624595957;\n\tbh=NiJaksCm2JnD3vadPLoQoPG5ZNwp/KIN7LT0iJ+XjBY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=hLNFS9x3IMKx3BnnMenTc/Ff4pQqTh8f5eI7nclUbLzbxEjS6BSgH+GkI78ek/yJL\n\tSYZFqWXVmsvmUK2JOI5Ota2wPGrPyjH91otuInjVrdb7CTijlb5vBWzERgQLnW49J+\n\t1XjMaiOwoH2+HCEtxXMTeIg9qNoUyNDWxwrfb4c0=","Date":"Fri, 25 Jun 2021 13:39:10 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210625043910.GL2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-12-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-12-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 11/16] libcamera/base: Move\n\tevent_notifier to base","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17775,"web_url":"https://patchwork.libcamera.org/comment/17775/","msgid":"<20210625084415.GO2599@pyrite.rasen.tech>","date":"2021-06-25T08:44:15","subject":"Re: [libcamera-devel] [PATCH 14/16] libcamera: Move generated\n\theaders to private dep","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 02:35:37AM +0100, Kieran Bingham wrote:\n> The libcamera_generated_ipa_headers are only a dependency to internal\n> components, and should not form part of the public API.\n> \n> Now that we have a private dependency, move the generated headers there,\n\ns/,$/./ ?\n\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/libcamera/meson.build | 12 ++++--------\n>  1 file changed, 4 insertions(+), 8 deletions(-)\n> \n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 64c7475f1a2e..706f44924f65 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -131,23 +131,19 @@ libcamera = shared_library('libcamera',\n>                             build_rpath : '/',\n>                             dependencies : libcamera_deps)\n>  \n> -# TODO Drop libcamera_generated_ipa_headers from libcamera_dep as libcamera_dep\n> -# is supposed to model the dependencies required for usage of the public API,\n> -# not the internal API. It is needed as as some external components such as the\n> -# unit tests make use of the generated headers and this creates a race in the\n> -# build.\n> -\n>  libcamera_dep = declare_dependency(sources : [\n>                                         libcamera_ipa_headers,\n>                                         libcamera_public_headers,\n> -                                       libcamera_generated_ipa_headers,\n>                                     ],\n>                                     include_directories : libcamera_includes,\n>                                     dependencies : libcamera_base,\n>                                     link_with : libcamera)\n>  \n>  # Internal dependancy for components and plugins which can use Private APIs\n> -libcamera_private = declare_dependency(dependencies : [\n> +libcamera_private = declare_dependency(sources : [\n> +                                           libcamera_generated_ipa_headers,\n> +                                       ],\n> +                                       dependencies : [\n>                                             libcamera_dep,\n>                                             libcamera_base_private,\n>                                         ])\n> -- \n> 2.30.2\n>","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 1091BC321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 08:44:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7F2FE684CF;\n\tFri, 25 Jun 2021 10:44:24 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 20BF3684CA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 10:44:23 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 9816D501;\n\tFri, 25 Jun 2021 10:44:21 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"e+L4pJMs\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624610662;\n\tbh=pHT/34lb6xcjZomy61ggzrWUPOMciqXldrfIJpOxPaY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=e+L4pJMs0DH4PMQ81AARDQAm6E6zY/AMukxnOjxmXgzm1hdKNAMGl5gj68IBMnFT3\n\tb1bhrqxJH9Rzn01irMZOI2CgzLgUSmZV8ERiMcE2XFFue4NU9w1cLKKmyBrCJfqWIz\n\tUgfakjItN97/q8DOAlSY6Sjjnmr43ECSN1JaJi4I=","Date":"Fri, 25 Jun 2021 17:44:15 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210625084415.GO2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-15-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-15-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 14/16] libcamera: Move generated\n\theaders to private dep","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17776,"web_url":"https://patchwork.libcamera.org/comment/17776/","msgid":"<20210625084538.GP2599@pyrite.rasen.tech>","date":"2021-06-25T08:45:38","subject":"Re: [libcamera-devel] [PATCH 15/16] libcamera: rename public\n\tlibcamera dependency","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 02:35:38AM +0100, Kieran Bingham wrote:\n> Now that we have a libcamera_private, make the public only dependency\n> libcamera_public so that it is clear which interface is being linked.\n\nAh, that's so much better.\n\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  src/cam/meson.build           |  2 +-\n>  src/gstreamer/meson.build     |  2 +-\n>  src/lc-compliance/meson.build |  2 +-\n>  src/libcamera/meson.build     | 16 ++++++++--------\n>  src/qcam/meson.build          |  2 +-\n>  test/controls/meson.build     |  2 +-\n>  test/meson.build              |  2 +-\n>  test/stream/meson.build       |  2 +-\n>  8 files changed, 15 insertions(+), 15 deletions(-)\n> \n> diff --git a/src/cam/meson.build b/src/cam/meson.build\n> index 5e1a7f387d60..6234ed0a059a 100644\n> --- a/src/cam/meson.build\n> +++ b/src/cam/meson.build\n> @@ -21,7 +21,7 @@ cam_sources = files([\n>  cam  = executable('cam', cam_sources,\n>                    dependencies : [\n>                        libatomic,\n> -                      libcamera_dep,\n> +                      libcamera_public,\n>                        libevent,\n>                    ],\n>                    install : true)\n> diff --git a/src/gstreamer/meson.build b/src/gstreamer/meson.build\n> index 4d3afee48737..77c79140eb37 100644\n> --- a/src/gstreamer/meson.build\n> +++ b/src/gstreamer/meson.build\n> @@ -42,7 +42,7 @@ endif\n>  libcamera_gst = shared_library('gstlibcamera',\n>      libcamera_gst_sources,\n>      cpp_args : libcamera_gst_cpp_args,\n> -    dependencies : [libcamera_dep, gstvideo_dep, gstallocator_dep],\n> +    dependencies : [libcamera_public, gstvideo_dep, gstallocator_dep],\n>      install: true,\n>      install_dir : '@0@/gstreamer-1.0'.format(get_option('libdir')),\n>  )\n> diff --git a/src/lc-compliance/meson.build b/src/lc-compliance/meson.build\n> index a2bfcceb1259..f3a7cbdec4f8 100644\n> --- a/src/lc-compliance/meson.build\n> +++ b/src/lc-compliance/meson.build\n> @@ -21,7 +21,7 @@ lc_compliance_sources = files([\n>  lc_compliance  = executable('lc-compliance', lc_compliance_sources,\n>                              dependencies : [\n>                                  libatomic,\n> -                                libcamera_dep,\n> +                                libcamera_public,\n>                                  libevent,\n>                              ],\n>                              install : true)\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 706f44924f65..40af7adbf05f 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -131,20 +131,20 @@ libcamera = shared_library('libcamera',\n>                             build_rpath : '/',\n>                             dependencies : libcamera_deps)\n>  \n> -libcamera_dep = declare_dependency(sources : [\n> -                                       libcamera_ipa_headers,\n> -                                       libcamera_public_headers,\n> -                                   ],\n> -                                   include_directories : libcamera_includes,\n> -                                   dependencies : libcamera_base,\n> -                                   link_with : libcamera)\n> +libcamera_public = declare_dependency(sources : [\n> +                                          libcamera_ipa_headers,\n> +                                          libcamera_public_headers,\n> +                                      ],\n> +                                      include_directories : libcamera_includes,\n> +                                      dependencies : libcamera_base,\n> +                                      link_with : libcamera)\n>  \n>  # Internal dependancy for components and plugins which can use Private APIs\n>  libcamera_private = declare_dependency(sources : [\n>                                             libcamera_generated_ipa_headers,\n>                                         ],\n>                                         dependencies : [\n> -                                           libcamera_dep,\n> +                                           libcamera_public,\n>                                             libcamera_base_private,\n>                                         ])\n>  \n> diff --git a/src/qcam/meson.build b/src/qcam/meson.build\n> index fad4cc95ddf7..7d3621c93d41 100644\n> --- a/src/qcam/meson.build\n> +++ b/src/qcam/meson.build\n> @@ -35,7 +35,7 @@ qcam_resources = files([\n>  \n>  qcam_deps = [\n>      libatomic,\n> -    libcamera_dep,\n> +    libcamera_public,\n>      qt5_dep,\n>  ]\n>  \n> diff --git a/test/controls/meson.build b/test/controls/meson.build\n> index 188c96da3336..0103543e1fc2 100644\n> --- a/test/controls/meson.build\n> +++ b/test/controls/meson.build\n> @@ -9,7 +9,7 @@ control_tests = [\n>  \n>  foreach t : control_tests\n>      exe = executable(t[0], t[1],\n> -                     dependencies : libcamera_dep,\n> +                     dependencies : libcamera_public,\n>                       link_with : test_libraries,\n>                       include_directories : test_includes_internal)\n>      test(t[0], exe, suite : 'controls', is_parallel : false)\n> diff --git a/test/meson.build b/test/meson.build\n> index b8615e0fd3e6..73eb44d03ad0 100644\n> --- a/test/meson.build\n> +++ b/test/meson.build\n> @@ -55,7 +55,7 @@ internal_tests = [\n>  \n>  foreach t : public_tests\n>      exe = executable(t[0], t[1],\n> -                     dependencies : libcamera_dep,\n> +                     dependencies : libcamera_public,\n>                       link_with : test_libraries,\n>                       include_directories : test_includes_public)\n>  \n> diff --git a/test/stream/meson.build b/test/stream/meson.build\n> index 5d3ef5881b44..73608ffdff7f 100644\n> --- a/test/stream/meson.build\n> +++ b/test/stream/meson.build\n> @@ -6,7 +6,7 @@ stream_tests = [\n>  \n>  foreach t : stream_tests\n>      exe = executable(t[0], t[1],\n> -                     dependencies : libcamera_dep,\n> +                     dependencies : libcamera_public,\n>                       link_with : test_libraries,\n>                       include_directories : test_includes_internal)\n>      test(t[0], exe, suite: 'stream')\n> -- \n> 2.30.2\n>","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 2F1A4C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 08:45:47 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E689A684D0;\n\tFri, 25 Jun 2021 10:45:46 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C60DE684CB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 10:45:45 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8B66B501;\n\tFri, 25 Jun 2021 10:45:44 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"GDKD5rrD\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624610745;\n\tbh=k6kuTDqlJLmM/U1mWF2huVcSlwdYf7aHolD+amTd+ww=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=GDKD5rrDCe/yF8U9E3rr/PKFY9yJv9JKmy7TXVurSxL6Llmo/iCddvw/zNHkF95Xa\n\tqLSedirhmwpy27MdEtjJAIXcF+lySWv0XSNe5IA4wD6NjzcWKlPdJdoF+YeoKIAP8n\n\toX4vZRET7eMa9j5IJRsX1cjOdBOL9KRa5MuN1Zc0=","Date":"Fri, 25 Jun 2021 17:45:38 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210625084538.GP2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-16-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-16-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 15/16] libcamera: rename public\n\tlibcamera dependency","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17777,"web_url":"https://patchwork.libcamera.org/comment/17777/","msgid":"<3b2e8517-dda7-5724-629e-975d26d0f4bf@ideasonboard.com>","date":"2021-06-25T08:53:34","subject":"Re: [libcamera-devel] [PATCH 02/16] android: cros: Simplify\n\tintegration","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 25/06/2021 04:20, Laurent Pinchart wrote:\n> On Fri, Jun 25, 2021 at 06:18:31AM +0300, Laurent Pinchart wrote:\n>> Hi Kieran,\n>>\n>> Thank you for the patch.\n>>\n>> On Fri, Jun 25, 2021 at 02:35:25AM +0100, Kieran Bingham wrote:\n>>> The ChromeOS specific Android HAL support was overly-complex to support\n>>> linking an additional library, and then passing the built object into\n>>> the libcamera.so build.\n>>>\n>>> Now that it has its own distinct libcamera-hal.so, simplify the CrOS\n>>> integration to build directly into that library.\n>>>\n>>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>\n>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>>\n>>> ---\n>>>  src/android/cros/meson.build | 11 +++--------\n>>>  src/android/meson.build      | 13 +++----------\n>>>  2 files changed, 6 insertions(+), 18 deletions(-)\n>>>\n>>> diff --git a/src/android/cros/meson.build b/src/android/cros/meson.build\n>>> index c2bda70838e2..35995dd814a2 100644\n>>> --- a/src/android/cros/meson.build\n>>> +++ b/src/android/cros/meson.build\n>>> @@ -4,15 +4,10 @@ if get_option('android_platform') != 'cros'\n>>>     subdir_done()\n>>>  endif\n>>>  \n>>> -cros_hal_info_sources = files([\n>>> +android_hal_sources += files([\n>>>      'camera3_hal.cpp',\n>>>  ])\n>>>  \n>>> -cros_hal_info = static_library('cros_hal_info',\n>>> -                               cros_hal_info_sources,\n>>> -                               dependencies : dependency('libcros_camera'),\n>>> -                               c_args : '-Wno-shadow',\n> \n> BTW, we're losing -Wno-shadow. I suppose that's fine as there's no .c\n> file, but have you compiled this on CrOS to ensure there's no breakage ?\n\nYes, Sorry  I should have added that to the commit message, that's\nintentional.\n\nI'll add:\n\n> The removal of the -Wno-shadow here is intentional, as it is not\n> required for compilation of the camera3_hal.o object.\n\n\n\nI believe the -Wno-shadow is cargo-culted from a copy paste of the\nandroid_camera_metadata = static_library() definition (where I expect it\n/is/ required)\n\nThe camea3_hal.cpp does not require -Wno-shadow to compile.\n\n\n\n> \n>>> -                               include_directories : [android_includes,\n>>> -                                                      libcamera_includes])\n>>> +android_deps += dependency('libcros_camera')\n>>>  \n>>> -android_objects += cros_hal_info.extract_objects('camera3_hal.cpp')\n>>> +android_cpp_args += ['-DOS_CHROMEOS']\n>>> diff --git a/src/android/meson.build b/src/android/meson.build\n>>> index feda3e0998bd..bd58ef964c2a 100644\n>>> --- a/src/android/meson.build\n>>> +++ b/src/android/meson.build\n>>> @@ -37,15 +37,6 @@ endif\n>>>  \n>>>  android_deps += [libyuv_dep]\n>>>  \n>>> -android_cpp_args = []\n>>> -android_objects = []\n>>> -\n>>> -if get_option('android_platform') == 'cros'\n>>> -    android_cpp_args += ['-DOS_CHROMEOS']\n>>> -endif\n>>> -\n>>> -subdir('cros')\n>>> -\n>>>  android_hal_sources = files([\n>>>      'camera3_hal.cpp',\n>>>      'camera_capabilities.cpp',\n>>> @@ -63,6 +54,9 @@ android_hal_sources = files([\n>>>      'yuv/post_processor_yuv.cpp'\n>>>  ])\n>>>  \n>>> +android_cpp_args = []\n>>> +\n>>> +subdir('cros')\n>>>  subdir('mm')\n>>>  \n>>>  android_camera_metadata_sources = files([\n>>> @@ -80,6 +74,5 @@ libcamera_hal = shared_library('libcamera-hal',\n>>>                                 link_with : android_camera_metadata,\n>>>                                 install : true,\n>>>                                 cpp_args : android_cpp_args,\n>>> -                               objects : android_objects,\n>>>                                 include_directories : android_includes,\n>>>                                 dependencies : android_deps)\n>","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 B7D08C321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 08:53:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EAC9C684D0;\n\tFri, 25 Jun 2021 10:53:38 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 96252684CB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 10:53:37 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 257F6501;\n\tFri, 25 Jun 2021 10:53:37 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"tlLmHpr3\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624611217;\n\tbh=e75pxlSBxXwqQM23XjVmjGbJDef4b57a+Y5Dn/PPudw=;\n\th=From:Subject:To:Cc:References:Date:In-Reply-To:From;\n\tb=tlLmHpr31taSZFhS9Ir9hObeXdT6UTHf5PAM4RL7xxASRO6fzAlBQBWk8RuMiOS8r\n\trn0E77dBMwa+mhyCML6k1xvBr791wubfxzXpMebYgf2Lg9nMejwwJp2oKBkbUy+092\n\txsGDS0IdHsi2Qy6ObS77ziSO7LxNT6shKrgDHotE=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-3-kieran.bingham@ideasonboard.com>\n\t<YNVLBqCeewL9oTiV@pendragon.ideasonboard.com>\n\t<YNVLeF2ZhIcAJGyZ@pendragon.ideasonboard.com>","Message-ID":"<3b2e8517-dda7-5724-629e-975d26d0f4bf@ideasonboard.com>","Date":"Fri, 25 Jun 2021 09:53:34 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<YNVLeF2ZhIcAJGyZ@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 02/16] android: cros: Simplify\n\tintegration","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17778,"web_url":"https://patchwork.libcamera.org/comment/17778/","msgid":"<d63247dd-f55b-4ddd-2703-3854462a929f@ideasonboard.com>","date":"2021-06-25T08:59:26","subject":"Re: [libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so\n\tpkg-config file generation","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Paul, Hiro,\n\nOn 25/06/2021 04:11, paul.elder@ideasonboard.com wrote:\n> Hi Hiro,\n> \n> On Fri, Jun 25, 2021 at 12:06:40PM +0900, Hirokazu Honda wrote:\n>> Hi Kieran, thank you for the patch.\n>>\n>> On Fri, Jun 25, 2021 at 11:30 AM <paul.elder@ideasonboard.com> wrote:\n>>>\n>>> Hi Kieran,\n>>>\n>>> On Fri, Jun 25, 2021 at 02:35:26AM +0100, Kieran Bingham wrote:\n>>>> The pkg-config file for the main libcamera.so is generated\n>>>> at the top level meson.build.\n>>>>\n>>>> Move this to the actual core libcamera build structure to be\n>>>> consistent and keep it next to the library construction.\n>>>>\n>>>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>>>\n>>> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n>>>\n>>>> ---\n>>>>  meson.build               | 8 --------\n>>>>  src/libcamera/meson.build | 8 ++++++++\n>>>>  2 files changed, 8 insertions(+), 8 deletions(-)\n>>>>\n>>>> diff --git a/meson.build b/meson.build\n>>>> index 4d7d936f09e2..6eed0d8c4a44 100644\n>>>> --- a/meson.build\n>>>> +++ b/meson.build\n>>>> @@ -164,14 +164,6 @@ run_command('ln', '-fsT', meson.source_root(), meson.build_root() / 'source')\n>>>>\n>>>>  configure_file(output : 'config.h', configuration : config_h)\n>>>>\n>>>> -pkg_mod = import('pkgconfig')\n>>>> -pkg_mod.generate(libraries : libcamera,\n>>>> -                 version : '1.0',\n>>>> -                 name : 'libcamera',\n>>>> -                 filebase : 'camera',\n>>>> -                 description : 'Complex Camera Support Library',\n>>>> -                 subdirs : 'libcamera')\n>>>> -\n>>>>  # Check for python installation and modules.\n>>>>  py_mod = import('python')\n>>>>  py_mod.find_installation('python3', modules: py_modules)\n>>>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n>>>> index d9b5bfae69fd..e4c60e736697 100644\n>>>> --- a/src/libcamera/meson.build\n>>>> +++ b/src/libcamera/meson.build\n>>>> @@ -156,4 +156,12 @@ libcamera_dep = declare_dependency(sources : [\n>>>>                                     include_directories : libcamera_includes,\n>>>>                                     link_with : libcamera)\n>>>>\n>>>> +pkg_mod = import('pkgconfig')\n>>>> +pkg_mod.generate(libraries: libcamera,\n>>>> +                 version : '1.0',\n>>>> +                 name : 'libcamera',\n>>>> +                 filebase : 'camera',\n>>\n>> This is not related to this change, but why is filebase camera, not libcamera?\n\nAs we fix in the next patch, we have historically been creating a\npkg-config file called 'camera.pc' instead of 'libcamera.pc', which is\nwhat the filebase gives us.\n\nThis is because when creating this we believed the 'correct' naming for\nlibcamera artefacts was to drop the 'lib' from the name. (I.e. for\nexample gstreamer packages are called 'gstreamer-1.0.pc' and not\n'libgstreamer.pc').\n\nHowever, (and I may even have been the cause of that decision, I can't\nremember any more) - I don't believe this is the right thing to do at\nall now. 'libcamera' is the name of our package, and project. The 'lib'\nis integral, so it's brought back in the next patch.\n\n\n> My understanding is that this patch is for moving this section directly\n> without modification, while the next patch changes the filebase from\n> camera to libcamera.\n\nCorrect ;-)\n\n> Paul\n> \n>>\n>> Reviewed-by: Hirokazu Honda <hiroh@chromium.org>\n\nThanks all!\n\n\n>>\n>>>> +                 description : 'Complex Camera Support Library',\n>>>> +                 subdirs : 'libcamera')\n>>>> +\n>>>>  subdir('proxy/worker')\n>>>> --\n>>>> 2.30.2\n>>>>","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 E8DC0C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 08:59:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3FE67684CF;\n\tFri, 25 Jun 2021 10:59:32 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 331DF684CA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 10:59:30 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 794C9501;\n\tFri, 25 Jun 2021 10:59:29 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"cEtwIqWF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624611569;\n\tbh=TY7rUspjssBHlft32vgWzexL6ZX3OK6Q0O0ER73cu78=;\n\th=From:Subject:To:Cc:References:Date:In-Reply-To:From;\n\tb=cEtwIqWFafUzLyYjcRossVVmPstuvn/lDPpPU8XsWU7jhl1jd9w/oePdKGczY1Ts3\n\trAOAlMy3jCHNcg0ABpzIImS9SlcItGE4q7IVWY8dKyIaF1ekbxIddUDitSL08fJF4d\n\tRJSGbZJrW4tKHj5dDRY6EuvCPkuXa1HwXvFK7JO4=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"paul.elder@ideasonboard.com, Hirokazu Honda <hiroh@chromium.org>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-4-kieran.bingham@ideasonboard.com>\n\t<20210625022950.GB2599@pyrite.rasen.tech>\n\t<CAO5uPHO_UcFTA_g6WsjQ6P6iDkv=JphA8rOG-nCd5TFn5PoitA@mail.gmail.com>\n\t<20210625031107.GE2599@pyrite.rasen.tech>","Message-ID":"<d63247dd-f55b-4ddd-2703-3854462a929f@ideasonboard.com>","Date":"Fri, 25 Jun 2021 09:59:26 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<20210625031107.GE2599@pyrite.rasen.tech>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so\n\tpkg-config file generation","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17779,"web_url":"https://patchwork.libcamera.org/comment/17779/","msgid":"<29410dc9-0bbc-b532-d493-50aea402f50f@ideasonboard.com>","date":"2021-06-25T09:00:10","subject":"Re: [libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so\n\tpkg-config file generation","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 25/06/2021 04:18, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> Thank you for the patch.\n\nYou're welcome ...\n\nAnything further to add ? ;-)\n\n\n> \n> On Fri, Jun 25, 2021 at 02:35:26AM +0100, Kieran Bingham wrote:\n>> The pkg-config file for the main libcamera.so is generated\n>> at the top level meson.build.\n>>\n>> Move this to the actual core libcamera build structure to be\n>> consistent and keep it next to the library construction.\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> ---\n>>  meson.build               | 8 --------\n>>  src/libcamera/meson.build | 8 ++++++++\n>>  2 files changed, 8 insertions(+), 8 deletions(-)\n>>\n>> diff --git a/meson.build b/meson.build\n>> index 4d7d936f09e2..6eed0d8c4a44 100644\n>> --- a/meson.build\n>> +++ b/meson.build\n>> @@ -164,14 +164,6 @@ run_command('ln', '-fsT', meson.source_root(), meson.build_root() / 'source')\n>>  \n>>  configure_file(output : 'config.h', configuration : config_h)\n>>  \n>> -pkg_mod = import('pkgconfig')\n>> -pkg_mod.generate(libraries : libcamera,\n>> -                 version : '1.0',\n>> -                 name : 'libcamera',\n>> -                 filebase : 'camera',\n>> -                 description : 'Complex Camera Support Library',\n>> -                 subdirs : 'libcamera')\n>> -\n>>  # Check for python installation and modules.\n>>  py_mod = import('python')\n>>  py_mod.find_installation('python3', modules: py_modules)\n>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n>> index d9b5bfae69fd..e4c60e736697 100644\n>> --- a/src/libcamera/meson.build\n>> +++ b/src/libcamera/meson.build\n>> @@ -156,4 +156,12 @@ libcamera_dep = declare_dependency(sources : [\n>>                                     include_directories : libcamera_includes,\n>>                                     link_with : libcamera)\n>>  \n>> +pkg_mod = import('pkgconfig')\n>> +pkg_mod.generate(libraries: libcamera,\n>> +                 version : '1.0',\n>> +                 name : 'libcamera',\n>> +                 filebase : 'camera',\n>> +                 description : 'Complex Camera Support Library',\n>> +                 subdirs : 'libcamera')\n>> +\n>>  subdir('proxy/worker')\n>","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 6E323C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 09:00:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 06899684D0;\n\tFri, 25 Jun 2021 11:00:15 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DF85E684CB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 11:00:13 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 973F5501;\n\tFri, 25 Jun 2021 11:00:13 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"MH23I4/P\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624611613;\n\tbh=kcIrote+pm06Fikx/YMGT7CDbr4SxokD7G6FV5NJZ9U=;\n\th=From:Subject:To:Cc:References:Date:In-Reply-To:From;\n\tb=MH23I4/PskXxMX/4EatRviMZT+7q42uYWHAfA4UGxMV+tsoIdWe6tmUq3VZ9rH/x+\n\t0bAvaeGXyQp1ZDMYzQ959hu67g53CavjUhM0RxglV0leypa8LC/ZCiJBZxnqAT8dT4\n\t3haGqGBqJtAPf21gb9161u2V/rw67RnZBKZJIuZk=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-4-kieran.bingham@ideasonboard.com>\n\t<YNVLGPxZqAezsv8H@pendragon.ideasonboard.com>","Message-ID":"<29410dc9-0bbc-b532-d493-50aea402f50f@ideasonboard.com>","Date":"Fri, 25 Jun 2021 10:00:10 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<YNVLGPxZqAezsv8H@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 03/16] libcamera: Move libcamera.so\n\tpkg-config file generation","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17780,"web_url":"https://patchwork.libcamera.org/comment/17780/","msgid":"<f494e55f-fe1e-e47c-c4ce-53b6e804db16@ideasonboard.com>","date":"2021-06-25T09:04:45","subject":"Re: [libcamera-devel] [PATCH 04/16] libcamera: Rename libcamera\n\tpkg-config generation","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 25/06/2021 04:18, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> Thank you for the patch.\n> \n> On Fri, Jun 25, 2021 at 02:35:27AM +0100, Kieran Bingham wrote:\n>> The libcamera library is moved to the first positional argument of the\n>> pkg-config generator to automatically populate the name and filebase\n>> values for the package.\n>>\n>> As part of this, the shared library name is adjusted to the full library\n>> name 'libcamera', without relying upon the automatic 'lib' prefix which\n>> better represents the component and naming of the library.\n>>\n>> As a result of this, the pkgconfig file is now named 'libcamera.pc' as\n>> opposed to 'camera.pc', and applications desiring to reference libcamera\n>> will need to search for 'libcamera' as a dependency rather than\n>> 'camera'.\n>>\n>> The library itself is still created and installed as 'libcamera.so'.\n>>\n>> An example meson.build file would need to be adjusted as the following:\n>>\n>> -      dependency('camera', required : true),\n>> +      dependency('libcamera', required : true),\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> ---\n>>  src/libcamera/meson.build | 7 +++----\n>>  1 file changed, 3 insertions(+), 4 deletions(-)\n>>\n>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n>> index e4c60e736697..387d20843203 100644\n>> --- a/src/libcamera/meson.build\n>> +++ b/src/libcamera/meson.build\n>> @@ -135,8 +135,9 @@ libcamera_deps = [\n>>  # runtime if the library is running from an installed location by checking\n>>  # for the presence or abscence of the dynamic tag.\n>>  \n>> -libcamera = shared_library('camera',\n>> +libcamera = shared_library('libcamera',\n>>                             libcamera_sources,\n>> +                           name_prefix : '',\n> \n> While I like the end-result for pkg-config, I'm not too fond of this\n> particular change as we work around the normal usage of shared_library()\n> here to change the name of the .pc file. Could we keep this unchanged,\n> and set filebase to 'libcamera' below instead ?\n\nBut ... it's the same principle on the shared-library too.\n\nOur project is called 'libcamera' ... not 'camera'...\n\nI can update the commit message to say \"Rename the shared library to\nmaintain the correct and intentional naming of the project\" if you prefer?\n\n\nWe still create a shared library called 'libcamera.so' ... the /only/\nplace where this differs is in the linker command where it becomes\n-lcamera ... but that's not really user facing, thanks to the pkg-config\n... (and neither is the definition here I guess).\n\n\n\n\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n>>                             install : true,\n>>                             include_directories : includes,\n>>                             build_rpath : '/',\n>> @@ -157,10 +158,8 @@ libcamera_dep = declare_dependency(sources : [\n>>                                     link_with : libcamera)\n>>  \n>>  pkg_mod = import('pkgconfig')\n>> -pkg_mod.generate(libraries: libcamera,\n>> +pkg_mod.generate(libcamera,\n>>                   version : '1.0',\n>> -                 name : 'libcamera',\n>> -                 filebase : 'camera',\n>>                   description : 'Complex Camera Support Library',\n>>                   subdirs : 'libcamera')\n>>  \n>","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 B00BBC321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 09:04:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E7DA4684D2;\n\tFri, 25 Jun 2021 11:04:49 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2E17B684CB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 11:04:49 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B8421501;\n\tFri, 25 Jun 2021 11:04:48 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"DQ9KCooZ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624611888;\n\tbh=VeeQagzXXW9nP+uYOGUPKQfNj5bPXyG1rhTK43wDKe4=;\n\th=From:Subject:To:Cc:References:Date:In-Reply-To:From;\n\tb=DQ9KCooZzttE+LjbhnG55XlswP/fURRdgDAoc1dMsP+3sldJhn9KGww5gBBNKVd33\n\tOcpFbAh5AbaA2U7aJfXwbXTjIuXtAoDy4+x/DXSZXjn7ZWs+SGxNxyMgd5Vx/a3q7v\n\tGuqG7tIC/WiHnA6XQZSNFMDFtyvzvkBDICTd9zpE=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-5-kieran.bingham@ideasonboard.com>\n\t<YNVK8Rmgu4Sa3cDJ@pendragon.ideasonboard.com>","Message-ID":"<f494e55f-fe1e-e47c-c4ce-53b6e804db16@ideasonboard.com>","Date":"Fri, 25 Jun 2021 10:04:45 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<YNVK8Rmgu4Sa3cDJ@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 04/16] libcamera: Rename libcamera\n\tpkg-config generation","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17781,"web_url":"https://patchwork.libcamera.org/comment/17781/","msgid":"<20210625090505.GQ2599@pyrite.rasen.tech>","date":"2021-06-25T09:05:05","subject":"Re: [libcamera-devel] [PATCH 16/16] test: Ensure\n\tLIBCAMERA_BASE_PRIVATE isn't public","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 02:35:39AM +0100, Kieran Bingham wrote:\n> If LIBCAMERA_BASE_PRIVATE is ever exposed on the libcamera public dependencies,\n> then the private.h header protection will be circumvented.\n> \n> Provide a test which will fail (at compile time) if the LIBCAMERA_BASE_PRIVATE\n> define ever leaks to the public dependencies.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  test/meson.build    |  1 +\n>  test/public-api.cpp | 25 +++++++++++++++++++++++++\n>  2 files changed, 26 insertions(+)\n>  create mode 100644 test/public-api.cpp\n> \n> diff --git a/test/meson.build b/test/meson.build\n> index 73eb44d03ad0..2c3e76546fbc 100644\n> --- a/test/meson.build\n> +++ b/test/meson.build\n> @@ -25,6 +25,7 @@ subdir('v4l2_videodevice')\n>  \n>  public_tests = [\n>      ['geometry',                        'geometry.cpp'],\n> +    ['public-api',                      'public-api.cpp'],\n>      ['signal',                          'signal.cpp'],\n>      ['span',                            'span.cpp'],\n>  ]\n> diff --git a/test/public-api.cpp b/test/public-api.cpp\n> new file mode 100644\n> index 000000000000..5afce97c6887\n> --- /dev/null\n> +++ b/test/public-api.cpp\n> @@ -0,0 +1,25 @@\n> +/* SPDX-License-Identifier: GPL-2.0-or-later */\n> +/*\n> + * Copyright (C) 2021, Google Inc.\n> + *\n> + * public-api.cpp - Public API validation\n> + */\n> +\n> +#include <libcamera/libcamera.h>\n> +\n> +#include \"test.h\"\n> +\n> +class PublicAPITest : public Test\n> +{\n> +\tint run()\n> +\t{\n> +#ifdef LIBCAMERA_BASE_PRIVATE\n> +#error \"Public Interfaces should not be exposed to LIBCAMERA_BASE_PRIVATE\"\n\ns/be exposed to/expose/ ?\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> +\t\treturn TestFail;\n> +#else\n> +\t\treturn TestPass;\n> +#endif\n> +\t}\n> +};\n> +\n> +TEST_REGISTER(PublicAPITest)\n> -- \n> 2.30.2\n>","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 49C91C321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 09:05:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0801C684D0;\n\tFri, 25 Jun 2021 11:05:13 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E16DE684CB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 11:05:11 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7980B8B6;\n\tFri, 25 Jun 2021 11:05:10 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"b/ufco5G\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624611911;\n\tbh=JVAEErpIKSO8EnndtLF5xja8kH7a5QW2K+3jCNDCeZY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=b/ufco5GSm4qVZEiZZ/2o70KVsoaJu8sYBoD8jitXse3doADTIo7eEqF7ZieAnAhs\n\tUr2fmVq1y1k1qVHIkj5NZxmGDIdH6OXEEq8eOYKhHYq8pVAxgzb2mKKMsqhVEIV4cP\n\tOKwVuQ4DT7w6hA2Yxbk7eNPSZts55BUObi6fWZBE=","Date":"Fri, 25 Jun 2021 18:05:05 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210625090505.GQ2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-17-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-17-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 16/16] test: Ensure\n\tLIBCAMERA_BASE_PRIVATE isn't public","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>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]