libcamera: global_configuration: Override options with environment variables
libcamera supports several environment variables that can override configuration options. This requires components that use such overrides to call the special envOption() and envListOption() functions, spreading knowledge of the overrides through the code base. This will hinder future enhancements to the global configuration, such as implementing per-camera options that will override pipeline handler-level options. To prepare for that, move handling of the environment variables to the GlobalConfiguration class. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>
This commit is contained in:
@@ -42,13 +42,6 @@ public:
|
||||
|
||||
std::optional<std::vector<std::string>> listOption(
|
||||
const std::initializer_list<std::string_view> confPath) const;
|
||||
std::optional<std::string> envOption(
|
||||
const char *const envVariable,
|
||||
const std::initializer_list<std::string_view> confPath) const;
|
||||
std::optional<std::vector<std::string>> envListOption(
|
||||
const char *const envVariable,
|
||||
const std::initializer_list<std::string_view> confPath,
|
||||
const std::string delimiter = ":") const;
|
||||
|
||||
private:
|
||||
void load();
|
||||
|
||||
Reference in New Issue
Block a user