libcamera: ipa_manager: implement class for managing IPA modules
IPAManager is a class that will search in given directories for IPA modules, and will load them into a list. It also provides an interface for pipeline handlers to acquire an IPA. A meson build file for the IPAs is added, which also specifies a hard-coded path for where to load the IPAs from in the installation directory. More paths can be specified with the environment variable LIBCAMERA_IPA_MODULE_PATH, with the same syntax as the regular PATH environment variable. Make the test framework set this environment variable. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
||||
/*
|
||||
* Copyright (C) 2019, Google Inc.
|
||||
*
|
||||
* ipa_manager.h - Image Processing Algorithm module manager
|
||||
*/
|
||||
#ifndef __LIBCAMERA_IPA_MANAGER_H__
|
||||
#define __LIBCAMERA_IPA_MANAGER_H__
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <libcamera/ipa/ipa_interface.h>
|
||||
#include <libcamera/ipa/ipa_module_info.h>
|
||||
|
||||
#include "ipa_module.h"
|
||||
#include "pipeline_handler.h"
|
||||
|
||||
namespace libcamera {
|
||||
|
||||
class IPAManager
|
||||
{
|
||||
public:
|
||||
static IPAManager *instance();
|
||||
|
||||
std::unique_ptr<IPAInterface> createIPA(PipelineHandler *pipe,
|
||||
uint32_t maxVersion,
|
||||
uint32_t minVersion);
|
||||
|
||||
private:
|
||||
std::vector<IPAModule *> modules_;
|
||||
|
||||
IPAManager();
|
||||
~IPAManager();
|
||||
|
||||
int addDir(const char *libDir);
|
||||
};
|
||||
|
||||
} /* namespace libcamera */
|
||||
|
||||
#endif /* __LIBCAMERA_IPA_MANAGER_H__ */
|
||||
Reference in New Issue
Block a user