IPA Proxy.
Isolate IPA into separate process.
std::string libcamera::IPAProxy::configurationFile |
( |
const std::string & |
name | ) |
const |
Retrieve the absolute path to an IPA configuration file.
- Parameters
-
[in] | name | The configuration file name |
This function locates the configuration file for an IPA and returns its absolute path. It searches the following directories, in order:
- All directories specified in the colon-separated LIBCAMERA_IPA_CONFIG_PATH environment variable ; or
- If libcamera is not installed, the src/ipa/ directory within the source tree ; otherwise
- The system sysconf (etc/libcamera/ipa) and the data (share/libcamera/ipa/) directories.
The system directories are not searched if libcamera is not installed.
Within each of those directories, the function looks for a subdirectory named after the IPA module name, as reported in IPAModuleInfo::name, and for a file named name within that directory. The name is IPA-specific.
- Returns
- The full path to the IPA configuration file, or an empty string if no configuration file can be found
std::string libcamera::IPAProxy::resolvePath |
( |
const std::string & |
file | ) |
const |
|
protected |
Find a valid full path for a proxy worker for a given executable name.
- Parameters
-
[in] | file | File name of proxy worker executable |
A proxy worker's executable could be found in either the global installation directory, or in the paths specified by the environment variable LIBCAMERA_IPA_PROXY_PATH. This method checks the global install directory first, then LIBCAMERA_IPA_PROXY_PATH in order, and returns the full path to the proxy worker executable that is specified by file. The proxy worker executable shall have exec permission.
- Returns
- The full path to the proxy worker executable, or an empty string if no valid executable path
libcamera::IPAProxy::state_ |
|
protected |
Current state of the IPAProxy.
The IPAProxy can be Running, Stopped, or Stopping.
This state provides a means to ensure that asynchronous methods are only called while the proxy is running, and prevent new tasks being submitted while still enabling events to complete when the IPAProxy is stopping.