€•¥oŒ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”‰jŒv4l2_capability”uh1hhŸh³h Khj¾ubhŒ returned by the ”…””}”(hj¾hžhhŸNh Nubh)”}”(hŒ:ref:`VIDIOC_QUERYCAP`”h]”hÿ)”}”(hj$h]”hŒVIDIOC_QUERYCAP”…””}”(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”j0Œ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”…””}”(hjWhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhjThž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 ”…””}”(hjehžhhŸNh NubjÇ)”}”(hŒ*Video Overlay*”h]”hŒ Video Overlay”…””}”(hjmhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jÆhjeubhŒ interface the framebuffer is normally implemented on the TV card and not the graphics card. On Linux it is accessible as a framebuffer device (”…””}”(hjehžhhŸNh Nubjj)”}”(hŒ ``/dev/fbN``”h]”hŒ/dev/fbN”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjeubhŒb). Given a V4L2 device, applications can find the corresponding framebuffer device by calling the ”…””}”(hjehž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&hjeubhŒ^ ioctl. It returns, amongst other information, the physical address of the framebuffer in the ”…””}”(hjehžhhŸNh Nubjj)”}”(hŒ``base``”h]”hŒbase”…””}”(hjµhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjeubhŒ field of struct ”…””}”(hjehž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”‰jŒv4l2_framebuffer”uh1hhŸh³h K&hjeubhŒ. The framebuffer device ioctl ”…””}”(hjehžhhŸNh Nubjj)”}”(hŒ``FBIOGET_FSCREENINFO``”h]”hŒFBIOGET_FSCREENINFO”…””}”(hjêhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjeubhŒ! returns the same address in the ”…””}”(hjehžhhŸNh Nubjj)”}”(hŒ``smem_start``”h]”hŒ smem_start”…””}”(hjühžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjeubhŒ field of struct ”…””}”(hjehžhhŸNh Nubh)”}”(hŒ:c:type:`fb_fix_screeninfo`”h]”jj)”}”(hjh]”hŒfb_fix_screeninfo”…””}”(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”‰jŒfb_fix_screeninfo”uh1hhŸh³h K&hjeubhŒ. The ”…””}”(hjehžhhŸNh Nubjj)”}”(hŒ``FBIOGET_FSCREENINFO``”h]”hŒFBIOGET_FSCREENINFO”…””}”(hj1hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjeubhŒ ioctl and struct ”…””}”(hjehžhhŸNh Nubh)”}”(hŒ:c:type:`fb_fix_screeninfo`”h]”jj)”}”(hjEh]”hŒfb_fix_screeninfo”…””}”(hjGhžhhŸNh Nubah}”(h]”h ]”(j j Œc-type”eh"]”h$]”h&]”uh1jihjCubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jŒfb_fix_screeninfo”uh1hhŸh³h K&hjeubhŒ are defined in the ”…””}”(hjehžhhŸNh Nubjj)”}”(hŒ``linux/fb.h``”h]”hŒ linux/fb.h”…””}”(hjfhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjeubhŒ header file.”…””}”(hjehžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K&hjThž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 Nubjj)”}”(hŒ ``EBUSY``”h]”hŒEBUSY”…””}”(hj†hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihj~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 K3hjThž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 K9ubhŒ 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;hjžhžhubeh}”(h]”Œ,example-finding-a-framebuffer-device-for-osd”ah ]”h"]”Œ-example: finding a framebuffer device for osd”ah$]”h&]”uh1hÂhjThžhhŸh³h K9ubeh}”(h]”Œ framebuffer”ah ]”h"]”Œ framebuffer”ah$]”h&]”uh1hÂhhÄhžhhŸh³h K$ubhÃ)”}”(hhh]”(hÈ)”}”(hŒOverlay Window and Scaling”h]”hŒOverlay Window and Scaling”…””}”(hjÖhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhjÓhžhhŸh³h KkubhØ)”}”(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 :ref:`Video Overlay ` 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 KmhjäubhŒ interface.”…””}”(hjähžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h KmhjÓ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 ”…””}”(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&]”uh1jihjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jŒ v4l2_window”uh1hhŸh³h KuhjubhŒ» 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 ”…””}”(hjhžhhŸNh Nubjj)”}”(hŒ``type``”h]”hŒtype”…””}”(hjAhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjubhŒ field of a struct ”…””}”(hjhžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_format`”h]”jj)”}”(hjUh]”hŒ v4l2_format”…””}”(hjWhžhhŸNh Nubah}”(h]”h ]”(j j Œc-type”eh"]”h$]”h&]”uh1jihjSubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jŒ v4l2_format”uh1hhŸh³h KuhjubhŒ to ”…””}”(hjhžhhŸNh Nubjj)”}”(hŒ&``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY``”h]”hŒ"V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY”…””}”(hjvhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjubhŒ and call the ”…””}”(hjhž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 KuhjubhŒ$ ioctl. The driver fills the 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”‰jŒ v4l2_window”uh1hhŸh³h KuhjubhŒ substructure named ”…””}”(hjhžhhŸNh Nubjj)”}”(hŒ``win``”h]”hŒwin”…””}”(hjÏhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jihjubhŒQ. It is not possible to retrieve a previously programmed clipping list or bitmap.”…””}”(hjhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h KuhjÓ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”‰jŒ v4l2_format”uh1hhŸh³h Khjç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Œ, initialize the ”…””}”(hjçhžhhŸNh Nubjj)”}”(hŒ``win``”h]”hŒwin”…””}”(hj6hž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ÿ)”}”(hjJh]”hŒ VIDIOC_S_FMT”…””}”(hjLhžhhŸNh Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhjHubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jVŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ vidioc_g_fmt”uh1hhŸh³h Khjç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ÿ)”}”(hjnh]”hŒ VIDIOC_G_FMT”…””}”(hjphžhhŸNh Nubah}”(h]”h ]”(j Œstd”Œstd-ref”eh"]”h$]”h&]”uh1hþhjlubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jzŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ vidioc_g_fmt”uh1hhŸh³h Khjç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þhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jžŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjŒ vidioc_g_fmt”uh1hhŸh³h Khjç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 Khjç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 Khjç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 KhjÓ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)”}”(hj h]”hŒ v4l2_crop”…””}”(hjhž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”‰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”…””}”(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”‰jŒ v4l2_window”uh1hhŸh³h K‰hjubhŒ and struct ”…””}”(hjhžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_crop`”h]”jj)”}”(hjRh]”hŒ v4l2_crop”…””}”(hjThžhhŸNh Nubah}”(h]”h ]”(j j Œc-type”eh"]”h$]”h&]”uh1jihjPubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”j Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jŒ v4l2_crop”uh1hhŸh³h K‰hjubhŒ. The cropping API applies to ”…””}”(hjhžhhŸNh NubjÇ)”}”(hŒ*Video Output*”h]”hŒ Video Output”…””}”(hjshž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 KkubhÃ)”}”(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”jVŒ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+j(jQjNjÐjÍjÈjÅjêjçj#j uŒ nametypes”}”(j,ˆj+‰jQ‰jЉjȉjê‰j#‰uh}”(hÁhÄj(hÄjNj­jÍjTjÅ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.