€•X,Œ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Œ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”“”)”}”(hhñh]”hŒread()”…””}”(hhõhžhhŸNh Nubah}”(h]”h ]”(Œxref”Œc”Œc-func”eh"]”h$]”h&]”uh1hóhhïubah}”(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]”hô)”}”(hj)h]”hŒwrite()”…””}”(hj+hžhhŸNh Nubah}”(h]”h ]”(hÿjŒc-func”eh"]”h$]”h&]”uh1hóhj'ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”jŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jjj!Œ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 ”…””}”(hjPhžhhŸNh Nubh)”}”(hŒ:ref:`VIDIOC_REQBUFS`”h]”hŒinline”“”)”}”(hjZh]”hŒVIDIOC_REQBUFS”…””}”(hj^hžhhŸNh Nubah}”(h]”h ]”(hÿŒstd”Œstd-ref”eh"]”h$]”h&]”uh1j\hjXubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”jhŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj!Œvidioc_reqbufs”uh1hhŸh³h KhjPubhŒ ioctl.”…””}”(hjPhž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]”j])”}”(hjŽh]”hŒ VIDIOC_S_FMT”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(hÿŒstd”Œstd-ref”eh"]”h$]”h&]”uh1j\hjŒubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”jšŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj!Œ vidioc_g_fmt”uh1hhŸh³h Khj„ubhŒ! ioctl. For more information see ”…””}”(hj„hžhhŸNh Nubh)”}”(hŒ:ref:`overlay`”h]”j])”}”(hj²h]”hŒoverlay”…””}”(hj´hžhhŸNh Nubah}”(h]”h ]”(hÿŒstd”Œstd-ref”eh"]”h$]”h&]”uh1j\hj°ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”j¾Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj!Œ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]”j])”}”(hjäh]”hŒopen”…””}”(hjæhžhhŸNh Nubah}”(h]”h ]”(hÿŒstd”Œstd-ref”eh"]”h$]”h&]”uh1j\hjâubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”jðŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj!Œ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]”j])”}”(hjh]”hŒ VIDIOC_S_FMT”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(hÿŒstd”Œstd-ref”eh"]”h$]”h&]”uh1j\hjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”jŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj!Œ vidioc_g_fmt”uh1hhŸh³h K"hj ubhŒ and ”…””}”(hj hžhhŸNh Nubh)”}”(hŒ:ref:`VIDIOC_REQBUFS`”h]”j])”}”(hj6h]”hŒVIDIOC_REQBUFS”…””}”(hj8hžhhŸNh Nubah}”(h]”h ]”(hÿŒstd”Œstd-ref”eh"]”h$]”h&]”uh1j\hj4ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”jBŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj!Œ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.”…””}”(hj^hž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”]”uh1jqhŸh³h K)hjnubah}”(h]”h ]”Œtoctree-wrapper”ah"]”h$]”h&]”uh1jlhhÄ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.”…””}”hj6sbah}”(h]”h ]”h"]”h$]”h&]”uh1h×hj3ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”h³Œline”Kuh1j1ubaŒ transformer”NŒ include_log”]”Œ decoration”Nhžhub.