sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget4/translations/zh_CN/userspace-api/media/v4l/diff-v4lmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/zh_TW/userspace-api/media/v4l/diff-v4lmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/it_IT/userspace-api/media/v4l/diff-v4lmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/ja_JP/userspace-api/media/v4l/diff-v4lmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/ko_KR/userspace-api/media/v4l/diff-v4lmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget4/translations/sp_SP/userspace-api/media/v4l/diff-v4lmodnameN 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:spacepreserveuh1hhhhhhN/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/diff-v4l.rsthKubhtarget)}(h .. _diff-v4l:h]h}(h]h ]h"]h$]h&]refiddiff-v4luh1hhKhhhhhhubhsection)}(hhh](htitle)}(h Differences between V4L and V4L2h]h Differences between V4L and V4L2}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hXThe Video For Linux API was first introduced in Linux 2.1 to unify and replace various TV and radio device related interfaces, developed independently by driver writers in prior years. Starting with Linux 2.5 the much improved V4L2 API replaces the V4L API. The support for the old V4L calls were removed from Kernel, but the library :ref:`libv4l` supports the conversion of a V4L API system call into a V4L2 one.h](hXNThe Video For Linux API was first introduced in Linux 2.1 to unify and replace various TV and radio device related interfaces, developed independently by driver writers in prior years. Starting with Linux 2.5 the much improved V4L2 API replaces the V4L API. The support for the old V4L calls were removed from Kernel, but the library }(hhhhhNhNubh)}(h :ref:`libv4l`h]hinline)}(hhh]hlibv4l}(hhhhhNhNubah}(h]h ](xrefstdstd-refeh"]h$]h&]uh1hhhubah}(h]h ]h"]h$]h&]refdoc userspace-api/media/v4l/diff-v4l refdomainhreftyperef refexplicitrefwarn reftargetlibv4luh1hhhhK hhubhB supports the conversion of a V4L API system call into a V4L2 one.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hhh](h)}(hOpening and Closing Devicesh]hOpening and Closing Devices}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hFor compatibility reasons the character device file names recommended for V4L2 video capture, overlay, radio and raw vbi capture devices did not change from those used by V4L. They are listed in :ref:`devices` and below in :ref:`v4l-dev`.h](hFor compatibility reasons the character device file names recommended for V4L2 video capture, overlay, radio and raw vbi capture devices did not change from those used by V4L. They are listed in }(hj!hhhNhNubh)}(h:ref:`devices`h]h)}(hj+h]hdevices}(hj-hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj)ubah}(h]h ]h"]h$]h&]refdoch refdomainj7reftyperef refexplicitrefwarnjdevicesuh1hhhhKhj!ubh and below in }(hj!hhhNhNubh)}(h:ref:`v4l-dev`h]h)}(hjOh]hv4l-dev}(hjQhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjMubah}(h]h ]h"]h$]h&]refdoch refdomainj[reftyperef refexplicitrefwarnjv4l-devuh1hhhhKhj!ubh.}(hj!hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hThe teletext devices (minor range 192-223) have been removed in V4L2 and no longer exist. There is no hardware available anymore for handling pure teletext. Instead raw or sliced VBI is used.h]hThe teletext devices (minor range 192-223) have been removed in V4L2 and no longer exist. There is no hardware available anymore for handling pure teletext. Instead raw or sliced VBI is used.}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXUThe V4L ``videodev`` module automatically assigns minor numbers to drivers in load order, depending on the registered device type. We recommend that V4L2 drivers by default register devices with the same numbers, but the system administrator can assign arbitrary minor numbers using driver module options. The major device number remains 81.h](hThe V4L }(hjhhhNhNubhliteral)}(h ``videodev``h]hvideodev}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhXA module automatically assigns minor numbers to drivers in load order, depending on the registered device type. We recommend that V4L2 drivers by default register devices with the same numbers, but the system administrator can assign arbitrary minor numbers using driver module options. The major device number remains 81.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h .. _v4l-dev:h]h}(h]h ]h"]h$]h&]hv4l-devuh1hhK#hjhhhhubhtable)}(hhh](h)}(h#V4L Device Types, Names and Numbersh]h#V4L Device Types, Names and Numbers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK%hjubhtgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1jhjubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(h Device Typeh]h Device Type}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h File Nameh]h File Name}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK*hj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h Minor Numbersh]h Minor Numbers}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hj$ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubhtbody)}(hhh](j)}(hhh](j)}(hhh]h)}(hVideo capture and overlayh]hVideo capture and overlay}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjOubah}(h]h ]h"]h$]h&]uh1jhjLubj)}(hhh]h)}(hO``/dev/video`` and ``/dev/bttv0``\ [#f1]_, ``/dev/video0`` to ``/dev/video63``h](j)}(h``/dev/video``h]h /dev/video}(hjmhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh and }(hjihhhNhNubj)}(h``/dev/bttv0``h]h /dev/bttv0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh }(hjihhhNhNubhfootnote_reference)}(h[#f1]_h]h1}(hjhhhNhNubah}(h]id1ah ]h"]h$]h&]autoKhf1docnamehuh1jhjiresolvedKubh, }(hjihhhNhNubj)}(h``/dev/video0``h]h /dev/video0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubh to }(hjihhhNhNubj)}(h``/dev/video63``h]h /dev/video63}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjiubeh}(h]h ]h"]h$]h&]uh1hhhhK-hjfubah}(h]h ]h"]h$]h&]uh1jhjLubj)}(hhh]h)}(h0-63h]h0-63}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jhjLubeh}(h]h ]h"]h$]h&]uh1jhjIubj)}(hhh](j)}(hhh]h)}(hRadio receiverh]hRadio receiver}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h<``/dev/radio``\ [#f2]_, ``/dev/radio0`` to ``/dev/radio63``h](j)}(h``/dev/radio``h]h /dev/radio}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh }(hjhhhNhNubj)}(h[#f2]_h]h2}(hj&hhhNhNubah}(h]id2ah ]h"]h$]h&]jKhf2jhuh1jhjjKubh, }(hjhhhNhNubj)}(h``/dev/radio0``h]h /dev/radio0}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to }(hjhhhNhNubj)}(h``/dev/radio63``h]h /dev/radio63}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhK1hj ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h64-127h]h64-127}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK2hjfubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjIubj)}(hhh](j)}(hhh]h)}(hRaw VBI captureh]hRaw VBI capture}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h-``/dev/vbi``, ``/dev/vbi0`` to ``/dev/vbi31``h](j)}(h ``/dev/vbi``h]h/dev/vbi}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h ``/dev/vbi0``h]h /dev/vbi0}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh to }(hjhhhNhNubj)}(h``/dev/vbi31``h]h /dev/vbi31}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhK4hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h224-255h]h224-255}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubeh}(h](id10jeh ]h"]v4l-devah$]h&]uh1jhjhhhNhNexpect_referenced_by_name}jjsexpect_referenced_by_id}jjsubh)}(hV4L prohibits (or used to prohibit) multiple opens of a device file. V4L2 drivers *may* support multiple opens, see :ref:`open` for details and consequences.h](hRV4L prohibits (or used to prohibit) multiple opens of a device file. V4L2 drivers }(hjhhhNhNubhemphasis)}(h*may*h]hmay}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubh support multiple opens, see }(hjhhhNhNubh)}(h :ref:`open`h]h)}(hj6h]hopen}(hj8hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]refdoch refdomainjBreftyperef refexplicitrefwarnjopenuh1hhhhK7hjubh for details and consequences.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK7hjhhubh)}(hAV4L drivers respond to V4L2 ioctls with an ``EINVAL`` error code.h](h+V4L drivers respond to V4L2 ioctls with an }(hj^hhhNhNubj)}(h ``EINVAL``h]hEINVAL}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj^ubh error code.}(hj^hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK;hjhhubeh}(h]opening-and-closing-devicesah ]h"]opening and closing devicesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hQuerying Capabilitiesh]hQuerying Capabilities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK>ubh)}(hLThe V4L ``VIDIOCGCAP`` ioctl is equivalent to V4L2's :ref:`VIDIOC_QUERYCAP`.h](hThe V4L }(hjhhhNhNubj)}(h``VIDIOCGCAP``h]h VIDIOCGCAP}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh! ioctl is equivalent to V4L2’s }(hjhhhNhNubh)}(h:ref:`VIDIOC_QUERYCAP`h]h)}(hjh]hVIDIOC_QUERYCAP}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjvidioc_querycapuh1hhhhK@hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK@hjhhubh)}(hXThe ``name`` field in struct ``video_capability`` became ``card`` in struct :c:type:`v4l2_capability`, ``type`` was replaced by ``capabilities``. Note V4L2 does not distinguish between device types like this, better think of basic video input, video output and radio devices supporting a set of related functions like video capturing, video overlay and VBI capturing. See :ref:`open` for an introduction.h](hThe }(hjhhhNhNubj)}(h``name``h]hname}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field in struct }(hjhhhNhNubj)}(h``video_capability``h]hvideo_capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh became }(hjhhhNhNubj)}(h``card``h]hcard}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh in struct }(hjhhhNhNubh)}(h:c:type:`v4l2_capability`h]j)}(hjh]hv4l2_capability}(hjhhhNhNubah}(h]h ](hcc-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarn c:parent_keysphinx.domains.c LookupKey)}data]j9 ASTIdentifier)} identifierV4LsbNasbjv4l2_capabilityuh1hhhhKChjubh, }(hjhhhNhNubj)}(h``type``h]htype}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh was replaced by }(hjhhhNhNubj)}(h``capabilities``h]h capabilities}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh. Note V4L2 does not distinguish between device types like this, better think of basic video input, video output and radio devices supporting a set of related functions like video capturing, video overlay and VBI capturing. See }(hjhhhNhNubh)}(h :ref:`open`h]h)}(hjrh]hopen}(hjthhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjpubah}(h]h ]h"]h$]h&]refdoch refdomainj~reftyperef refexplicitrefwarnjopenuh1hhhhKChjubh for an introduction.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKChjhhubhraw)}(h\smallh]h\small}hjsbah}(h]h ]h"]h$]h&]formatlatexhhuh1jhhhKKhjhhubhtabular_col_spec)}(hhh]h}(h]h ]h"]h$]h&]spec|p{5.3cm}|p{6.7cm}|p{5.3cm}|uh1jhhhKOhjhhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK!uh1jhjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h$``struct video_capability`` ``type``h](j)}(h``struct video_capability``h]hstruct video_capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh }(hjhhhNhNubj)}(h``type``h]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKWhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h7struct :c:type:`v4l2_capability` ``capabilities`` flagsh](hstruct }(hjhhhNhNubh)}(h:c:type:`v4l2_capability`h]j)}(hj#h]hv4l2_capability}(hj%hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<jv4l2_capabilityuh1hhhhKXhjubh }(hjhhhNhNubj)}(h``capabilities``h]h capabilities}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh flags}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKXhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hPurposeh]hPurpose}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKZhjbubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubjH)}(hhh](j)}(hhh](j)}(hhh]h)}(h``VID_TYPE_CAPTURE``h]j)}(hjh]hVID_TYPE_CAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK[hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h``V4L2_CAP_VIDEO_CAPTURE``h]j)}(hjh]hV4L2_CAP_VIDEO_CAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK\hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h:The :ref:`video capture ` interface is supported.h](hThe }(hjhhhNhNubh)}(h:ref:`video capture `h]h)}(hjh]h video capture}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjcaptureuh1hhhhK]hjubh interface is supported.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK]hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VID_TYPE_TUNER``h]j)}(hjh]hVID_TYPE_TUNER}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhK^hjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h``V4L2_CAP_TUNER``h]j)}(hj4h]hV4L2_CAP_TUNER}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1hhhhK_hj/ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h3The device has a :ref:`tuner or modulator `.h](hThe device has a }(hjRhhhNhNubh)}(h!:ref:`tuner or modulator `h]h)}(hj\h]htuner or modulator}(hj^hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjZubah}(h]h ]h"]h$]h&]refdoch refdomainjhreftyperef refexplicitrefwarnjtuneruh1hhhhK`hjRubh.}(hjRhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK`hjOubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VID_TYPE_TELETEXT``h]j)}(hjh]hVID_TYPE_TELETEXT}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKahjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h``V4L2_CAP_VBI_CAPTURE``h]j)}(hjh]hV4L2_CAP_VBI_CAPTURE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKbhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h` interface is supported.h](hThe }(hjhhhNhNubh)}(h :ref:`raw VBI capture `h]h)}(hjh]hraw VBI capture}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjraw-vbiuh1hhhhKchjubh interface is supported.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKchjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VID_TYPE_OVERLAY``h]j)}(hjh]hVID_TYPE_OVERLAY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKdhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h``V4L2_CAP_VIDEO_OVERLAY``h]j)}(hj<h]hV4L2_CAP_VIDEO_OVERLAY}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubah}(h]h ]h"]h$]h&]uh1hhhhKehj7ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h:The :ref:`video overlay ` interface is supported.h](hThe }(hjZhhhNhNubh)}(h:ref:`video overlay `h]h)}(hjdh]h video overlay}(hjfhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjbubah}(h]h ]h"]h$]h&]refdoch refdomainjpreftyperef refexplicitrefwarnjoverlayuh1hhhhKfhjZubh interface is supported.}(hjZhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKfhjWubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VID_TYPE_CHROMAKEY``h]j)}(hjh]hVID_TYPE_CHROMAKEY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKghjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hX``V4L2_FBUF_CAP_CHROMAKEY`` in field ``capability`` of struct :c:type:`v4l2_framebuffer`h](j)}(h``V4L2_FBUF_CAP_CHROMAKEY``h]hV4L2_FBUF_CAP_CHROMAKEY}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh in field }(hjhhhNhNubj)}(h``capability``h]h capability}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh of struct }(hjhhhNhNubh)}(h:c:type:`v4l2_framebuffer`h]j)}(hjh]hv4l2_framebuffer}(hjhhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<jv4l2_framebufferuh1hhhhKhhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h[Whether chromakey overlay is supported. For more information on overlay see :ref:`overlay`.h](hLWhether chromakey overlay is supported. For more information on overlay see }(hj hhhNhNubh)}(h:ref:`overlay`h]h)}(hj h]hoverlay}(hj hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdoch refdomainj* reftyperef refexplicitrefwarnjoverlayuh1hhhhKjhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKjhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VID_TYPE_CLIPPING``h]j)}(hjZ h]hVID_TYPE_CLIPPING}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjX ubah}(h]h ]h"]h$]h&]uh1hhhhKlhjU ubah}(h]h ]h"]h$]h&]uh1jhjR ubj)}(hhh]h)}(h``V4L2_FBUF_CAP_LIST_CLIPPING`` and ``V4L2_FBUF_CAP_BITMAP_CLIPPING`` in field ``capability`` of struct :c:type:`v4l2_framebuffer`h](j)}(h``V4L2_FBUF_CAP_LIST_CLIPPING``h]hV4L2_FBUF_CAP_LIST_CLIPPING}(hj| hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjx ubh and }(hjx hhhNhNubj)}(h!``V4L2_FBUF_CAP_BITMAP_CLIPPING``h]hV4L2_FBUF_CAP_BITMAP_CLIPPING}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjx ubh in field }(hjx hhhNhNubj)}(h``capability``h]h capability}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjx ubh of struct }(hjx hhhNhNubh)}(h:c:type:`v4l2_framebuffer`h]j)}(hj h]hv4l2_framebuffer}(hj hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<jv4l2_framebufferuh1hhhhKmhjx ubeh}(h]h ]h"]h$]h&]uh1hhhhKmhju ubah}(h]h ]h"]h$]h&]uh1jhjR ubj)}(hhh]h)}(hEWhether clipping the overlaid image is supported, see :ref:`overlay`.h](h6Whether clipping the overlaid image is supported, see }(hj hhhNhNubh)}(h:ref:`overlay`h]h)}(hj h]hoverlay}(hj hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdoch refdomainj reftyperef refexplicitrefwarnjoverlayuh1hhhhKphj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKphj ubah}(h]h ]h"]h$]h&]uh1jhjR ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VID_TYPE_FRAMERAM``h]j)}(hj& h]hVID_TYPE_FRAMERAM}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj$ ubah}(h]h ]h"]h$]h&]uh1hhhhKrhj! ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hf``V4L2_FBUF_CAP_EXTERNOVERLAY`` *not set* in field ``capability`` of struct :c:type:`v4l2_framebuffer`h](j)}(h``V4L2_FBUF_CAP_EXTERNOVERLAY``h]hV4L2_FBUF_CAP_EXTERNOVERLAY}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjD ubh }(hjD hhhNhNubj!)}(h *not set*h]hnot set}(hjZ hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjD ubh in field }(hjD hhhNhNubj)}(h``capability``h]h capability}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjD ubh of struct }(hjD hhhNhNubh)}(h:c:type:`v4l2_framebuffer`h]j)}(hj h]hv4l2_framebuffer}(hj hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj~ ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<jv4l2_framebufferuh1hhhhKshjD ubeh}(h]h ]h"]h$]h&]uh1hhhhKshjA ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hCWhether overlay overwrites frame buffer memory, see :ref:`overlay`.h](h4Whether overlay overwrites frame buffer memory, see }(hj hhhNhNubh)}(h:ref:`overlay`h]h)}(hj h]hoverlay}(hj hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdoch refdomainj reftyperef refexplicitrefwarnjoverlayuh1hhhhKuhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKuhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VID_TYPE_SCALES``h]j)}(hj h]hVID_TYPE_SCALES}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKwhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h``-``h]j)}(hj h]h-}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKxhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hXdThis flag indicates if the hardware can scale images. The V4L2 API implies the scale factor by setting the cropping dimensions and image size with the :ref:`VIDIOC_S_CROP ` and :ref:`VIDIOC_S_FMT ` ioctl, respectively. The driver returns the closest sizes possible. For more information on cropping and scaling see :ref:`crop`.h](hThis flag indicates if the hardware can scale images. The V4L2 API implies the scale factor by setting the cropping dimensions and image size with the }(hj0 hhhNhNubh)}(h$:ref:`VIDIOC_S_CROP `h]h)}(hj: h]h VIDIOC_S_CROP}(hj< hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj8 ubah}(h]h ]h"]h$]h&]refdoch refdomainjF reftyperef refexplicitrefwarnj vidioc_g_cropuh1hhhhKyhj0 ubh and }(hj0 hhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]h)}(hj^ h]h VIDIOC_S_FMT}(hj` hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj\ ubah}(h]h ]h"]h$]h&]refdoch refdomainjj reftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhKyhj0 ubhv ioctl, respectively. The driver returns the closest sizes possible. For more information on cropping and scaling see }(hj0 hhhNhNubh)}(h :ref:`crop`h]h)}(hj h]hcrop}(hj hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdoch refdomainj reftyperef refexplicitrefwarnjcropuh1hhhhKyhj0 ubh.}(hj0 hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKyhj- ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VID_TYPE_MONOCHROME``h]j)}(hj h]hVID_TYPE_MONOCHROME}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h``-``h]j)}(hj h]h-}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hApplications can enumerate the supported image formats with the :ref:`VIDIOC_ENUM_FMT` ioctl to determine if the device supports grey scale capturing only. For more information on image formats see :ref:`pixfmt`.h](h@Applications can enumerate the supported image formats with the }(hj hhhNhNubh)}(h:ref:`VIDIOC_ENUM_FMT`h]h)}(hj h]hVIDIOC_ENUM_FMT}(hj hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdoch refdomainj reftyperef refexplicitrefwarnjvidioc_enum_fmtuh1hhhhKhj ubhp ioctl to determine if the device supports grey scale capturing only. For more information on image formats see }(hj hhhNhNubh)}(h :ref:`pixfmt`h]h)}(hj* h]hpixfmt}(hj, hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj( ubah}(h]h ]h"]h$]h&]refdoch refdomainj6 reftyperef refexplicitrefwarnjpixfmtuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VID_TYPE_SUBCAPTURE``h]j)}(hjf h]hVID_TYPE_SUBCAPTURE}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjd ubah}(h]h ]h"]h$]h&]uh1hhhhKhja ubah}(h]h ]h"]h$]h&]uh1jhj^ ubj)}(hhh]h)}(h``-``h]j)}(hj h]h-}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj^ ubj)}(hhh]h)}(hXApplications can call the :ref:`VIDIOC_G_CROP ` ioctl to determine if the device supports capturing a subsection of the full picture ("cropping" in V4L2). If not, the ioctl returns the ``EINVAL`` error code. For more information on cropping and scaling see :ref:`crop`.h](hApplications can call the }(hj hhhNhNubh)}(h$:ref:`VIDIOC_G_CROP `h]h)}(hj h]h VIDIOC_G_CROP}(hj hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdoch refdomainj reftyperef refexplicitrefwarnj vidioc_g_cropuh1hhhhKhj ubh ioctl to determine if the device supports capturing a subsection of the full picture (“cropping” in V4L2). If not, the ioctl returns the }(hj hhhNhNubj)}(h ``EINVAL``h]hEINVAL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubh> error code. For more information on cropping and scaling see }(hj hhhNhNubh)}(h :ref:`crop`h]h)}(hj h]hcrop}(hj hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdoch refdomainj reftyperef refexplicitrefwarnjcropuh1hhhhKhj ubh.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj^ ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VID_TYPE_MPEG_DECODER``h]j)}(hj h]hVID_TYPE_MPEG_DECODER}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h``-``h]j)}(hj@ h]h-}(hjB hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj> ubah}(h]h ]h"]h$]h&]uh1hhhhKhj; ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(hApplications can enumerate the supported image formats with the :ref:`VIDIOC_ENUM_FMT` ioctl to determine if the device supports MPEG streams.h](h@Applications can enumerate the supported image formats with the }(hj^ hhhNhNubh)}(h:ref:`VIDIOC_ENUM_FMT`h]h)}(hjh h]hVIDIOC_ENUM_FMT}(hjj hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjf ubah}(h]h ]h"]h$]h&]refdoch refdomainjt reftyperef refexplicitrefwarnjvidioc_enum_fmtuh1hhhhKhj^ ubh8 ioctl to determine if the device supports MPEG streams.}(hj^ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj[ ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VID_TYPE_MPEG_ENCODER``h]j)}(hj h]hVID_TYPE_MPEG_ENCODER}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h``-``h]j)}(hj h]h-}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h See above.h]h See above.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VID_TYPE_MJPEG_DECODER``h]j)}(hjh]hVID_TYPE_MJPEG_DECODER}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h``-``h]j)}(hj$h]h-}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h See above.h]h See above.}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj?ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VID_TYPE_MJPEG_ENCODER``h]j)}(hjdh]hVID_TYPE_MJPEG_ENCODER}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjbubah}(h]h ]h"]h$]h&]uh1hhhhKhj_ubah}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh]h)}(h``-``h]j)}(hjh]h-}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj\ubj)}(hhh]h)}(h See above.h]h See above.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj\ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ] longtableah"]h$]h&]uh1jhjhhhNhNubj)}(h \normalsizeh]h \normalsize}hjsbah}(h]h ]h"]h$]h&]formatlatexhhuh1jhhhKhjhhubh)}(hX3The ``audios`` field was replaced by ``capabilities`` flag ``V4L2_CAP_AUDIO``, indicating *if* the device has any audio inputs or outputs. To determine their number applications can enumerate audio inputs with the :ref:`VIDIOC_G_AUDIO ` ioctl. The audio ioctls are described in :ref:`audio`.h](hThe }(hjhhhNhNubj)}(h ``audios``h]haudios}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field was replaced by }(hjhhhNhNubj)}(h``capabilities``h]h capabilities}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh flag }(hjhhhNhNubj)}(h``V4L2_CAP_AUDIO``h]hV4L2_CAP_AUDIO}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh , indicating }(hjhhhNhNubj!)}(h*if*h]hif}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhx the device has any audio inputs or outputs. To determine their number applications can enumerate audio inputs with the }(hjhhhNhNubh)}(h&:ref:`VIDIOC_G_AUDIO `h]h)}(hj2h]hVIDIOC_G_AUDIO}(hj4hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj0ubah}(h]h ]h"]h$]h&]refdoch refdomainj>reftyperef refexplicitrefwarnjvidioc_g_audiouh1hhhhKhjubh* ioctl. The audio ioctls are described in }(hjhhhNhNubh)}(h :ref:`audio`h]h)}(hjVh]haudio}(hjXhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjTubah}(h]h ]h"]h$]h&]refdoch refdomainjbreftyperef refexplicitrefwarnjaudiouh1hhhhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hXBThe ``maxwidth``, ``maxheight``, ``minwidth`` and ``minheight`` fields were removed. Calling the :ref:`VIDIOC_S_FMT ` or :ref:`VIDIOC_TRY_FMT ` ioctl with the desired dimensions returns the closest size possible, taking into account the current video standard, cropping and scaling limitations.h](hThe }(hj~hhhNhNubj)}(h ``maxwidth``h]hmaxwidth}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubh, }(hj~hhhNhNubj)}(h ``maxheight``h]h maxheight}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubh, }hj~sbj)}(h ``minwidth``h]hminwidth}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubh and }(hj~hhhNhNubj)}(h ``minheight``h]h minheight}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~ubh" fields were removed. Calling the }(hj~hhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]h)}(hjh]h VIDIOC_S_FMT}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhKhj~ubh or }(hj~hhhNhNubh)}(h$:ref:`VIDIOC_TRY_FMT `h]h)}(hjh]hVIDIOC_TRY_FMT}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhKhj~ubh ioctl with the desired dimensions returns the closest size possible, taking into account the current video standard, cropping and scaling limitations.}(hj~hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]querying-capabilitiesah ]h"]querying capabilitiesah$]h&]uh1hhhhhhhhK>ubh)}(hhh](h)}(h Video Sourcesh]h Video Sources}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj$hhhhhKubh)}(hXRV4L provides the ``VIDIOCGCHAN`` and ``VIDIOCSCHAN`` ioctl using struct ``video_channel`` to enumerate the video inputs of a V4L device. The equivalent V4L2 ioctls are :ref:`VIDIOC_ENUMINPUT`, :ref:`VIDIOC_G_INPUT ` and :ref:`VIDIOC_S_INPUT ` using struct :c:type:`v4l2_input` as discussed in :ref:`video`.h](hV4L provides the }(hj5hhhNhNubj)}(h``VIDIOCGCHAN``h]h VIDIOCGCHAN}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh and }(hj5hhhNhNubj)}(h``VIDIOCSCHAN``h]h VIDIOCSCHAN}(hjOhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh ioctl using struct }(hj5hhhNhNubj)}(h``video_channel``h]h video_channel}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubhO to enumerate the video inputs of a V4L device. The equivalent V4L2 ioctls are }(hj5hhhNhNubh)}(h:ref:`VIDIOC_ENUMINPUT`h]h)}(hjuh]hVIDIOC_ENUMINPUT}(hjwhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjsubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjvidioc_enuminputuh1hhhhKhj5ubh, }(hj5hhhNhNubh)}(h&:ref:`VIDIOC_G_INPUT `h]h)}(hjh]hVIDIOC_G_INPUT}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjvidioc_g_inputuh1hhhhKhj5ubh and }(hj5hhhNhNubh)}(h&:ref:`VIDIOC_S_INPUT `h]h)}(hjh]hVIDIOC_S_INPUT}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjvidioc_g_inputuh1hhhhKhj5ubh using struct }(hj5hhhNhNubh)}(h:c:type:`v4l2_input`h]j)}(hjh]h v4l2_input}(hjhhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_inputuh1hhhhKhj5ubh as discussed in }(hj5hhhNhNubh)}(h :ref:`video`h]h)}(hjh]hvideo}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjvideouh1hhhhKhj5ubh.}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj$hhubh)}(hnThe ``channel`` field counting inputs was renamed to ``index``, the video input types were renamed as follows:h](hThe }(hj,hhhNhNubj)}(h ``channel``h]hchannel}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh& field counting inputs was renamed to }(hj,hhhNhNubj)}(h ``index``h]hindex}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh0, the video input types were renamed as follows:}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj$hhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jhjaubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jhjaubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h!struct ``video_channel`` ``type``h](hstruct }(hjhhhNhNubj)}(h``video_channel``h]h video_channel}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh }(hjhhhNhNubj)}(h``type``h]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhj~ubah}(h]h ]h"]h$]h&]uh1jhj{ubj)}(hhh]h)}(h$struct :c:type:`v4l2_input` ``type``h](hstruct }(hjhhhNhNubh)}(h:c:type:`v4l2_input`h]j)}(hjh]h v4l2_input}(hjhhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_inputuh1hhhhKhjubh }(hjhhhNhNubj)}(h``type``h]htype}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj{ubeh}(h]h ]h"]h$]h&]uh1jhjxubah}(h]h ]h"]h$]h&]uh1jhjaubjH)}(hhh](j)}(hhh](j)}(hhh]h)}(h``VIDEO_TYPE_TV``h]j)}(hjh]h VIDEO_TYPE_TV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h``V4L2_INPUT_TYPE_TUNER``h]j)}(hj4h]hV4L2_INPUT_TYPE_TUNER}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]uh1hhhhKhj/ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh](j)}(hhh]h)}(h``VIDEO_TYPE_CAMERA``h]j)}(hj]h]hVIDEO_TYPE_CAMERA}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj[ubah}(h]h ]h"]h$]h&]uh1hhhhKhjXubah}(h]h ]h"]h$]h&]uh1jhjUubj)}(hhh]h)}(h``V4L2_INPUT_TYPE_CAMERA``h]j)}(hj}h]hV4L2_INPUT_TYPE_CAMERA}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubah}(h]h ]h"]h$]h&]uh1hhhhKhjxubah}(h]h ]h"]h$]h&]uh1jhjUubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jGhjaubeh}(h]h ]h"]h$]h&]colsKuh1jhj^ubah}(h]h ]h"]h$]h&]uh1jhj$hhhNhNubh)}(hXUnlike the ``tuners`` field expressing the number of tuners of this input, V4L2 assumes each video input is connected to at most one tuner. However a tuner can have more than one input, i. e. RF connectors, and a device can have multiple tuners. The index number of the tuner associated with the input, if any, is stored in field ``tuner`` of struct :c:type:`v4l2_input`. Enumeration of tuners is discussed in :ref:`tuner`.h](h Unlike the }(hjhhhNhNubj)}(h ``tuners``h]htuners}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhX5 field expressing the number of tuners of this input, V4L2 assumes each video input is connected to at most one tuner. However a tuner can have more than one input, i. e. RF connectors, and a device can have multiple tuners. The index number of the tuner associated with the input, if any, is stored in field }(hjhhhNhNubj)}(h ``tuner``h]htuner}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh of struct }(hjhhhNhNubh)}(h:c:type:`v4l2_input`h]j)}(hjh]h v4l2_input}(hjhhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_inputuh1hhhhKhjubh(. Enumeration of tuners is discussed in }(hjhhhNhNubh)}(h :ref:`tuner`h]h)}(hjh]htuner}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjtuneruh1hhhhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj$hhubh)}(hXThe redundant ``VIDEO_VC_TUNER`` flag was dropped. Video inputs associated with a tuner are of type ``V4L2_INPUT_TYPE_TUNER``. The ``VIDEO_VC_AUDIO`` flag was replaced by the ``audioset`` field. V4L2 considers devices with up to 32 audio inputs. Each set bit in the ``audioset`` field represents one audio input this video input combines with. For information about audio inputs and how to switch between them see :ref:`audio`.h](hThe redundant }(hj*hhhNhNubj)}(h``VIDEO_VC_TUNER``h]hVIDEO_VC_TUNER}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubhD flag was dropped. Video inputs associated with a tuner are of type }(hj*hhhNhNubj)}(h``V4L2_INPUT_TYPE_TUNER``h]hV4L2_INPUT_TYPE_TUNER}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh. The }(hj*hhhNhNubj)}(h``VIDEO_VC_AUDIO``h]hVIDEO_VC_AUDIO}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh flag was replaced by the }(hj*hhhNhNubj)}(h ``audioset``h]haudioset}(hjhhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubhO field. V4L2 considers devices with up to 32 audio inputs. Each set bit in the }(hj*hhhNhNubj)}(h ``audioset``h]haudioset}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh field represents one audio input this video input combines with. For information about audio inputs and how to switch between them see }(hj*hhhNhNubh)}(h :ref:`audio`h]h)}(hjh]haudio}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjaudiouh1hhhhKhj*ubh.}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj$hhubh)}(hXThe ``norm`` field describing the supported video standards was replaced by ``std``. The V4L specification mentions a flag ``VIDEO_VC_NORM`` indicating whether the standard can be changed. This flag was a later addition together with the ``norm`` field and has been removed in the meantime. V4L2 has a similar, albeit more comprehensive approach to video standards, see :ref:`standard` for more information.h](hThe }(hjhhhNhNubj)}(h``norm``h]hnorm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh@ field describing the supported video standards was replaced by }(hjhhhNhNubj)}(h``std``h]hstd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh(. The V4L specification mentions a flag }(hjhhhNhNubj)}(h``VIDEO_VC_NORM``h]h VIDEO_VC_NORM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhb indicating whether the standard can be changed. This flag was a later addition together with the }(hjhhhNhNubj)}(h``norm``h]hnorm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh| field and has been removed in the meantime. V4L2 has a similar, albeit more comprehensive approach to video standards, see }(hjhhhNhNubh)}(h:ref:`standard`h]h)}(hjh]hstandard}(hj hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjstandarduh1hhhhKhjubh for more information.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj$hhubeh}(h] video-sourcesah ]h"] video sourcesah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hTuningh]hTuning}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj8hhhhhKubh)}(hXGThe V4L ``VIDIOCGTUNER`` and ``VIDIOCSTUNER`` ioctl and struct ``video_tuner`` can be used to enumerate the tuners of a V4L TV or radio device. The equivalent V4L2 ioctls are :ref:`VIDIOC_G_TUNER ` and :ref:`VIDIOC_S_TUNER ` using struct :c:type:`v4l2_tuner`. Tuners are covered in :ref:`tuner`.h](hThe V4L }(hjIhhhNhNubj)}(h``VIDIOCGTUNER``h]h VIDIOCGTUNER}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubh and }(hjIhhhNhNubj)}(h``VIDIOCSTUNER``h]h VIDIOCSTUNER}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubh ioctl and struct }(hjIhhhNhNubj)}(h``video_tuner``h]h video_tuner}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjIubha can be used to enumerate the tuners of a V4L TV or radio device. The equivalent V4L2 ioctls are }(hjIhhhNhNubh)}(h&:ref:`VIDIOC_G_TUNER `h]h)}(hjh]hVIDIOC_G_TUNER}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjvidioc_g_tuneruh1hhhhKhjIubh and }(hjIhhhNhNubh)}(h&:ref:`VIDIOC_S_TUNER `h]h)}(hjh]hVIDIOC_S_TUNER}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjvidioc_g_tuneruh1hhhhKhjIubh using struct }(hjIhhhNhNubh)}(h:c:type:`v4l2_tuner`h]j)}(hjh]h v4l2_tuner}(hjhhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_tuneruh1hhhhKhjIubh. Tuners are covered in }(hjIhhhNhNubh)}(h :ref:`tuner`h]h)}(hjh]htuner}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjtuneruh1hhhhKhjIubh.}(hjIhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj8hhubh)}(hThe ``tuner`` field counting tuners was renamed to ``index``. The fields ``name``, ``rangelow`` and ``rangehigh`` remained unchanged.h](hThe }(hjhhhNhNubj)}(h ``tuner``h]htuner}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh& field counting tuners was renamed to }(hjhhhNhNubj)}(h ``index``h]hindex}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh . The fields }(hjhhhNhNubj)}(h``name``h]hname}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h ``rangelow``h]hrangelow}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h ``rangehigh``h]h rangehigh}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh remained unchanged.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj8hhubh)}(hXThe ``VIDEO_TUNER_PAL``, ``VIDEO_TUNER_NTSC`` and ``VIDEO_TUNER_SECAM`` flags indicating the supported video standards were dropped. This information is now contained in the associated struct :c:type:`v4l2_input`. No replacement exists for the ``VIDEO_TUNER_NORM`` flag indicating whether the video standard can be switched. The ``mode`` field to select a different video standard was replaced by a whole new set of ioctls and structures described in :ref:`standard`. Due to its ubiquity it should be mentioned the BTTV driver supports several standards in addition to the regular ``VIDEO_MODE_PAL`` (0), ``VIDEO_MODE_NTSC``, ``VIDEO_MODE_SECAM`` and ``VIDEO_MODE_AUTO`` (3). Namely N/PAL Argentina, M/PAL, N/PAL, and NTSC Japan with numbers 3-6 (sic).h](hThe }(hjhhhNhNubj)}(h``VIDEO_TUNER_PAL``h]hVIDEO_TUNER_PAL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }(hjhhhNhNubj)}(h``VIDEO_TUNER_NTSC``h]hVIDEO_TUNER_NTSC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``VIDEO_TUNER_SECAM``h]hVIDEO_TUNER_SECAM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhy flags indicating the supported video standards were dropped. This information is now contained in the associated struct }(hjhhhNhNubh)}(h:c:type:`v4l2_input`h]j)}(hjh]h v4l2_input}(hjhhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_inputuh1hhhhKhjubh . No replacement exists for the }(hjhhhNhNubj)}(h``VIDEO_TUNER_NORM``h]hVIDEO_TUNER_NORM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhA flag indicating whether the video standard can be switched. The }(hjhhhNhNubj)}(h``mode``h]hmode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhr field to select a different video standard was replaced by a whole new set of ioctls and structures described in }(hjhhhNhNubh)}(h:ref:`standard`h]h)}(hj h]hstandard}(hj hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjstandarduh1hhhhKhjubhs. Due to its ubiquity it should be mentioned the BTTV driver supports several standards in addition to the regular }(hjhhhNhNubj)}(h``VIDEO_MODE_PAL``h]hVIDEO_MODE_PAL}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh (0), }(hjhhhNhNubj)}(h``VIDEO_MODE_NTSC``h]hVIDEO_MODE_NTSC}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh, }hjsbj)}(h``VIDEO_MODE_SECAM``h]hVIDEO_MODE_SECAM}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh and }(hjhhhNhNubj)}(h``VIDEO_MODE_AUTO``h]hVIDEO_MODE_AUTO}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhR (3). Namely N/PAL Argentina, M/PAL, N/PAL, and NTSC Japan with numbers 3-6 (sic).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj8hhubh)}(hX_The ``VIDEO_TUNER_STEREO_ON`` flag indicating stereo reception became ``V4L2_TUNER_SUB_STEREO`` in field ``rxsubchans``. This field also permits the detection of monaural and bilingual audio, see the definition of struct :c:type:`v4l2_tuner` for details. Presently no replacement exists for the ``VIDEO_TUNER_RDS_ON`` and ``VIDEO_TUNER_MBS_ON`` flags.h](hThe }(hj{hhhNhNubj)}(h``VIDEO_TUNER_STEREO_ON``h]hVIDEO_TUNER_STEREO_ON}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubh) flag indicating stereo reception became }(hj{hhhNhNubj)}(h``V4L2_TUNER_SUB_STEREO``h]hV4L2_TUNER_SUB_STEREO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubh in field }(hj{hhhNhNubj)}(h``rxsubchans``h]h rxsubchans}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubhf. This field also permits the detection of monaural and bilingual audio, see the definition of struct }(hj{hhhNhNubh)}(h:c:type:`v4l2_tuner`h]j)}(hjh]h v4l2_tuner}(hjhhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_tuneruh1hhhhKhj{ubh6 for details. Presently no replacement exists for the }(hj{hhhNhNubj)}(h``VIDEO_TUNER_RDS_ON``h]hVIDEO_TUNER_RDS_ON}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubh and }(hj{hhhNhNubj)}(h``VIDEO_TUNER_MBS_ON``h]hVIDEO_TUNER_MBS_ON}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj{ubh flags.}(hj{hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj8hhubh)}(h{The ``VIDEO_TUNER_LOW`` flag was renamed to ``V4L2_TUNER_CAP_LOW`` in the struct :c:type:`v4l2_tuner` ``capability`` field.h](hThe }(hjhhhNhNubj)}(h``VIDEO_TUNER_LOW``h]hVIDEO_TUNER_LOW}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh flag was renamed to }(hjhhhNhNubj)}(h``V4L2_TUNER_CAP_LOW``h]hV4L2_TUNER_CAP_LOW}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh in the struct }(hjhhhNhNubh)}(h:c:type:`v4l2_tuner`h]j)}(hj4h]h v4l2_tuner}(hj6hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj2ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_tuneruh1hhhhKhjubh }(hjhhhNhNubj)}(h``capability``h]h capability}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj8hhubh)}(hXThe ``VIDIOCGFREQ`` and ``VIDIOCSFREQ`` ioctl to change the tuner frequency where renamed to :ref:`VIDIOC_G_FREQUENCY ` and :ref:`VIDIOC_S_FREQUENCY `. They take a pointer to a struct :c:type:`v4l2_frequency` instead of an unsigned long integer.h](hThe }(hjmhhhNhNubj)}(h``VIDIOCGFREQ``h]h VIDIOCGFREQ}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh and }(hjmhhhNhNubj)}(h``VIDIOCSFREQ``h]h VIDIOCSFREQ}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjmubh6 ioctl to change the tuner frequency where renamed to }(hjmhhhNhNubh)}(h.:ref:`VIDIOC_G_FREQUENCY `h]h)}(hjh]hVIDIOC_G_FREQUENCY}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjvidioc_g_frequencyuh1hhhhMhjmubh and }(hjmhhhNhNubh)}(h.:ref:`VIDIOC_S_FREQUENCY `h]h)}(hjh]hVIDIOC_S_FREQUENCY}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjvidioc_g_frequencyuh1hhhhMhjmubh". They take a pointer to a struct }(hjmhhhNhNubh)}(h:c:type:`v4l2_frequency`h]j)}(hjh]hv4l2_frequency}(hjhhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<jv4l2_frequencyuh1hhhhMhjmubh% instead of an unsigned long integer.}(hjmhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj8hhubh)}(h.. _v4l-image-properties:h]h}(h]h ]h"]h$]h&]hv4l-image-propertiesuh1hhMhj8hhhhubeh}(h]tuningah ]h"]tuningah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hImage Propertiesh]hImage Properties}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhM ubh)}(hXV4L2 has no equivalent of the ``VIDIOCGPICT`` and ``VIDIOCSPICT`` ioctl and struct ``video_picture``. The following fields where replaced by V4L2 controls accessible with the :ref:`VIDIOC_QUERYCTRL`, :ref:`VIDIOC_G_CTRL ` and :ref:`VIDIOC_S_CTRL ` ioctls:h](hV4L2 has no equivalent of the }(hj.hhhNhNubj)}(h``VIDIOCGPICT``h]h VIDIOCGPICT}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh and }(hj.hhhNhNubj)}(h``VIDIOCSPICT``h]h VIDIOCSPICT}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh ioctl and struct }(hj.hhhNhNubj)}(h``video_picture``h]h video_picture}(hjZhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubhK. The following fields where replaced by V4L2 controls accessible with the }(hj.hhhNhNubh)}(h:ref:`VIDIOC_QUERYCTRL`h]h)}(hjnh]hVIDIOC_QUERYCTRL}(hjphhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjlubah}(h]h ]h"]h$]h&]refdoch refdomainjzreftyperef refexplicitrefwarnjvidioc_queryctrluh1hhhhM hj.ubh, }(hj.hhhNhNubh)}(h$:ref:`VIDIOC_G_CTRL `h]h)}(hjh]h VIDIOC_G_CTRL}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnj vidioc_g_ctrluh1hhhhM hj.ubh and }(hj.hhhNhNubh)}(h$:ref:`VIDIOC_S_CTRL `h]h)}(hjh]h VIDIOC_S_CTRL}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnj vidioc_g_ctrluh1hhhhM hj.ubh ioctls:}(hj.hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hjhhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jhjubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hstruct ``video_picture``h](hstruct }(hjhhhNhNubj)}(h``video_picture``h]h video_picture}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hV4L2 Control IDh]hV4L2 Control ID}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubjH)}(hhh](j)}(hhh](j)}(hhh]h)}(h``brightness``h]j)}(hjQh]h brightness}(hjShhhNhNubah}(h]h ]h"]h$]h&]uh1jhjOubah}(h]h ]h"]h$]h&]uh1hhhhMhjLubah}(h]h ]h"]h$]h&]uh1jhjIubj)}(hhh]h)}(h``V4L2_CID_BRIGHTNESS``h]j)}(hjqh]hV4L2_CID_BRIGHTNESS}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1jhjoubah}(h]h ]h"]h$]h&]uh1hhhhMhjlubah}(h]h ]h"]h$]h&]uh1jhjIubeh}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh](j)}(hhh]h)}(h``hue``h]j)}(hjh]hhue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h``V4L2_CID_HUE``h]j)}(hjh]h V4L2_CID_HUE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh](j)}(hhh]h)}(h ``colour``h]j)}(hjh]hcolour}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h``V4L2_CID_SATURATION``h]j)}(hjh]hV4L2_CID_SATURATION}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh](j)}(hhh]h)}(h ``contrast``h]j)}(hj,h]hcontrast}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]uh1hhhhM hj'ubah}(h]h ]h"]h$]h&]uh1jhj$ubj)}(hhh]h)}(h``V4L2_CID_CONTRAST``h]j)}(hjLh]hV4L2_CID_CONTRAST}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJubah}(h]h ]h"]h$]h&]uh1hhhhM!hjGubah}(h]h ]h"]h$]h&]uh1jhj$ubeh}(h]h ]h"]h$]h&]uh1jhjFubj)}(hhh](j)}(hhh]h)}(h ``whiteness``h]j)}(hjuh]h whiteness}(hjwhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjsubah}(h]h ]h"]h$]h&]uh1hhhhM"hjpubah}(h]h ]h"]h$]h&]uh1jhjmubj)}(hhh]h)}(h``V4L2_CID_WHITENESS``h]j)}(hjh]hV4L2_CID_WHITENESS}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhM#hjubah}(h]h ]h"]h$]h&]uh1jhjmubeh}(h]h ]h"]h$]h&]uh1jhjFubeh}(h]h ]h"]h$]h&]uh1jGhjubeh}(h]h ]h"]h$]h&]colsKuh1jhjubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubh)}(hXThe V4L picture controls are assumed to range from 0 to 65535 with no particular reset value. The V4L2 API permits arbitrary limits and defaults which can be queried with the :ref:`VIDIOC_QUERYCTRL` ioctl. For general information about controls see :ref:`control`.h](hThe V4L picture controls are assumed to range from 0 to 65535 with no particular reset value. The V4L2 API permits arbitrary limits and defaults which can be queried with the }(hjhhhNhNubh)}(h:ref:`VIDIOC_QUERYCTRL`h]h)}(hjh]hVIDIOC_QUERYCTRL}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjvidioc_queryctrluh1hhhhM%hjubh3 ioctl. For general information about controls see }(hjhhhNhNubh)}(h:ref:`control`h]h)}(hjh]hcontrol}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjcontroluh1hhhhM%hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM%hjhhubh)}(hXGThe ``depth`` (average number of bits per pixel) of a video image is implied by the selected image format. V4L2 does not explicitly provide such information assuming applications recognizing the format are aware of the image depth and others need not know. The ``palette`` field moved into the struct :c:type:`v4l2_pix_format`:h](hThe }(hjhhhNhNubj)}(h ``depth``h]hdepth}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh (average number of bits per pixel) of a video image is implied by the selected image format. V4L2 does not explicitly provide such information assuming applications recognizing the format are aware of the image depth and others need not know. The }(hjhhhNhNubj)}(h ``palette``h]hpalette}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh field moved into the struct }(hjhhhNhNubh)}(h:c:type:`v4l2_pix_format`h]j)}(hjMh]hv4l2_pix_format}(hjOhhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjKubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<jv4l2_pix_formatuh1hhhhM+hjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM+hjhhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jhjwubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jhjwubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h$struct ``video_picture`` ``palette``h](hstruct }(hjhhhNhNubj)}(h``video_picture``h]h video_picture}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh }(hjhhhNhNubj)}(h ``palette``h]hpalette}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhM6hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h+struct :c:type:`v4l2_pix_format` ``pixfmt``h](hstruct }(hjhhhNhNubh)}(h:c:type:`v4l2_pix_format`h]j)}(hjh]hv4l2_pix_format}(hjhhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<jv4l2_pix_formatuh1hhhhM7hjubh }(hjhhhNhNubj)}(h ``pixfmt``h]hpixfmt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1hhhhM7hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjwubjH)}(hhh](j)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_GREY``h]j)}(hj*h]hVIDEO_PALETTE_GREY}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubah}(h]h ]h"]h$]h&]uh1hhhhM8hj%ubah}(h]h ]h"]h$]h&]uh1jhj"ubj)}(hhh]h)}(h,:ref:`V4L2_PIX_FMT_GREY `h]h)}(hjJh]h)}(hjJh]hV4L2_PIX_FMT_GREY}(hjOhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjLubah}(h]h ]h"]h$]h&]refdoch refdomainjYreftyperef refexplicitrefwarnjv4l2-pix-fmt-greyuh1hhhhM9hjHubah}(h]h ]h"]h$]h&]uh1hhhhM9hjEubah}(h]h ]h"]h$]h&]uh1jhj"ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_HI240``h]j)}(hjh]hVIDEO_PALETTE_HI240}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhM:hjubah}(h]h ]h"]h$]h&]uh1jhj}ubj)}(hhh]h)}(h2:ref:`V4L2_PIX_FMT_HI240 ` [#f3]_h](h)}(h+:ref:`V4L2_PIX_FMT_HI240 `h]h)}(hjh]hV4L2_PIX_FMT_HI240}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjpixfmt-reserveduh1hhhhM;hjubh }(hjhhhNhNubj)}(h[#f3]_h]h3}(hjhhhNhNubah}(h]id3ah ]h"]h$]h&]jKhf3jhuh1jhjjKubeh}(h]h ]h"]h$]h&]uh1hhhhM;hjubah}(h]h ]h"]h$]h&]uh1jhj}ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_RGB565``h]j)}(hjh]hVIDEO_PALETTE_RGB565}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhM<hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h':ref:`V4L2_PIX_FMT_RGB565 `h]h)}(hjh]h)}(hjh]hV4L2_PIX_FMT_RGB565}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainj$reftyperef refexplicitrefwarnj pixfmt-rgbuh1hhhhM=hjubah}(h]h ]h"]h$]h&]uh1hhhhM=hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_RGB555``h]j)}(hjPh]hVIDEO_PALETTE_RGB555}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjNubah}(h]h ]h"]h$]h&]uh1hhhhM>hjKubah}(h]h ]h"]h$]h&]uh1jhjHubj)}(hhh]h)}(h':ref:`V4L2_PIX_FMT_RGB555 `h]h)}(hjph]h)}(hjph]hV4L2_PIX_FMT_RGB555}(hjuhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjrubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnj pixfmt-rgbuh1hhhhM?hjnubah}(h]h ]h"]h$]h&]uh1hhhhM?hjkubah}(h]h ]h"]h$]h&]uh1jhjHubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_RGB24``h]j)}(hjh]hVIDEO_PALETTE_RGB24}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhM@hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h&:ref:`V4L2_PIX_FMT_BGR24 `h]h)}(hjh]h)}(hjh]hV4L2_PIX_FMT_BGR24}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnj pixfmt-rgbuh1hhhhMAhjubah}(h]h ]h"]h$]h&]uh1hhhhMAhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_RGB32``h]j)}(hjh]hVIDEO_PALETTE_RGB32}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMBhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h-:ref:`V4L2_PIX_FMT_BGR32 ` [#f4]_h](h)}(h&:ref:`V4L2_PIX_FMT_BGR32 `h]h)}(hj*h]hV4L2_PIX_FMT_BGR32}(hj,hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]refdoch refdomainj6reftyperef refexplicitrefwarnj pixfmt-rgbuh1hhhhMChj$ubh }(hj$hhhNhNubj)}(h[#f4]_h]h4}(hjLhhhNhNubah}(h]id4ah ]h"]h$]h&]jKhf4jhuh1jhj$jKubeh}(h]h ]h"]h$]h&]uh1hhhhMChj!ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_YUV422``h]j)}(hjvh]hVIDEO_PALETTE_YUV422}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjtubah}(h]h ]h"]h$]h&]uh1hhhhMDhjqubah}(h]h ]h"]h$]h&]uh1jhjnubj)}(hhh]h)}(h,:ref:`V4L2_PIX_FMT_YUYV `h]h)}(hjh]h)}(hjh]hV4L2_PIX_FMT_YUYV}(hjhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjv4l2-pix-fmt-yuyvuh1hhhhMEhjubah}(h]h ]h"]h$]h&]uh1hhhhMEhjubah}(h]h ]h"]h$]h&]uh1jhjnubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_YUYV``\ [#f5]_h](j)}(h``VIDEO_PALETTE_YUYV``h]hVIDEO_PALETTE_YUYV}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh }(hjhhhNhNubj)}(h[#f5]_h]h5}(hjhhhNhNubah}(h]id5ah ]h"]h$]h&]jKhf5jhuh1jhjjKubeh}(h]h ]h"]h$]h&]uh1hhhhMFhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h,:ref:`V4L2_PIX_FMT_YUYV `h]h)}(hjh]h)}(hjh]hV4L2_PIX_FMT_YUYV}(hj hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainjreftyperef refexplicitrefwarnjv4l2-pix-fmt-yuyvuh1hhhhMGhjubah}(h]h ]h"]h$]h&]uh1hhhhMGhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_UYVY``h]j)}(hjAh]hVIDEO_PALETTE_UYVY}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jhj?ubah}(h]h ]h"]h$]h&]uh1hhhhMHhj<ubah}(h]h ]h"]h$]h&]uh1jhj9ubj)}(hhh]h)}(h,:ref:`V4L2_PIX_FMT_UYVY `h]h)}(hjah]h)}(hjah]hV4L2_PIX_FMT_UYVY}(hjfhhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjcubah}(h]h ]h"]h$]h&]refdoch refdomainjpreftyperef refexplicitrefwarnjv4l2-pix-fmt-uyvyuh1hhhhMIhj_ubah}(h]h ]h"]h$]h&]uh1hhhhMIhj\ubah}(h]h ]h"]h$]h&]uh1jhj9ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_YUV420``h]j)}(hjh]hVIDEO_PALETTE_YUV420}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMJhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hNoneh]hNone}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_YUV411``h]j)}(hjh]hVIDEO_PALETTE_YUV411}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hhhhMLhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h3:ref:`V4L2_PIX_FMT_Y41P ` [#f6]_h](h)}(h,:ref:`V4L2_PIX_FMT_Y41P `h]h)}(hj h]hV4L2_PIX_FMT_Y41P}(hj hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjubah}(h]h ]h"]h$]h&]refdoch refdomainj reftyperef refexplicitrefwarnjv4l2-pix-fmt-y41puh1hhhhMMhjubh }(hjhhhNhNubj)}(h[#f6]_h]h6}(hj" hhhNhNubah}(h]id6ah ]h"]h$]h&]jKhf6jhuh1jhjjKubeh}(h]h ]h"]h$]h&]uh1hhhhMMhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_RAW``h]j)}(hjL h]hVIDEO_PALETTE_RAW}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ ubah}(h]h ]h"]h$]h&]uh1hhhhMNhjG ubah}(h]h ]h"]h$]h&]uh1jhjD ubj)}(hhh]h)}(h None [#f7]_h](hNone }(hjj hhhNhNubj)}(h[#f7]_h]h7}(hjr hhhNhNubah}(h]id7ah ]h"]h$]h&]jKhf7jhuh1jhjj jKubeh}(h]h ]h"]h$]h&]uh1hhhhMOhjg ubah}(h]h ]h"]h$]h&]uh1jhjD ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_YUV422P``h]j)}(hj h]hVIDEO_PALETTE_YUV422P}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhMPhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h2:ref:`V4L2_PIX_FMT_YUV422P `h]h)}(hj h]h)}(hj h]hV4L2_PIX_FMT_YUV422P}(hj hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]refdoch refdomainj reftyperef refexplicitrefwarnjv4l2-pix-fmt-yuv422puh1hhhhMQhj ubah}(h]h ]h"]h$]h&]uh1hhhhMQhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_YUV411P``h]j)}(hj h]hVIDEO_PALETTE_YUV411P}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1hhhhMRhj ubah}(h]h ]h"]h$]h&]uh1jhj ubj)}(hhh]h)}(h9:ref:`V4L2_PIX_FMT_YUV411P ` [#f8]_h](h)}(h2:ref:`V4L2_PIX_FMT_YUV411P `h]h)}(hj!h]hV4L2_PIX_FMT_YUV411P}(hj!hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]refdoch refdomainj'!reftyperef refexplicitrefwarnjv4l2-pix-fmt-yuv411puh1hhhhMShj!ubh }(hj!hhhNhNubj)}(h[#f8]_h]h8}(hj=!hhhNhNubah}(h]id8ah ]h"]h$]h&]jKhf8jhuh1jhj!jKubeh}(h]h ]h"]h$]h&]uh1hhhhMShj!ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_YUV420P``h]j)}(hjg!h]hVIDEO_PALETTE_YUV420P}(hji!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhje!ubah}(h]h ]h"]h$]h&]uh1hhhhMThjb!ubah}(h]h ]h"]h$]h&]uh1jhj_!ubj)}(hhh]h)}(h0:ref:`V4L2_PIX_FMT_YVU420 `h]h)}(hj!h]h)}(hj!h]hV4L2_PIX_FMT_YVU420}(hj!hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]refdoch refdomainj!reftyperef refexplicitrefwarnjv4l2-pix-fmt-yvu420uh1hhhhMUhj!ubah}(h]h ]h"]h$]h&]uh1hhhhMUhj!ubah}(h]h ]h"]h$]h&]uh1jhj_!ubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(h``VIDEO_PALETTE_YUV410P``h]j)}(hj!h]hVIDEO_PALETTE_YUV410P}(hj!hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj!ubah}(h]h ]h"]h$]h&]uh1hhhhMVhj!ubah}(h]h ]h"]h$]h&]uh1jhj!ubj)}(hhh]h)}(h0:ref:`V4L2_PIX_FMT_YVU410 `h]h)}(hj!h]h)}(hj!h]hV4L2_PIX_FMT_YVU410}(hj!hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj!ubah}(h]h ]h"]h$]h&]refdoch refdomainj!reftyperef refexplicitrefwarnjv4l2-pix-fmt-yvu410uh1hhhhMWhj!ubah}(h]h ]h"]h$]h&]uh1hhhhMWhj!ubah}(h]h ]h"]h$]h&]uh1jhj!ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jGhjwubeh}(h]h ]h"]h$]h&]colsKuh1jhjtubah}(h]h ]h"]h$]h&]uh1jhjhhhNhNubh)}(hV4L2 image formats are defined in :ref:`pixfmt`. The image format can be selected with the :ref:`VIDIOC_S_FMT ` ioctl.h](h"V4L2 image formats are defined in }(hj("hhhNhNubh)}(h :ref:`pixfmt`h]h)}(hj2"h]hpixfmt}(hj4"hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj0"ubah}(h]h ]h"]h$]h&]refdoch refdomainj>"reftyperef refexplicitrefwarnjpixfmtuh1hhhhMYhj("ubh,. The image format can be selected with the }(hj("hhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]h)}(hjV"h]h VIDIOC_S_FMT}(hjX"hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjT"ubah}(h]h ]h"]h$]h&]refdoch refdomainjb"reftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhMYhj("ubh ioctl.}(hj("hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMYhjhhubeh}(h](image-propertiesjeh ]h"](image propertiesv4l-image-propertieseh$]h&]uh1hhhhhhhhM j}j"j sj}jj subh)}(hhh](h)}(hAudioh]hAudio}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj"hhhhhM]ubh)}(hX3The ``VIDIOCGAUDIO`` and ``VIDIOCSAUDIO`` ioctl and struct ``video_audio`` are used to enumerate the audio inputs of a V4L device. The equivalent V4L2 ioctls are :ref:`VIDIOC_G_AUDIO ` and :ref:`VIDIOC_S_AUDIO ` using struct :c:type:`v4l2_audio` as discussed in :ref:`audio`.h](hThe }(hj"hhhNhNubj)}(h``VIDIOCGAUDIO``h]h VIDIOCGAUDIO}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh and }(hj"hhhNhNubj)}(h``VIDIOCSAUDIO``h]h VIDIOCSAUDIO}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubh ioctl and struct }(hj"hhhNhNubj)}(h``video_audio``h]h video_audio}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj"ubhX are used to enumerate the audio inputs of a V4L device. The equivalent V4L2 ioctls are }(hj"hhhNhNubh)}(h&:ref:`VIDIOC_G_AUDIO `h]h)}(hj"h]hVIDIOC_G_AUDIO}(hj"hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj"ubah}(h]h ]h"]h$]h&]refdoch refdomainj"reftyperef refexplicitrefwarnjvidioc_g_audiouh1hhhhM_hj"ubh and }(hj"hhhNhNubh)}(h&:ref:`VIDIOC_S_AUDIO `h]h)}(hj"h]hVIDIOC_S_AUDIO}(hj#hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj"ubah}(h]h ]h"]h$]h&]refdoch refdomainj #reftyperef refexplicitrefwarnjvidioc_g_audiouh1hhhhM_hj"ubh using struct }(hj"hhhNhNubh)}(h:c:type:`v4l2_audio`h]j)}(hj"#h]h v4l2_audio}(hj$#hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj #ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_audiouh1hhhhM_hj"ubh as discussed in }(hj"hhhNhNubh)}(h :ref:`audio`h]h)}(hjE#h]haudio}(hjG#hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjC#ubah}(h]h ]h"]h$]h&]refdoch refdomainjQ#reftyperef refexplicitrefwarnjaudiouh1hhhhM_hj"ubh.}(hj"hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM_hj"hhubh)}(hTThe ``audio`` "channel number" field counting audio inputs was renamed to ``index``.h](hThe }(hjm#hhhNhNubj)}(h ``audio``h]haudio}(hju#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm#ubhA “channel number” field counting audio inputs was renamed to }(hjm#hhhNhNubj)}(h ``index``h]hindex}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjm#ubh.}(hjm#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMfhj"hhubh)}(hXOn ``VIDIOCSAUDIO`` the ``mode`` field selects *one* of the ``VIDEO_SOUND_MONO``, ``VIDEO_SOUND_STEREO``, ``VIDEO_SOUND_LANG1`` or ``VIDEO_SOUND_LANG2`` audio demodulation modes. When the current audio standard is BTSC ``VIDEO_SOUND_LANG2`` refers to SAP and ``VIDEO_SOUND_LANG1`` is meaningless. Also undocumented in the V4L specification, there is no way to query the selected mode. On ``VIDIOCGAUDIO`` the driver returns the *actually received* audio programmes in this field. In the V4L2 API this information is stored in the struct :c:type:`v4l2_tuner` ``rxsubchans`` and ``audmode`` fields, respectively. See :ref:`tuner` for more information on tuners. Related to audio modes struct :c:type:`v4l2_audio` also reports if this is a mono or stereo input, regardless if the source is a tuner.h](hOn }(hj#hhhNhNubj)}(h``VIDIOCSAUDIO``h]h VIDIOCSAUDIO}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh the }(hj#hhhNhNubj)}(h``mode``h]hmode}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh field selects }(hj#hhhNhNubj!)}(h*one*h]hone}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj#ubh of the }(hj#hhhNhNubj)}(h``VIDEO_SOUND_MONO``h]hVIDEO_SOUND_MONO}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh, }(hj#hhhNhNubj)}(h``VIDEO_SOUND_STEREO``h]hVIDEO_SOUND_STEREO}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh, }hj#sbj)}(h``VIDEO_SOUND_LANG1``h]hVIDEO_SOUND_LANG1}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh or }(hj#hhhNhNubj)}(h``VIDEO_SOUND_LANG2``h]hVIDEO_SOUND_LANG2}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubhC audio demodulation modes. When the current audio standard is BTSC }(hj#hhhNhNubj)}(h``VIDEO_SOUND_LANG2``h]hVIDEO_SOUND_LANG2}(hj%$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh refers to SAP and }(hj#hhhNhNubj)}(h``VIDEO_SOUND_LANG1``h]hVIDEO_SOUND_LANG1}(hj7$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubhl is meaningless. Also undocumented in the V4L specification, there is no way to query the selected mode. On }(hj#hhhNhNubj)}(h``VIDIOCGAUDIO``h]h VIDIOCGAUDIO}(hjI$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh the driver returns the }(hj#hhhNhNubj!)}(h*actually received*h]hactually received}(hj[$hhhNhNubah}(h]h ]h"]h$]h&]uh1j hj#ubhZ audio programmes in this field. In the V4L2 API this information is stored in the struct }(hj#hhhNhNubh)}(h:c:type:`v4l2_tuner`h]j)}(hjo$h]h v4l2_tuner}(hjq$hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjm$ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_tuneruh1hhhhMihj#ubh }(hj#hhhNhNubj)}(h``rxsubchans``h]h rxsubchans}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh and }(hj#hhhNhNubj)}(h ``audmode``h]haudmode}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj#ubh fields, respectively. See }(hj#hhhNhNubh)}(h :ref:`tuner`h]h)}(hj$h]htuner}(hj$hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj$ubah}(h]h ]h"]h$]h&]refdoch refdomainj$reftyperef refexplicitrefwarnjtuneruh1hhhhMihj#ubh? for more information on tuners. Related to audio modes struct }(hj#hhhNhNubh)}(h:c:type:`v4l2_audio`h]j)}(hj$h]h v4l2_audio}(hj$hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj$ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_audiouh1hhhhMihj#ubhU also reports if this is a mono or stereo input, regardless if the source is a tuner.}(hj#hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMihj"hhubh)}(hThe following fields where replaced by V4L2 controls accessible with the :ref:`VIDIOC_QUERYCTRL`, :ref:`VIDIOC_G_CTRL ` and :ref:`VIDIOC_S_CTRL ` ioctls:h](hIThe following fields where replaced by V4L2 controls accessible with the }(hj%hhhNhNubh)}(h:ref:`VIDIOC_QUERYCTRL`h]h)}(hj %h]hVIDIOC_QUERYCTRL}(hj %hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj %ubah}(h]h ]h"]h$]h&]refdoch refdomainj%reftyperef refexplicitrefwarnjvidioc_queryctrluh1hhhhMwhj%ubh, }(hj%hhhNhNubh)}(h$:ref:`VIDIOC_G_CTRL `h]h)}(hj/%h]h VIDIOC_G_CTRL}(hj1%hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj-%ubah}(h]h ]h"]h$]h&]refdoch refdomainj;%reftyperef refexplicitrefwarnj vidioc_g_ctrluh1hhhhMwhj%ubh and }(hj%hhhNhNubh)}(h$:ref:`VIDIOC_S_CTRL `h]h)}(hjS%h]h VIDIOC_S_CTRL}(hjU%hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjQ%ubah}(h]h ]h"]h$]h&]refdoch refdomainj_%reftyperef refexplicitrefwarnj vidioc_g_ctrluh1hhhhMwhj%ubh ioctls:}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMwhj"hhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jhj~%ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jhj~%ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hstruct ``video_audio``h](hstruct }(hj%hhhNhNubj)}(h``video_audio``h]h video_audio}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jhj%ubj)}(hhh]h)}(hV4L2 Control IDh]hV4L2 Control ID}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1jhj~%ubjH)}(hhh](j)}(hhh](j)}(hhh]h)}(h ``volume``h]j)}(hj%h]hvolume}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj%ubah}(h]h ]h"]h$]h&]uh1hhhhMhj%ubah}(h]h ]h"]h$]h&]uh1jhj%ubj)}(hhh]h)}(h``V4L2_CID_AUDIO_VOLUME``h]j)}(hj&h]hV4L2_CID_AUDIO_VOLUME}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj &ubah}(h]h ]h"]h$]h&]uh1hhhhMhj &ubah}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jhj%ubj)}(hhh](j)}(hhh]h)}(h``bass``h]j)}(hj7&h]hbass}(hj9&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5&ubah}(h]h ]h"]h$]h&]uh1hhhhMhj2&ubah}(h]h ]h"]h$]h&]uh1jhj/&ubj)}(hhh]h)}(h``V4L2_CID_AUDIO_BASS``h]j)}(hjW&h]hV4L2_CID_AUDIO_BASS}(hjY&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjU&ubah}(h]h ]h"]h$]h&]uh1hhhhMhjR&ubah}(h]h ]h"]h$]h&]uh1jhj/&ubeh}(h]h ]h"]h$]h&]uh1jhj%ubj)}(hhh](j)}(hhh]h)}(h ``treble``h]j)}(hj&h]htreble}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj~&ubah}(h]h ]h"]h$]h&]uh1hhhhMhj{&ubah}(h]h ]h"]h$]h&]uh1jhjx&ubj)}(hhh]h)}(h``V4L2_CID_AUDIO_TREBLE``h]j)}(hj&h]hV4L2_CID_AUDIO_TREBLE}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1hhhhMhj&ubah}(h]h ]h"]h$]h&]uh1jhjx&ubeh}(h]h ]h"]h$]h&]uh1jhj%ubj)}(hhh](j)}(hhh]h)}(h ``balance``h]j)}(hj&h]hbalance}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1hhhhMhj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubj)}(hhh]h)}(h``V4L2_CID_AUDIO_BALANCE``h]j)}(hj&h]hV4L2_CID_AUDIO_BALANCE}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj&ubah}(h]h ]h"]h$]h&]uh1hhhhMhj&ubah}(h]h ]h"]h$]h&]uh1jhj&ubeh}(h]h ]h"]h$]h&]uh1jhj%ubeh}(h]h ]h"]h$]h&]uh1jGhj~%ubeh}(h]h ]h"]h$]h&]colsKuh1jhj{%ubah}(h]h ]h"]h$]h&]uh1jhj"hhhNhNubh)}(hXTo determine which of these controls are supported by a driver V4L provides the ``flags`` ``VIDEO_AUDIO_VOLUME``, ``VIDEO_AUDIO_BASS``, ``VIDEO_AUDIO_TREBLE`` and ``VIDEO_AUDIO_BALANCE``. In the V4L2 API the :ref:`VIDIOC_QUERYCTRL` ioctl reports if the respective control is supported. Accordingly the ``VIDEO_AUDIO_MUTABLE`` and ``VIDEO_AUDIO_MUTE`` flags where replaced by the boolean ``V4L2_CID_AUDIO_MUTE`` control.h](hPTo determine which of these controls are supported by a driver V4L provides the }(hj'hhhNhNubj)}(h ``flags``h]hflags}(hj%'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh }(hj'hhhNhNubj)}(h``VIDEO_AUDIO_VOLUME``h]hVIDEO_AUDIO_VOLUME}(hj7'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh, }(hj'hhhNhNubj)}(h``VIDEO_AUDIO_BASS``h]hVIDEO_AUDIO_BASS}(hjI'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh, }(hj'hhhNhNubj)}(h``VIDEO_AUDIO_TREBLE``h]hVIDEO_AUDIO_TREBLE}(hj['hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh and }(hj'hhhNhNubj)}(h``VIDEO_AUDIO_BALANCE``h]hVIDEO_AUDIO_BALANCE}(hjm'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh. In the V4L2 API the }(hj'hhhNhNubh)}(h:ref:`VIDIOC_QUERYCTRL`h]h)}(hj'h]hVIDIOC_QUERYCTRL}(hj'hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj'ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftyperef refexplicitrefwarnjvidioc_queryctrluh1hhhhMhj'ubhG ioctl reports if the respective control is supported. Accordingly the }(hj'hhhNhNubj)}(h``VIDEO_AUDIO_MUTABLE``h]hVIDEO_AUDIO_MUTABLE}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh and }(hj'hhhNhNubj)}(h``VIDEO_AUDIO_MUTE``h]hVIDEO_AUDIO_MUTE}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh% flags where replaced by the boolean }(hj'hhhNhNubj)}(h``V4L2_CID_AUDIO_MUTE``h]hV4L2_CID_AUDIO_MUTE}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh control.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj"hhubh)}(hXgAll V4L2 controls have a ``step`` attribute replacing the struct ``video_audio`` ``step`` field. The V4L audio controls are assumed to range from 0 to 65535 with no particular reset value. The V4L2 API permits arbitrary limits and defaults which can be queried with the :ref:`VIDIOC_QUERYCTRL` ioctl. For general information about controls see :ref:`control`.h](hAll V4L2 controls have a }(hj'hhhNhNubj)}(h``step``h]hstep}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh attribute replacing the struct }(hj'hhhNhNubj)}(h``video_audio``h]h video_audio}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh }(hj'hhhNhNubj)}(h``step``h]hstep}(hj (hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'ubh field. The V4L audio controls are assumed to range from 0 to 65535 with no particular reset value. The V4L2 API permits arbitrary limits and defaults which can be queried with the }(hj'hhhNhNubh)}(h:ref:`VIDIOC_QUERYCTRL`h]h)}(hj(h]hVIDIOC_QUERYCTRL}(hj!(hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]refdoch refdomainj+(reftyperef refexplicitrefwarnjvidioc_queryctrluh1hhhhMhj'ubh3 ioctl. For general information about controls see }(hj'hhhNhNubh)}(h:ref:`control`h]h)}(hjC(h]hcontrol}(hjE(hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjA(ubah}(h]h ]h"]h$]h&]refdoch refdomainjO(reftyperef refexplicitrefwarnjcontroluh1hhhhMhj'ubh.}(hj'hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj"hhubeh}(h]audioah ]h"]audioah$]h&]uh1hhhhhhhhM]ubh)}(hhh](h)}(hFrame Buffer Overlayh]hFrame Buffer Overlay}(hjv(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjs(hhhhhMubh)}(hX9The V4L2 ioctls equivalent to ``VIDIOCGFBUF`` and ``VIDIOCSFBUF`` are :ref:`VIDIOC_G_FBUF ` and :ref:`VIDIOC_S_FBUF `. The ``base`` field of struct ``video_buffer`` remained unchanged, except V4L2 defines a flag to indicate non-destructive overlays instead of a ``NULL`` pointer. All other fields moved into the struct :c:type:`v4l2_pix_format` ``fmt`` substructure of struct :c:type:`v4l2_framebuffer`. The ``depth`` field was replaced by ``pixelformat``. See :ref:`pixfmt-rgb` for a list of RGB formats and their respective color depths.h](hThe V4L2 ioctls equivalent to }(hj(hhhNhNubj)}(h``VIDIOCGFBUF``h]h VIDIOCGFBUF}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh and }(hj(hhhNhNubj)}(h``VIDIOCSFBUF``h]h VIDIOCSFBUF}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh are }(hj(hhhNhNubh)}(h$:ref:`VIDIOC_G_FBUF `h]h)}(hj(h]h VIDIOC_G_FBUF}(hj(hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]refdoch refdomainj(reftyperef refexplicitrefwarnj vidioc_g_fbufuh1hhhhMhj(ubh and }(hj(hhhNhNubh)}(h$:ref:`VIDIOC_S_FBUF `h]h)}(hj(h]h VIDIOC_S_FBUF}(hj(hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj(ubah}(h]h ]h"]h$]h&]refdoch refdomainj(reftyperef refexplicitrefwarnj vidioc_g_fbufuh1hhhhMhj(ubh. The }(hj(hhhNhNubj)}(h``base``h]hbase}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh field of struct }(hj(hhhNhNubj)}(h``video_buffer``h]h video_buffer}(hj )hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubhb remained unchanged, except V4L2 defines a flag to indicate non-destructive overlays instead of a }(hj(hhhNhNubj)}(h``NULL``h]hNULL}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh1 pointer. All other fields moved into the struct }(hj(hhhNhNubh)}(h:c:type:`v4l2_pix_format`h]j)}(hj0)h]hv4l2_pix_format}(hj2)hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj.)ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<jv4l2_pix_formatuh1hhhhMhj(ubh }(hj(hhhNhNubj)}(h``fmt``h]hfmt}(hjQ)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh substructure of struct }(hj(hhhNhNubh)}(h:c:type:`v4l2_framebuffer`h]j)}(hje)h]hv4l2_framebuffer}(hjg)hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjc)ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<jv4l2_framebufferuh1hhhhMhj(ubh. The }hj(sbj)}(h ``depth``h]hdepth}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh field was replaced by }(hj(hhhNhNubj)}(h``pixelformat``h]h pixelformat}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj(ubh. See }(hj(hhhNhNubh)}(h:ref:`pixfmt-rgb`h]h)}(hj)h]h pixfmt-rgb}(hj)hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj)ubah}(h]h ]h"]h$]h&]refdoch refdomainj)reftyperef refexplicitrefwarnj pixfmt-rgbuh1hhhhMhj(ubh= for a list of RGB formats and their respective color depths.}(hj(hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjs(hhubh)}(hX`Instead of the special ioctls ``VIDIOCGWIN`` and ``VIDIOCSWIN`` V4L2 uses the general-purpose data format negotiation ioctls :ref:`VIDIOC_G_FMT ` and :ref:`VIDIOC_S_FMT `. They take a pointer to a struct :c:type:`v4l2_format` as argument. Here the ``win`` member of the ``fmt`` union is used, a struct :c:type:`v4l2_window`.h](hInstead of the special ioctls }(hj)hhhNhNubj)}(h``VIDIOCGWIN``h]h VIDIOCGWIN}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh and }(hj)hhhNhNubj)}(h``VIDIOCSWIN``h]h VIDIOCSWIN}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh> V4L2 uses the general-purpose data format negotiation ioctls }(hj)hhhNhNubh)}(h":ref:`VIDIOC_G_FMT `h]h)}(hj*h]h VIDIOC_G_FMT}(hj*hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj*ubah}(h]h ]h"]h$]h&]refdoch refdomainj*reftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhMhj)ubh and }(hj)hhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]h)}(hj&*h]h VIDIOC_S_FMT}(hj(*hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj$*ubah}(h]h ]h"]h$]h&]refdoch refdomainj2*reftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhMhj)ubh". They take a pointer to a struct }(hj)hhhNhNubh)}(h:c:type:`v4l2_format`h]j)}(hjJ*h]h v4l2_format}(hjL*hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjH*ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_formatuh1hhhhMhj)ubh as argument. Here the }(hj)hhhNhNubj)}(h``win``h]hwin}(hjk*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh member of the }(hj)hhhNhNubj)}(h``fmt``h]hfmt}(hj}*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj)ubh union is used, a struct }(hj)hhhNhNubh)}(h:c:type:`v4l2_window`h]j)}(hj*h]h v4l2_window}(hj*hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj*ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_windowuh1hhhhMhj)ubh.}(hj)hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjs(hhubh)}(hXThe ``x``, ``y``, ``width`` and ``height`` fields of struct ``video_window`` moved into struct :c:type:`v4l2_rect` substructure ``w`` of struct :c:type:`v4l2_window`. The ``chromakey``, ``clips``, and ``clipcount`` fields remained unchanged. Struct ``video_clip`` was renamed to struct :c:type:`v4l2_clip`, also containing a struct :c:type:`v4l2_rect`, but the semantics are still the same.h](hThe }(hj*hhhNhNubj)}(h``x``h]hx}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh, }(hj*hhhNhNubj)}(h``y``h]hy}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh, }hj*sbj)}(h ``width``h]hwidth}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh and }(hj*hhhNhNubj)}(h ``height``h]hheight}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh fields of struct }(hj*hhhNhNubj)}(h``video_window``h]h video_window}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh moved into struct }(hj*hhhNhNubh)}(h:c:type:`v4l2_rect`h]j)}(hj+h]h v4l2_rect}(hj+hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_rectuh1hhhhMhj*ubh substructure }(hj*hhhNhNubj)}(h``w``h]hw}(hj=+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh of struct }(hj*hhhNhNubh)}(h:c:type:`v4l2_window`h]j)}(hjQ+h]h v4l2_window}(hjS+hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjO+ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_windowuh1hhhhMhj*ubh. The }(hj*hhhNhNubj)}(h ``chromakey``h]h chromakey}(hjr+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh, }hj*sbj)}(h ``clips``h]hclips}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh, and }(hj*hhhNhNubj)}(h ``clipcount``h]h clipcount}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh# fields remained unchanged. Struct }(hj*hhhNhNubj)}(h``video_clip``h]h video_clip}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj*ubh was renamed to struct }(hj*hhhNhNubh)}(h:c:type:`v4l2_clip`h]j)}(hj+h]h v4l2_clip}(hj+hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_clipuh1hhhhMhj*ubh, also containing a struct }(hj*hhhNhNubh)}(h:c:type:`v4l2_rect`h]j)}(hj+h]h v4l2_rect}(hj+hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj+ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_rectuh1hhhhMhj*ubh', but the semantics are still the same.}(hj*hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjs(hhubh)}(hXThe ``VIDEO_WINDOW_INTERLACE`` flag was dropped. Instead applications must set the ``field`` field to ``V4L2_FIELD_ANY`` or ``V4L2_FIELD_INTERLACED``. The ``VIDEO_WINDOW_CHROMAKEY`` flag moved into struct :c:type:`v4l2_framebuffer`, under the new name ``V4L2_FBUF_FLAG_CHROMAKEY``.h](hThe }(hj,hhhNhNubj)}(h``VIDEO_WINDOW_INTERLACE``h]hVIDEO_WINDOW_INTERLACE}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh5 flag was dropped. Instead applications must set the }(hj,hhhNhNubj)}(h ``field``h]hfield}(hj ,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh field to }(hj,hhhNhNubj)}(h``V4L2_FIELD_ANY``h]hV4L2_FIELD_ANY}(hj2,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh or }(hj,hhhNhNubj)}(h``V4L2_FIELD_INTERLACED``h]hV4L2_FIELD_INTERLACED}(hjD,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh. The }(hj,hhhNhNubj)}(h``VIDEO_WINDOW_CHROMAKEY``h]hVIDEO_WINDOW_CHROMAKEY}(hjV,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh flag moved into struct }(hj,hhhNhNubh)}(h:c:type:`v4l2_framebuffer`h]j)}(hjj,h]hv4l2_framebuffer}(hjl,hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhjh,ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<jv4l2_framebufferuh1hhhhMhj,ubh, under the new name }(hj,hhhNhNubj)}(h``V4L2_FBUF_FLAG_CHROMAKEY``h]hV4L2_FBUF_FLAG_CHROMAKEY}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh.}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjs(hhubh)}(hXGIn V4L, storing a bitmap pointer in ``clips`` and setting ``clipcount`` to ``VIDEO_CLIP_BITMAP`` (-1) requests bitmap clipping, using a fixed size bitmap of 1024 × 625 bits. Struct :c:type:`v4l2_window` has a separate ``bitmap`` pointer field for this purpose and the bitmap size is determined by ``w.width`` and ``w.height``.h](h$In V4L, storing a bitmap pointer in }(hj,hhhNhNubj)}(h ``clips``h]hclips}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh and setting }(hj,hhhNhNubj)}(h ``clipcount``h]h clipcount}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh to }(hj,hhhNhNubj)}(h``VIDEO_CLIP_BITMAP``h]hVIDEO_CLIP_BITMAP}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubhV (-1) requests bitmap clipping, using a fixed size bitmap of 1024 × 625 bits. Struct }(hj,hhhNhNubh)}(h:c:type:`v4l2_window`h]j)}(hj,h]h v4l2_window}(hj,hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj,ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_windowuh1hhhhMhj,ubh has a separate }(hj,hhhNhNubj)}(h ``bitmap``h]hbitmap}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubhE pointer field for this purpose and the bitmap size is determined by }(hj,hhhNhNubj)}(h ``w.width``h]hw.width}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh and }(hj,hhhNhNubj)}(h ``w.height``h]hw.height}(hj(-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj,ubh.}(hj,hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjs(hhubh)}(h^The ``VIDIOCCAPTURE`` ioctl to enable or disable overlay was renamed to :ref:`VIDIOC_OVERLAY`.h](hThe }(hj@-hhhNhNubj)}(h``VIDIOCCAPTURE``h]h VIDIOCCAPTURE}(hjH-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@-ubh3 ioctl to enable or disable overlay was renamed to }(hj@-hhhNhNubh)}(h:ref:`VIDIOC_OVERLAY`h]h)}(hj\-h]hVIDIOC_OVERLAY}(hj^-hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjZ-ubah}(h]h ]h"]h$]h&]refdoch refdomainjh-reftyperef refexplicitrefwarnjvidioc_overlayuh1hhhhMhj@-ubh.}(hj@-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjs(hhubeh}(h]frame-buffer-overlayah ]h"]frame buffer overlayah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hCroppingh]hCropping}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj-hhhhhMubh)}(hXTo capture only a subsection of the full picture V4L defines the ``VIDIOCGCAPTURE`` and ``VIDIOCSCAPTURE`` ioctls using struct ``video_capture``. The equivalent V4L2 ioctls are :ref:`VIDIOC_G_CROP ` and :ref:`VIDIOC_S_CROP ` using struct :c:type:`v4l2_crop`, and the related :ref:`VIDIOC_CROPCAP` ioctl. This is a rather complex matter, see :ref:`crop` for details.h](hATo capture only a subsection of the full picture V4L defines the }(hj-hhhNhNubj)}(h``VIDIOCGCAPTURE``h]hVIDIOCGCAPTURE}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh and }(hj-hhhNhNubj)}(h``VIDIOCSCAPTURE``h]hVIDIOCSCAPTURE}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh ioctls using struct }(hj-hhhNhNubj)}(h``video_capture``h]h video_capture}(hj-hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj-ubh!. The equivalent V4L2 ioctls are }(hj-hhhNhNubh)}(h$:ref:`VIDIOC_G_CROP `h]h)}(hj-h]h VIDIOC_G_CROP}(hj-hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj-ubah}(h]h ]h"]h$]h&]refdoch refdomainj-reftyperef refexplicitrefwarnj vidioc_g_cropuh1hhhhMhj-ubh and }(hj-hhhNhNubh)}(h$:ref:`VIDIOC_S_CROP `h]h)}(hj.h]h VIDIOC_S_CROP}(hj.hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj-ubah}(h]h ]h"]h$]h&]refdoch refdomainj .reftyperef refexplicitrefwarnj vidioc_g_cropuh1hhhhMhj-ubh using struct }(hj-hhhNhNubh)}(h:c:type:`v4l2_crop`h]j)}(hj%.h]h v4l2_crop}(hj'.hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj#.ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_cropuh1hhhhMhj-ubh, and the related }(hj-hhhNhNubh)}(h:ref:`VIDIOC_CROPCAP`h]h)}(hjH.h]hVIDIOC_CROPCAP}(hjJ.hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjF.ubah}(h]h ]h"]h$]h&]refdoch refdomainjT.reftyperef refexplicitrefwarnjvidioc_cropcapuh1hhhhMhj-ubh- ioctl. This is a rather complex matter, see }(hj-hhhNhNubh)}(h :ref:`crop`h]h)}(hjl.h]hcrop}(hjn.hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjj.ubah}(h]h ]h"]h$]h&]refdoch refdomainjx.reftyperef refexplicitrefwarnjcropuh1hhhhMhj-ubh for details.}(hj-hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj-hhubh)}(hX3The ``x``, ``y``, ``width`` and ``height`` fields moved into struct :c:type:`v4l2_rect` substructure ``c`` of struct :c:type:`v4l2_crop`. The ``decimation`` field was dropped. In the V4L2 API the scaling factor is implied by the size of the cropping rectangle and the size of the captured or overlaid image.h](hThe }(hj.hhhNhNubj)}(h``x``h]hx}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh, }(hj.hhhNhNubj)}(h``y``h]hy}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh, }hj.sbj)}(h ``width``h]hwidth}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh and }(hj.hhhNhNubj)}(h ``height``h]hheight}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh fields moved into struct }(hj.hhhNhNubh)}(h:c:type:`v4l2_rect`h]j)}(hj.h]h v4l2_rect}(hj.hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_rectuh1hhhhMhj.ubh substructure }(hj.hhhNhNubj)}(h``c``h]hc}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj.ubh of struct }(hj.hhhNhNubh)}(h:c:type:`v4l2_crop`h]j)}(hj/h]h v4l2_crop}(hj/hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_cropuh1hhhhMhj.ubh. The }(hj.hhhNhNubj)}(h``decimation``h]h decimation}(hj` ioctl.h](hThe }(hjT/hhhNhNubj)}(h``VIDEO_CAPTURE_ODD``h]hVIDEO_CAPTURE_ODD}(hj\/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjT/ubh and }(hjT/hhhNhNubj)}(h``VIDEO_CAPTURE_EVEN``h]hVIDEO_CAPTURE_EVEN}(hjn/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjT/ubhM flags to capture only the odd or even field, respectively, were replaced by }(hjT/hhhNhNubj)}(h``V4L2_FIELD_TOP``h]hV4L2_FIELD_TOP}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjT/ubh and }hjT/sbj)}(h``V4L2_FIELD_BOTTOM``h]hV4L2_FIELD_BOTTOM}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjT/ubh in the field named }(hjT/hhhNhNubj)}(h ``field``h]hfield}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjT/ubh of struct }(hjT/hhhNhNubh)}(h:c:type:`v4l2_pix_format`h]j)}(hj/h]hv4l2_pix_format}(hj/hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<jv4l2_pix_formatuh1hhhhMhjT/ubh and struct }(hjT/hhhNhNubh)}(h:c:type:`v4l2_window`h]j)}(hj/h]h v4l2_window}(hj/hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_windowuh1hhhhMhjT/ubhK. These structures are used to select a capture or overlay format with the }(hjT/hhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]h)}(hj/h]h VIDIOC_S_FMT}(hj0hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj/ubah}(h]h ]h"]h$]h&]refdoch refdomainj 0reftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhMhjT/ubh ioctl.}(hjT/hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj-hhubeh}(h]croppingah ]h"]croppingah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hReading Images, Memory Mappingh]hReading Images, Memory Mapping}(hj10hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj.0hhhhhMubh)}(hhh](h)}(hCapturing using the read methodh]hCapturing using the read method}(hjB0hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj?0hhhhhMubh)}(hXThere is no essential difference between reading images from a V4L or V4L2 device using the :c:func:`read()` function, however V4L2 drivers are not required to support this I/O method. Applications can determine if the function is available with the :ref:`VIDIOC_QUERYCAP` ioctl. All V4L2 devices exchanging data with applications must support the :c:func:`select()` and :c:func:`poll()` functions.h](h\There is no essential difference between reading images from a V4L or V4L2 device using the }(hjP0hhhNhNubh)}(h:c:func:`read()`h]j)}(hjZ0h]hread()}(hj\0hhhNhNubah}(h]h ](hj'c-funceh"]h$]h&]uh1jhjX0ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypefunc refexplicitrefwarnj8j<jreaduh1hhhhMhjP0ubh function, however V4L2 drivers are not required to support this I/O method. Applications can determine if the function is available with the }(hjP0hhhNhNubh)}(h:ref:`VIDIOC_QUERYCAP`h]h)}(hj}0h]hVIDIOC_QUERYCAP}(hj0hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj{0ubah}(h]h ]h"]h$]h&]refdoch refdomainj0reftyperef refexplicitrefwarnjvidioc_querycapuh1hhhhMhjP0ubhL ioctl. All V4L2 devices exchanging data with applications must support the }(hjP0hhhNhNubh)}(h:c:func:`select()`h]j)}(hj0h]hselect()}(hj0hhhNhNubah}(h]h ](hj'c-funceh"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypefunc refexplicitrefwarnj8j<jselectuh1hhhhMhjP0ubh and }(hjP0hhhNhNubh)}(h:c:func:`poll()`h]j)}(hj0h]hpoll()}(hj0hhhNhNubah}(h]h ](hj'c-funceh"]h$]h&]uh1jhj0ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypefunc refexplicitrefwarnj8j<jpolluh1hhhhMhjP0ubh functions.}(hjP0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj?0hhubh)}(hXTo select an image format and size, V4L provides the ``VIDIOCSPICT`` and ``VIDIOCSWIN`` ioctls. V4L2 uses the general-purpose data format negotiation ioctls :ref:`VIDIOC_G_FMT ` and :ref:`VIDIOC_S_FMT `. They take a pointer to a struct :c:type:`v4l2_format` as argument, here the struct :c:type:`v4l2_pix_format` named ``pix`` of its ``fmt`` union is used.h](h5To select an image format and size, V4L provides the }(hj0hhhNhNubj)}(h``VIDIOCSPICT``h]h VIDIOCSPICT}(hj0hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh and }(hj0hhhNhNubj)}(h``VIDIOCSWIN``h]h VIDIOCSWIN}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubhF ioctls. V4L2 uses the general-purpose data format negotiation ioctls }(hj0hhhNhNubh)}(h":ref:`VIDIOC_G_FMT `h]h)}(hj1h]h VIDIOC_G_FMT}(hj1hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]refdoch refdomainj%1reftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhMhj0ubh and }hj0sbh)}(h":ref:`VIDIOC_S_FMT `h]h)}(hj=1h]h VIDIOC_S_FMT}(hj?1hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj;1ubah}(h]h ]h"]h$]h&]refdoch refdomainjI1reftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhMhj0ubh". They take a pointer to a struct }(hj0hhhNhNubh)}(h:c:type:`v4l2_format`h]j)}(hja1h]h v4l2_format}(hjc1hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj_1ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<j v4l2_formatuh1hhhhMhj0ubh as argument, here the struct }(hj0hhhNhNubh)}(h:c:type:`v4l2_pix_format`h]j)}(hj1h]hv4l2_pix_format}(hj1hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj1ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<jv4l2_pix_formatuh1hhhhMhj0ubh named }(hj0hhhNhNubj)}(h``pix``h]hpix}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh of its }(hj0hhhNhNubj)}(h``fmt``h]hfmt}(hj1hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj0ubh union is used.}(hj0hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj?0hhubh)}(hAFor more information about the V4L2 read interface see :ref:`rw`.h](h7For more information about the V4L2 read interface see }(hj1hhhNhNubh)}(h :ref:`rw`h]h)}(hj1h]hrw}(hj1hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj1ubah}(h]h ]h"]h$]h&]refdoch refdomainj1reftyperef refexplicitrefwarnjrwuh1hhhhMhj1ubh.}(hj1hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj?0hhubeh}(h]capturing-using-the-read-methodah ]h"]capturing using the read methodah$]h&]uh1hhj.0hhhhhMubh)}(hhh](h)}(hCapturing using memory mappingh]hCapturing using memory mapping}(hj 2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj 2hhhhhMubh)}(hXApplications can read from V4L devices by mapping buffers in device memory, or more often just buffers allocated in DMA-able system memory, into their address space. This avoids the data copying overhead of the read method. V4L2 supports memory mapping as well, with a few differences.h]hXApplications can read from V4L devices by mapping buffers in device memory, or more often just buffers allocated in DMA-able system memory, into their address space. This avoids the data copying overhead of the read method. V4L2 supports memory mapping as well, with a few differences.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj 2hhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jhj+2ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jhj+2ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(hV4Lh]hV4L}(hjK2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hjH2ubah}(h]h ]h"]h$]h&]uh1jhjE2ubj)}(hhh]h)}(hV4L2h]hV4L2}(hjb2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhM hj_2ubah}(h]h ]h"]h$]h&]uh1jhjE2ubeh}(h]h ]h"]h$]h&]uh1jhjB2ubah}(h]h ]h"]h$]h&]uh1jhj+2ubjH)}(hhh](j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj2ubj)}(hhh]h)}(hThe image format must be selected before buffers are allocated, with the :ref:`VIDIOC_S_FMT ` ioctl. When no format is selected the driver may use the last, possibly by another application requested format.h](hIThe image format must be selected before buffers are allocated, with the }(hj2hhhNhNubh)}(h":ref:`VIDIOC_S_FMT `h]h)}(hj2h]h VIDIOC_S_FMT}(hj2hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]refdoch refdomainj2reftyperef refexplicitrefwarnj vidioc_g_fmtuh1hhhhM hj2ubhq ioctl. When no format is selected the driver may use the last, possibly by another application requested format.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hj2ubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhj2ubj)}(hhh](j)}(hhh]h)}(hApplications cannot change the number of buffers. The it is built into the driver, unless it has a module option to change the number when the driver module is loaded.h]hApplications cannot change the number of buffers. The it is built into the driver, unless it has a module option to change the number when the driver module is loaded.}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1jhj2ubj)}(hhh]h)}(hThe :ref:`VIDIOC_REQBUFS` ioctl allocates the desired number of buffers, this is a required step in the initialization sequence.h](hThe }(hj2hhhNhNubh)}(h:ref:`VIDIOC_REQBUFS`h]h)}(hj2h]hVIDIOC_REQBUFS}(hj2hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj2ubah}(h]h ]h"]h$]h&]refdoch refdomainj3reftyperef refexplicitrefwarnjvidioc_reqbufsuh1hhhhMhj2ubhg ioctl allocates the desired number of buffers, this is a required step in the initialization sequence.}(hj2hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj2ubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhj2ubj)}(hhh](j)}(hhh]h)}(hX(Drivers map all buffers as one contiguous range of memory. The ``VIDIOCGMBUF`` ioctl is available to query the number of buffers, the offset of each buffer from the start of the virtual file, and the overall amount of memory used, which can be used as arguments for the :c:func:`mmap()` function.h](h?Drivers map all buffers as one contiguous range of memory. The }(hj33hhhNhNubj)}(h``VIDIOCGMBUF``h]h VIDIOCGMBUF}(hj;3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj33ubh ioctl is available to query the number of buffers, the offset of each buffer from the start of the virtual file, and the overall amount of memory used, which can be used as arguments for the }(hj33hhhNhNubh)}(h:c:func:`mmap()`h]j)}(hjO3h]hmmap()}(hjQ3hhhNhNubah}(h]h ](hj'c-funceh"]h$]h&]uh1jhjM3ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypefunc refexplicitrefwarnj8j<jmmapuh1hhhhMhj33ubh function.}(hj33hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj03ubah}(h]h ]h"]h$]h&]uh1jhj-3ubj)}(hhh]h)}(h|Buffers are individually mapped. The offset and size of each buffer can be determined with the :ref:`VIDIOC_QUERYBUF` ioctl.h](h_Buffers are individually mapped. The offset and size of each buffer can be determined with the }(hj3hhhNhNubh)}(h:ref:`VIDIOC_QUERYBUF`h]h)}(hj3h]hVIDIOC_QUERYBUF}(hj3hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj3ubah}(h]h ]h"]h$]h&]refdoch refdomainj3reftyperef refexplicitrefwarnjvidioc_querybufuh1hhhhMhj3ubh ioctl.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj|3ubah}(h]h ]h"]h$]h&]uh1jhj-3ubeh}(h]h ]h"]h$]h&]uh1jhj2ubj)}(hhh](j)}(hhh](h)}(hXrThe ``VIDIOCMCAPTURE`` ioctl prepares a buffer for capturing. It also determines the image format for this buffer. The ioctl returns immediately, eventually with an ``EAGAIN`` error code if no video signal had been detected. When the driver supports more than one buffer applications can call the ioctl multiple times and thus have multiple outstanding capture requests.h](hThe }(hj3hhhNhNubj)}(h``VIDIOCMCAPTURE``h]hVIDIOCMCAPTURE}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh ioctl prepares a buffer for capturing. It also determines the image format for this buffer. The ioctl returns immediately, eventually with an }(hj3hhhNhNubj)}(h ``EAGAIN``h]hEAGAIN}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubh error code if no video signal had been detected. When the driver supports more than one buffer applications can call the ioctl multiple times and thus have multiple outstanding capture requests.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj3ubh)}(hVThe ``VIDIOCSYNC`` ioctl suspends execution until a particular buffer has been filled.h](hThe }(hj3hhhNhNubj)}(h``VIDIOCSYNC``h]h VIDIOCSYNC}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj3ubhD ioctl suspends execution until a particular buffer has been filled.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM&hj3ubeh}(h]h ]h"]h$]h&]uh1jhj3ubj)}(hhh]h)}(hXDrivers maintain an incoming and outgoing queue. :ref:`VIDIOC_QBUF` enqueues any empty buffer into the incoming queue. Filled buffers are dequeued from the outgoing queue with the :ref:`VIDIOC_DQBUF ` ioctl. To wait until filled buffers become available this function, :c:func:`select()` or :c:func:`poll()` can be used. The :ref:`VIDIOC_STREAMON` ioctl must be called once after enqueuing one or more buffers to start capturing. Its counterpart :ref:`VIDIOC_STREAMOFF ` stops capturing and dequeues all buffers from both queues. Applications can query the signal status, if known, with the :ref:`VIDIOC_ENUMINPUT` ioctl.h](h1Drivers maintain an incoming and outgoing queue. }(hj4hhhNhNubh)}(h:ref:`VIDIOC_QBUF`h]h)}(hj(4h]h VIDIOC_QBUF}(hj*4hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj&4ubah}(h]h ]h"]h$]h&]refdoch refdomainj44reftyperef refexplicitrefwarnj vidioc_qbufuh1hhhhM(hj4ubhq enqueues any empty buffer into the incoming queue. Filled buffers are dequeued from the outgoing queue with the }(hj4hhhNhNubh)}(h!:ref:`VIDIOC_DQBUF `h]h)}(hjL4h]h VIDIOC_DQBUF}(hjN4hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjJ4ubah}(h]h ]h"]h$]h&]refdoch refdomainjX4reftyperef refexplicitrefwarnj vidioc_qbufuh1hhhhM(hj4ubhE ioctl. To wait until filled buffers become available this function, }(hj4hhhNhNubh)}(h:c:func:`select()`h]j)}(hjp4h]hselect()}(hjr4hhhNhNubah}(h]h ](hj'c-funceh"]h$]h&]uh1jhjn4ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypefunc refexplicitrefwarnj8j<jselectuh1hhhhM(hj4ubh or }(hj4hhhNhNubh)}(h:c:func:`poll()`h]j)}(hj4h]hpoll()}(hj4hhhNhNubah}(h]h ](hj'c-funceh"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypefunc refexplicitrefwarnj8j<jpolluh1hhhhM(hj4ubh can be used. The }(hj4hhhNhNubh)}(h:ref:`VIDIOC_STREAMON`h]h)}(hj4h]hVIDIOC_STREAMON}(hj4hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]refdoch refdomainj4reftyperef refexplicitrefwarnjvidioc_streamonuh1hhhhM(hj4ubhc ioctl must be called once after enqueuing one or more buffers to start capturing. Its counterpart }(hj4hhhNhNubh)}(h):ref:`VIDIOC_STREAMOFF `h]h)}(hj4h]hVIDIOC_STREAMOFF}(hj4hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]refdoch refdomainj4reftyperef refexplicitrefwarnjvidioc_streamonuh1hhhhM(hj4ubhy stops capturing and dequeues all buffers from both queues. Applications can query the signal status, if known, with the }(hj4hhhNhNubh)}(h:ref:`VIDIOC_ENUMINPUT`h]h)}(hj4h]hVIDIOC_ENUMINPUT}(hj5hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj4ubah}(h]h ]h"]h$]h&]refdoch refdomainj 5reftyperef refexplicitrefwarnjvidioc_enuminputuh1hhhhM(hj4ubh ioctl.}(hj4hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM(hj4ubah}(h]h ]h"]h$]h&]uh1jhj3ubeh}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jGhj+2ubeh}(h]h ]h"]h$]h&]colsKuh1jhj(2ubah}(h]h ]h"]h$]h&]uh1jhj 2hhhNhNubh)}(hOFor a more in-depth discussion of memory mapping and examples, see :ref:`mmap`.h](hCFor a more in-depth discussion of memory mapping and examples, see }(hjE5hhhNhNubh)}(h :ref:`mmap`h]h)}(hjO5h]hmmap}(hjQ5hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjM5ubah}(h]h ]h"]h$]h&]refdoch refdomainj[5reftyperef refexplicitrefwarnjmmapuh1hhhhM6hjE5ubh.}(hjE5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM6hj 2hhubeh}(h]capturing-using-memory-mappingah ]h"]capturing using memory mappingah$]h&]uh1hhj.0hhhhhMubeh}(h]reading-images-memory-mappingah ]h"]reading images, memory mappingah$]h&]uh1hhhhhhhhMubh)}(hhh](h)}(hReading Raw VBI Datah]hReading Raw VBI Data}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj5hhhhhM:ubh)}(hX:Originally the V4L API did not specify a raw VBI capture interface, only the device file ``/dev/vbi`` was reserved for this purpose. The only driver supporting this interface was the BTTV driver, de-facto defining the V4L VBI interface. Reading from the device yields a raw VBI image with the following parameters:h](hYOriginally the V4L API did not specify a raw VBI capture interface, only the device file }(hj5hhhNhNubj)}(h ``/dev/vbi``h]h/dev/vbi}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj5ubh was reserved for this purpose. The only driver supporting this interface was the BTTV driver, de-facto defining the V4L VBI interface. Reading from the device yields a raw VBI image with the following parameters:}(hj5hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM<hj5hhubj)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jhj5ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK2uh1jhj5ubj)}(hhh]j)}(hhh](j)}(hhh]h)}(h struct :c:type:`v4l2_vbi_format`h](hstruct }(hj5hhhNhNubh)}(h:c:type:`v4l2_vbi_format`h]j)}(hj5h]hv4l2_vbi_format}(hj5hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<jv4l2_vbi_formatuh1hhhhMGhj5ubeh}(h]h ]h"]h$]h&]uh1hhhhMGhj5ubah}(h]h ]h"]h$]h&]uh1jhj5ubj)}(hhh]h)}(hV4L, BTTV driverh]hV4L, BTTV driver}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMHhj6ubah}(h]h ]h"]h$]h&]uh1jhj5ubeh}(h]h ]h"]h$]h&]uh1jhj5ubah}(h]h ]h"]h$]h&]uh1jhj5ubjH)}(hhh](j)}(hhh](j)}(hhh]h)}(h sampling_rateh]h sampling_rate}(hj:6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMIhj76ubah}(h]h ]h"]h$]h&]uh1jhj46ubj)}(hhh]h)}(ha28636363 Hz NTSC (or any other 525-line standard); 35468950 Hz PAL and SECAM (625-line standards)h]ha28636363 Hz NTSC (or any other 525-line standard); 35468950 Hz PAL and SECAM (625-line standards)}(hjQ6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMJhjN6ubah}(h]h ]h"]h$]h&]uh1jhj46ubeh}(h]h ]h"]h$]h&]uh1jhj16ubj)}(hhh](j)}(hhh]h)}(hoffseth]hoffset}(hjq6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMLhjn6ubah}(h]h ]h"]h$]h&]uh1jhjk6ubj)}(hhh]h)}(h?h]h?}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMMhj6ubah}(h]h ]h"]h$]h&]uh1jhjk6ubeh}(h]h ]h"]h$]h&]uh1jhj16ubj)}(hhh](j)}(hhh]h)}(hsamples_per_lineh]hsamples_per_line}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMNhj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubj)}(hhh]h)}(h2048h]h2048}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMOhj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]uh1jhj16ubj)}(hhh](j)}(hhh]h)}(h sample_formath]h sample_format}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMPhj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubj)}(hhh]h)}(h^V4L2_PIX_FMT_GREY. The last four bytes (a machine endianness integer) contain a frame counter.h]h^V4L2_PIX_FMT_GREY. The last four bytes (a machine endianness integer) contain a frame counter.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMQhj6ubah}(h]h ]h"]h$]h&]uh1jhj6ubeh}(h]h ]h"]h$]h&]uh1jhj16ubj)}(hhh](j)}(hhh]h)}(hstart[]h]hstart[]}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMShj7ubah}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh]h)}(h#10, 273 NTSC; 22, 335 PAL and SECAMh]h#10, 273 NTSC; 22, 335 PAL and SECAM}(hj-7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMThj*7ubah}(h]h ]h"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]uh1jhj16ubj)}(hhh](j)}(hhh]h)}(hcount[]h]hcount[]}(hjM7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMUhjJ7ubah}(h]h ]h"]h$]h&]uh1jhjG7ubj)}(hhh]h)}(h 16, 16 [#f9]_h](h16, 16 }(hjd7hhhNhNubj)}(h[#f9]_h]h9}(hjl7hhhNhNubah}(h]id9ah ]h"]h$]h&]jKhf9jhuh1jhjd7jKubeh}(h]h ]h"]h$]h&]uh1hhhhMVhja7ubah}(h]h ]h"]h$]h&]uh1jhjG7ubeh}(h]h ]h"]h$]h&]uh1jhj16ubj)}(hhh](j)}(hhh]h)}(hflagsh]hflags}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMWhj7ubah}(h]h ]h"]h$]h&]uh1jhj7ubj)}(hhh]h)}(h0h]h0}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMXhj7ubah}(h]h ]h"]h$]h&]uh1jhj7ubeh}(h]h ]h"]h$]h&]uh1jhj16ubeh}(h]h ]h"]h$]h&]uh1jGhj5ubeh}(h]h ]h"]h$]h&]colsKuh1jhj5ubah}(h]h ]h"]h$]h&]uh1jhj5hhhNhNubh)}(hXUndocumented in the V4L specification, in Linux 2.3 the ``VIDIOCGVBIFMT`` and ``VIDIOCSVBIFMT`` ioctls using struct ``vbi_format`` were added to determine the VBI image parameters. These ioctls are only partially compatible with the V4L2 VBI interface specified in :ref:`raw-vbi`.h](h8Undocumented in the V4L specification, in Linux 2.3 the }(hj7hhhNhNubj)}(h``VIDIOCGVBIFMT``h]h VIDIOCGVBIFMT}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh and }(hj7hhhNhNubj)}(h``VIDIOCSVBIFMT``h]h VIDIOCSVBIFMT}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh ioctls using struct }(hj7hhhNhNubj)}(h``vbi_format``h]h vbi_format}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj7ubh were added to determine the VBI image parameters. These ioctls are only partially compatible with the V4L2 VBI interface specified in }(hj7hhhNhNubh)}(h:ref:`raw-vbi`h]h)}(hj8h]hraw-vbi}(hj8hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj8ubah}(h]h ]h"]h$]h&]refdoch refdomainj$8reftyperef refexplicitrefwarnjraw-vbiuh1hhhhMZhj7ubh.}(hj7hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMZhj5hhubh)}(hAn ``offset`` field does not exist, ``sample_format`` is supposed to be ``VIDEO_PALETTE_RAW``, equivalent to ``V4L2_PIX_FMT_GREY``. The remaining fields are probably equivalent to struct :c:type:`v4l2_vbi_format`.h](hAn }(hj@8hhhNhNubj)}(h ``offset``h]hoffset}(hjH8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@8ubh field does not exist, }(hj@8hhhNhNubj)}(h``sample_format``h]h sample_format}(hjZ8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@8ubh is supposed to be }(hj@8hhhNhNubj)}(h``VIDEO_PALETTE_RAW``h]hVIDEO_PALETTE_RAW}(hjl8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@8ubh, equivalent to }(hj@8hhhNhNubj)}(h``V4L2_PIX_FMT_GREY``h]hV4L2_PIX_FMT_GREY}(hj~8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@8ubh9. The remaining fields are probably equivalent to struct }(hj@8hhhNhNubh)}(h:c:type:`v4l2_vbi_format`h]j)}(hj8h]hv4l2_vbi_format}(hj8hhhNhNubah}(h]h ](hj'c-typeeh"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypetype refexplicitrefwarnj8j<jv4l2_vbi_formatuh1hhhhM`hj@8ubh.}(hj@8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM`hj5hhubh)}(hXApparently only the Zoran (ZR 36120) driver implements these ioctls. The semantics differ from those specified for V4L2 in two ways. The parameters are reset on :c:func:`open()` and ``VIDIOCSVBIFMT`` always returns an ``EINVAL`` error code if the parameters are invalid.h](hApparently only the Zoran (ZR 36120) driver implements these ioctls. The semantics differ from those specified for V4L2 in two ways. The parameters are reset on }(hj8hhhNhNubh)}(h:c:func:`open()`h]j)}(hj8h]hopen()}(hj8hhhNhNubah}(h]h ](hj'c-funceh"]h$]h&]uh1jhj8ubah}(h]h ]h"]h$]h&]refdoch refdomainj'reftypefunc refexplicitrefwarnj8j<jopenuh1hhhhMehj8ubh and }(hj8hhhNhNubj)}(h``VIDIOCSVBIFMT``h]h VIDIOCSVBIFMT}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh always returns an }(hj8hhhNhNubj)}(h ``EINVAL``h]hEINVAL}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj8ubh* error code if the parameters are invalid.}(hj8hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMehj5hhubeh}(h]reading-raw-vbi-dataah ]h"]reading raw vbi dataah$]h&]uh1hhhhhhhhM:ubh)}(hhh](h)}(h Miscellaneoush]h Miscellaneous}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj9hhhhhMlubh)}(hV4L2 has no equivalent of the ``VIDIOCGUNIT`` ioctl. Applications can find the VBI device associated with a video capture device (or vice versa) by reopening the device and requesting VBI data. For details see :ref:`open`.h](hV4L2 has no equivalent of the }(hj'9hhhNhNubj)}(h``VIDIOCGUNIT``h]h VIDIOCGUNIT}(hj/9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj'9ubh ioctl. Applications can find the VBI device associated with a video capture device (or vice versa) by reopening the device and requesting VBI data. For details see }(hj'9hhhNhNubh)}(h :ref:`open`h]h)}(hjC9h]hopen}(hjE9hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjA9ubah}(h]h ]h"]h$]h&]refdoch refdomainjO9reftyperef refexplicitrefwarnjopenuh1hhhhMnhj'9ubh.}(hj'9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMnhj9hhubh)}(hNo replacement exists for ``VIDIOCKEY``, and the V4L functions for microcode programming. A new interface for MPEG compression and playback devices is documented in :ref:`extended-controls`.h](hNo replacement exists for }(hjk9hhhNhNubj)}(h ``VIDIOCKEY``h]h VIDIOCKEY}(hjs9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjk9ubh~, and the V4L functions for microcode programming. A new interface for MPEG compression and playback devices is documented in }(hjk9hhhNhNubh)}(h:ref:`extended-controls`h]h)}(hj9h]hextended-controls}(hj9hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhj9ubah}(h]h ]h"]h$]h&]refdoch refdomainj9reftyperef refexplicitrefwarnjextended-controlsuh1hhhhMshjk9ubh.}(hjk9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMshj9hhubhfootnote)}(hAccording to Documentation/admin-guide/devices.rst these should be symbolic links to ``/dev/video0``. Note the original bttv interface is not compatible with V4L or V4L2. h](hlabel)}(hhh]h1}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j9hj9hhhNhNubh)}(hAccording to Documentation/admin-guide/devices.rst these should be symbolic links to ``/dev/video0``. Note the original bttv interface is not compatible with V4L or V4L2.h](hUAccording to Documentation/admin-guide/devices.rst these should be symbolic links to }(hj9hhhNhNubj)}(h``/dev/video0``h]h /dev/video0}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubhF. Note the original bttv interface is not compatible with V4L or V4L2.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMxhj9ubeh}(h]jah ]h"]f1ah$]h&]jajKjhuh1j9hhhMwhj9hhubj9)}(h[According to ``Documentation/admin-guide/devices.rst`` a symbolic link to ``/dev/radio0``. h](j9)}(hhh]h2}(hj9hhhNhNubah}(h]h ]h"]h$]h&]uh1j9hj9hhhNhNubh)}(hZAccording to ``Documentation/admin-guide/devices.rst`` a symbolic link to ``/dev/radio0``.h](h According to }(hj9hhhNhNubj)}(h)``Documentation/admin-guide/devices.rst``h]h%Documentation/admin-guide/devices.rst}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh a symbolic link to }(hj9hhhNhNubj)}(h``/dev/radio0``h]h /dev/radio0}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj9ubh.}(hj9hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM}hj9ubeh}(h]j5ah ]h"]f2ah$]h&]j0ajKjhuh1j9hhhM|hj9hhubj9)}(hWThis is a custom format used by the BTTV driver, not one of the V4L2 standard formats. h](j9)}(hhh]h3}(hj9:hhhNhNubah}(h]h ]h"]h$]h&]uh1j9hj5:hhhNhNubh)}(hVThis is a custom format used by the BTTV driver, not one of the V4L2 standard formats.h]hVThis is a custom format used by the BTTV driver, not one of the V4L2 standard formats.}(hjF:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj5:ubeh}(h]jah ]h"]f3ah$]h&]jajKjhuh1j9hhhMhj9hhubj9)}(hPresumably all V4L RGB formats are little-endian, although some drivers might interpret them according to machine endianness. V4L2 defines little-endian, big-endian and red/blue swapped variants. For details see :ref:`pixfmt-rgb`. h](j9)}(hhh]h4}(hj_:hhhNhNubah}(h]h ]h"]h$]h&]uh1j9hj[:hhhNhNubh)}(hPresumably all V4L RGB formats are little-endian, although some drivers might interpret them according to machine endianness. V4L2 defines little-endian, big-endian and red/blue swapped variants. For details see :ref:`pixfmt-rgb`.h](hPresumably all V4L RGB formats are little-endian, although some drivers might interpret them according to machine endianness. V4L2 defines little-endian, big-endian and red/blue swapped variants. For details see }(hjl:hhhNhNubh)}(h:ref:`pixfmt-rgb`h]h)}(hjv:h]h pixfmt-rgb}(hjx:hhhNhNubah}(h]h ](hstdstd-refeh"]h$]h&]uh1hhjt:ubah}(h]h ]h"]h$]h&]refdoch refdomainj:reftyperef refexplicitrefwarnj pixfmt-rgbuh1hhhhMhjl:ubh.}(hjl:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj[:ubeh}(h]j[ah ]h"]f4ah$]h&]jVajKjhuh1j9hhhMhj9hhubj9)}(h~``VIDEO_PALETTE_YUV422`` and ``VIDEO_PALETTE_YUYV`` are the same formats. Some V4L drivers respond to one, some to the other. h](j9)}(hhh]h5}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j9hj:hhhNhNubh)}(h}``VIDEO_PALETTE_YUV422`` and ``VIDEO_PALETTE_YUYV`` are the same formats. Some V4L drivers respond to one, some to the other.h](j)}(h``VIDEO_PALETTE_YUV422``h]hVIDEO_PALETTE_YUV422}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh and }(hj:hhhNhNubj)}(h``VIDEO_PALETTE_YUYV``h]hVIDEO_PALETTE_YUYV}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubhJ are the same formats. Some V4L drivers respond to one, some to the other.}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj:ubeh}(h]jah ]h"]f5ah$]h&]jajKjhuh1j9hhhMhj9hhubj9)}(hLNot to be confused with ``V4L2_PIX_FMT_YUV411P``, which is a planar format. h](j9)}(hhh]h6}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1j9hj:hhhNhNubh)}(hKNot to be confused with ``V4L2_PIX_FMT_YUV411P``, which is a planar format.h](hNot to be confused with }(hj:hhhNhNubj)}(h``V4L2_PIX_FMT_YUV411P``h]hV4L2_PIX_FMT_YUV411P}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj:ubh, which is a planar format.}(hj:hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj:ubeh}(h]j1 ah ]h"]f6ah$]h&]j, ajKjhuh1j9hhhMhj9hhubj9)}(h,V4L explains this as: "RAW capture (BT848)" h](j9)}(hhh]h7}(hj';hhhNhNubah}(h]h ]h"]h$]h&]uh1j9hj#;hhhNhNubh)}(h+V4L explains this as: "RAW capture (BT848)"h]h/V4L explains this as: “RAW capture (BT848)”}(hj4;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj#;ubeh}(h]j ah ]h"]f7ah$]h&]j| ajKjhuh1j9hhhMhj9hhubj9)}(hINot to be confused with ``V4L2_PIX_FMT_Y41P``, which is a packed format. h](j9)}(hhh]h8}(hjM;hhhNhNubah}(h]h ]h"]h$]h&]uh1j9hjI;hhhNhNubh)}(hHNot to be confused with ``V4L2_PIX_FMT_Y41P``, which is a packed format.h](hNot to be confused with }(hjZ;hhhNhNubj)}(h``V4L2_PIX_FMT_Y41P``h]hV4L2_PIX_FMT_Y41P}(hjb;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjZ;ubh, which is a packed format.}(hjZ;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhjI;ubeh}(h]jL!ah ]h"]f8ah$]h&]jG!ajKjhuh1j9hhhMhj9hhubj9)}(h~Old driver versions used different values, eventually the custom ``BTTV_VBISIZE`` ioctl was added to query the correct values.h](j9)}(hhh]h9}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1j9hj;hhhNhNubh)}(h~Old driver versions used different values, eventually the custom ``BTTV_VBISIZE`` ioctl was added to query the correct values.h](hAOld driver versions used different values, eventually the custom }(hj;hhhNhNubj)}(h``BTTV_VBISIZE``h]h BTTV_VBISIZE}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj;ubh- ioctl was added to query the correct values.}(hj;hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj;ubeh}(h]j{7ah ]h"]f9ah$]h&]jv7ajKjhuh1j9hhhMhj9hhubeh}(h] miscellaneousah ]h"] miscellaneousah$]h&]uh1hhhhhhhhMlubeh}(h]( differences-between-v4l-and-v4l2heh ]h"]( differences between v4l and v4l2diff-v4leh$]h&]uh1hhhhhhhhKj}j;hsj}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj;error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}(f1]jaf2]j&af3]jaf4]jLaf5]jaf6]j" af7]jr af8]j=!af9]jl7aurefids}(h]haj]jaj]j aj]jaj5]j&aj]jaj[]jLaj]jaj1 ]j" aj ]jr ajL!]j=!aj{7]jl7aunameids}(j;hj;j;jjjjj!jj5j2jjj"jj"j"jp(jm(j-j-j+0j(0j5j5j2j2j|5jy5j9j9j;j;j9jj2:j5jX:jj:j[j:jj ;j1 jF;j j~;jL!j;j{7u nametypes}(j;j;jjj!j5jj"j"jp(j-j+0j5j2j|5j9j;j9j2:jX:j:j:j ;jF;j~;j;uh}(hhj;hjjjjjjj0j&jjj2j$jj8jjj"jjjjVjLjjj, j" j| jr jG!j=!jm(j"j-js(j(0j-j5j.0j2j?0jy5j 2j9j5jv7jl7j;j9jj9j5j9jj5:j[j[:jj:j1 j:j j#;jL!jI;j{7j;jju footnote_refs}(j.<]jaj0<]j&aj2<]jaj4<]jLaj6<]jaj8<]j" aj:<]jr aj<<]j=!aj><]jl7au citation_refs} autofootnotes](j9j9j5:j[:j:j:j#;jI;j;eautofootnote_refs](jj&jjLjj" jr j=!jl7esymbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startK symbol_footnote_startK id_counter collectionsCounter}j;K sRparse_messages]hsystem_message)}(hhh]h)}(heUnexpected possible title overline or transition. Treating it as ordinary text because it's so short.h]hgUnexpected possible title overline or transition. Treating it as ordinary text because it’s so short.}(hj|<hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjy<ubah}(h]h ]h"]h$]h&]levelKtypeINFOlineMMsourcehuh1jw<hj6ubatransform_messages](jx<)}(hhh]h)}(hhh]h.Hyperlink target "diff-v4l" is not referenced.}hj<sbah}(h]h ]h"]h$]h&]uh1hhj<ubah}(h]h ]h"]h$]h&]levelKtypej<sourcehlineKuh1jw<ubjx<)}(hhh]h)}(hhh]h-Hyperlink target "v4l-dev" is not referenced.}hj<sbah}(h]h ]h"]h$]h&]uh1hhj<ubah}(h]h ]h"]h$]h&]levelKtypej<sourcehlineK#uh1jw<ubjx<)}(hhh]h)}(hhh]h:Hyperlink target "v4l-image-properties" is not referenced.}hj<sbah}(h]h ]h"]h$]h&]uh1hhj<ubah}(h]h ]h"]h$]h&]levelKtypej<sourcehlineMuh1jw<ube transformerN include_log] decorationNhhub.