Files
external_libcamera/include/libcamera/internal/ipa_proxy.h
Laurent Pinchart 1c3e1baa6e 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>
2026-04-24 18:09:05 +03:00

52 lines
928 B
C++

/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2019, Google Inc.
*
* Image Processing Algorithm proxy
*/
#pragma once
#include <optional>
#include <string>
#include <vector>
#include <libcamera/ipa/ipa_interface.h>
#include "libcamera/internal/camera_manager.h"
namespace libcamera {
class IPAModule;
class IPAProxy : public IPAInterface
{
public:
enum ProxyState {
ProxyStopped,
ProxyStopping,
ProxyRunning,
};
IPAProxy(IPAModule *ipam, const CameraManager &cm);
~IPAProxy();
bool isValid() const { return valid_; }
std::string configurationFile(const std::string &name,
const std::string &fallbackName = std::string()) const;
protected:
std::string resolvePath(const std::string &file) const;
bool valid_;
ProxyState state_;
private:
IPAModule *ipam_;
std::vector<std::string> configPaths_;
std::vector<std::string> execPaths_;
};
} /* namespace libcamera */