diff options
author | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-06-16 15:33:08 +0100 |
---|---|---|
committer | Kieran Bingham <kieran.bingham@ideasonboard.com> | 2021-06-16 15:43:02 +0100 |
commit | 5db033f0e7d4fd1b27422a74f6b3442affe13adc (patch) | |
tree | d51da7afd862b8e85cb40521ad4bbe2fa4b196f0 | |
parent | 3c9c2870e226950bd2a4ed98488aae0be6fea3b6 (diff) |
libcamera: pipeline: vimc: Fail without an IPA
The IPA is required for VIMC so fail early if it can't be loaded.
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r-- | src/libcamera/pipeline/vimc/vimc.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp index d89ab33a..8bbac008 100644 --- a/src/libcamera/pipeline/vimc/vimc.cpp +++ b/src/libcamera/pipeline/vimc/vimc.cpp @@ -426,13 +426,14 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator) return false; data->ipa_ = IPAManager::createIPA<ipa::vimc::IPAProxyVimc>(this, 0, 0); - if (data->ipa_ != nullptr) { - std::string conf = data->ipa_->configurationFile("vimc.conf"); - data->ipa_->init(IPASettings{ conf, data->sensor_->model() }); - } else { - LOG(VIMC, Warning) << "no matching IPA found"; + if (!data->ipa_) { + LOG(VIMC, Error) << "no matching IPA found"; + return false; } + std::string conf = data->ipa_->configurationFile("vimc.conf"); + data->ipa_->init(IPASettings{ conf, data->sensor_->model() }); + /* Create and register the camera. */ std::set<Stream *> streams{ &data->stream_ }; std::shared_ptr<Camera> camera = |