^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) .. _common:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) ###################
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) Common API Elements
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) ###################
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) Programming a V4L2 device consists of these steps:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) - Opening the device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) - Changing device properties, selecting a video and audio input, video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) standard, picture brightness a. o.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) - Negotiating a data format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) - Negotiating an input/output method
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) - The actual input/output loop
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) - Closing the device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) In practice most steps are optional and can be executed out of order. It
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) depends on the V4L2 device type, you can read about the details in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) :ref:`devices`. In this chapter we will discuss the basic concepts
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) applicable to all devices.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) .. toctree::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) :maxdepth: 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) open
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) querycap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) app-pri
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) video
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) audio
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) tuner
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) standard
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) dv-timings
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) control
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) extended-controls
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) ext-ctrls-camera
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) ext-ctrls-flash
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) ext-ctrls-image-source
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) ext-ctrls-image-process
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) ext-ctrls-codec
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) ext-ctrls-jpeg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) ext-ctrls-dv
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) ext-ctrls-rf-tuner
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) ext-ctrls-fm-tx
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) ext-ctrls-fm-rx
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) ext-ctrls-detect
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) ext-ctrls-colorimetry
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) fourcc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) format
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) planar-apis
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) selection-api
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) crop
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) streaming-par