libcamera: global_configuration: Rename Configuration to Option
The GlobalConfiguration::Configuration type represent a configuration option. Rename it to Option to make this clearer. This shortens lines as an added bonus. 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:
@@ -22,12 +22,12 @@ namespace libcamera {
|
||||
class GlobalConfiguration
|
||||
{
|
||||
public:
|
||||
using Configuration = const ValueNode &;
|
||||
using Option = const ValueNode &;
|
||||
|
||||
GlobalConfiguration();
|
||||
|
||||
unsigned int version() const;
|
||||
Configuration configuration() const;
|
||||
Option configuration() const;
|
||||
|
||||
template<typename T>
|
||||
std::optional<T> option(
|
||||
|
||||
@@ -56,8 +56,8 @@ LOG_DEFINE_CATEGORY(Configuration)
|
||||
*/
|
||||
|
||||
/**
|
||||
* \typedef GlobalConfiguration::Configuration
|
||||
* \brief Type representing global libcamera configuration
|
||||
* \typedef GlobalConfiguration::Option
|
||||
* \brief Type representing a configuration option
|
||||
*
|
||||
* All code outside GlobalConfiguration must use this type declaration and not
|
||||
* the underlying type.
|
||||
@@ -156,9 +156,9 @@ unsigned int GlobalConfiguration::version() const
|
||||
* \note \a ValueNode type itself shouldn't be used in type declarations to
|
||||
* avoid trouble if we decide to change the underlying data objects in future.
|
||||
*
|
||||
* \return The whole configuration section
|
||||
* \return The top-level configuration option
|
||||
*/
|
||||
GlobalConfiguration::Configuration GlobalConfiguration::configuration() const
|
||||
GlobalConfiguration::Option GlobalConfiguration::configuration() const
|
||||
{
|
||||
return (*configuration_)["configuration"];
|
||||
}
|
||||
|
||||
@@ -1880,7 +1880,7 @@ bool SimplePipelineHandler::matchDevice(std::shared_ptr<MediaDevice> media,
|
||||
|
||||
swIspEnabled_ = info.swIspEnabled;
|
||||
const GlobalConfiguration &configuration = cameraManager()->_d()->configuration();
|
||||
for (GlobalConfiguration::Configuration entry :
|
||||
for (GlobalConfiguration::Option entry :
|
||||
configuration.configuration()["pipelines"]["simple"]["supported_devices"]
|
||||
.asList()) {
|
||||
auto name = entry["driver"].get<std::string>();
|
||||
|
||||
Reference in New Issue
Block a user