[RFC PATCH 07/11] config: Look up rpi config path in configuration file
Milan Zamazal
mzamazal at redhat.com
Tue Mar 26 12:24:10 CET 2024
The configuration snippet:
configuration:
pipeline:
rpi:
config_file: FILENAME
Signed-off-by: Milan Zamazal <mzamazal at redhat.com>
---
src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
index 7e420b3f..8260a3ff 100644
--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
@@ -20,6 +20,7 @@
#include <libcamera/property_ids.h>
#include "libcamera/internal/camera_lens.h"
+#include "libcamera/internal/global_configuration.h"
#include "libcamera/internal/ipa_manager.h"
#include "libcamera/internal/v4l2_subdevice.h"
@@ -1086,7 +1087,12 @@ int CameraData::loadPipelineConfiguration()
/* Initial configuration of the platform, in case no config file is present */
platformPipelineConfigure({});
- char const *configFromEnv = utils::secure_getenv("LIBCAMERA_RPI_CONFIG_FILE");
+ std::optional<std::string> configFile =
+ GlobalConfiguration::envOption("LIBCAMERA_RPI_CONFIG_FILE",
+ "pipeline.rpi.config_file");
+ if (!configFile.has_value())
+ return 0;
+ char const *configFromEnv = configFile.value().c_str();
if (!configFromEnv || *configFromEnv == '\0')
return 0;
--
2.42.0
More information about the libcamera-devel
mailing list