Jsphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget7/translations/zh_CN/userspace-api/media/v4l/dev-overlaymodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/zh_TW/userspace-api/media/v4l/dev-overlaymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/it_IT/userspace-api/media/v4l/dev-overlaymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/ja_JP/userspace-api/media/v4l/dev-overlaymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/ko_KR/userspace-api/media/v4l/dev-overlaymodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget7/translations/sp_SP/userspace-api/media/v4l/dev-overlaymodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-laterh]h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhQ/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/dev-overlay.rsthKubhtarget)}(h .. _overlay:h]h}(h]h ]h"]h$]h&]refidoverlayuh1hhKhhhhhhubhsection)}(hhh](htitle)}(hVideo Overlay Interfaceh]hVideo Overlay Interface}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(h4**Also known as Framebuffer Overlay or Previewing.**h]hstrong)}(hhh]h0Also known as Framebuffer Overlay or Previewing.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hXVideo overlay devices have the ability to genlock (TV-)video into the (VGA-)video signal of a graphics card, or to store captured images directly in video memory of a graphics card, typically with clipping. This can be considerable more efficient than capturing images and displaying them by other means. In the old days when only nuclear power plants needed cooling towers this used to be the only way to put live video into a window.h]hXVideo overlay devices have the ability to genlock (TV-)video into the (VGA-)video signal of a graphics card, or to store captured images directly in video memory of a graphics card, typically with clipping. This can be considerable more efficient than capturing images and displaying them by other means. In the old days when only nuclear power plants needed cooling towers this used to be the only way to put live video into a window.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hvVideo overlay devices are accessed through the same character special files as :ref:`video capture ` devices.h](hOVideo overlay devices are accessed through the same character special files as }(hjhhhNhNubh)}(h:ref:`video capture `h]hinline)}(hj h]h video capture}(hjhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdoc#userspace-api/media/v4l/dev-overlay refdomainjreftyperef refexplicitrefwarn reftargetcaptureuh1hhhhKhjubh devices.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhnote)}(hThe default function of a ``/dev/video`` device is video capturing. The overlay function is only available after calling the :ref:`VIDIOC_S_FMT ` ioctl.h]h)}(hThe default function of a ``/dev/video`` device is video capturing. The overlay function is only available after calling the :ref:`VIDIOC_S_FMT ` ioctl.h](hThe default function of a }(hj=hhhNhNubhliteral)}(h``/dev/video``h]h /dev/video}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhj=ubhU device is video capturing. The overlay function is only available after calling the }(hj=hhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]j )}(hj[h]h VIDIOC_S_FMT}(hj]hhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hjYubah}(h]h ]h"]h$]h&]refdocj% refdomainjgreftyperef refexplicitrefwarnj+ vidioc_g_fmtuh1hhhhKhj=ubh ioctl.}(hj=hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj9ubah}(h]h ]h"]h$]h&]uh1j7hhhhhhhNubh)}(hXXThe driver may support simultaneous overlay and capturing using the read/write and streaming I/O methods. If so, operation at the nominal frame rate of the video standard is not guaranteed. Frames may be directed away from overlay to capture, or one field may be used for overlay and the other for capture if the capture parameters permit this.h]hXXThe driver may support simultaneous overlay and capturing using the read/write and streaming I/O methods. If so, operation at the nominal frame rate of the video standard is not guaranteed. Frames may be directed away from overlay to capture, or one field may be used for overlay and the other for capture if the capture parameters permit this.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hX?Applications should use different file descriptors for capturing and overlay. This must be supported by all drivers capable of simultaneous capturing and overlay. Optionally these drivers may also permit capturing and overlay with a single file descriptor for compatibility with V4L and earlier versions of V4L2. [#f1]_h](hX9Applications should use different file descriptors for capturing and overlay. This must be supported by all drivers capable of simultaneous capturing and overlay. Optionally these drivers may also permit capturing and overlay with a single file descriptor for compatibility with V4L and earlier versions of V4L2. }(hjhhhNhNubhfootnote_reference)}(h[#f1]_h]h1}(hjhhhNhNubah}(h]id1ah ]h"]h$]h&]autoKhf1docnamej%uh1jhjresolvedKubeh}(h]h ]h"]h$]h&]uh1hhhhK"hhhhubh)}(hA common application of two file descriptors is the X11 :ref:`Xv/V4L ` interface driver and a V4L2 application. While the X server controls video overlay, the application can take advantage of memory mapping and DMA.h](h8A common application of two file descriptors is the X11 }(hjhhhNhNubh)}(h:ref:`Xv/V4L `h]j )}(hjh]hXv/V4L}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hjubah}(h]h ]h"]h$]h&]refdocj% refdomainjreftyperef refexplicitrefwarnj+xvideouh1hhhhK(hjubh interface driver and a V4L2 application. While the X server controls video overlay, the application can take advantage of memory mapping and DMA.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK(hhhhubh)}(hhh](h)}(hQuerying Capabilitiesh]hQuerying Capabilities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK.ubh)}(hX&Devices supporting the video overlay interface set the ``V4L2_CAP_VIDEO_OVERLAY`` flag in the ``capabilities`` field of struct :c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl. The overlay I/O method specified below must be supported. Tuners and audio inputs are optional.h](h7Devices supporting the video overlay interface set the }(hjhhhNhNubjF)}(h``V4L2_CAP_VIDEO_OVERLAY``h]hV4L2_CAP_VIDEO_OVERLAY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubh flag in the }(hjhhhNhNubjF)}(h``capabilities``h]h capabilities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jEhjubh field of struct }(hjhhhNhNubh)}(h:c:type:`v4l2_capability`h]jF)}(hj+h]hv4l2_capability}(hj-hhhNhNubah}(h]h ](jcc-typeeh"]h$]h&]uh1jEhj)ubah}(h]h ]h"]h$]h&]refdocj% refdomainj7reftypetype refexplicitrefwarnj+v4l2_capabilityuh1hhhhK0hjubh returned by the }(hjhhhNhNubh)}(h:ref:`VIDIOC_QUERYCAP`h]j )}(hjOh]hVIDIOC_QUERYCAP}(hjQhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1j hjMubah}(h]h ]h"]h$]h&]refdocj% refdomainj[reftyperef refexplicitrefwarnj+vidioc_querycapuh1hhhhK0hjubhg ioctl. The overlay I/O method specified below must be supported. Tuners and audio inputs are optional.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK0hjhhubeh}(h]querying-capabilitiesah ]h"]querying capabilitiesah$]h&]uh1hhhhhhhhK.ubh)}(hhh](h)}(hSupplemental Functionsh]hSupplemental Functions}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK9ubh)}(hXGVideo overlay devices shall support :ref:`audio input