ioctl VIDIOC_ENUM_DV_PRESETS

&manvol;

VIDIOC_ENUM_DV_PRESETS

Enumerate supported Digital Video presets

    	int ioctl
    	int fd
    	int request
    	struct v4l2_dv_enum_preset *argp

## Arguments

`fd`

- &fd;

`request`

- VIDIOC_ENUM_DV_PRESETS

`argp`

## Description

To query the attributes of a DV preset, applications initialize the index field and zero the reserved array of &v4l2-dv-enum-preset; and call the `VIDIOC_ENUM_DV_PRESETS` ioctl with a pointer to this structure. Drivers fill the rest of the structure or return an &EINVAL; when the index is out of bounds. To enumerate all DV Presets supported, applications shall begin at index zero, incrementing by one until the driver returns EINVAL. Drivers may enumerate a different set of DV presets after switching the video input or output.

## struct v4l2_dv_enum_presets

&cs-str;
__u32 | index | Number of the DV preset, set by the application.
__u32 | preset | This field identifies one of the DV preset values listed in v4l2-dv-presets-vals.
__u8 | name[24] | Name of the preset, a NUL-terminated ASCII string, for example: "720P-60", "1080I-60". This information is intended for the user.
__u32 | width | Width of the active video in pixels for the DV preset.
__u32 | height | Height of the active video in lines for the DV preset.
__u32 | reserved[4] | Reserved for future extensions. Drivers must set the array to zero.

## struct DV Presets

&cs-str;
Preset | Preset value | Description
V4L2_DV_INVALID | 0 | Invalid preset value.
V4L2_DV_480P59_94 | 1 | 720x480 progressive video at 59.94 fps as per BT.1362.
V4L2_DV_576P50 | 2 | 720x576 progressive video at 50 fps as per BT.1362.
V4L2_DV_720P24 | 3 | 1280x720 progressive video at 24 fps as per SMPTE 296M.
V4L2_DV_720P25 | 4 | 1280x720 progressive video at 25 fps as per SMPTE 296M.
V4L2_DV_720P30 | 5 | 1280x720 progressive video at 30 fps as per SMPTE 296M.
V4L2_DV_720P50 | 6 | 1280x720 progressive video at 50 fps as per SMPTE 296M.
V4L2_DV_720P59_94 | 7 | 1280x720 progressive video at 59.94 fps as per SMPTE 274M.
V4L2_DV_720P60 | 8 | 1280x720 progressive video at 60 fps as per SMPTE 274M/296M.
V4L2_DV_1080I29_97 | 9 | 1920x1080 interlaced video at 29.97 fps as per BT.1120/SMPTE 274M.
V4L2_DV_1080I30 | 10 | 1920x1080 interlaced video at 30 fps as per BT.1120/SMPTE 274M.
V4L2_DV_1080I25 | 11 | 1920x1080 interlaced video at 25 fps as per BT.1120.
V4L2_DV_1080I50 | 12 | 1920x1080 interlaced video at 50 fps as per SMPTE 296M.
V4L2_DV_1080I60 | 13 | 1920x1080 interlaced video at 60 fps as per SMPTE 296M.
V4L2_DV_1080P24 | 14 | 1920x1080 progressive video at 24 fps as per SMPTE 296M.
V4L2_DV_1080P25 | 15 | 1920x1080 progressive video at 25 fps as per SMPTE 296M.
V4L2_DV_1080P30 | 16 | 1920x1080 progressive video at 30 fps as per SMPTE 296M.
V4L2_DV_1080P50 | 17 | 1920x1080 progressive video at 50 fps as per BT.1120.
V4L2_DV_1080P60 | 18 | 1920x1080 progressive video at 60 fps as per BT.1120.

&return-value;

EINVAL

- The &v4l2-dv-enum-preset; index is out of bounds.