€•Y-Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ./translations/zh_CN/userspace-api/media/v4l/io”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/zh_TW/userspace-api/media/v4l/io”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/it_IT/userspace-api/media/v4l/io”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/ja_JP/userspace-api/media/v4l/io”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/ko_KR/userspace-api/media/v4l/io”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/pt_BR/userspace-api/media/v4l/io”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/sp_SP/userspace-api/media/v4l/io”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later”h]”hŒ8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒH/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/io.rst”h´KubhŒtarget”“”)”}”(hŒ.. _io:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œio”uh1hÈh´Khhh²hh³hÇubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ Input/Output”h]”hŒ Input/Output”…””}”(hhÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhhØh²hh³hÇh´KubhŒ paragraph”“”)”}”(hŒ¢The V4L2 API defines several different methods to read from or write to a device. All drivers exchanging data with applications must support at least one of them.”h]”hŒ¢The V4L2 API defines several different methods to read from or write to a device. All drivers exchanging data with applications must support at least one of them.”…””}”(hhíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K hhØh²hubhì)”}”(hŒåThe classic I/O method using the :c:func:`read()` and :c:func:`write()` function is automatically selected after opening a V4L2 device. When the driver does not support this method attempts to read or write will fail at any time.”h]”(hŒ!The classic I/O method using the ”…””}”(hhûh²hh³Nh´Nubh)”}”(hŒ:c:func:`read()`”h]”hŒliteral”“”)”}”(hjh]”hŒread()”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”(Œxref”Œc”Œc-func”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œuserspace-api/media/v4l/io”Œ refdomain”jŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰Œ c:parent_key”Œsphinx.domains.c”Œ LookupKey”“”)”}”Œdata”]”j'Œ ASTIdentifier”“”)”}”Œ identifier”ŒV4L”sbN†”asbŒ reftarget”Œread”uh1hh³hÇh´K hhûubhŒ and ”…””}”(hhûh²hh³Nh´Nubh)”}”(hŒ:c:func:`write()`”h]”j)”}”(hj=h]”hŒwrite()”…””}”(hj?h²hh³Nh´Nubah}”(h]”h ]”(jjŒc-func”eh"]”h$]”h&]”uh1jhj;ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”jŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰j&j*j5Œwrite”uh1hh³hÇh´K hhûubhŒž function is automatically selected after opening a V4L2 device. When the driver does not support this method attempts to read or write will fail at any time.”…””}”(hhûh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K hhØh²hubhì)”}”(hŒšOther methods must be negotiated. To select the streaming I/O method with memory mapped or user buffers applications call the :ref:`VIDIOC_REQBUFS` ioctl.”h]”(hŒ~Other methods must be negotiated. To select the streaming I/O method with memory mapped or user buffers applications call the ”…””}”(hjdh²hh³Nh´Nubh)”}”(hŒ:ref:`VIDIOC_REQBUFS`”h]”hŒinline”“”)”}”(hjnh]”hŒVIDIOC_REQBUFS”…””}”(hjrh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jphjlubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”j|Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj5Œvidioc_reqbufs”uh1hh³hÇh´KhjdubhŒ ioctl.”…””}”(hjdh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KhhØh²hubhì)”}”(hŒýVideo overlay can be considered another I/O method, although the application does not directly receive the image data. It is selected by initiating video overlay with the :ref:`VIDIOC_S_FMT ` ioctl. For more information see :ref:`overlay`.”h]”(hŒ«Video overlay can be considered another I/O method, although the application does not directly receive the image data. It is selected by initiating video overlay with the ”…””}”(hj˜h²hh³Nh´Nubh)”}”(hŒ":ref:`VIDIOC_S_FMT `”h]”jq)”}”(hj¢h]”hŒ VIDIOC_S_FMT”…””}”(hj¤h²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jphj ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”j®Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj5Œ vidioc_g_fmt”uh1hh³hÇh´Khj˜ubhŒ! ioctl. For more information see ”…””}”(hj˜h²hh³Nh´Nubh)”}”(hŒ:ref:`overlay`”h]”jq)”}”(hjÆh]”hŒoverlay”…””}”(hjÈh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jphjÄubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”jÒŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj5Œoverlay”uh1hh³hÇh´Khj˜ubhŒ.”…””}”(hj˜h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KhhØh²hubhì)”}”(hXeGenerally exactly one I/O method, including overlay, is associated with each file descriptor. The only exceptions are applications not exchanging data with a driver ("panel applications", see :ref:`open`) and drivers permitting simultaneous video capturing and overlay using the same file descriptor, for compatibility with V4L and earlier versions of V4L2.”h]”(hŒÄGenerally exactly one I/O method, including overlay, is associated with each file descriptor. The only exceptions are applications not exchanging data with a driver (“panel applicationsâ€, see ”…””}”(hjîh²hh³Nh´Nubh)”}”(hŒ :ref:`open`”h]”jq)”}”(hjøh]”hŒopen”…””}”(hjúh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jphjöubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”jŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj5Œopen”uh1hh³hÇh´KhjîubhŒš) and drivers permitting simultaneous video capturing and overlay using the same file descriptor, for compatibility with V4L and earlier versions of V4L2.”…””}”(hjîh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KhhØh²hubhì)”}”(hX:ref:`VIDIOC_S_FMT ` and :ref:`VIDIOC_REQBUFS` would permit this to some degree, but for simplicity drivers need not support switching the I/O method (after first switching away from read/write) other than by closing and reopening the device.”h]”(h)”}”(hŒ":ref:`VIDIOC_S_FMT `”h]”jq)”}”(hj&h]”hŒ VIDIOC_S_FMT”…””}”(hj(h²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jphj$ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”j2Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj5Œ vidioc_g_fmt”uh1hh³hÇh´K"hj ubhŒ and ”…””}”(hj h²hh³Nh´Nubh)”}”(hŒ:ref:`VIDIOC_REQBUFS`”h]”jq)”}”(hjJh]”hŒVIDIOC_REQBUFS”…””}”(hjLh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jphjHubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”jVŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj5Œvidioc_reqbufs”uh1hh³hÇh´K"hj ubhŒÄ would permit this to some degree, but for simplicity drivers need not support switching the I/O method (after first switching away from read/write) other than by closing and reopening the device.”…””}”(hj h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K"hhØh²hubhì)”}”(hŒGThe following sections describe the various I/O methods in more detail.”h]”hŒGThe following sections describe the various I/O methods in more detail.”…””}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K'hhØh²hubhŒcompound”“”)”}”(hhh]”hŒtoctree”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”hj Œentries”]”(NŒuserspace-api/media/v4l/rw”†”NŒuserspace-api/media/v4l/mmap”†”NŒuserspace-api/media/v4l/userp”†”NŒuserspace-api/media/v4l/dmabuf”†”NŒuserspace-api/media/v4l/buffer”†”NŒ#userspace-api/media/v4l/field-order”†”eŒ includefiles”]”(j’j”j–j˜jšjœeŒmaxdepth”KŒcaption”NŒglob”‰Œhidden”‰Œ includehidden”‰Œnumbered”KŒ titlesonly”‰Œ rawentries”]”uh1j…h³hÇh´K)hj‚ubah}”(h]”h ]”Œtoctree-wrapper”ah"]”h$]”h&]”uh1j€hhØh²hh³hÇh´Nubeh}”(h]”(Œ input-output”hÕeh ]”h"]”(Œ input/output”Œio”eh$]”h&]”uh1hÖhhh²hh³hÇh´KŒexpect_referenced_by_name”}”j¶hÊsŒexpect_referenced_by_id”}”hÕhÊsubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÛNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jàŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”hÕ]”hÊasŒnameids”}”(j¶hÕjµj²uŒ nametypes”}”(j¶ˆjµ‰uh}”(hÕhØj²hØuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”hŒsystem_message”“”)”}”(hhh]”hì)”}”(hhh]”hŒ(Hyperlink target "io" is not referenced.”…””}”hjJsbah}”(h]”h ]”h"]”h$]”h&]”uh1hëhjGubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÇŒline”Kuh1jEubaŒ transformer”NŒ include_log”]”Œ decoration”Nh²hub.