Lines Matching +full:audio +full:- +full:video
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
4 .. _diff-v4l:
10 The Video For Linux API was first introduced in Linux 2.1 to unify and
21 for V4L2 video capture, overlay, radio and raw vbi capture devices did
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
70 device types like this, better think of basic video input, video output
71 and radio devices supporting a set of related functions like video
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
108 * - ``VID_TYPE_CLIPPING``
109 - ``V4L2_FBUF_CAP_LIST_CLIPPING`` and
112 - Whether clipping the overlaid image is supported, see
114 * - ``VID_TYPE_FRAMERAM``
115 - ``V4L2_FBUF_CAP_EXTERNOVERLAY`` *not set* in field ``capability``
117 - Whether overlay overwrites frame buffer memory, see
119 * - ``VID_TYPE_SCALES``
120 - ``-``
121 - This flag indicates if the hardware can scale images. The V4L2 API
127 * - ``VID_TYPE_MONOCHROME``
128 - ``-``
129 - Applications can enumerate the supported image formats with the
133 * - ``VID_TYPE_SUBCAPTURE``
134 - ``-``
135 - Applications can call the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>`
140 * - ``VID_TYPE_MPEG_DECODER``
141 - ``-``
142 - Applications can enumerate the supported image formats with the
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.
160 ``V4L2_CAP_AUDIO``, indicating *if* the device has any audio inputs or
161 outputs. To determine their number applications can enumerate audio
163 audio ioctls are described in :ref:`audio`.
169 current video standard, cropping and scaling limitations.
171 Video Sources
175 ``video_channel`` to enumerate the video inputs of a V4L
180 :c:type:`v4l2_input` as discussed in :ref:`video`.
183 video input types were renamed as follows:
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``
198 input, V4L2 assumes each video input is connected to at most one tuner.
205 The redundant ``VIDEO_VC_TUNER`` flag was dropped. Video inputs
208 considers devices with up to 32 audio inputs. Each set bit in the
209 ``audioset`` field represents one audio input this video input combines
210 with. For information about audio inputs and how to switch between them
211 see :ref:`audio`.
213 The ``norm`` field describing the supported video standards was replaced
218 video standards, see :ref:`standard` for more information.
234 flags indicating the supported video standards were dropped. This
237 ``VIDEO_TUNER_NORM`` flag indicating whether the video standard can be
238 switched. The ``mode`` field to select a different video standard was
244 Japan with numbers 3-6 (sic).
248 permits the detection of monaural and bilingual audio, see the
263 .. _v4l-image-properties:
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``
299 The ``depth`` (average number of bits per pixel) of a video image is
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>`
348 Audio chapter
352 ``video_audio`` are used to enumerate the audio inputs
356 :c:type:`v4l2_audio` as discussed in :ref:`audio`.
358 The ``audio`` "channel number" field counting audio inputs was renamed
363 ``VIDEO_SOUND_LANG2`` audio demodulation modes. When the current audio
367 ``VIDIOCGAUDIO`` the driver returns the *actually received* audio
371 information on tuners. Related to audio modes struct
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``
405 ``video_audio`` ``step`` field. The V4L audio controls
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
449 to ``VIDEO_CLIP_BITMAP`` (-1) requests bitmap clipping, using a fixed
487 -------------------------------
499 ``VIDIOCSWIN`` ioctls. V4L2 uses the general-purpose data format
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,
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
543 * - The ``VIDIOCMCAPTURE`` ioctl prepares a buffer for capturing. It
546 video signal had been detected. When the driver supports more than
552 - Drivers maintain an incoming and outgoing queue.
566 For a more in-depth discussion of memory mapping and examples, see
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`.
623 find the VBI device associated with a video capture device (or vice
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`.