camera_manager: Look up pipelines match list in configuration file
Let's add a configuration file item for the pipelines match list.
The configuration snippet:
configuration:
pipelines_match_list:
- rkisp1
- simple
Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
committed by
Laurent Pinchart
parent
dcbde32f5e
commit
7ba8c15dbf
@@ -111,14 +111,16 @@ 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) {
|
||||
const auto pipesList =
|
||||
configuration().envListOption("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 : pipesList.value()) {
|
||||
const PipelineHandlerFactoryBase *factory;
|
||||
factory = PipelineHandlerFactoryBase::getFactoryByName(pipeName);
|
||||
if (!factory)
|
||||
|
||||
Reference in New Issue
Block a user