diff options
author | Paul Elder <paul.elder@ideasonboard.com> | 2019-05-27 16:34:17 -0400 |
---|---|---|
committer | Paul Elder <paul.elder@ideasonboard.com> | 2019-06-05 10:44:52 -0400 |
commit | 57338798641f0a0402ff1f8ae89622b9ad5dd6c7 (patch) | |
tree | 4f36d086101a0c0ae77081599f2fc38d9d3b9f74 /src | |
parent | 87a93e17f8f86e651f2021dba37ba749a43cc363 (diff) |
libcamera: pipeline: vimc: add dummy IPA
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@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/libcamera/pipeline/vimc.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp index 0e4eede3..ad4577ac 100644 --- a/src/libcamera/pipeline/vimc.cpp +++ b/src/libcamera/pipeline/vimc.cpp @@ -9,10 +9,13 @@ #include <array> #include <libcamera/camera.h> +#include <libcamera/ipa/ipa_interface.h> +#include <libcamera/ipa/ipa_module_info.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" @@ -77,6 +80,8 @@ private: return static_cast<VimcCameraData *>( PipelineHandler::cameraData(camera)); } + + std::unique_ptr<IPAInterface> ipa_; }; VimcCameraConfiguration::VimcCameraConfiguration() @@ -248,6 +253,12 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator) if (!media) return false; + ipa_ = IPAManager::instance()->createIPA(this, 0, 0); + if (ipa_ == nullptr) + LOG(VIMC, Warning) << "no matching IPA found"; + else + ipa_->init(); + std::unique_ptr<VimcCameraData> data = utils::make_unique<VimcCameraData>(this); /* Locate and open the capture video node. */ |