[libcamera-devel,v3,1/4] libcamera: properties: Add Unknown value to camera Location
diff mbox series

Message ID 20210215101200.149457-2-paul.elder@ideasonboard.com
State Rejected
Headers show
Series
  • Add Unknown camera location
Related show

Commit Message

Paul Elder Feb. 15, 2021, 10:11 a.m. UTC
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@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

---
No change in v3

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(-)

Patch
diff mbox series

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