include/uapi/linux/videodev2.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/videodev2.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/videodev2.h- Extension
.h- Size
- 108243 bytes
- Lines
- 2845
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
sys/time.hlinux/compiler.hlinux/ioctl.hlinux/types.hlinux/v4l2-common.hlinux/v4l2-controls.h
Detected Declarations
struct v4l2_rectstruct v4l2_fractstruct v4l2_areastruct v4l2_capabilitystruct v4l2_pix_formatstruct v4l2_fmtdescstruct v4l2_frmsize_discretestruct v4l2_frmsize_stepwisestruct v4l2_frmsizeenumstruct v4l2_frmival_stepwisestruct v4l2_frmivalenumstruct v4l2_timecodestruct v4l2_jpegcompressionstruct __kernel_v4l2_timevalstruct v4l2_requestbuffersstruct v4l2_planestruct v4l2_bufferstruct v4l2_exportbufferstruct v4l2_framebufferstruct v4l2_clipstruct v4l2_windowstruct v4l2_captureparmstruct v4l2_outputparmstruct v4l2_cropcapstruct v4l2_cropstruct v4l2_selectionstruct v4l2_standardstruct v4l2_bt_timingsstruct v4l2_dv_timingsstruct v4l2_enum_dv_timingsstruct v4l2_bt_timings_capstruct v4l2_dv_timings_capstruct v4l2_inputstruct v4l2_outputstruct v4l2_controlstruct v4l2_ext_controlstruct v4l2_ext_controlsstruct v4l2_queryctrlstruct v4l2_query_ext_ctrlstruct v4l2_querymenustruct v4l2_tunerstruct v4l2_modulatorstruct v4l2_frequencystruct v4l2_frequency_bandstruct v4l2_hw_freq_seekstruct v4l2_rds_datastruct v4l2_audiostruct v4l2_audioout
Annotated Snippet
struct v4l2_rect {
__s32 left;
__s32 top;
__u32 width;
__u32 height;
};
struct v4l2_fract {
__u32 numerator;
__u32 denominator;
};
struct v4l2_area {
__u32 width;
__u32 height;
};
/**
* struct v4l2_capability - Describes V4L2 device caps returned by VIDIOC_QUERYCAP
*
* @driver: name of the driver module (e.g. "bttv")
* @card: name of the card (e.g. "Hauppauge WinTV")
* @bus_info: name of the bus (e.g. "PCI:" + pci_name(pci_dev) )
* @version: KERNEL_VERSION
* @capabilities: capabilities of the physical device as a whole
* @device_caps: capabilities accessed via this particular device (node)
* @reserved: reserved fields for future extensions
*/
struct v4l2_capability {
__u8 driver[16];
__u8 card[32];
__u8 bus_info[32];
__u32 version;
__u32 capabilities;
__u32 device_caps;
__u32 reserved[3];
};
/* Values for 'capabilities' field */
#define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */
#define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */
#define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */
#define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */
#define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */
#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */
#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */
#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */
#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 /* Can do video output overlay */
#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */
#define V4L2_CAP_RDS_OUTPUT 0x00000800 /* Is an RDS encoder */
/* Is a video capture device that supports multiplanar formats */
#define V4L2_CAP_VIDEO_CAPTURE_MPLANE 0x00001000
/* Is a video output device that supports multiplanar formats */
#define V4L2_CAP_VIDEO_OUTPUT_MPLANE 0x00002000
/* Is a video mem-to-mem device that supports multiplanar formats */
#define V4L2_CAP_VIDEO_M2M_MPLANE 0x00004000
/* Is a video mem-to-mem device */
#define V4L2_CAP_VIDEO_M2M 0x00008000
#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */
#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */
#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */
#define V4L2_CAP_MODULATOR 0x00080000 /* has a modulator */
#define V4L2_CAP_SDR_CAPTURE 0x00100000 /* Is a SDR capture device */
#define V4L2_CAP_EXT_PIX_FORMAT 0x00200000 /* Supports the extended pixel format */
#define V4L2_CAP_SDR_OUTPUT 0x00400000 /* Is a SDR output device */
#define V4L2_CAP_META_CAPTURE 0x00800000 /* Is a metadata capture device */
#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */
#define V4L2_CAP_EDID 0x02000000 /* Is an EDID-only device */
#define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */
#define V4L2_CAP_META_OUTPUT 0x08000000 /* Is a metadata output device */
#define V4L2_CAP_TOUCH 0x10000000 /* Is a touch device */
#define V4L2_CAP_IO_MC 0x20000000 /* Is input/output controlled by the media controller */
#define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */
/*
* V I D E O I M A G E F O R M A T
*/
struct v4l2_pix_format {
__u32 width;
__u32 height;
__u32 pixelformat;
__u32 field; /* enum v4l2_field */
__u32 bytesperline; /* for padding, zero if unused */
Annotation
- Immediate include surface: `sys/time.h`, `linux/compiler.h`, `linux/ioctl.h`, `linux/types.h`, `linux/v4l2-common.h`, `linux/v4l2-controls.h`.
- Detected declarations: `struct v4l2_rect`, `struct v4l2_fract`, `struct v4l2_area`, `struct v4l2_capability`, `struct v4l2_pix_format`, `struct v4l2_fmtdesc`, `struct v4l2_frmsize_discrete`, `struct v4l2_frmsize_stepwise`, `struct v4l2_frmsizeenum`, `struct v4l2_frmival_stepwise`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.