Jetson Linux API Reference

32.7.4 Release
V4L2 Video Camera

Detailed Description

NVIDIA V4L2 Camera Description and Extensions.

The camera device node is "/dev/video%d".

Supported Pixelformats

CAPTURE PLANE :------------------— V4L2_PIX_FMT_NV12M

Supported Memory Types

MEMORY CAPTURE PLANE
V4L2_MEMORY_MMAP Y
V4L2_MEMORY_DMABUF Y
V4L2_MEMORY_USERPTR N
Attention
For the camera, it is necessary that the capture plane format be set and only then request buffers.

Supported Controls

The following sections describe the supported controls.

Controls From the Open Source V4L2-Controls Header

Control ID Purpose Runtime Configurable
- V4L2_CID_3A_LOCK AWB/AE Lock Y

All non-runtime configurable options must be set after setting format on the capture planes and before requesting buffers.

NVIDIA-Specific Controls

Setting Framerate

The camera framerate can be set with VIDIOC_S_PARM IOCTL by setting the numerator and denominator in v4l2_streamparm.parm.output.timeperframe. Selection of camera mode can override this setting. If the camera mode is to be selected along with the specified framerate, then camera mode must be selected before setting the framerate.

Camera Capture Metadata

The camera can be queried to report frame related metadata. See V4L2_CID_ARGUS_METADATA for more information.

EOS Handling

Camera outputs all the queued empty buffers with data and TIME_OUT if no more empty buffers are queued. If error is encountered, am empty buffer is queued to the output with V4L2_BUF_FLAG_LAST flag.

Data Structures

struct  _v4l2_argus_denoise_strength
 Holds the strength value for denoise operation. More...
 
struct  _v4l2_argus_edge_enhance_strength
 Holds the strength value for edge enhancement operation. More...
 
struct  _v4l2_argus_exposure_compensation
 Holds the value for exposure compensation. More...
 
struct  _v4l2_argus_ispdigital_gainrange
 Holds the value for Isp Digital gain range. More...
 
struct  _v4l2_argus_color_saturation
 Holds the value for absolute color saturation. More...
 
struct  _v4l2_argus_gainrange
 Holds the value for gain range. More...
 
struct  _v4l2_argus_exposure_timerange
 Holds the value for exposure range. More...
 
struct  _v4l2_argus_ctrl_metadata
 Holds the value for camera output metadata. More...
 

Macros

#define V4L2_CID_ARGUS_AUTO_WHITE_BALANCE_MODE   (V4L2_CID_CAMERA_CLASS_BASE+20)
 Defines the Control ID to set auto white balance mode for camera. More...
 
#define V4L2_CID_ARGUS_SENSOR_MODE   (V4L2_CID_CAMERA_CLASS_BASE+32)
 Defines the Control ID to set sensor mode for camera. More...
 
#define V4L2_CID_ARGUS_DENOISE_STRENGTH   (V4L2_CID_CAMERA_CLASS_BASE+33)
 Defines the Control ID to set denoise strength for camera. More...
 
#define V4L2_CID_ARGUS_DENOISE_MODE   (V4L2_CID_CAMERA_CLASS_BASE+34)
 Defines the Control ID to set denoise mode for camera. More...
 
#define V4L2_CID_ARGUS_EE_STRENGTH   (V4L2_CID_CAMERA_CLASS_BASE+35)
 Defines the Control ID to set edge enhancement strength for camera. More...
 
#define V4L2_CID_ARGUS_EE_MODE   (V4L2_CID_CAMERA_CLASS_BASE+36)
 Defines the Control ID to set edge enhancement mode for camera. More...
 
#define V4L2_CID_ARGUS_AE_ANTIBANDING_MODE   (V4L2_CID_CAMERA_CLASS_BASE+37)
 Defines the Control ID to set Auto Exposure antibanding mode for camera. More...
 
#define V4L2_CID_ARGUS_EXPOSURE_COMPENSATION   (V4L2_CID_CAMERA_CLASS_BASE+38)
 Defines the Control ID to set edge enhancement settings for camera. More...
 
#define V4L2_CID_ARGUS_ISP_DIGITAL_GAIN_RANGE   (V4L2_CID_CAMERA_CLASS_BASE+39)
 Defines the Control ID to set edge enhancement settings for camera. More...
 
#define V4L2_CID_ARGUS_COLOR_SATURATION   (V4L2_CID_CAMERA_CLASS_BASE+40)
 Defines the Control ID to set sensor mode for camera. More...
 
#define V4L2_CID_ARGUS_GAIN_RANGE   (V4L2_CID_CAMERA_CLASS_BASE+41)
 Defines the Control ID to set edge enhancement settings for camera. More...
 
#define V4L2_CID_ARGUS_EXPOSURE_TIME_RANGE   (V4L2_CID_CAMERA_CLASS_BASE+42)
 Defines the Control ID to set edge enhancement settings for camera. More...
 
#define V4L2_CID_ARGUS_METADATA   (V4L2_CID_CAMERA_CLASS_BASE+43)
 Defines the Control ID to get the camera argus output metadata. More...
 

Typedefs

typedef struct _v4l2_argus_denoise_strength v4l2_argus_denoise_strength
 Holds the strength value for denoise operation. More...
 
typedef struct _v4l2_argus_edge_enhance_strength v4l2_argus_edge_enhance_strength
 Holds the strength value for edge enhancement operation. More...
 
typedef struct _v4l2_argus_exposure_compensation v4l2_argus_exposure_compensation
 Holds the value for exposure compensation. More...
 
typedef struct _v4l2_argus_ispdigital_gainrange v4l2_argus_ispdigital_gainrange
 Holds the value for Isp Digital gain range. More...
 
typedef struct _v4l2_argus_color_saturation v4l2_argus_color_saturation
 Holds the value for absolute color saturation. More...
 
typedef struct _v4l2_argus_gainrange v4l2_argus_gainrange
 Holds the value for gain range. More...
 
typedef struct _v4l2_argus_exposure_timerange v4l2_argus_exposure_timerange
 Holds the value for exposure range. More...
 
typedef struct _v4l2_argus_ctrl_metadata v4l2_argus_ctrl_metadata
 Holds the value for camera output metadata. More...
 

Enumerations

enum  v4l2_argus_denoise_mode {
  V4L2_ARGUS_DENOISE_MODE_UNKNOWN = 0,
  V4L2_ARGUS_DENOISE_MODE_OFF = 1,
  V4L2_ARGUS_DENOISE_MODE_FAST = 2,
  V4L2_ARGUS_DENOISE_MODE_HIGH_QUALITY = 3
}
 Enum specifying types of denoise modes. More...
 
enum  v4l2_argus_edge_enhance_mode {
  V4L2_ARGUS_EDGE_ENHANCE_MODE_UNKNOWN = 0,
  V4L2_ARGUS_EDGE_ENHANCE_MODE_OFF = 1,
  V4L2_ARGUS_EDGE_ENHANCE_MODE_FAST = 2,
  V4L2_ARGUS_EDGE_ENHANCE_MODE_HIGH_QUALITY = 3
}
 Enum specifying types of edge enhancement modes. More...
 
enum  v4l2_argus_ac_ae_antibanding_mode {
  V4L2_ARGUS_AE_ANTIBANDING_MODE_UNKNOWN = 0,
  V4L2_ARGUS_AE_ANTIBANDING_MODE_OFF = 1,
  V4L2_ARGUS_AE_ANTIBANDING_MODE_AUTO = 2,
  V4L2_ARGUS_AE_ANTIBANDING_MODE_50HZ = 3,
  V4L2_ARGUS_AE_ANTIBANDING_MODE_60HZ = 4
}
 Enum specifying types of AE antibanding modes. More...
 
enum  v4l2_argus_ac_awb_mode {
  V4L2_ARGUS_AWB_MODE_OFF = 1,
  V4L2_ARGUS_AWB_MODE_AUTO = 2,
  V4L2_ARGUS_AWB_MODE_INCANDESCENT = 3,
  V4L2_ARGUS_AWB_MODE_FLUORESCENT = 4,
  V4L2_ARGUS_AWB_MODE_WARM_FLUORESCENT = 5,
  V4L2_ARGUS_AWB_MODE_DAYLIGHT = 6,
  V4L2_ARGUS_AWB_MODE_CLOUDY_DAYLIGHT = 7,
  V4L2_ARGUS_AWB_MODE_TWILIGHT = 8,
  V4L2_ARGUS_AWB_MODE_SHADE = 9,
  V4L2_ARGUS_AWB_MODE_MANUAL = 10
}
 Enum specifying types of AC AWB modes. More...
 
enum  v4l2_argus_ae_state {
  V4L2_ARGUS_AeState_Unknown = 0,
  V4L2_ARGUS_AE_STATE_INACTIVE = 1,
  V4L2_ARGUS_AE_STATE_SEARCHING = 2,
  V4L2_ARGUS_AE_STATE_CONVERGED = 3,
  V4L2_ARGUS_AE_STATE_FLASH_REQUIRED = 4,
  V4L2_ARGUS_AE_STATE_TIMEOUT = 5
}
 Enum specifying types of AE states. More...
 
enum  v4l2_argus_awb_state {
  V4L2_ARGUS_AwbState_Unknown = 0,
  V4L2_ARGUS_AWB_STATE_INACTIVE = 1,
  V4L2_ARGUS_AWB_STATE_SEARCHING = 2,
  V4L2_ARGUS_AWB_STATE_CONVERGED = 3,
  V4L2_ARGUS_AWB_STATE_LOCKED = 4
}
 Enum specifying types of AWB states. More...
 

Macro Definition Documentation

◆ V4L2_CID_ARGUS_AE_ANTIBANDING_MODE

#define V4L2_CID_ARGUS_AE_ANTIBANDING_MODE   (V4L2_CID_CAMERA_CLASS_BASE+37)

Defines the Control ID to set Auto Exposure antibanding mode for camera.

A value of type v4l2_argus_ac_ae_antibanding_mode must be supplied with this control.

Attention
This control should be set after setting format on the capture plane.

Definition at line 1514 of file v4l2_nv_extensions.h.

◆ V4L2_CID_ARGUS_AUTO_WHITE_BALANCE_MODE

#define V4L2_CID_ARGUS_AUTO_WHITE_BALANCE_MODE   (V4L2_CID_CAMERA_CLASS_BASE+20)

Defines the Control ID to set auto white balance mode for camera.

A value of type v4l2_argus_ac_awb_mode must be supplied with this control.

Attention
This control should be set after setting format on the capture plane.

Definition at line 1449 of file v4l2_nv_extensions.h.

◆ V4L2_CID_ARGUS_COLOR_SATURATION

#define V4L2_CID_ARGUS_COLOR_SATURATION   (V4L2_CID_CAMERA_CLASS_BASE+40)

Defines the Control ID to set sensor mode for camera.

A pointer to a valid structure v4l2_argus_color_saturation must be supplied with this control. The flag EnableSaturation must be set to true to enable setting the specified color saturation

Attention
This control should be set after setting format and before requesting buffers on the capture plane.

Definition at line 1549 of file v4l2_nv_extensions.h.

◆ V4L2_CID_ARGUS_DENOISE_MODE

#define V4L2_CID_ARGUS_DENOISE_MODE   (V4L2_CID_CAMERA_CLASS_BASE+34)

Defines the Control ID to set denoise mode for camera.

A value of type v4l2_argus_denoise_mode must be supplied with this control.

Attention
This control should be set after setting format on the capture plane.

Definition at line 1481 of file v4l2_nv_extensions.h.

◆ V4L2_CID_ARGUS_DENOISE_STRENGTH

#define V4L2_CID_ARGUS_DENOISE_STRENGTH   (V4L2_CID_CAMERA_CLASS_BASE+33)

Defines the Control ID to set denoise strength for camera.

A pointer to a valid structure v4l2_argus_denoise_strength must be supplied with this control.

Attention
This control should be set after setting format on the capture plane.

Definition at line 1470 of file v4l2_nv_extensions.h.

◆ V4L2_CID_ARGUS_EE_MODE

#define V4L2_CID_ARGUS_EE_MODE   (V4L2_CID_CAMERA_CLASS_BASE+36)

Defines the Control ID to set edge enhancement mode for camera.

A value of type v4l2_argus_edge_enhance_mode must be supplied with this control.

Attention
This control should be set after setting format on the capture plane.

Definition at line 1503 of file v4l2_nv_extensions.h.

◆ V4L2_CID_ARGUS_EE_STRENGTH

#define V4L2_CID_ARGUS_EE_STRENGTH   (V4L2_CID_CAMERA_CLASS_BASE+35)

Defines the Control ID to set edge enhancement strength for camera.

A pointer to a valid structure v4l2_argus_edge_enhance_strength must be supplied with this control.

Attention
This control should be set after setting format on the capture plane.

Definition at line 1492 of file v4l2_nv_extensions.h.

◆ V4L2_CID_ARGUS_EXPOSURE_COMPENSATION

#define V4L2_CID_ARGUS_EXPOSURE_COMPENSATION   (V4L2_CID_CAMERA_CLASS_BASE+38)

Defines the Control ID to set edge enhancement settings for camera.

A pointer to a valid structure v4l2_argus_exposure_compensation must be supplied with this control.

Attention
This control should be set after setting format on the capture plane.

Definition at line 1525 of file v4l2_nv_extensions.h.

◆ V4L2_CID_ARGUS_EXPOSURE_TIME_RANGE

#define V4L2_CID_ARGUS_EXPOSURE_TIME_RANGE   (V4L2_CID_CAMERA_CLASS_BASE+42)

Defines the Control ID to set edge enhancement settings for camera.

A pointer to a valid structure v4l2_argus_exposure_timerange must be supplied with this control.

Attention
This control should be set after setting format on the capture plane.

Definition at line 1571 of file v4l2_nv_extensions.h.

◆ V4L2_CID_ARGUS_GAIN_RANGE

#define V4L2_CID_ARGUS_GAIN_RANGE   (V4L2_CID_CAMERA_CLASS_BASE+41)

Defines the Control ID to set edge enhancement settings for camera.

A pointer to a valid structure v4l2_argus_gainrange must be supplied with this control.

Attention
This control should be set after setting format on the capture plane.

Definition at line 1560 of file v4l2_nv_extensions.h.

◆ V4L2_CID_ARGUS_ISP_DIGITAL_GAIN_RANGE

#define V4L2_CID_ARGUS_ISP_DIGITAL_GAIN_RANGE   (V4L2_CID_CAMERA_CLASS_BASE+39)

Defines the Control ID to set edge enhancement settings for camera.

A pointer to a valid structure v4l2_argus_ispdigital_gainrange must be supplied with this control.

Attention
This control should be set after setting format on the capture plane.

Definition at line 1536 of file v4l2_nv_extensions.h.

◆ V4L2_CID_ARGUS_METADATA

#define V4L2_CID_ARGUS_METADATA   (V4L2_CID_CAMERA_CLASS_BASE+43)

Defines the Control ID to get the camera argus output metadata.

A pointer to a valid structure v4l2_argus_ctrl_metadata must be supplied with this control.

Attention
This control must be read after dequeueing a buffer successfully from the capture plane. The values in the structure are valid until the buffer is queued again.

Definition at line 1583 of file v4l2_nv_extensions.h.

◆ V4L2_CID_ARGUS_SENSOR_MODE

#define V4L2_CID_ARGUS_SENSOR_MODE   (V4L2_CID_CAMERA_CLASS_BASE+32)

Defines the Control ID to set sensor mode for camera.

A non-negative integer value must be supplied with this control.

Attention
This control should be set after setting format and before requesting buffers on the capture plane.

Definition at line 1459 of file v4l2_nv_extensions.h.

Typedef Documentation

◆ v4l2_argus_color_saturation

Holds the value for absolute color saturation.

Must be used with V4L2_CID_ARGUS_COLOR_SATURATION ioctl.

◆ v4l2_argus_ctrl_metadata

Holds the value for camera output metadata.

Must be used with V4L2_CID_ARGUS_METADATA ioctl.

◆ v4l2_argus_denoise_strength

Holds the strength value for denoise operation.

Must be used with V4L2_CID_ARGUS_DENOISE_STRENGTH ioctl.

◆ v4l2_argus_edge_enhance_strength

Holds the strength value for edge enhancement operation.

Must be used with V4L2_CID_ARGUS_EE_STRENGTH ioctl.

◆ v4l2_argus_exposure_compensation

Holds the value for exposure compensation.

Must be used with V4L2_CID_ARGUS_EXPOSURE_COMPENSATION ioctl.

◆ v4l2_argus_exposure_timerange

Holds the value for exposure range.

Must be used with V4L2_CID_ARGUS_EXPOSURE_TIME_RANGE ioctl.

◆ v4l2_argus_gainrange

Holds the value for gain range.

Must be used with V4L2_CID_ARGUS_GAIN_RANGE ioctl.

◆ v4l2_argus_ispdigital_gainrange

Holds the value for Isp Digital gain range.

Must be used with V4L2_CID_ARGUS_ISP_DIGITAL_GAIN_RANGE ioctl.

Enumeration Type Documentation

◆ v4l2_argus_ac_ae_antibanding_mode

Enum specifying types of AE antibanding modes.

Enumerator
V4L2_ARGUS_AE_ANTIBANDING_MODE_UNKNOWN 
V4L2_ARGUS_AE_ANTIBANDING_MODE_OFF 
V4L2_ARGUS_AE_ANTIBANDING_MODE_AUTO 
V4L2_ARGUS_AE_ANTIBANDING_MODE_50HZ 
V4L2_ARGUS_AE_ANTIBANDING_MODE_60HZ 

Definition at line 2306 of file v4l2_nv_extensions.h.

◆ v4l2_argus_ac_awb_mode

Enum specifying types of AC AWB modes.

Enumerator
V4L2_ARGUS_AWB_MODE_OFF 
V4L2_ARGUS_AWB_MODE_AUTO 
V4L2_ARGUS_AWB_MODE_INCANDESCENT 
V4L2_ARGUS_AWB_MODE_FLUORESCENT 
V4L2_ARGUS_AWB_MODE_WARM_FLUORESCENT 
V4L2_ARGUS_AWB_MODE_DAYLIGHT 
V4L2_ARGUS_AWB_MODE_CLOUDY_DAYLIGHT 
V4L2_ARGUS_AWB_MODE_TWILIGHT 
V4L2_ARGUS_AWB_MODE_SHADE 
V4L2_ARGUS_AWB_MODE_MANUAL 

Definition at line 2317 of file v4l2_nv_extensions.h.

◆ v4l2_argus_ae_state

Enum specifying types of AE states.

Enumerator
V4L2_ARGUS_AeState_Unknown 
V4L2_ARGUS_AE_STATE_INACTIVE 
V4L2_ARGUS_AE_STATE_SEARCHING 
V4L2_ARGUS_AE_STATE_CONVERGED 
V4L2_ARGUS_AE_STATE_FLASH_REQUIRED 
V4L2_ARGUS_AE_STATE_TIMEOUT 

Definition at line 2333 of file v4l2_nv_extensions.h.

◆ v4l2_argus_awb_state

Enum specifying types of AWB states.

Enumerator
V4L2_ARGUS_AwbState_Unknown 
V4L2_ARGUS_AWB_STATE_INACTIVE 
V4L2_ARGUS_AWB_STATE_SEARCHING 
V4L2_ARGUS_AWB_STATE_CONVERGED 
V4L2_ARGUS_AWB_STATE_LOCKED 

Definition at line 2345 of file v4l2_nv_extensions.h.

◆ v4l2_argus_denoise_mode

Enum specifying types of denoise modes.

Enumerator
V4L2_ARGUS_DENOISE_MODE_UNKNOWN 
V4L2_ARGUS_DENOISE_MODE_OFF 
V4L2_ARGUS_DENOISE_MODE_FAST 
V4L2_ARGUS_DENOISE_MODE_HIGH_QUALITY 

Definition at line 2286 of file v4l2_nv_extensions.h.

◆ v4l2_argus_edge_enhance_mode

Enum specifying types of edge enhancement modes.

Enumerator
V4L2_ARGUS_EDGE_ENHANCE_MODE_UNKNOWN 
V4L2_ARGUS_EDGE_ENHANCE_MODE_OFF 
V4L2_ARGUS_EDGE_ENHANCE_MODE_FAST 
V4L2_ARGUS_EDGE_ENHANCE_MODE_HIGH_QUALITY 

Definition at line 2296 of file v4l2_nv_extensions.h.