From c417dd3a37427d79c616b24e69f1bc32ccd3e1a8 Mon Sep 17 00:00:00 2001 From: Kieran Bingham Date: Fri, 10 Jul 2020 15:37:55 +0100 Subject: 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 [230:51:10.670503423] [2872877] DEBUG VIVID vivid.cpp:81 Obtained Vivid Device """ Signed-off-by: Kieran Bingham --- src/libcamera/pipeline/vivid/vivid.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/libcamera/pipeline/vivid/vivid.cpp b/src/libcamera/pipeline/vivid/vivid.cpp index 07598d10..bca508f2 100644 --- a/src/libcamera/pipeline/vivid/vivid.cpp +++ b/src/libcamera/pipeline/vivid/vivid.cpp @@ -7,6 +7,7 @@ #include +#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) -- cgit v1.2.1