Lines Matching +full:ref +full:-

1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
4 .. _diff-v4l:
14 V4L calls were removed from Kernel, but the library :ref:`libv4l`
22 not change from those used by V4L. They are listed in :ref:`devices`
23 and below in :ref:`v4l-dev`.
25 The teletext devices (minor range 192-223) have been removed in V4L2 and
35 .. _v4l-dev:
37 .. flat-table:: V4L Device Types, Names and Numbers
38 :header-rows: 1
39 :stub-columns: 0
41 * - Device Type
42 - File Name
43 - Minor Numbers
44 * - Video capture and overlay
45 - ``/dev/video`` and ``/dev/bttv0``\ [#f1]_, ``/dev/video0`` to
47 - 0-63
48 * - Radio receiver
49 - ``/dev/radio``\ [#f2]_, ``/dev/radio0`` to ``/dev/radio63``
50 - 64-127
51 * - Raw VBI capture
52 - ``/dev/vbi``, ``/dev/vbi0`` to ``/dev/vbi31``
53 - 224-255
56 V4L2 drivers *may* support multiple opens, see :ref:`open` for details
65 :ref:`VIDIOC_QUERYCAP`.
72 capturing, video overlay and VBI capturing. See :ref:`open` for an
83 .. flat-table::
84 :header-rows: 1
85 :stub-columns: 0
87 * - ``struct video_capability`` ``type``
88 - struct :c:type:`v4l2_capability`
90 - Purpose
91 * - ``VID_TYPE_CAPTURE``
92 - ``V4L2_CAP_VIDEO_CAPTURE``
93 - The :ref:`video capture <capture>` interface is supported.
94 * - ``VID_TYPE_TUNER``
95 - ``V4L2_CAP_TUNER``
96 - The device has a :ref:`tuner or modulator <tuner>`.
97 * - ``VID_TYPE_TELETEXT``
98 - ``V4L2_CAP_VBI_CAPTURE``
99 - The :ref:`raw VBI capture <raw-vbi>` interface is supported.
100 * - ``VID_TYPE_OVERLAY``
101 - ``V4L2_CAP_VIDEO_OVERLAY``
102 - The :ref:`video overlay <overlay>` interface is supported.
103 * - ``VID_TYPE_CHROMAKEY``
104 - ``V4L2_FBUF_CAP_CHROMAKEY`` in field ``capability`` of struct
106 - Whether chromakey overlay is supported. For more information on
107 overlay see :ref:`overlay`.
108 * - ``VID_TYPE_CLIPPING``
109 - ``V4L2_FBUF_CAP_LIST_CLIPPING`` and
112 - Whether clipping the overlaid image is supported, see
113 :ref:`overlay`.
114 * - ``VID_TYPE_FRAMERAM``
115 - ``V4L2_FBUF_CAP_EXTERNOVERLAY`` *not set* in field ``capability``
117 - Whether overlay overwrites frame buffer memory, see
118 :ref:`overlay`.
119 * - ``VID_TYPE_SCALES``
120 - ``-``
121 - This flag indicates if the hardware can scale images. The V4L2 API
123 image size with the :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` and
124 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, respectively. The
126 cropping and scaling see :ref:`crop`.
127 * - ``VID_TYPE_MONOCHROME``
128 - ``-``
129 - Applications can enumerate the supported image formats with the
130 :ref:`VIDIOC_ENUM_FMT` ioctl to determine if
132 information on image formats see :ref:`pixfmt`.
133 * - ``VID_TYPE_SUBCAPTURE``
134 - ``-``
135 - Applications can call the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>`
139 and scaling see :ref:`crop`.
140 * - ``VID_TYPE_MPEG_DECODER``
141 - ``-``
142 - Applications can enumerate the supported image formats with the
143 :ref:`VIDIOC_ENUM_FMT` ioctl to determine if
145 * - ``VID_TYPE_MPEG_ENCODER``
146 - ``-``
147 - See above.
148 * - ``VID_TYPE_MJPEG_DECODER``
149 - ``-``
150 - See above.
151 * - ``VID_TYPE_MJPEG_ENCODER``
152 - ``-``
153 - See above.
162 inputs with the :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` ioctl. The
163 audio ioctls are described in :ref:`audio`.
166 were removed. Calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or
167 :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl with the desired
177 :ref:`VIDIOC_ENUMINPUT`,
178 :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` and
179 :ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>` using struct
180 :c:type:`v4l2_input` as discussed in :ref:`video`.
186 .. flat-table::
187 :header-rows: 1
188 :stub-columns: 0
190 * - struct ``video_channel`` ``type``
191 - struct :c:type:`v4l2_input` ``type``
192 * - ``VIDEO_TYPE_TV``
193 - ``V4L2_INPUT_TYPE_TUNER``
194 * - ``VIDEO_TYPE_CAMERA``
195 - ``V4L2_INPUT_TYPE_CAMERA``
203 discussed in :ref:`tuner`.
211 see :ref:`audio`.
218 video standards, see :ref:`standard` for more information.
226 :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` and
227 :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` using struct
228 :c:type:`v4l2_tuner`. Tuners are covered in :ref:`tuner`.
240 :ref:`standard`. Due to its ubiquity it should be mentioned the BTTV
244 Japan with numbers 3-6 (sic).
258 :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and
259 :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>`. They take a pointer
263 .. _v4l-image-properties:
271 :ref:`VIDIOC_QUERYCTRL`,
272 :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
273 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls:
276 .. flat-table::
277 :header-rows: 1
278 :stub-columns: 0
280 * - struct ``video_picture``
281 - V4L2 Control ID
282 * - ``brightness``
283 - ``V4L2_CID_BRIGHTNESS``
284 * - ``hue``
285 - ``V4L2_CID_HUE``
286 * - ``colour``
287 - ``V4L2_CID_SATURATION``
288 * - ``contrast``
289 - ``V4L2_CID_CONTRAST``
290 * - ``whiteness``
291 - ``V4L2_CID_WHITENESS``
296 :ref:`VIDIOC_QUERYCTRL` ioctl. For general
297 information about controls see :ref:`control`.
306 .. flat-table::
307 :header-rows: 1
308 :stub-columns: 0
310 * - struct ``video_picture`` ``palette``
311 - struct :c:type:`v4l2_pix_format` ``pixfmt``
312 * - ``VIDEO_PALETTE_GREY``
313 - :ref:`V4L2_PIX_FMT_GREY <V4L2-PIX-FMT-GREY>`
314 * - ``VIDEO_PALETTE_HI240``
315 - :ref:`V4L2_PIX_FMT_HI240 <pixfmt-reserved>` [#f3]_
316 * - ``VIDEO_PALETTE_RGB565``
317 - :ref:`V4L2_PIX_FMT_RGB565 <pixfmt-rgb>`
318 * - ``VIDEO_PALETTE_RGB555``
319 - :ref:`V4L2_PIX_FMT_RGB555 <pixfmt-rgb>`
320 * - ``VIDEO_PALETTE_RGB24``
321 - :ref:`V4L2_PIX_FMT_BGR24 <pixfmt-rgb>`
322 * - ``VIDEO_PALETTE_RGB32``
323 - :ref:`V4L2_PIX_FMT_BGR32 <pixfmt-rgb>` [#f4]_
324 * - ``VIDEO_PALETTE_YUV422``
325 - :ref:`V4L2_PIX_FMT_YUYV <V4L2-PIX-FMT-YUYV>`
326 * - ``VIDEO_PALETTE_YUYV``\ [#f5]_
327 - :ref:`V4L2_PIX_FMT_YUYV <V4L2-PIX-FMT-YUYV>`
328 * - ``VIDEO_PALETTE_UYVY``
329 - :ref:`V4L2_PIX_FMT_UYVY <V4L2-PIX-FMT-UYVY>`
330 * - ``VIDEO_PALETTE_YUV420``
331 - None
332 * - ``VIDEO_PALETTE_YUV411``
333 - :ref:`V4L2_PIX_FMT_Y41P <V4L2-PIX-FMT-Y41P>` [#f6]_
334 * - ``VIDEO_PALETTE_RAW``
335 - None [#f7]_
336 * - ``VIDEO_PALETTE_YUV422P``
337 - :ref:`V4L2_PIX_FMT_YUV422P <V4L2-PIX-FMT-YUV422P>`
338 * - ``VIDEO_PALETTE_YUV411P``
339 - :ref:`V4L2_PIX_FMT_YUV411P <V4L2-PIX-FMT-YUV411P>` [#f8]_
340 * - ``VIDEO_PALETTE_YUV420P``
341 - :ref:`V4L2_PIX_FMT_YVU420 <V4L2-PIX-FMT-YVU420>`
342 * - ``VIDEO_PALETTE_YUV410P``
343 - :ref:`V4L2_PIX_FMT_YVU410 <V4L2-PIX-FMT-YVU410>`
345 V4L2 image formats are defined in :ref:`pixfmt`. The image format can
346 be selected with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
354 :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` and
355 :ref:`VIDIOC_S_AUDIO <VIDIOC_G_AUDIO>` using struct
356 :c:type:`v4l2_audio` as discussed in :ref:`audio`.
370 ``audmode`` fields, respectively. See :ref:`tuner` for more
376 :ref:`VIDIOC_QUERYCTRL`,
377 :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` and
378 :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls:
381 .. flat-table::
382 :header-rows: 1
383 :stub-columns: 0
385 * - struct ``video_audio``
386 - V4L2 Control ID
387 * - ``volume``
388 - ``V4L2_CID_AUDIO_VOLUME``
389 * - ``bass``
390 - ``V4L2_CID_AUDIO_BASS``
391 * - ``treble``
392 - ``V4L2_CID_AUDIO_TREBLE``
393 * - ``balance``
394 - ``V4L2_CID_AUDIO_BALANCE``
399 :ref:`VIDIOC_QUERYCTRL` ioctl reports if the
408 the :ref:`VIDIOC_QUERYCTRL` ioctl. For general
409 information about controls see :ref:`control`.
415 :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` and
416 :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>`. The ``base`` field of struct
418 a flag to indicate non-destructive overlays instead of a ``NULL``
422 field was replaced by ``pixelformat``. See :ref:`pixfmt-rgb` for a
426 uses the general-purpose data format negotiation ioctls
427 :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
428 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`. They take a pointer to a struct
449 to ``VIDEO_CLIP_BITMAP`` (-1) requests bitmap clipping, using a fixed
455 :ref:`VIDIOC_OVERLAY`.
463 :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and
464 :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` using struct
466 :ref:`VIDIOC_CROPCAP` ioctl. This is a rather
467 complex matter, see :ref:`crop` for details.
481 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
487 -------------------------------
493 :ref:`VIDIOC_QUERYCAP` ioctl. All V4L2 devices
499 ``VIDIOCSWIN`` ioctls. V4L2 uses the general-purpose data format
500 negotiation ioctls :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
501 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`. They take a pointer to a struct
506 For more information about the V4L2 read interface see :ref:`rw`.
509 ------------------------------
512 memory, or more often just buffers allocated in DMA-able system memory,
518 .. flat-table::
519 :header-rows: 1
520 :stub-columns: 0
522 * - V4L
523 - V4L2
524 * -
525 - The image format must be selected before buffers are allocated,
526 with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. When no
529 * - Applications cannot change the number of buffers. The it is built
532 - The :ref:`VIDIOC_REQBUFS` ioctl allocates the
535 * - Drivers map all buffers as one contiguous range of memory. The
540 - Buffers are individually mapped. The offset and size of each
542 :ref:`VIDIOC_QUERYBUF` ioctl.
543 * - The ``VIDIOCMCAPTURE`` ioctl prepares a buffer for capturing. It
552 - Drivers maintain an incoming and outgoing queue.
553 :ref:`VIDIOC_QBUF` enqueues any empty buffer into
555 queue with the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. To wait
558 be used. The :ref:`VIDIOC_STREAMON` ioctl
561 :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` stops capturing and
564 :ref:`VIDIOC_ENUMINPUT` ioctl.
566 For a more in-depth discussion of memory mapping and examples, see
567 :ref:`mmap`.
574 driver supporting this interface was the BTTV driver, de-facto defining
579 .. flat-table::
580 :header-rows: 1
581 :stub-columns: 0
583 * - struct :c:type:`v4l2_vbi_format`
584 - V4L, BTTV driver
585 * - sampling_rate
586 - 28636363 Hz NTSC (or any other 525-line standard); 35468950 Hz PAL
587 and SECAM (625-line standards)
588 * - offset
589 - ?
590 * - samples_per_line
591 - 2048
592 * - sample_format
593 - V4L2_PIX_FMT_GREY. The last four bytes (a machine endianness
595 * - start[]
596 - 10, 273 NTSC; 22, 335 PAL and SECAM
597 * - count[]
598 - 16, 16 [#f9]_
599 * - flags
600 - 0
606 interface specified in :ref:`raw-vbi`.
625 :ref:`open`.
629 devices is documented in :ref:`extended-controls`.
632 According to Documentation/admin-guide/devices.rst these should be symbolic links
637 According to ``Documentation/admin-guide/devices.rst`` a symbolic link to
645 Presumably all V4L RGB formats are little-endian, although some
647 defines little-endian, big-endian and red/blue swapped variants. For
648 details see :ref:`pixfmt-rgb`.