Documentation/userspace-api/media/v4l/vidioc-enum-frameintervals.rst
Source file repositories/reference/linux-study-clean/Documentation/userspace-api/media/v4l/vidioc-enum-frameintervals.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/userspace-api/media/v4l/vidioc-enum-frameintervals.rst- Extension
.rst- Size
- 5469 bytes
- Lines
- 187
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_ENUM_FRAMEINTERVALS:
********************************
ioctl VIDIOC_ENUM_FRAMEINTERVALS
********************************
Name
====
VIDIOC_ENUM_FRAMEINTERVALS - Enumerate frame intervals
Synopsis
========
.. c:macro:: VIDIOC_ENUM_FRAMEINTERVALS
``int ioctl(int fd, VIDIOC_ENUM_FRAMEINTERVALS, struct v4l2_frmivalenum *argp)``
Arguments
=========
``fd``
File descriptor returned by :c:func:`open()`.
``argp``
Pointer to struct :c:type:`v4l2_frmivalenum`
that contains a pixel format and size and receives a frame interval.
Description
===========
This ioctl allows applications to enumerate all frame intervals that the
device supports for the given pixel format and frame size.
The supported pixel formats and frame sizes can be obtained by using the
:ref:`VIDIOC_ENUM_FMT` and
:ref:`VIDIOC_ENUM_FRAMESIZES` functions.
The return value and the content of the ``v4l2_frmivalenum.type`` field
depend on the type of frame intervals the device supports. Here are the
semantics of the function for the different cases:
- **Discrete:** The function returns success if the given index value
(zero-based) is valid. The application should increase the index by
one for each call until ``EINVAL`` is returned. The
`v4l2_frmivalenum.type` field is set to
`V4L2_FRMIVAL_TYPE_DISCRETE` by the driver. Of the union only
the `discrete` member is valid.
- **Step-wise:** The function returns success if the given index value
is zero and ``EINVAL`` for any other index value. The
``v4l2_frmivalenum.type`` field is set to
``V4L2_FRMIVAL_TYPE_STEPWISE`` by the driver. Of the union only the
``stepwise`` member is valid.
- **Continuous:** This is a special case of the step-wise type above.
The function returns success if the given index value is zero and
``EINVAL`` for any other index value. The ``v4l2_frmivalenum.type``
field is set to ``V4L2_FRMIVAL_TYPE_CONTINUOUS`` by the driver. Of
the union only the ``stepwise`` member is valid and the ``step``
value is set to 1.
When the application calls the function with index zero, it must check
the ``type`` field to determine the type of frame interval enumeration
the device supports. Only for the ``V4L2_FRMIVAL_TYPE_DISCRETE`` type
does it make sense to increase the index value to receive more frame
intervals.
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.