summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2020-11-03 15:30:41 +0200
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-12-08 14:56:21 +0000
commit1462c5687ec4368f8cb3dfa2646d3b1c65124d54 (patch)
tree73fe1280f5a5cc2ad7922b0c5d49f15eb4c394b2
parentd115776f8a2853628c0a5e6473c2a9fbc3389283 (diff)
libcamera: pipeline: vivid: Set camera properties
Initialize the CameraData properties with Location and Model. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--src/libcamera/pipeline/vivid/vivid.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/vivid/vivid.cpp b/src/libcamera/pipeline/vivid/vivid.cpp
index a07f3012..19cac475 100644
--- a/src/libcamera/pipeline/vivid/vivid.cpp
+++ b/src/libcamera/pipeline/vivid/vivid.cpp
@@ -13,6 +13,7 @@
#include <libcamera/control_ids.h>
#include <libcamera/controls.h>
#include <libcamera/formats.h>
+#include <libcamera/property_ids.h>
#include "libcamera/internal/camera.h"
#include "libcamera/internal/device_enumerator.h"
@@ -350,7 +351,7 @@ int VividCameraData::init()
video_->bufferReady.connect(this, &VividCameraData::bufferReady);
- /* Initialise the supported controls. */
+ /* Initialise the supported controls and properties. */
const ControlInfoMap &controls = video_->controls();
ControlInfoMap::Map ctrls;
@@ -380,6 +381,9 @@ int VividCameraData::init()
controlInfo_ = ControlInfoMap(std::move(ctrls), controls::controls);
+ properties_.set(properties::Location, properties::CameraLocationExternal);
+ properties_.set(properties::Model, "Virtual Video Device");
+
return 0;
}