€•v5Œ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/rw”Œ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/rw”Œ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/rw”Œ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/rw”Œ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/rw”Œ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/rw”Œ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/rw.rst”h KubhŒtarget”“”)”}”(hŒ.. _rw:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œrw”uh1h´h KhhhžhhŸh³ubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ Read/Write”h]”hŒ Read/Write”…””}”(hhÉhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhhÄhžhhŸh³h KubhŒ paragraph”“”)”}”(hŒÿInput and output devices support the :c:func:`read()` and :c:func:`write()` function, respectively, when the ``V4L2_CAP_READWRITE`` flag in the ``capabilities`` field of struct :c:type:`v4l2_capability` returned by the :ref:`VIDIOC_QUERYCAP` ioctl is set.”h]”(hŒ%Input and output devices support 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/rw”Œ refdomain”hòŒ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æ)”}”(hjh]”hŒwrite()”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(hñhòŒc-func”eh"]”h$]”h&]”uh1håhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”hòŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jjjŒwrite”uh1hhŸh³h K hhÙubhŒ" function, respectively, when the ”…””}”(hhÙhžhhŸNh Nubhæ)”}”(hŒ``V4L2_CAP_READWRITE``”h]”hŒV4L2_CAP_READWRITE”…””}”(hj<hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1håhhÙubhŒ flag in the ”…””}”(hhÙhžhhŸNh Nubhæ)”}”(hŒ``capabilities``”h]”hŒ capabilities”…””}”(hjNhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1håhhÙubhŒ field of struct ”…””}”(hhÙhžhhŸNh Nubh)”}”(hŒ:c:type:`v4l2_capability`”h]”hæ)”}”(hjbh]”hŒv4l2_capability”…””}”(hjdhžhhŸNh Nubah}”(h]”h ]”(hñhòŒc-type”eh"]”h$]”h&]”uh1håhj`ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”hòŒreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰jjjŒv4l2_capability”uh1hhŸh³h K hhÙubhŒ returned by the ”…””}”(hhÙhžhhŸNh Nubh)”}”(hŒ:ref:`VIDIOC_QUERYCAP`”h]”hŒinline”“”)”}”(hj…h]”hŒVIDIOC_QUERYCAP”…””}”(hj‰hžhhŸNh Nubah}”(h]”h ]”(hñŒstd”Œstd-ref”eh"]”h$]”h&]”uh1j‡hjƒubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”j“Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjŒvidioc_querycap”uh1hhŸh³h K hhÙubhŒ ioctl is set.”…””}”(hhÙhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K hhÄhžhubhØ)”}”(hXDDrivers may need the CPU to copy the data, but they may also support DMA to or from user memory, so this I/O method is not necessarily less efficient than other methods merely exchanging buffer pointers. It is considered inferior though because no meta-information like frame counters or timestamps are passed. This information is necessary to recognize frame dropping and to synchronize with other data streams. However this is also the simplest I/O method, requiring little or no setup to exchange data. It permits command line stunts like this (the vidctrl tool is fictitious):”h]”hXDDrivers may need the CPU to copy the data, but they may also support DMA to or from user memory, so this I/O method is not necessarily less efficient than other methods merely exchanging buffer pointers. It is considered inferior though because no meta-information like frame counters or timestamps are passed. This information is necessary to recognize frame dropping and to synchronize with other data streams. However this is also the simplest I/O method, requiring little or no setup to exchange data. It permits command line stunts like this (the vidctrl tool is fictitious):”…””}”(hj¯hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h KhhÄhžhubhŒ literal_block”“”)”}”(hŒo$ vidctrl /dev/video --input=0 --format=YUYV --size=352x288 $ dd if=/dev/video of=myimage.422 bs=202752 count=1”h]”hŒo$ vidctrl /dev/video --input=0 --format=YUYV --size=352x288 $ dd if=/dev/video of=myimage.422 bs=202752 count=1”…””}”hj¿sbah}”(h]”h ]”h"]”h$]”h&]”h±h²Œforce”‰Œlanguage”Œnone”Œhighlight_args”}”uh1j½hŸh³h KhhÄhžhubhØ)”}”(hX_To read from the device applications use the :c:func:`read()` function, to write the :c:func:`write()` function. Drivers must implement one I/O method if they exchange data with applications, but it need not be this. [#f1]_ When reading or writing is supported, the driver must also support the :c:func:`select()` and :c:func:`poll()` function. [#f2]_”h]”(hŒ-To read from the device applications use the ”…””}”(hjÒhžhhŸNh Nubh)”}”(hŒ:c:func:`read()`”h]”hæ)”}”(hjÜh]”hŒread()”…””}”(hjÞhžhhŸNh Nubah}”(h]”h ]”(hñhòŒc-func”eh"]”h$]”h&]”uh1håhjÚubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”hòŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jjjŒread”uh1hhŸh³h KhjÒubhŒ function, to write the ”…””}”(hjÒhžhhŸNh Nubh)”}”(hŒ:c:func:`write()`”h]”hæ)”}”(hjÿh]”hŒwrite()”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”(hñhòŒc-func”eh"]”h$]”h&]”uh1håhjýubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”hòŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jjjŒwrite”uh1hhŸh³h KhjÒubhŒs function. Drivers must implement one I/O method if they exchange data with applications, but it need not be this. ”…””}”(hjÒhžhhŸNh NubhŒfootnote_reference”“”)”}”(hŒ[#f1]_”h]”hŒ1”…””}”(hj"hžhhŸNh Nubah}”(h]”Œid1”ah ]”h"]”h$]”h&]”Œauto”KhÀŒf1”Œdocname”hþuh1j hjÒŒresolved”KubhŒH When reading or writing is supported, the driver must also support the ”…””}”(hjÒhžhhŸNh Nubh)”}”(hŒ:c:func:`select()`”h]”hæ)”}”(hj;h]”hŒselect()”…””}”(hj=hžhhŸNh Nubah}”(h]”h ]”(hñhòŒc-func”eh"]”h$]”h&]”uh1håhj9ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”hòŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jjjŒselect”uh1hhŸh³h KhjÒubhŒ and ”…””}”(hjÒhžhhŸNh Nubh)”}”(hŒ:c:func:`poll()`”h]”hæ)”}”(hj^h]”hŒpoll()”…””}”(hj`hžhhŸNh Nubah}”(h]”h ]”(hñhòŒc-func”eh"]”h$]”h&]”uh1håhj\ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”hòŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jjjŒpoll”uh1hhŸh³h KhjÒubhŒ function. ”…””}”(hjÒhžhhŸNh Nubj!)”}”(hŒ[#f2]_”h]”hŒ2”…””}”(hjhžhhŸNh Nubah}”(h]”Œid2”ah ]”h"]”h$]”h&]”j1KhÀŒf2”j3hþuh1j hjÒj4Kubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h KhhÄhžhubhŒfootnote”“”)”}”(hX It would be desirable if applications could depend on drivers supporting all I/O interfaces, but as much as the complex memory mapping I/O can be inadequate for some devices we have no reason to require this interface, which is most useful for simple applications capturing still images. ”h]”(hŒlabel”“”)”}”(hhh]”hŒ1”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j›hj—hžhhŸNh NubhØ)”}”(hXIt would be desirable if applications could depend on drivers supporting all I/O interfaces, but as much as the complex memory mapping I/O can be inadequate for some devices we have no reason to require this interface, which is most useful for simple applications capturing still images.”h]”hXIt would be desirable if applications could depend on drivers supporting all I/O interfaces, but as much as the complex memory mapping I/O can be inadequate for some devices we have no reason to require this interface, which is most useful for simple applications capturing still images.”…””}”(hjªhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K'hj—ubeh}”(h]”j2ah ]”h"]”Œf1”ah$]”h&]”j,aj1Kj3hþuh1j•hŸh³h K&hhÄhžhubj–)”}”(hŒAt the driver level :c:func:`select()` and :c:func:`poll()` are the same, and :c:func:`select()` is too important to be optional.”h]”(jœ)”}”(hhh]”hŒ2”…””}”(hjÃhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j›hj¿hžhhŸNh NubhØ)”}”(hŒAt the driver level :c:func:`select()` and :c:func:`poll()` are the same, and :c:func:`select()` is too important to be optional.”h]”(hŒAt the driver level ”…””}”(hjÐhžhhŸNh Nubh)”}”(hŒ:c:func:`select()`”h]”hæ)”}”(hjÚh]”hŒselect()”…””}”(hjÜhžhhŸNh Nubah}”(h]”h ]”(hñhòŒc-func”eh"]”h$]”h&]”uh1håhjØubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”hòŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jjjŒselect”uh1hhŸh³h K.hjÐubhŒ and ”…””}”(hjÐhžhhŸNh Nubh)”}”(hŒ:c:func:`poll()`”h]”hæ)”}”(hjýh]”hŒpoll()”…””}”(hjÿhžhhŸNh Nubah}”(h]”h ]”(hñhòŒc-func”eh"]”h$]”h&]”uh1håhjûubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”hòŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jjjŒpoll”uh1hhŸh³h K.hjÐubhŒ are the same, and ”…””}”(hjÐhžhhŸNh Nubh)”}”(hŒ:c:func:`select()`”h]”hæ)”}”(hj h]”hŒselect()”…””}”(hj"hžhhŸNh Nubah}”(h]”h ]”(hñhòŒc-func”eh"]”h$]”h&]”uh1håhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”hþŒ refdomain”hòŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jjjŒselect”uh1hhŸh³h K.hjÐubhŒ! is too important to be optional.”…””}”(hjÐhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1h×hŸh³h K.hj¿ubeh}”(h]”jŽah ]”h"]”Œf2”ah$]”h&]”j‰aj1Kj3hþuh1j•hŸh³h K-hhÄhžhubeh}”(h]”(Œ read-write”hÁeh ]”h"]”(Œ read/write”Œrw”eh$]”h&]”uh1hÂhhhžhhŸh³h KŒexpect_referenced_by_name”}”jTh¶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”}”(Œf1”]”j"aŒf2”]”jauŒrefids”}”(hÁ]”h¶aj2]”j"ajŽ]”jauŒnameids”}”(jThÁjSjPj¼j2jKjŽuŒ nametypes”}”(jTˆjS‰j¼ˆjKˆuh}”(hÁhÄjPhÄj,j"j‰jj2j—jŽj¿uŒ footnote_refs”}”(j¾]”j"ajÀ]”jauŒ citation_refs”}”Œ autofootnotes”]”(j—j¿eŒautofootnote_refs”]”(j"jeŒsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”jŒKs…”R”Œparse_messages”]”Œtransform_messages”]”hŒsystem_message”“”)”}”(hhh]”hØ)”}”(hhh]”hŒ(Hyperlink target "rw" is not referenced.”…””}”hjðsbah}”(h]”h ]”h"]”h$]”h&]”uh1h×hjíubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”h³Œline”Kuh1jëubaŒ transformer”NŒ include_log”]”Œ decoration”Nhžhub.