From patchwork Wed Mar 25 08:58:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3317 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EE34C62BD6 for ; Wed, 25 Mar 2020 09:58:10 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="fh6lTPGV"; dkim-atps=neutral Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 86B349D0 for ; Wed, 25 Mar 2020 09:58:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1585126690; bh=hjyeAdvFPjYAKCoSVE/6XfFh9s797ggPcA4DXIEnvVo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fh6lTPGVUYqyLM6FJjGEGL9tTjArnzwW11YMJu6GXI30i8qfFOTX9n01rDc2fhCPl Bpf5AKs9CKBcWVKi3xqWFgV2S7xhosixI5dfvd9HRlHZzq5eylo4Krj6HIzI5CULt3 DfiKgyzUdfwyJZy9Eik9SAvvUUz9HxGpAPR1U6wo= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Wed, 25 Mar 2020 10:58:03 +0200 Message-Id: <20200325085805.11749-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200325085805.11749-1-laurent.pinchart@ideasonboard.com> References: <20200325085805.11749-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/3] libcamera: pipeline: Move uvcvideo and vimc to subdirectories X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 08:58:11 -0000 Give a subdirectory to all pipeline handlers to make the structure of the source tree more consistent. This will also simplify the implementation of pipeline handlers selection at build time. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/meson.build | 7 ++----- src/libcamera/pipeline/uvcvideo/meson.build | 3 +++ src/libcamera/pipeline/{ => uvcvideo}/uvcvideo.cpp | 0 src/libcamera/pipeline/vimc/meson.build | 3 +++ src/libcamera/pipeline/{ => vimc}/vimc.cpp | 0 5 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 src/libcamera/pipeline/uvcvideo/meson.build rename src/libcamera/pipeline/{ => uvcvideo}/uvcvideo.cpp (100%) create mode 100644 src/libcamera/pipeline/vimc/meson.build rename src/libcamera/pipeline/{ => vimc}/vimc.cpp (100%) diff --git a/src/libcamera/pipeline/meson.build b/src/libcamera/pipeline/meson.build index 0d466225a72e..c1a6ab0484f0 100644 --- a/src/libcamera/pipeline/meson.build +++ b/src/libcamera/pipeline/meson.build @@ -1,7 +1,4 @@ -libcamera_sources += files([ - 'uvcvideo.cpp', - 'vimc.cpp', -]) - subdir('ipu3') subdir('rkisp1') +subdir('uvcvideo') +subdir('vimc') diff --git a/src/libcamera/pipeline/uvcvideo/meson.build b/src/libcamera/pipeline/uvcvideo/meson.build new file mode 100644 index 000000000000..c19ae2389f48 --- /dev/null +++ b/src/libcamera/pipeline/uvcvideo/meson.build @@ -0,0 +1,3 @@ +libcamera_sources += files([ + 'uvcvideo.cpp', +]) diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp similarity index 100% rename from src/libcamera/pipeline/uvcvideo.cpp rename to src/libcamera/pipeline/uvcvideo/uvcvideo.cpp diff --git a/src/libcamera/pipeline/vimc/meson.build b/src/libcamera/pipeline/vimc/meson.build new file mode 100644 index 000000000000..615ecd20f1a2 --- /dev/null +++ b/src/libcamera/pipeline/vimc/meson.build @@ -0,0 +1,3 @@ +libcamera_sources += files([ + 'vimc.cpp', +]) diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp similarity index 100% rename from src/libcamera/pipeline/vimc.cpp rename to src/libcamera/pipeline/vimc/vimc.cpp From patchwork Wed Mar 25 08:58:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3318 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A0E7762BD6 for ; Wed, 25 Mar 2020 09:58:11 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="my49pYxK"; dkim-atps=neutral Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DCC7580C for ; Wed, 25 Mar 2020 09:58:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1585126691; bh=CjPPlt4XlUks04B+Xs1gzx4d/bmYIc7CrQTLUTZlVVw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=my49pYxKgX13oo4H3raK8G5H+sSJS858zutJ7fqbETLdksSVAnvjAvy+kPEBsKxIJ jGNevfl8LKCu/RsE7MyF5XjX1RvbOZsKPuxhcRxoiVh0La43YpENv0/F3lGBkwsbJu g4YwHP/sALqlHdmIV6v5VHIxyIPfk8NhVU81tuDU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Wed, 25 Mar 2020 10:58:04 +0200 Message-Id: <20200325085805.11749-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200325085805.11749-1-laurent.pinchart@ideasonboard.com> References: <20200325085805.11749-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/3] ipa: Move vimc to a subdirectory X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 08:58:11 -0000 Give a subdirectory to all IPA moduels to make the structure of the source tree more consistent. This will also simplify the implementation of IPA module selection at build time. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/ipa/meson.build | 20 ++------------------ src/ipa/vimc/meson.build | 15 +++++++++++++++ src/ipa/{ipa_vimc.cpp => vimc/vimc.cpp} | 2 +- 3 files changed, 18 insertions(+), 19 deletions(-) create mode 100644 src/ipa/vimc/meson.build rename src/ipa/{ipa_vimc.cpp => vimc/vimc.cpp} (98%) diff --git a/src/ipa/meson.build b/src/ipa/meson.build index 421803243e32..9aaf92494d37 100644 --- a/src/ipa/meson.build +++ b/src/ipa/meson.build @@ -1,8 +1,3 @@ -ipa_vimc_sources = [ - ['ipa_vimc', 'LGPL-2.1-or-later'], - ['ipa_vimc_isolate', 'Proprietary'], -] - ipa_install_dir = join_paths(get_option('libdir'), 'libcamera') ipa_includes = [ @@ -10,20 +5,9 @@ ipa_includes = [ libcamera_internal_includes, ] -subdir('libipa') - -foreach t : ipa_vimc_sources - ipa = shared_module(t[0], 'ipa_vimc.cpp', - name_prefix : '', - include_directories : ipa_includes, - dependencies : libcamera_dep, - link_with : libipa, - install : true, - install_dir : ipa_install_dir, - cpp_args : '-DLICENSE="' + t[1] + '"') -endforeach - config_h.set('IPA_MODULE_DIR', '"' + join_paths(get_option('prefix'), ipa_install_dir) + '"') +subdir('libipa') subdir('rkisp1') +subdir('vimc') diff --git a/src/ipa/vimc/meson.build b/src/ipa/vimc/meson.build new file mode 100644 index 000000000000..435c7d3160be --- /dev/null +++ b/src/ipa/vimc/meson.build @@ -0,0 +1,15 @@ +ipa_vimc_sources = [ + ['ipa_vimc', 'LGPL-2.1-or-later'], + ['ipa_vimc_isolate', 'Proprietary'], +] + +foreach t : ipa_vimc_sources + ipa = shared_module(t[0], 'vimc.cpp', + name_prefix : '', + include_directories : [ipa_includes, libipa_includes], + dependencies : libcamera_dep, + link_with : libipa, + install : true, + install_dir : ipa_install_dir, + cpp_args : '-DLICENSE="' + t[1] + '"') +endforeach diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/vimc/vimc.cpp similarity index 98% rename from src/ipa/ipa_vimc.cpp rename to src/ipa/vimc/vimc.cpp index 4751ad919a0f..6e2095b56bbc 100644 --- a/src/ipa/ipa_vimc.cpp +++ b/src/ipa/vimc/vimc.cpp @@ -17,7 +17,7 @@ #include #include -#include "libipa/ipa_interface_wrapper.h" +#include #include "log.h" From patchwork Wed Mar 25 08:58:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3319 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 18DD062BEB for ; Wed, 25 Mar 2020 09:58:12 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="YCF6RoGl"; dkim-atps=neutral Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9371F9D0 for ; Wed, 25 Mar 2020 09:58:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1585126691; bh=JFN7f3E+nLd8kiWr94DCaj2IHAPrqpj+GyLnhzZ3GAY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YCF6RoGlSyjbAJC+Xw7wwVxKhLeRhDaheRpnKznDFRKnRc786G8tRvEUZwhFZGZJ/ r7lNwCIFQ8VIjzT0NF2Nwu4hQgR/7FI2Hko3+iE+5nqBra4IIVliXHiptrhddqsDgP S8+KDlX+wEg2Yqq+R7y6tLBmJjIIQTU8td5BNhKY= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Wed, 25 Mar 2020 10:58:05 +0200 Message-Id: <20200325085805.11749-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200325085805.11749-1-laurent.pinchart@ideasonboard.com> References: <20200325085805.11749-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/3] libcamera: Make pipeline handlers selectable at compile time X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2020 08:58:12 -0000 Add a pipelines project option that specifies which pipeline handlers to compile in. The corresponding IPA modules are automatically selected. The default is to compile all pipeline handlers. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- meson_options.txt | 5 +++++ src/ipa/meson.build | 10 ++++++++-- src/libcamera/pipeline/meson.build | 7 +++---- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/meson_options.txt b/meson_options.txt index b17b6de6f182..6464df837cc3 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -12,6 +12,11 @@ option('gstreamer', value : 'auto', description : 'Compile libcamera GStreamer plugin') +option('pipelines', + type : 'array', + choices : ['ipu3', 'rkisp1', 'uvcvideo', 'vimc'], + description : 'Select which pipeline handlers to include') + option('test', type : 'boolean', description: 'Compile and include the tests') diff --git a/src/ipa/meson.build b/src/ipa/meson.build index 9aaf92494d37..73278a60a99f 100644 --- a/src/ipa/meson.build +++ b/src/ipa/meson.build @@ -9,5 +9,11 @@ config_h.set('IPA_MODULE_DIR', '"' + join_paths(get_option('prefix'), ipa_install_dir) + '"') subdir('libipa') -subdir('rkisp1') -subdir('vimc') + +ipas = ['rkisp1', 'vimc'] + +foreach pipeline : get_option('pipelines') + if ipas.contains(pipeline) + subdir(pipeline) + endif +endforeach diff --git a/src/libcamera/pipeline/meson.build b/src/libcamera/pipeline/meson.build index c1a6ab0484f0..190ca5a8db92 100644 --- a/src/libcamera/pipeline/meson.build +++ b/src/libcamera/pipeline/meson.build @@ -1,4 +1,3 @@ -subdir('ipu3') -subdir('rkisp1') -subdir('uvcvideo') -subdir('vimc') +foreach pipeline : get_option('pipelines') + subdir(pipeline) +endforeach