[libcamera-devel] [PATCH v4 5/7] libcamera: pipeline: uvcvideo: Set sensor model property
Niklas Söderlund
niklas.soderlund at ragnatech.se
Fri Aug 14 00:37:20 CEST 2020
Set the sensor model property from the model reported in the media
graph.
Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
* Changes since v1
- Ensure model string only contains ASCII characters.
---
src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
index b12083a7a74dae54..a55049c5179bd78e 100644
--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
@@ -14,6 +14,7 @@
#include <libcamera/camera.h>
#include <libcamera/control_ids.h>
#include <libcamera/controls.h>
+#include <libcamera/property_ids.h>
#include <libcamera/request.h>
#include <libcamera/stream.h>
@@ -500,6 +501,9 @@ int UVCCameraData::init(MediaDevice *media)
video_->bufferReady.connect(this, &UVCCameraData::bufferReady);
+ /* Initialize the camera properties. */
+ properties_.set(properties::Model, utils::toAscii(media->model()));
+
/* Initialise the supported controls. */
ControlInfoMap::Map ctrls;
--
2.28.0
More information about the libcamera-devel
mailing list