Name

VIDIOC_ENUM_DV_PRESETS — Enumerate supported Digital Video presets

Synopsis

int ioctl(int fd,
 int request,
 struct v4l2_dv_enum_preset *argp);
 

Arguments

fd

File descriptor returned by open().

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 struct 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 error code 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.

Table A.21. struct v4l2_dv_enum_presets

__u32indexNumber of the DV preset, set by the application.
__u32presetThis field identifies one of the DV preset values listed in Table A.22, “struct DV Presets.
__u8name[24]Name of the preset, a NUL-terminated ASCII string, for example: "720P-60", "1080I-60". This information is intended for the user.
__u32widthWidth of the active video in pixels for the DV preset.
__u32heightHeight of the active video in lines for the DV preset.
__u32reserved[4]Reserved for future extensions. Drivers must set the array to zero.

Table A.22. struct DV Presets

PresetPreset valueDescription
   
V4L2_DV_INVALID0Invalid preset value.
V4L2_DV_480P59_941720x480 progressive video at 59.94 fps as per BT.1362.
V4L2_DV_576P502720x576 progressive video at 50 fps as per BT.1362.
V4L2_DV_720P2431280x720 progressive video at 24 fps as per SMPTE 296M.
V4L2_DV_720P2541280x720 progressive video at 25 fps as per SMPTE 296M.
V4L2_DV_720P3051280x720 progressive video at 30 fps as per SMPTE 296M.
V4L2_DV_720P5061280x720 progressive video at 50 fps as per SMPTE 296M.
V4L2_DV_720P59_9471280x720 progressive video at 59.94 fps as per SMPTE 274M.
V4L2_DV_720P6081280x720 progressive video at 60 fps as per SMPTE 274M/296M.
V4L2_DV_1080I29_9791920x1080 interlaced video at 29.97 fps as per BT.1120/SMPTE 274M.
V4L2_DV_1080I30101920x1080 interlaced video at 30 fps as per BT.1120/SMPTE 274M.
V4L2_DV_1080I25111920x1080 interlaced video at 25 fps as per BT.1120.
V4L2_DV_1080I50121920x1080 interlaced video at 50 fps as per SMPTE 296M.
V4L2_DV_1080I60131920x1080 interlaced video at 60 fps as per SMPTE 296M.
V4L2_DV_1080P24141920x1080 progressive video at 24 fps as per SMPTE 296M.
V4L2_DV_1080P25151920x1080 progressive video at 25 fps as per SMPTE 296M.
V4L2_DV_1080P30161920x1080 progressive video at 30 fps as per SMPTE 296M.
V4L2_DV_1080P50171920x1080 progressive video at 50 fps as per BT.1120.
V4L2_DV_1080P60181920x1080 progressive video at 60 fps as per BT.1120.

Return Value

On success 0 is returned, on error -1 and the errno variable is set appropriately. The generic error codes are described at the Generic Error Codes chapter.

EINVAL

The struct v4l2_dv_enum_preset index is out of bounds.