[PATCH v5 11/15] config: Look up pipelines match list in configuration file
Milan Zamazal
mzamazal at redhat.com
Tue Oct 1 12:28:03 CEST 2024
Signed-off-by: Milan Zamazal <mzamazal at redhat.com>
---
src/libcamera/camera_manager.cpp | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp
index 09f587765..41e0d8229 100644
--- a/src/libcamera/camera_manager.cpp
+++ b/src/libcamera/camera_manager.cpp
@@ -15,6 +15,7 @@
#include "libcamera/internal/camera.h"
#include "libcamera/internal/device_enumerator.h"
+#include "libcamera/internal/global_configuration.h"
#include "libcamera/internal/ipa_manager.h"
#include "libcamera/internal/pipeline_handler.h"
@@ -108,14 +109,15 @@ void CameraManager::Private::createPipelineHandlers()
* file and only fallback on environment variable or all handlers, if
* there is no configuration file.
*/
- const char *pipesList =
- utils::secure_getenv("LIBCAMERA_PIPELINES_MATCH_LIST");
- if (pipesList) {
+ std::optional<std::string> pipesList =
+ GlobalConfiguration::envOption("LIBCAMERA_PIPELINES_MATCH_LIST",
+ "pipelines_match_list");
+ if (pipesList.has_value()) {
/*
* When a list of preferred pipelines is defined, iterate
* through the ordered list to match the enumerated devices.
*/
- for (const auto &pipeName : utils::split(pipesList, ",")) {
+ for (const auto &pipeName : utils::split(pipesList.value(), ",")) {
const PipelineHandlerFactoryBase *factory;
factory = PipelineHandlerFactoryBase::getFactoryByName(pipeName);
if (!factory)
--
2.44.1
More information about the libcamera-devel
mailing list