€•~pŒ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Œ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 ”…””}”(hhòhžhhŸNh Nubh)”}”(hŒ:ref:`Video Overlay `”h]”hŒinline”“”)”}”(hhüh]”hŒ Video Overlay”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(Œxref”Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhhúubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œuserspace-api/media/v4l/dev-osd”Œ refdomain”j Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆŒ reftarget”Œoverlay”uh1hhŸh³h K hhòubhŒ interface.”…””}”(hhòhž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]”hÿ)”}”(hj3h]”hŒ Video Output”…””}”(hj5hžhhŸNh Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhj1ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j?Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ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 ”…””}”(hjahžhhŸNh NubhŒliteral”“”)”}”(hŒ``/dev/video``”h]”hŒ /dev/video”…””}”(hjkhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjaubhŒ[ device is video capturing or output. The OSD function is only available after calling the ”…””}”(hjahžhhŸNh Nubh)”}”(hŒ":ref:`VIDIOC_S_FMT `”h]”hÿ)”}”(hjh]”hŒ VIDIOC_S_FMT”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhj}ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j‹Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ vidioc_g_fmt”uh1hhŸh³h KhjaubhŒ ioctl.”…””}”(hjahžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h Khj]ubah}”(h]”h ]”h"]”h$]”h&]”uh1j[hhÄ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 Nubjj)”}”(hŒ!``V4L2_CAP_VIDEO_OUTPUT_OVERLAY``”h]”hŒV4L2_CAP_VIDEO_OUTPUT_OVERLAY”…””}”(hjÚhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihj¾ubhŒ flag in the ”…””}”(hj¾hžhhŸNh Nubjj)”}”(hŒ``capabilities``”h]”hŒ capabilities”…””}”(hjìhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihj¾ubhŒ field of struct ”…””}”(hj¾hžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_capability`”h]”jj)”}”(hjh]”hŒv4l2_capability”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(j Œc”Œc-type”eh"]”h$]”h&]”uh1jihjþubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰Œ c:parent_key”Œsphinx.domains.c”Œ LookupKey”“”)”}”Œdata”]”jŒ ASTIdentifier”“”)”}”Œ identifier”ŒV4L”sbN†”asbjŒv4l2_capability”uh1hhŸh³h Khj¾ubhŒ returned by the ”…””}”(hj¾hžhhŸNh Nubh)”}”(hŒ:ref:`VIDIOC_QUERYCAP`”h]”hÿ)”}”(hj3h]”hŒVIDIOC_QUERYCAP”…””}”(hj5hžhhŸNh Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhj1ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j?Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjŒ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”…””}”(hjfhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhjchž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 ”…””}”(hjthžhhŸNh NubjÇ)”}”(hŒ*Video Overlay*”h]”hŒ Video Overlay”…””}”(hj|hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆhjtubhŒ interface the framebuffer is normally implemented on the TV card and not the graphics card. On Linux it is accessible as a framebuffer device (”…””}”(hjthžhhŸNh Nubjj)”}”(hŒ ``/dev/fbN``”h]”hŒ/dev/fbN”…””}”(hjŽhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjtubhŒb). Given a V4L2 device, applications can find the corresponding framebuffer device by calling the ”…””}”(hjthžhhŸNh Nubh)”}”(hŒ$:ref:`VIDIOC_G_FBUF `”h]”hÿ)”}”(hj¢h]”hŒ VIDIOC_G_FBUF”…””}”(hj¤hžhhŸNh Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhj ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j®Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ vidioc_g_fbuf”uh1hhŸh³h K'hjtubhŒ^ ioctl. It returns, amongst other information, the physical address of the framebuffer in the ”…””}”(hjthžhhŸNh Nubjj)”}”(hŒ``base``”h]”hŒbase”…””}”(hjÄhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjtubhŒ field of struct ”…””}”(hjthžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_framebuffer`”h]”jj)”}”(hjØh]”hŒv4l2_framebuffer”…””}”(hjÚhžhhŸNh Nubah}”(h]”h ]”(j j Œc-type”eh"]”h$]”h&]”uh1jihjÖubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jj!jŒv4l2_framebuffer”uh1hhŸh³h K'hjtubhŒ. The framebuffer device ioctl ”…””}”(hjthžhhŸNh Nubjj)”}”(hŒ``FBIOGET_FSCREENINFO``”h]”hŒFBIOGET_FSCREENINFO”…””}”(hjùhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjtubhŒ! returns the same address in the ”…””}”(hjthžhhŸNh Nubjj)”}”(hŒ``smem_start``”h]”hŒ smem_start”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjtubhŒ field of struct ”…””}”(hjthžhhŸNh Nubh)”}”(hŒ:c:type:`fb_fix_screeninfo`”h]”jj)”}”(hjh]”hŒfb_fix_screeninfo”…””}”(hj!hžhhŸNh Nubah}”(h]”h ]”(j j Œc-type”eh"]”h$]”h&]”uh1jihjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jj!jŒfb_fix_screeninfo”uh1hhŸh³h K'hjtubhŒ. The ”…””}”(hjthžhhŸNh Nubjj)”}”(hŒ``FBIOGET_FSCREENINFO``”h]”hŒFBIOGET_FSCREENINFO”…””}”(hj@hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjtubhŒ ioctl and struct ”…””}”(hjthžhhŸNh Nubh)”}”(hŒ:c:type:`fb_fix_screeninfo`”h]”jj)”}”(hjTh]”hŒfb_fix_screeninfo”…””}”(hjVhžhhŸNh Nubah}”(h]”h ]”(j j Œc-type”eh"]”h$]”h&]”uh1jihjRubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jj!jŒfb_fix_screeninfo”uh1hhŸh³h K'hjtubhŒ are defined in the ”…””}”(hjthžhhŸNh Nubjj)”}”(hŒ``linux/fb.h``”h]”hŒ linux/fb.h”…””}”(hjuhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjtubhŒ header file.”…””}”(hjthžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K'hjchž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 ”…””}”(hjhžhhŸNh Nubjj)”}”(hŒ ``EBUSY``”h]”hŒEBUSY”…””}”(hj•hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjubhŒA error code until all applications closed the framebuffer device.”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K4hjchž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 ”…””}”(hjóhžhhŸNh Nubh)”}”(hŒ:ref:`Video Overlay `”h]”hÿ)”}”(hjýh]”hŒ Video Overlay”…””}”(hjÿhžhhŸNh Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhjûubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒoverlay”uh1hhŸh³h KnhjóubhŒ interface.”…””}”(hjóhž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 ”…””}”(hj%hžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_window`”h]”jj)”}”(hj/h]”hŒ v4l2_window”…””}”(hj1hžhhŸNh Nubah}”(h]”h ]”(j j Œc-type”eh"]”h$]”h&]”uh1jihj-ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jj!jŒ v4l2_window”uh1hhŸh³h Kvhj%ubhŒ» 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 ”…””}”(hj%hžhhŸNh Nubjj)”}”(hŒ``type``”h]”hŒtype”…””}”(hjPhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihj%ubhŒ field of a struct ”…””}”(hj%hžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_format`”h]”jj)”}”(hjdh]”hŒ v4l2_format”…””}”(hjfhžhhŸNh Nubah}”(h]”h ]”(j j Œc-type”eh"]”h$]”h&]”uh1jihjbubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jj!jŒ v4l2_format”uh1hhŸh³h Kvhj%ubhŒ to ”…””}”(hj%hžhhŸNh Nubjj)”}”(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&]”uh1jihj%ubhŒ and call the ”…””}”(hj%hžhhŸNh Nubh)”}”(hŒ":ref:`VIDIOC_G_FMT `”h]”hÿ)”}”(hj™h]”hŒ VIDIOC_G_FMT”…””}”(hj›hžhhŸNh Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhj—ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j¥Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ vidioc_g_fmt”uh1hhŸh³h Kvhj%ubhŒ$ ioctl. The driver fills the struct ”…””}”(hj%hžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_window`”h]”jj)”}”(hj½h]”hŒ v4l2_window”…””}”(hj¿hžhhŸNh Nubah}”(h]”h ]”(j j Œc-type”eh"]”h$]”h&]”uh1jihj»ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jj!jŒ v4l2_window”uh1hhŸh³h Kvhj%ubhŒ substructure named ”…””}”(hj%hžhhŸNh Nubjj)”}”(hŒ``win``”h]”hŒwin”…””}”(hjÞhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihj%ubhŒQ. It is not possible to retrieve a previously programmed clipping list or bitmap.”…””}”(hj%hž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 Nubjj)”}”(hŒ``type``”h]”hŒtype”…””}”(hjþhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjöubhŒ field of a struct ”…””}”(hjöhžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_format`”h]”jj)”}”(hjh]”hŒ v4l2_format”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(j j Œc-type”eh"]”h$]”h&]”uh1jihjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jj!jŒ v4l2_format”uh1hhŸh³h K€hjöubhŒ to ”…””}”(hjöhžhhŸNh Nubjj)”}”(hŒ&``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY``”h]”hŒ"V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY”…””}”(hj3hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjöubhŒ, initialize the ”…””}”(hjöhžhhŸNh Nubjj)”}”(hŒ``win``”h]”hŒwin”…””}”(hjEhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjöubhŒ substructure and call the ”…””}”(hjöhžhhŸNh Nubh)”}”(hŒ":ref:`VIDIOC_S_FMT `”h]”hÿ)”}”(hjYh]”hŒ VIDIOC_S_FMT”…””}”(hj[hžhhŸNh Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhjWubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jeŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ 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]”hÿ)”}”(hj}h]”hŒ VIDIOC_G_FMT”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhj{ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j‰Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ vidioc_g_fmt”uh1hhŸh³h K€hjöubhŒ does. Like ”…””}”(hjöhžhhŸNh Nubh)”}”(hŒ":ref:`VIDIOC_S_FMT `”h]”hÿ)”}”(hj¡h]”hŒ VIDIOC_S_FMT”…””}”(hj£hžhhŸNh Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhjŸubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j­Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ vidioc_g_fmt”uh1hhŸh³h K€hjöubhŒ, the ”…””}”(hjöhžhhŸNh Nubh)”}”(hŒ$:ref:`VIDIOC_TRY_FMT `”h]”hÿ)”}”(hjÅh]”hŒVIDIOC_TRY_FMT”…””}”(hjÇhžhhŸNh Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhjÃubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jÑŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ 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]”hÿ)”}”(hjéh]”hŒ VIDIOC_S_FMT”…””}”(hjëhžhhŸNh Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhjçubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jõŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ 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 ”…””}”(hjhžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_crop`”h]”jj)”}”(hjh]”hŒ v4l2_crop”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(j j Œc-type”eh"]”h$]”h&]”uh1jihjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jj!jŒ v4l2_crop”uh1hhŸh³h KŠhjubhŒ 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 ”…””}”(hjhžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_window`”h]”jj)”}”(hj>h]”hŒ v4l2_window”…””}”(hj@hžhhŸNh Nubah}”(h]”h ]”(j j Œc-type”eh"]”h$]”h&]”uh1jihj<ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jj!jŒ v4l2_window”uh1hhŸh³h KŠhjubhŒ and struct ”…””}”(hjhžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_crop`”h]”jj)”}”(hjah]”hŒ v4l2_crop”…””}”(hjchžhhŸNh Nubah}”(h]”h ]”(j j Œc-type”eh"]”h$]”h&]”uh1jihj_ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jj!jŒ v4l2_crop”uh1hhŸh³h KŠhjubhŒ. The cropping API applies to ”…””}”(hjhžhhŸNh NubjÇ)”}”(hŒ*Video Output*”h]”hŒ Video Output”…””}”(hj‚hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆhjubhŒ and ”…””}”(hjhžhhŸNh NubjÇ)”}”(hŒ*Video Output Overlay*”h]”hŒVideo Output Overlay”…””}”(hj”hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆhjubhŒ devices in the same way as to ”…””}”(hjhžhhŸNh NubjÇ)”}”(hŒ*Video Capture*”h]”hŒ Video Capture”…””}”(hj¦hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆhjubhŒ and ”…””}”hjsbjÇ)”}”(hŒ*Video Overlay*”h]”hŒ Video Overlay”…””}”(hj¸hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆhjubhŒT devices, merely reversing the direction of the data flow. For more information see ”…””}”(hjhžhhŸNh Nubh)”}”(hŒ :ref:`crop`”h]”hÿ)”}”(hjÌh]”hŒcrop”…””}”(hjÎhžhhŸNh Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhjÊubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jØŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjŒcrop”uh1hhŸh³h KŠhjubhŒ.”…””}”(hjhž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”…””}”(hjÿhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhjühž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 Nubjj)”}”(hŒ ``FBIOBLANK``”h]”hŒ FBIOBLANK”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihj ubhŒ ioctl.”…””}”(hj hžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K–hjühž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”}”j;h¶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”jeŒ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”}”(j;hÁj:j7j`j]jßjÜj×jÔjùjöj2j/uŒ nametypes”}”(j;ˆj:‰j`‰j߉j׉jù‰j2‰uh}”(hÁhÄj7hÄj]j­jÜjcjÔj­jöjâj/jüuŒ 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.