summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp9
-rw-r--r--src/libcamera/pipeline/simple/simple.cpp5
2 files changed, 10 insertions, 4 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 2352ab3b..c74a2e9b 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -1107,10 +1107,13 @@ bool PipelineHandlerRkISP1::match(DeviceEnumerator *enumerator)
if (!pad)
return false;
- for (MediaLink *link : pad->links())
- createCamera(link->source()->entity());
+ bool registered = false;
+ for (MediaLink *link : pad->links()) {
+ if (!createCamera(link->source()->entity()))
+ registered = true;
+ }
- return true;
+ return registered;
}
/* -----------------------------------------------------------------------------
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index d63f9701..216ef538 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -821,6 +821,8 @@ bool SimplePipelineHandler::match(DeviceEnumerator *enumerator)
}
/* Initialize each pipeline and register a corresponding camera. */
+ bool registered = false;
+
for (std::unique_ptr<SimpleCameraData> &data : pipelines) {
int ret = data->init();
if (ret < 0)
@@ -830,9 +832,10 @@ bool SimplePipelineHandler::match(DeviceEnumerator *enumerator)
Camera::create(this, data->sensor_->id(),
data->streams());
registerCamera(std::move(camera), std::move(data));
+ registered = true;
}
- return true;
+ return registered;
}
V4L2VideoDevice *SimplePipelineHandler::video(const MediaEntity *entity)