[RFC PATCH v1] libcamera: virtual: Install configuration file

Christian Rauch Rauch.Christian at gmx.de
Fri Dec 20 17:05:10 CET 2024


Hi Barnabás,

Thank you for looking into this. I am also interested in making the
virtual pipeline available in an "install" space for testing
applications that use an installed libcamera or binary (Debian, etc.)
packages.

At the moment, the search path is hard coded through
"LIBCAMERA_DATA_DIR", the virtual pipeline will search in
"<install>/share/libcamera/pipeline/virtual/virtual.yaml".

How would you make the "virtual.yaml.example" available in the CI. Would
you move/rename/symlink "virtual.yaml.example" to match that path in CI?
If so, instead, I think it would be more convenient to set the
configuration file path at runtime with an environment variable instead
of changing the installed package. What do you think?

Best,
Christian


Am 19.12.24 um 13:37 schrieb Barnabás Pőcze:
> Install the example configuration file of the virtual pipeline
> handler as it serves documentation purposes, and to make the
> virtual pipeline handler easily usable in CI.
>
> Nonetheless, the file is installed with the ".example" suffix
> so that it will not be used by default, to avoid cluttering
> the camera lists of users whose distributions decide to
> enable the virtual pipeline handler.
>
> Signed-off-by: Barnabás Pőcze <pobrn at protonmail.com>
> ---
>   src/libcamera/pipeline/virtual/data/meson.build | 4 ++++
>   src/libcamera/pipeline/virtual/meson.build      | 2 ++
>   2 files changed, 6 insertions(+)
>   create mode 100644 src/libcamera/pipeline/virtual/data/meson.build
>
> diff --git a/src/libcamera/pipeline/virtual/data/meson.build b/src/libcamera/pipeline/virtual/data/meson.build
> new file mode 100644
> index 000000000..ce63f9a27
> --- /dev/null
> +++ b/src/libcamera/pipeline/virtual/data/meson.build
> @@ -0,0 +1,4 @@
> +install_data('virtual.yaml',
> +             install_dir : pipeline_data_dir / 'virtual',
> +             install_tag : 'runtime',
> +             rename: 'virtual.yaml.example')
> diff --git a/src/libcamera/pipeline/virtual/meson.build b/src/libcamera/pipeline/virtual/meson.build
> index 4786fe2e0..c84345936 100644
> --- a/src/libcamera/pipeline/virtual/meson.build
> +++ b/src/libcamera/pipeline/virtual/meson.build
> @@ -11,3 +11,5 @@ libjpeg = dependency('libjpeg', required : true)
>
>   libcamera_deps += [libyuv_dep]
>   libcamera_deps += [libjpeg]
> +
> +subdir('data')



More information about the libcamera-devel mailing list