€•·qŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ3/translations/zh_CN/userspace-api/media/v4l/dev-osd”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/zh_TW/userspace-api/media/v4l/dev-osd”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/it_IT/userspace-api/media/v4l/dev-osd”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/ja_JP/userspace-api/media/v4l/dev-osd”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/ko_KR/userspace-api/media/v4l/dev-osd”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/pt_BR/userspace-api/media/v4l/dev-osd”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ3/translations/sp_SP/userspace-api/media/v4l/dev-osd”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later”h]”hŒ8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒM/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/dev-osd.rst”h´KubhŒtarget”“”)”}”(hŒ.. _osd:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œosd”uh1hÈh´Khhh²hh³hÇubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒVideo Output Overlay Interface”h]”hŒVideo Output Overlay Interface”…””}”(hhÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhhØh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒ)**Also known as On-Screen Display (OSD)**”h]”hŒstrong”“”)”}”(hhïh]”hŒ%Also known as On-Screen Display (OSD)”…””}”(hhóh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hñhhíubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K hhØh²hubhì)”}”(hŒìSome video output devices can overlay a framebuffer image onto the outgoing video signal. Applications can set up such an overlay using this interface, which borrows structures and ioctls of the :ref:`Video Overlay ` interface.”h]”(hŒÃSome video output devices can overlay a framebuffer image onto the outgoing video signal. Applications can set up such an overlay using this interface, which borrows structures and ioctls of the ”…””}”(hjh²hh³Nh´Nubh)”}”(hŒ:ref:`Video Overlay `”h]”hŒinline”“”)”}”(hjh]”hŒ Video Overlay”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(Œxref”Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œuserspace-api/media/v4l/dev-osd”Œ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆŒ reftarget”Œoverlay”uh1hh³hÇh´K hjubhŒ interface.”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K hhØh²hubhì)”}”(hŒuThe OSD function is accessible through the same character special file as the :ref:`Video Output ` function.”h]”(hŒNThe OSD function is accessible through the same character special file as the ”…””}”(hj=h²hh³Nh´Nubh)”}”(hŒ:ref:`Video Output `”h]”j)”}”(hjGh]”hŒ Video Output”…””}”(hjIh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjEubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”jSŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj1Œcapture”uh1hh³hÇh´Khj=ubhŒ function.”…””}”(hj=h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KhhØh²hubhŒnote”“”)”}”(hŒ±The default function of such a ``/dev/video`` device is video capturing or output. The OSD function is only available after calling the :ref:`VIDIOC_S_FMT ` ioctl.”h]”hì)”}”(hŒ±The default function of such a ``/dev/video`` device is video capturing or output. The OSD function is only available after calling the :ref:`VIDIOC_S_FMT ` ioctl.”h]”(hŒThe default function of such a ”…””}”(hjuh²hh³Nh´NubhŒliteral”“”)”}”(hŒ``/dev/video``”h]”hŒ /dev/video”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjuubhŒ[ device is video capturing or output. The OSD function is only available after calling the ”…””}”(hjuh²hh³Nh´Nubh)”}”(hŒ":ref:`VIDIOC_S_FMT `”h]”j)”}”(hj“h]”hŒ VIDIOC_S_FMT”…””}”(hj•h²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj‘ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”jŸŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj1Œ vidioc_g_fmt”uh1hh³hÇh´KhjuubhŒ ioctl.”…””}”(hjuh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Khjqubah}”(h]”h ]”h"]”h$]”h&]”uh1johhØh²hh³hÇh´Nubh×)”}”(hhh]”(hÜ)”}”(hŒQuerying Capabilities”h]”hŒQuerying Capabilities”…””}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjÁh²hh³hÇh´Kubhì)”}”(hŒÖDevices supporting the *Video Output Overlay* interface set the ``V4L2_CAP_VIDEO_OUTPUT_OVERLAY`` flag in the ``capabilities`` field of struct :c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl.”h]”(hŒDevices supporting the ”…””}”(hjÒh²hh³Nh´NubhŒemphasis”“”)”}”(hŒ*Video Output Overlay*”h]”hŒVideo Output Overlay”…””}”(hjÜh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÚhjÒubhŒ interface set the ”…””}”(hjÒh²hh³Nh´Nubj~)”}”(hŒ!``V4L2_CAP_VIDEO_OUTPUT_OVERLAY``”h]”hŒV4L2_CAP_VIDEO_OUTPUT_OVERLAY”…””}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjÒubhŒ flag in the ”…””}”(hjÒh²hh³Nh´Nubj~)”}”(hŒ``capabilities``”h]”hŒ capabilities”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjÒubhŒ field of struct ”…””}”(hjÒh²hh³Nh´Nubh)”}”(hŒ:c:type:`v4l2_capability`”h]”j~)”}”(hjh]”hŒv4l2_capability”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(jŒc”Œc-type”eh"]”h$]”h&]”uh1j}hjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰Œ c:parent_key”Œsphinx.domains.c”Œ LookupKey”“”)”}”Œdata”]”j2Œ ASTIdentifier”“”)”}”Œ identifier”ŒV4L”sbN†”asbj1Œv4l2_capability”uh1hh³hÇh´KhjÒubhŒ returned by the ”…””}”(hjÒh²hh³Nh´Nubh)”}”(hŒ:ref:`VIDIOC_QUERYCAP`”h]”j)”}”(hjGh]”hŒVIDIOC_QUERYCAP”…””}”(hjIh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjEubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”jSŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj1Œvidioc_querycap”uh1hh³hÇh´KhjÒubhŒ ioctl.”…””}”(hjÒh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KhjÁh²hubeh}”(h]”Œquerying-capabilities”ah ]”h"]”Œquerying capabilities”ah$]”h&]”uh1hÖhhØh²hh³hÇh´Kubh×)”}”(hhh]”(hÜ)”}”(hŒ Framebuffer”h]”hŒ Framebuffer”…””}”(hjzh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjwh²hh³hÇh´K%ubhì)”}”(hXÜContrary to the *Video Overlay* interface the framebuffer is normally implemented on the TV card and not the graphics card. On Linux it is accessible as a framebuffer device (``/dev/fbN``). Given a V4L2 device, applications can find the corresponding framebuffer device by calling the :ref:`VIDIOC_G_FBUF ` ioctl. It returns, amongst other information, the physical address of the framebuffer in the ``base`` field of struct :c:type:`v4l2_framebuffer`. The framebuffer device ioctl ``FBIOGET_FSCREENINFO`` returns the same address in the ``smem_start`` field of struct :c:type:`fb_fix_screeninfo`. The ``FBIOGET_FSCREENINFO`` ioctl and struct :c:type:`fb_fix_screeninfo` are defined in the ``linux/fb.h`` header file.”h]”(hŒContrary to the ”…””}”(hjˆh²hh³Nh´NubjÛ)”}”(hŒ*Video Overlay*”h]”hŒ Video Overlay”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÚhjˆubhŒ interface the framebuffer is normally implemented on the TV card and not the graphics card. On Linux it is accessible as a framebuffer device (”…””}”(hjˆh²hh³Nh´Nubj~)”}”(hŒ ``/dev/fbN``”h]”hŒ/dev/fbN”…””}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjˆubhŒb). Given a V4L2 device, applications can find the corresponding framebuffer device by calling the ”…””}”(hjˆh²hh³Nh´Nubh)”}”(hŒ$:ref:`VIDIOC_G_FBUF `”h]”j)”}”(hj¶h]”hŒ VIDIOC_G_FBUF”…””}”(hj¸h²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj´ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”jÂŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj1Œ vidioc_g_fbuf”uh1hh³hÇh´K'hjˆubhŒ^ ioctl. It returns, amongst other information, the physical address of the framebuffer in the ”…””}”(hjˆh²hh³Nh´Nubj~)”}”(hŒ``base``”h]”hŒbase”…””}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjˆubhŒ field of struct ”…””}”(hjˆh²hh³Nh´Nubh)”}”(hŒ:c:type:`v4l2_framebuffer`”h]”j~)”}”(hjìh]”hŒv4l2_framebuffer”…””}”(hjîh²hh³Nh´Nubah}”(h]”h ]”(jj Œc-type”eh"]”h$]”h&]”uh1j}hjêubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰j1j5j1Œv4l2_framebuffer”uh1hh³hÇh´K'hjˆubhŒ. The framebuffer device ioctl ”…””}”(hjˆh²hh³Nh´Nubj~)”}”(hŒ``FBIOGET_FSCREENINFO``”h]”hŒFBIOGET_FSCREENINFO”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjˆubhŒ! returns the same address in the ”…””}”(hjˆh²hh³Nh´Nubj~)”}”(hŒ``smem_start``”h]”hŒ smem_start”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjˆubhŒ field of struct ”…””}”(hjˆh²hh³Nh´Nubh)”}”(hŒ:c:type:`fb_fix_screeninfo`”h]”j~)”}”(hj3h]”hŒfb_fix_screeninfo”…””}”(hj5h²hh³Nh´Nubah}”(h]”h ]”(jj Œc-type”eh"]”h$]”h&]”uh1j}hj1ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰j1j5j1Œfb_fix_screeninfo”uh1hh³hÇh´K'hjˆubhŒ. The ”…””}”(hjˆh²hh³Nh´Nubj~)”}”(hŒ``FBIOGET_FSCREENINFO``”h]”hŒFBIOGET_FSCREENINFO”…””}”(hjTh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjˆubhŒ ioctl and struct ”…””}”(hjˆh²hh³Nh´Nubh)”}”(hŒ:c:type:`fb_fix_screeninfo`”h]”j~)”}”(hjhh]”hŒfb_fix_screeninfo”…””}”(hjjh²hh³Nh´Nubah}”(h]”h ]”(jj Œc-type”eh"]”h$]”h&]”uh1j}hjfubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰j1j5j1Œfb_fix_screeninfo”uh1hh³hÇh´K'hjˆubhŒ are defined in the ”…””}”(hjˆh²hh³Nh´Nubj~)”}”(hŒ``linux/fb.h``”h]”hŒ linux/fb.h”…””}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hjˆubhŒ header file.”…””}”(hjˆh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K'hjwh²hubhì)”}”(hX!The width and height of the framebuffer depends on the current video standard. A V4L2 driver may reject attempts to change the video standard (or any other ioctl which would imply a framebuffer size change) with an ``EBUSY`` error code until all applications closed the framebuffer device.”h]”(hŒ×The width and height of the framebuffer depends on the current video standard. A V4L2 driver may reject attempts to change the video standard (or any other ioctl which would imply a framebuffer size change) with an ”…””}”(hj¡h²hh³Nh´Nubj~)”}”(hŒ ``EBUSY``”h]”hŒEBUSY”…””}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj¡ubhŒA error code until all applications closed the framebuffer device.”…””}”(hj¡h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K4hjwh²hubh×)”}”(hhh]”(hÜ)”}”(hŒ-Example: Finding a framebuffer device for OSD”h]”hŒ-Example: Finding a framebuffer device for OSD”…””}”(hjÄh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjÁh²hh³hÇh´K:ubhŒ literal_block”“”)”}”(hXÃ#include struct v4l2_framebuffer fbuf; unsigned int i; int fb_fd; if (-1 == ioctl(fd, VIDIOC_G_FBUF, &fbuf)) { perror("VIDIOC_G_FBUF"); exit(EXIT_FAILURE); } for (i = 0; i < 30; i++) { char dev_name[16]; struct fb_fix_screeninfo si; snprintf(dev_name, sizeof(dev_name), "/dev/fb%u", i); fb_fd = open(dev_name, O_RDWR); if (-1 == fb_fd) { switch (errno) { case ENOENT: /* no such file */ case ENXIO: /* no driver */ continue; default: perror("open"); exit(EXIT_FAILURE); } } if (0 == ioctl(fb_fd, FBIOGET_FSCREENINFO, &si)) { if (si.smem_start == (unsigned long)fbuf.base) break; } else { /* Apparently not a framebuffer device. */ } close(fb_fd); fb_fd = -1; } /* fb_fd is the file descriptor of the framebuffer device for the video output overlay, or -1 if no device was found. */”h]”hXÃ#include struct v4l2_framebuffer fbuf; unsigned int i; int fb_fd; if (-1 == ioctl(fd, VIDIOC_G_FBUF, &fbuf)) { perror("VIDIOC_G_FBUF"); exit(EXIT_FAILURE); } for (i = 0; i < 30; i++) { char dev_name[16]; struct fb_fix_screeninfo si; snprintf(dev_name, sizeof(dev_name), "/dev/fb%u", i); fb_fd = open(dev_name, O_RDWR); if (-1 == fb_fd) { switch (errno) { case ENOENT: /* no such file */ case ENXIO: /* no driver */ continue; default: perror("open"); exit(EXIT_FAILURE); } } if (0 == ioctl(fb_fd, FBIOGET_FSCREENINFO, &si)) { if (si.smem_start == (unsigned long)fbuf.base) break; } else { /* Apparently not a framebuffer device. */ } close(fb_fd); fb_fd = -1; } /* fb_fd is the file descriptor of the framebuffer device for the video output overlay, or -1 if no device was found. */”…””}”hjÔsbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆŒforce”‰Œlanguage”j Œhighlight_args”}”uh1jÒh³hÇh´K` interface.”h]”(hXŸThe overlay is controlled by source and target rectangles. The source rectangle selects a subsection of the framebuffer image to be overlaid, the target rectangle an area in the outgoing video signal where the image will appear. Drivers may or may not support scaling, and arbitrary sizes and positions of these rectangles. Further drivers may support any (or none) of the clipping/blending methods defined for the ”…””}”(hjh²hh³Nh´Nubh)”}”(hŒ:ref:`Video Overlay `”h]”j)”}”(hjh]”hŒ Video Overlay”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj1Œoverlay”uh1hh³hÇh´KnhjubhŒ interface.”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Knhjöh²hubhì)”}”(hXA struct :c:type:`v4l2_window` defines the size of the source rectangle, its position in the framebuffer and the clipping/blending method to be used for the overlay. To get the current parameters applications set the ``type`` field of a struct :c:type:`v4l2_format` to ``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY`` and call the :ref:`VIDIOC_G_FMT ` ioctl. The driver fills the struct :c:type:`v4l2_window` substructure named ``win``. It is not possible to retrieve a previously programmed clipping list or bitmap.”h]”(hŒ A struct ”…””}”(hj9h²hh³Nh´Nubh)”}”(hŒ:c:type:`v4l2_window`”h]”j~)”}”(hjCh]”hŒ v4l2_window”…””}”(hjEh²hh³Nh´Nubah}”(h]”h ]”(jj Œc-type”eh"]”h$]”h&]”uh1j}hjAubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰j1j5j1Œ v4l2_window”uh1hh³hÇh´Kvhj9ubhŒ» defines the size of the source rectangle, its position in the framebuffer and the clipping/blending method to be used for the overlay. To get the current parameters applications set the ”…””}”(hj9h²hh³Nh´Nubj~)”}”(hŒ``type``”h]”hŒtype”…””}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj9ubhŒ field of a struct ”…””}”(hj9h²hh³Nh´Nubh)”}”(hŒ:c:type:`v4l2_format`”h]”j~)”}”(hjxh]”hŒ v4l2_format”…””}”(hjzh²hh³Nh´Nubah}”(h]”h ]”(jj Œc-type”eh"]”h$]”h&]”uh1j}hjvubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰j1j5j1Œ v4l2_format”uh1hh³hÇh´Kvhj9ubhŒ to ”…””}”(hj9h²hh³Nh´Nubj~)”}”(hŒ&``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY``”h]”hŒ"V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY”…””}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj9ubhŒ and call the ”…””}”(hj9h²hh³Nh´Nubh)”}”(hŒ":ref:`VIDIOC_G_FMT `”h]”j)”}”(hj­h]”hŒ VIDIOC_G_FMT”…””}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj«ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”j¹Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj1Œ vidioc_g_fmt”uh1hh³hÇh´Kvhj9ubhŒ$ ioctl. The driver fills the struct ”…””}”(hj9h²hh³Nh´Nubh)”}”(hŒ:c:type:`v4l2_window`”h]”j~)”}”(hjÑh]”hŒ v4l2_window”…””}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”(jj Œc-type”eh"]”h$]”h&]”uh1j}hjÏubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰j1j5j1Œ v4l2_window”uh1hh³hÇh´Kvhj9ubhŒ substructure named ”…””}”(hj9h²hh³Nh´Nubj~)”}”(hŒ``win``”h]”hŒwin”…””}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj9ubhŒQ. It is not possible to retrieve a previously programmed clipping list or bitmap.”…””}”(hj9h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´Kvhjöh²hubhì)”}”(hX€To program the source rectangle applications set the ``type`` field of a struct :c:type:`v4l2_format` to ``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY``, initialize the ``win`` substructure and call the :ref:`VIDIOC_S_FMT ` ioctl. The driver adjusts the parameters against hardware limits and returns the actual parameters as :ref:`VIDIOC_G_FMT ` does. Like :ref:`VIDIOC_S_FMT `, the :ref:`VIDIOC_TRY_FMT ` ioctl can be used to learn about driver capabilities without actually changing driver state. Unlike :ref:`VIDIOC_S_FMT ` this also works after the overlay has been enabled.”h]”(hŒ5To program the source rectangle applications set the ”…””}”(hj h²hh³Nh´Nubj~)”}”(hŒ``type``”h]”hŒtype”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj ubhŒ field of a struct ”…””}”(hj h²hh³Nh´Nubh)”}”(hŒ:c:type:`v4l2_format`”h]”j~)”}”(hj&h]”hŒ v4l2_format”…””}”(hj(h²hh³Nh´Nubah}”(h]”h ]”(jj Œc-type”eh"]”h$]”h&]”uh1j}hj$ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰j1j5j1Œ v4l2_format”uh1hh³hÇh´K€hj ubhŒ to ”…””}”(hj h²hh³Nh´Nubj~)”}”(hŒ&``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY``”h]”hŒ"V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY”…””}”(hjGh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj ubhŒ, initialize the ”…””}”(hj h²hh³Nh´Nubj~)”}”(hŒ``win``”h]”hŒwin”…””}”(hjYh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj ubhŒ substructure and call the ”…””}”(hj h²hh³Nh´Nubh)”}”(hŒ":ref:`VIDIOC_S_FMT `”h]”j)”}”(hjmh]”hŒ VIDIOC_S_FMT”…””}”(hjoh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjkubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”jyŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj1Œ vidioc_g_fmt”uh1hh³hÇh´K€hj ubhŒg ioctl. The driver adjusts the parameters against hardware limits and returns the actual parameters as ”…””}”(hj h²hh³Nh´Nubh)”}”(hŒ":ref:`VIDIOC_G_FMT `”h]”j)”}”(hj‘h]”hŒ VIDIOC_G_FMT”…””}”(hj“h²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj1Œ vidioc_g_fmt”uh1hh³hÇh´K€hj ubhŒ does. Like ”…””}”(hj h²hh³Nh´Nubh)”}”(hŒ":ref:`VIDIOC_S_FMT `”h]”j)”}”(hjµh]”hŒ VIDIOC_S_FMT”…””}”(hj·h²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj³ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”jÁŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj1Œ vidioc_g_fmt”uh1hh³hÇh´K€hj ubhŒ, the ”…””}”(hj h²hh³Nh´Nubh)”}”(hŒ$:ref:`VIDIOC_TRY_FMT `”h]”j)”}”(hjÙh]”hŒVIDIOC_TRY_FMT”…””}”(hjÛh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj×ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”jåŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj1Œ vidioc_g_fmt”uh1hh³hÇh´K€hj ubhŒe ioctl can be used to learn about driver capabilities without actually changing driver state. Unlike ”…””}”(hj h²hh³Nh´Nubh)”}”(hŒ":ref:`VIDIOC_S_FMT `”h]”j)”}”(hjýh]”hŒ VIDIOC_S_FMT”…””}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjûubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”j Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj1Œ vidioc_g_fmt”uh1hh³hÇh´K€hj ubhŒ4 this also works after the overlay has been enabled.”…””}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K€hjöh²hubhì)”}”(hXÆA struct :c:type:`v4l2_crop` defines the size and position of the target rectangle. The scaling factor of the overlay is implied by the width and height given in struct :c:type:`v4l2_window` and struct :c:type:`v4l2_crop`. The cropping API applies to *Video Output* and *Video Output Overlay* devices in the same way as to *Video Capture* and *Video Overlay* devices, merely reversing the direction of the data flow. For more information see :ref:`crop`.”h]”(hŒ A struct ”…””}”(hj%h²hh³Nh´Nubh)”}”(hŒ:c:type:`v4l2_crop`”h]”j~)”}”(hj/h]”hŒ v4l2_crop”…””}”(hj1h²hh³Nh´Nubah}”(h]”h ]”(jj Œc-type”eh"]”h$]”h&]”uh1j}hj-ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰j1j5j1Œ v4l2_crop”uh1hh³hÇh´KŠhj%ubhŒ defines the size and position of the target rectangle. The scaling factor of the overlay is implied by the width and height given in struct ”…””}”(hj%h²hh³Nh´Nubh)”}”(hŒ:c:type:`v4l2_window`”h]”j~)”}”(hjRh]”hŒ v4l2_window”…””}”(hjTh²hh³Nh´Nubah}”(h]”h ]”(jj Œc-type”eh"]”h$]”h&]”uh1j}hjPubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰j1j5j1Œ v4l2_window”uh1hh³hÇh´KŠhj%ubhŒ and struct ”…””}”(hj%h²hh³Nh´Nubh)”}”(hŒ:c:type:`v4l2_crop`”h]”j~)”}”(hjuh]”hŒ v4l2_crop”…””}”(hjwh²hh³Nh´Nubah}”(h]”h ]”(jj Œc-type”eh"]”h$]”h&]”uh1j}hjsubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰j1j5j1Œ v4l2_crop”uh1hh³hÇh´KŠhj%ubhŒ. The cropping API applies to ”…””}”(hj%h²hh³Nh´NubjÛ)”}”(hŒ*Video Output*”h]”hŒ Video Output”…””}”(hj–h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÚhj%ubhŒ and ”…””}”(hj%h²hh³Nh´NubjÛ)”}”(hŒ*Video Output Overlay*”h]”hŒVideo Output Overlay”…””}”(hj¨h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÚhj%ubhŒ devices in the same way as to ”…””}”(hj%h²hh³Nh´NubjÛ)”}”(hŒ*Video Capture*”h]”hŒ Video Capture”…””}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÚhj%ubhŒ and ”…””}”hj%sbjÛ)”}”(hŒ*Video Overlay*”h]”hŒ Video Overlay”…””}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÚhj%ubhŒT devices, merely reversing the direction of the data flow. For more information see ”…””}”(hj%h²hh³Nh´Nubh)”}”(hŒ :ref:`crop`”h]”j)”}”(hjàh]”hŒcrop”…””}”(hjâh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÞubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j+Œ refdomain”jìŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj1Œcrop”uh1hh³hÇh´KŠhj%ubhŒ.”…””}”(hj%h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KŠhjöh²hubeh}”(h]”Œoverlay-window-and-scaling”ah ]”h"]”Œoverlay window and scaling”ah$]”h&]”uh1hÖhhØh²hh³hÇh´Klubh×)”}”(hhh]”(hÜ)”}”(hŒEnabling Overlay”h]”hŒEnabling Overlay”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjh²hh³hÇh´K”ubhì)”}”(hŒThere is no V4L2 ioctl to enable or disable the overlay, however the framebuffer interface of the driver may support the ``FBIOBLANK`` ioctl.”h]”(hŒyThere is no V4L2 ioctl to enable or disable the overlay, however the framebuffer interface of the driver may support the ”…””}”(hj!h²hh³Nh´Nubj~)”}”(hŒ ``FBIOBLANK``”h]”hŒ FBIOBLANK”…””}”(hj)h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j}hj!ubhŒ ioctl.”…””}”(hj!h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K–hjh²hubeh}”(h]”Œenabling-overlay”ah ]”h"]”Œenabling overlay”ah$]”h&]”uh1hÖhhØh²hh³hÇh´K”ubeh}”(h]”(Œvideo-output-overlay-interface”hÕeh ]”h"]”(Œvideo output overlay interface”Œosd”eh$]”h&]”uh1hÖhhh²hh³hÇh´KŒexpect_referenced_by_name”}”jOhÊsŒexpect_referenced_by_id”}”hÕhÊsubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÛNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jyŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”hÕ]”hÊasŒnameids”}”(jOhÕjNjKjtjqjójðjëjèj j jFjCuŒ nametypes”}”(jOˆjN‰jt‰jó‰jë‰j ‰jF‰uh}”(hÕhØjKhØjqjÁjðjwjèjÁj jöjCjuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”hŒsystem_message”“”)”}”(hhh]”hì)”}”(hhh]”hŒ)Hyperlink target "osd" is not referenced.”…””}”hjãsbah}”(h]”h ]”h"]”h$]”h&]”uh1hëhjàubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÇŒline”Kuh1jÞubaŒ transformer”NŒ include_log”]”Œ decoration”Nh²hub.