The branch main has been updated by seuros:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=ea7c31ba9d21c199f6458a4a4ec447dde2310c32

commit ea7c31ba9d21c199f6458a4a4ec447dde2310c32
Author:     Abdelkader Boudih <[email protected]>
AuthorDate: 2026-09-05 21:18:13 +0000
Commit:     Abdelkader Boudih <[email protected]>
CommitDate: 2026-09-05 21:18:13 +0000

    video(4): fix camera control class ABI and add missing V4L2 constants
    
    Renumbered the camera class to match the reference ABI and added the
    constants ported applications expect:
    
    Reviewed by:    thierry
    Differential Revision:  https://reviews.freebsd.org/D59459
---
 sys/sys/videoio.h | 29 ++++++++++++++++++++++++++---
 1 file changed, 26 insertions(+), 3 deletions(-)

diff --git a/sys/sys/videoio.h b/sys/sys/videoio.h
index 714a95fa5810..2760b0ec3b68 100644
--- a/sys/sys/videoio.h
+++ b/sys/sys/videoio.h
@@ -522,6 +522,7 @@ struct v4l2_frmivalenum {
  *  Capability flags
  */
 #define V4L2_CAP_VIDEO_CAPTURE         0x00000001
+#define V4L2_CAP_VIDEO_OUTPUT          0x00000002
 #define V4L2_CAP_VIDEO_CAPTURE_MPLANE  0x00001000
 #define V4L2_CAP_STREAMING             0x04000000
 #define V4L2_CAP_EXT_PIX_FORMAT                0x00200000
@@ -574,7 +575,9 @@ struct v4l2_frmivalenum {
  */
 #define V4L2_CTRL_CLASS_USER           0x00980000
 #define V4L2_CTRL_CLASS_MPEG           0x00990000
+#define V4L2_CTRL_CLASS_CAMERA         0x009a0000
 #define V4L2_CID_BASE                  (V4L2_CTRL_CLASS_USER | 0x900)
+#define V4L2_CID_USER_CLASS            (V4L2_CTRL_CLASS_USER | 1)
 
 /*
  *  MPEG/codec control class
@@ -593,24 +596,44 @@ struct v4l2_frmivalenum {
 #define V4L2_CID_HFLIP                 (V4L2_CID_BASE + 20)
 #define V4L2_CID_VFLIP                 (V4L2_CID_BASE + 21)
 #define V4L2_CID_POWER_LINE_FREQUENCY  (V4L2_CID_BASE + 24)
+enum v4l2_power_line_frequency {
+       V4L2_CID_POWER_LINE_FREQUENCY_DISABLED  = 0,
+       V4L2_CID_POWER_LINE_FREQUENCY_50HZ      = 1,
+       V4L2_CID_POWER_LINE_FREQUENCY_60HZ      = 2,
+       V4L2_CID_POWER_LINE_FREQUENCY_AUTO      = 3,
+};
 #define V4L2_CID_HUE_AUTO              (V4L2_CID_BASE + 25)
 #define V4L2_CID_WHITE_BALANCE_TEMPERATURE (V4L2_CID_BASE + 26)
 #define V4L2_CID_SHARPNESS             (V4L2_CID_BASE + 27)
 #define V4L2_CID_BACKLIGHT_COMPENSATION        (V4L2_CID_BASE + 28)
 #define V4L2_CID_LASTP1                        (V4L2_CID_BASE + 44)
 
-#define V4L2_CID_CAMERA_CLASS_BASE     0x009a0000
+#define V4L2_CID_CAMERA_CLASS_BASE     (V4L2_CTRL_CLASS_CAMERA | 0x900)
+#define V4L2_CID_CAMERA_CLASS          (V4L2_CTRL_CLASS_CAMERA | 1)
 #define V4L2_CID_EXPOSURE_AUTO         (V4L2_CID_CAMERA_CLASS_BASE + 1)
+enum v4l2_exposure_auto_type {
+       V4L2_EXPOSURE_AUTO              = 0,
+       V4L2_EXPOSURE_MANUAL            = 1,
+       V4L2_EXPOSURE_SHUTTER_PRIORITY  = 2,
+       V4L2_EXPOSURE_APERTURE_PRIORITY = 3,
+};
 #define V4L2_CID_EXPOSURE_ABSOLUTE     (V4L2_CID_CAMERA_CLASS_BASE + 2)
 #define V4L2_CID_EXPOSURE_AUTO_PRIORITY        (V4L2_CID_CAMERA_CLASS_BASE + 3)
-#define V4L2_CID_FOCUS_ABSOLUTE                (V4L2_CID_CAMERA_CLASS_BASE + 4)
-#define V4L2_CID_FOCUS_RELATIVE                (V4L2_CID_CAMERA_CLASS_BASE + 5)
+#define V4L2_CID_PAN_RELATIVE          (V4L2_CID_CAMERA_CLASS_BASE + 4)
+#define V4L2_CID_TILT_RELATIVE         (V4L2_CID_CAMERA_CLASS_BASE + 5)
+#define V4L2_CID_PAN_RESET             (V4L2_CID_CAMERA_CLASS_BASE + 6)
+#define V4L2_CID_TILT_RESET            (V4L2_CID_CAMERA_CLASS_BASE + 7)
 #define V4L2_CID_PAN_ABSOLUTE          (V4L2_CID_CAMERA_CLASS_BASE + 8)
 #define V4L2_CID_TILT_ABSOLUTE         (V4L2_CID_CAMERA_CLASS_BASE + 9)
+#define V4L2_CID_FOCUS_ABSOLUTE                (V4L2_CID_CAMERA_CLASS_BASE + 
10)
+#define V4L2_CID_FOCUS_RELATIVE                (V4L2_CID_CAMERA_CLASS_BASE + 
11)
 #define V4L2_CID_FOCUS_AUTO            (V4L2_CID_CAMERA_CLASS_BASE + 12)
 #define V4L2_CID_ZOOM_ABSOLUTE         (V4L2_CID_CAMERA_CLASS_BASE + 13)
+#define V4L2_CID_ZOOM_RELATIVE         (V4L2_CID_CAMERA_CLASS_BASE + 14)
 #define V4L2_CID_ZOOM_CONTINUOUS       (V4L2_CID_CAMERA_CLASS_BASE + 15)
 #define V4L2_CID_PRIVACY               (V4L2_CID_CAMERA_CLASS_BASE + 16)
+#define V4L2_CID_IRIS_ABSOLUTE         (V4L2_CID_CAMERA_CLASS_BASE + 17)
+#define V4L2_CID_IRIS_RELATIVE         (V4L2_CID_CAMERA_CLASS_BASE + 18)
 
 /*
  *  IDs reserved for driver specific controls

Reply via email to