libcamera: ipa_proxy: Provide suport for IPA configuration files

IPA modules may require configuration files, which may be stored in
different locations in the file system. To standardize file locations
between all IPAs and pipeline handlers, provide a helper function to
locate a configuration file by searching in the following directories:

- All directories specified in the LIBCAMERA_IPA_CONFIG_PATH environment
  variable ; or
- In the source tree if libcamera is not installed ; otherwise
- In standard system locations (etc and share directories).

When stored in the source tree, configuration files shall be located in
a 'data' subdirectory of their respective IPA directory.

More locations, or extensions to the mechanism, may be implemented
later.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart
2020-04-27 04:04:48 +03:00
parent 78f685df8a
commit 53d3f4152a
5 changed files with 106 additions and 7 deletions

View File

@@ -73,7 +73,7 @@ private:
};
IPAProxyThread::IPAProxyThread(IPAModule *ipam)
: running_(false)
: IPAProxy(ipam), running_(false)
{
if (!ipam->load())
return;