[libcamera-devel] [PATCH v2 1/4] libcamera: properties: Add Unknown value to camera Location

Paul Elder paul.elder at ideasonboard.com
Fri Feb 12 06:48:13 CET 2021


If a camera's location is unknown, it should be set so, and not
defaulted to another location. Add such a value to the Location property
enum.

Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

---
Changes in v2:
- Unknown is now 0, the rest are incremented by 1
---
 src/libcamera/property_ids.yaml | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml
index 104e9aaf..fd17bf0c 100644
--- a/src/libcamera/property_ids.yaml
+++ b/src/libcamera/property_ids.yaml
@@ -10,18 +10,22 @@ controls:
       description: |
         Camera mounting location
       enum:
-        - name: CameraLocationFront
+        - name: CameraLocationUnknown
           value: 0
+          description: |
+            The camera location is unknown
+        - name: CameraLocationFront
+          value: 1
           description: |
             The camera is mounted on the front side of the device, facing the
             user
         - name: CameraLocationBack
-          value: 1
+          value: 2
           description: |
             The camera is mounted on the back side of the device, facing away
             from the user
         - name: CameraLocationExternal
-          value: 2
+          value: 3
           description: |
             The camera is attached to the device in a way that allows it to
             be moved freely
-- 
2.27.0



More information about the libcamera-devel mailing list