[libcamera-devel] [PATCH v4 1/5] libcamera: pipeline: uvcvideo: Treat all UVC cameras as external
Umang Jain
email at uajain.com
Fri Aug 21 16:46:06 CEST 2020
We currently have no way to identify if the UVC device is external
or internal(i.e. non-removable) to the system to set this property.
Until we have a starting point to resolve this, treat all UVC cameras.
Add a \todo explaining the situation for the same.
Signed-off-by: Umang Jain <email at uajain.com>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
index bc892ec..bafe6f1 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,12 @@ int UVCCameraData::init(MediaEntity *entity)
video_->bufferReady.connect(this, &UVCCameraData::bufferReady);
+ /*
+ * \todo Find a way to tell internal and external UVC cameras apart.
+ * Until then, treat all UVC cameras as external.
+ */
+ properties_.set(properties::Location, properties::CameraLocationExternal);
+
/* Initialise the supported controls. */
ControlInfoMap::Map ctrls;
--
2.26.2
More information about the libcamera-devel
mailing list