summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2020-07-10 15:37:55 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2025-01-14 13:04:37 +0000
commit077d0634c87438a24d29f6bc130a85e09296482d (patch)
tree7caa5167b9da2f9e5806e82b23ca57c0ed7275de
parent59b4d75a475ad16427c24c18c8b004455b9c8411 (diff)
libcamera: pipeline: vivid: Match device
Verify that we can match on our expected device(s). Use a temporary debug print to check that the pipeline finds our device: """ LIBCAMERA_LOG_LEVELS=Pipeline,VIVID:0 ./src/cam/cam -l <snipped> [230:51:10.670503423] [2872877] DEBUG VIVID vivid.cpp:81 Obtained Vivid Device """ Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--src/libcamera/pipeline/vivid/vivid.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/vivid/vivid.cpp b/src/libcamera/pipeline/vivid/vivid.cpp
index 4621449e..1d45a9e6 100644
--- a/src/libcamera/pipeline/vivid/vivid.cpp
+++ b/src/libcamera/pipeline/vivid/vivid.cpp
@@ -8,6 +8,7 @@
#include <libcamera/base/log.h>
#include "libcamera/internal/camera.h"
+#include "libcamera/internal/device_enumerator.h"
#include "libcamera/internal/pipeline_handler.h"
/*
@@ -85,7 +86,16 @@ int PipelineHandlerVivid::queueRequestDevice(Camera *camera, Request *request)
bool PipelineHandlerVivid::match(DeviceEnumerator *enumerator)
{
- return false;
+ DeviceMatch dm("vivid");
+ dm.add("vivid-000-vid-cap");
+
+ MediaDevice *media = acquireMediaDevice(enumerator, dm);
+ if (!media)
+ return false;
+
+ LOG(VIVID, Debug) << "Obtained Vivid Device";
+
+ return false; // Prevent infinite loops for now
}
REGISTER_PIPELINE_HANDLER(PipelineHandlerVivid, "vivid")