summaryrefslogtreecommitdiff
path: root/src/libcamera/proxy
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-09-15 17:30:26 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-11-20 21:48:00 +0200
commit132d99bc8fac63d7473de6f62f7860b149f8e1c2 (patch)
treef6fbcb6ff234eaf3c44b71eed1c8215b736fc3c5 /src/libcamera/proxy
parentbc9527de454670445a8d69b039e65c0e5c7a699e (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/libcamera/proxy')
-rw-r--r--src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp b/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp
index a10761e5..07380c16 100644
--- a/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp
+++ b/src/libcamera/proxy/worker/ipa_proxy_linux_worker.cpp
@@ -72,9 +72,9 @@ int main(int argc, char **argv)
}
socket.readyRead.connect(&readyRead);
- std::unique_ptr<IPAInterface> ipa = ipam->createInstance();
- if (!ipa) {
- LOG(IPAProxyLinuxWorker, Error) << "Failed to create IPA interface";
+ struct ipa_context *ipac = ipam->createContext();
+ if (!ipac) {
+ LOG(IPAProxyLinuxWorker, Error) << "Failed to create IPA context";
return EXIT_FAILURE;
}
@@ -85,5 +85,7 @@ int main(int argc, char **argv)
while (1)
dispatcher->processEvents();
+ ipac->ops->destroy(ipac);
+
return 0;
}