libcamera: global_configuration: Populate empty configuration
If no configuration file can be parsed, populate an empty configuration. This will serve as a base to store the configuration options set through environment variables. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
This commit is contained in:
@@ -61,6 +61,11 @@ LOG_DEFINE_CATEGORY(Configuration)
|
||||
GlobalConfiguration::GlobalConfiguration()
|
||||
{
|
||||
load();
|
||||
|
||||
if (configuration_->isEmpty()) {
|
||||
configuration_->add("version", std::make_unique<ValueNode>(1));
|
||||
configuration_->add("configuration", std::make_unique<ValueNode>());
|
||||
}
|
||||
}
|
||||
|
||||
void GlobalConfiguration::load()
|
||||
|
||||
Reference in New Issue
Block a user