summaryrefslogtreecommitdiff
path: root/include/ipa/ipa_interface.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-27 02:36:18 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-04-28 01:54:49 +0300
commita6de9030893753e5428ee912fe7c52fbf93febd1 (patch)
treee82996e2e87c464919808663c443a3dcb99ea887 /include/ipa/ipa_interface.h
parent26a4b03ed85e0cc39939028964ae4a8961c05d02 (diff)
ipa: Pass IPA initialization settings to IPAInterface::init()
Add a new IPASettings class to pass IPA initialization settings through the IPAInterface::init() method. The settings currently only contain the name of a configuration file, and are expected to be extended later. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include/ipa/ipa_interface.h')
-rw-r--r--include/ipa/ipa_interface.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/include/ipa/ipa_interface.h b/include/ipa/ipa_interface.h
index e65844bc..ef3d6507 100644
--- a/include/ipa/ipa_interface.h
+++ b/include/ipa/ipa_interface.h
@@ -18,6 +18,10 @@ struct ipa_context {
const struct ipa_context_ops *ops;
};
+struct ipa_settings {
+ const char *configuration_file;
+};
+
struct ipa_stream {
unsigned int id;
unsigned int pixel_format;
@@ -63,7 +67,8 @@ struct ipa_callback_ops {
struct ipa_context_ops {
void (*destroy)(struct ipa_context *ctx);
void *(*get_interface)(struct ipa_context *ctx);
- void (*init)(struct ipa_context *ctx);
+ void (*init)(struct ipa_context *ctx,
+ const struct ipa_settings *settings);
int (*start)(struct ipa_context *ctx);
void (*stop)(struct ipa_context *ctx);
void (*register_callbacks)(struct ipa_context *ctx,
@@ -100,6 +105,10 @@ struct ipa_context *ipaCreate();
namespace libcamera {
+struct IPASettings {
+ std::string configurationFile;
+};
+
struct IPAStream {
unsigned int pixelFormat;
Size size;
@@ -121,7 +130,7 @@ class IPAInterface
public:
virtual ~IPAInterface() {}
- virtual int init() = 0;
+ virtual int init(const IPASettings &settings) = 0;
virtual int start() = 0;
virtual void stop() = 0;