[libcamera-devel] [PATCH v2 10/10] libcamera: pipeline: vimc: add dummy IPA
Paul Elder
paul.elder at ideasonboard.com
Tue Jun 4 01:16:37 CEST 2019
Make the vimc pipeline handler get the dummy IPA, to show how an IPA can
be acquired by a pipeline handler.
Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
---
Changes in v2:
- save IPA to pipeline data
- no IPA is fatal error
src/libcamera/pipeline/vimc.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
index 78feeb8..f000c21 100644
--- a/src/libcamera/pipeline/vimc.cpp
+++ b/src/libcamera/pipeline/vimc.cpp
@@ -10,10 +10,12 @@
#include <libcamera/camera.h>
#include <libcamera/ipa/ipa_module_info.h>
+#include <libcamera/ipa/ipa_interface.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
#include "device_enumerator.h"
+#include "ipa_manager.h"
#include "log.h"
#include "media_device.h"
#include "pipeline_handler.h"
@@ -252,6 +254,15 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator)
if (!media)
return false;
+ IPAManager *ipaManager = IPAManager::instance();
+ ipa_ = ipaManager->createIPA(this);
+ if (ipa_ == nullptr) {
+ LOG(VIMC, Error) << "no matching IPA found";
+ return false;
+ } else {
+ ipa_->init();
+ }
+
std::unique_ptr<VimcCameraData> data = utils::make_unique<VimcCameraData>(this);
/* Locate and open the capture video node. */
--
2.20.1
More information about the libcamera-devel
mailing list