Documentation/userspace-api/media/v4l/vidioc-subscribe-event.rst
Source file repositories/reference/linux-study-clean/Documentation/userspace-api/media/v4l/vidioc-subscribe-event.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/userspace-api/media/v4l/vidioc-subscribe-event.rst- Extension
.rst- Size
- 3326 bytes
- Lines
- 114
- 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_SUBSCRIBE_EVENT:
.. _VIDIOC_UNSUBSCRIBE_EVENT:
******************************************************
ioctl VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT
******************************************************
Name
====
VIDIOC_SUBSCRIBE_EVENT - VIDIOC_UNSUBSCRIBE_EVENT - Subscribe or unsubscribe event
Synopsis
========
.. c:macro:: VIDIOC_SUBSCRIBE_EVENT
``int ioctl(int fd, VIDIOC_SUBSCRIBE_EVENT, struct v4l2_event_subscription *argp)``
.. c:macro:: VIDIOC_UNSUBSCRIBE_EVENT
``int ioctl(int fd, VIDIOC_UNSUBSCRIBE_EVENT, struct v4l2_event_subscription *argp)``
Arguments
=========
``fd``
File descriptor returned by :c:func:`open()`.
``argp``
Pointer to struct :c:type:`v4l2_event_subscription`.
Description
===========
Subscribe or unsubscribe V4L2 event. Subscribed events are dequeued by
using the :ref:`VIDIOC_DQEVENT` ioctl.
.. tabularcolumns:: |p{2.6cm}|p{4.4cm}|p{10.3cm}|
.. c:type:: v4l2_event_subscription
.. flat-table:: struct v4l2_event_subscription
:header-rows: 0
:stub-columns: 0
:widths: 1 1 2
* - __u32
- ``type``
- Type of the event, see :ref:`event-type`.
.. note::
``V4L2_EVENT_ALL`` can be used with
:ref:`VIDIOC_UNSUBSCRIBE_EVENT <VIDIOC_SUBSCRIBE_EVENT>` for
unsubscribing all events at once.
* - __u32
- ``id``
- ID of the event source. If there is no ID associated with the
event source, then set this to 0. Whether or not an event needs an
ID depends on the event type.
* - __u32
- ``flags``
- Event flags, see :ref:`event-flags`.
* - __u32
- ``reserved``\ [5]
- Reserved for future extensions. Drivers and applications must set
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.