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-09-09 14:00:34 +0100
commit40bef01de0ed1159d99d8e6ec8edfcc025eb74a7 (patch)
treeff917c032d9fb20079131bdf1e9eca8405d8b48d
parentd2e5a2480b87d5980c4409885d6a7e85a6efed59 (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;
}