summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2020-07-10 15:37:55 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-08-12 08:07:25 +0100
commitf88649c321d6ee8ed95eb640dce60edbfde711db (patch)
tree1d1a65de417d03162ae3e41a841cb16aaa46bc38 /src
parent92ea82be98b3fbadd9d65937512d326b33e5488a (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>
Diffstat (limited to 'src')
-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 bc788212..6dce9928 100644
--- a/src/libcamera/pipeline/vivid/vivid.cpp
+++ b/src/libcamera/pipeline/vivid/vivid.cpp
@@ -7,6 +7,7 @@
#include <libcamera/base/log.h>
+#include "libcamera/internal/device_enumerator.h"
#include "libcamera/internal/pipeline_handler.h"
/*
@@ -84,7 +85,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)