Loading...
Searching...
No Matches
ipa_proxy.h
Go to the documentation of this file.
/* 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/global_configuration.h"
namespace libcamera {
class IPAModule;
class IPAProxy : public IPAInterface
{
public:
enum ProxyState {
ProxyStopped,
ProxyStopping,
ProxyRunning,
};
IPAProxy(IPAModule *ipam, const GlobalConfiguration &configuration);
~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 */
libcamera::GlobalConfiguration
Support for global libcamera configuration.
Definition global_configuration.h:22
libcamera::IPAInterface
C++ Interface for IPA implementation.
Definition ipa_interface.h:18
libcamera::IPAModule
Wrapper around IPA module shared object.
Definition ipa_module.h:24
libcamera::IPAProxy
IPA Proxy.
Definition ipa_proxy.h:23
libcamera::IPAProxy::isValid
bool isValid() const
Check if the IPAProxy instance is valid.
Definition ipa_proxy.h:34
libcamera::IPAProxy::configurationFile
std::string configurationFile(const std::string &name, const std::string &fallbackName=std::string()) const
Retrieve the absolute path to an IPA configuration file.
Definition ipa_proxy.cpp:170
libcamera::IPAProxy::IPAProxy
IPAProxy(IPAModule *ipam, const GlobalConfiguration &configuration)
Construct an IPAProxy instance.
Definition ipa_proxy.cpp:122
libcamera::IPAProxy::resolvePath
std::string resolvePath(const std::string &file) const
Find a valid full path for a proxy worker for a given executable name.
Definition ipa_proxy.cpp:213
libcamera::IPAProxy::state_
ProxyState state_
Current state of the IPAProxy.
Definition ipa_proxy.h:43
libcamera::IPAProxy::ProxyState
ProxyState
Identifies the available operational states of the proxy.
Definition ipa_proxy.h:25
libcamera::IPAProxy::ProxyRunning
@ ProxyRunning
The Proxy is active and asynchronous tasks may be queued.
Definition ipa_proxy.h:28
libcamera::IPAProxy::ProxyStopped
@ ProxyStopped
The proxy is not active and only synchronous operations are permitted.
Definition ipa_proxy.h:26
libcamera::IPAProxy::ProxyStopping
@ ProxyStopping
No new tasks can be submitted to the proxy, however existing events can be completed.
Definition ipa_proxy.h:27
libcamera::IPAProxy::valid_
bool valid_
Flag to indicate if the IPAProxy instance is valid.
Definition ipa_proxy.h:42
ipa_interface.h
Image Processing Algorithm interface.
libcamera
Top-level libcamera namespace.
Definition backtrace.h:17