diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2019-09-15 17:30:26 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-11-20 21:48:00 +0200 |
commit | 132d99bc8fac63d7473de6f62f7860b149f8e1c2 (patch) | |
tree | f6fbcb6ff234eaf3c44b71eed1c8215b736fc3c5 /src/ipa/ipa_vimc.cpp | |
parent | bc9527de454670445a8d69b039e65c0e5c7a699e (diff) |
ipa: Switch to the plain C API
Switch IPA communication to the plain C API. As the IPAInterface class
is easier to use for pipeline handlers than a plain C API, retain it and
add an IPAContextWrapper that translate between the C++ and the C APIs.
On the IPA module side usage of IPAInterface may be desired for IPAs
implemented in C++ that want to link to libcamera. For those IPAs, a new
IPAInterfaceWrapper helper class is introduced to wrap the IPAInterface
implemented internally by the IPA module into an ipa_context,
ipa_context_ops and ipa_callback_ops.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'src/ipa/ipa_vimc.cpp')
-rw-r--r-- | src/ipa/ipa_vimc.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp index 50ca8dd8..8f03e811 100644 --- a/src/ipa/ipa_vimc.cpp +++ b/src/ipa/ipa_vimc.cpp @@ -17,7 +17,10 @@ #include <ipa/ipa_interface.h> #include <ipa/ipa_module_info.h> +#include "libipa/ipa_interface_wrapper.h" + #include "log.h" +#include "utils.h" namespace libcamera { @@ -108,9 +111,9 @@ const struct IPAModuleInfo ipaModuleInfo = { LICENSE, }; -IPAInterface *ipaCreate() +struct ipa_context *ipaCreate() { - return new IPAVimc(); + return new IPAInterfaceWrapper(utils::make_unique<IPAVimc>()); } } |