libcamera
v0.0.0
Supporting cameras in Linux since 2019
|
IPA Proxy. More...
Public Member Functions | |
IPAProxy (IPAModule *ipam) | |
Construct an IPAProxy instance. More... | |
bool | isValid () const |
Check if the IPAProxy instance is valid. More... | |
std::string | configurationFile (const std::string &file) const |
Retrieve the absolute path to an IPA configuration file. More... | |
![]() | |
virtual int | init (const IPASettings &settings)=0 |
Initialise the IPAInterface. More... | |
virtual int | start ()=0 |
Start the IPA. More... | |
virtual void | stop ()=0 |
Stop the IPA. More... | |
virtual void | configure (const CameraSensorInfo &sensorInfo, const std::map< unsigned int, IPAStream > &streamConfig, const std::map< unsigned int, const ControlInfoMap & > &entityControls)=0 |
Configure the IPA stream and sensor settings. More... | |
virtual void | mapBuffers (const std::vector< IPABuffer > &buffers)=0 |
Map buffers shared between the pipeline handler and the IPA. More... | |
virtual void | unmapBuffers (const std::vector< unsigned int > &ids)=0 |
Unmap buffers shared by the pipeline to the IPA. More... | |
virtual void | processEvent (const IPAOperationData &data)=0 |
Process an event from the pipeline handler. More... | |
Protected Member Functions | |
std::string | resolvePath (const std::string &file) const |
Find a valid full path for a proxy worker for a given executable name. More... | |
Protected Attributes | |
bool | valid_ |
Flag to indicate if the IPAProxy instance is valid. More... | |
Additional Inherited Members | |
![]() | |
Signal< unsigned int, const IPAOperationData & > | queueFrameAction |
Queue an action associated with a frame to the pipeline handler. More... | |
IPA Proxy.
Isolate IPA into separate process.
Every subclass of proxy shall be registered with libcamera using the REGISTER_IPA_PROXY() macro.
libcamera::IPAProxy::IPAProxy | ( | IPAModule * | ipam | ) |
Construct an IPAProxy instance.
[in] | ipam | The IPA module |
IPAProxy instances shall be constructed through the IPAProxyFactory::create() method implemented by the respective factories.
std::string libcamera::IPAProxy::configurationFile | ( | const std::string & | name | ) | const |
Retrieve the absolute path to an IPA configuration file.
[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:
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.
|
inline |
|
protected |
Find a valid full path for a proxy worker for a given executable name.
[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.
|
protected |
Flag to indicate if the IPAProxy instance is valid.
A IPAProxy instance is valid if the IPA interface is successfully created in isolation, and IPC is successfully set up.
This flag can be read via IPAProxy::isValid().
Implementations of the IPAProxy class should set this flag upon successful construction.