libcamera: Pass CameraManager around instead of GlobalConfiguration
The GlobalConfiguration is explicitly passed around through constructors of various objects that need access to the configuration. This ad-hoc solution works for the specific use cases it was meant to support, but isn't very generic. We have a top-level object in libcamera, the CameraManager, that also needs to be accessed from various locations and is passed to object constructors. Standardize on passing the CameraManager everywhere, and access the global configuration through it. 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:
@@ -13,15 +13,15 @@
|
||||
#include <stdint.h>
|
||||
#include <string>
|
||||
#include <time.h>
|
||||
#include <libcamera/base/log.h>
|
||||
#include "libcamera/internal/global_configuration.h"
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
class CameraManager;
|
||||
|
||||
class Benchmark
|
||||
{
|
||||
public:
|
||||
Benchmark(const GlobalConfiguration &configuration, const std::string &name);
|
||||
Benchmark(const CameraManager &cm, const std::string &name);
|
||||
~Benchmark();
|
||||
|
||||
void startFrame(void);
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
|
||||
#include "libcamera/internal/bayer_format.h"
|
||||
#include "libcamera/internal/framebuffer.h"
|
||||
#include "libcamera/internal/global_configuration.h"
|
||||
#include "libcamera/internal/shared_mem_object.h"
|
||||
#include "libcamera/internal/software_isp/swisp_stats.h"
|
||||
|
||||
@@ -28,14 +27,15 @@
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
class PixelFormat;
|
||||
class CameraManager;
|
||||
class MappedFrameBuffer;
|
||||
class PixelFormat;
|
||||
struct StreamConfiguration;
|
||||
|
||||
class SwStatsCpu
|
||||
{
|
||||
public:
|
||||
SwStatsCpu(const GlobalConfiguration &configuration);
|
||||
SwStatsCpu(const CameraManager &cm);
|
||||
~SwStatsCpu() = default;
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user