€•Ñ6Œ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ŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ./translations/pt_BR/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”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()”…””}”(hj1h²hh³Nh´Nubah}”(h]”h ]”(jjŒ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, respectively, when the ”…””}”(hhíh²hh³Nh´Nubhú)”}”(hŒ``V4L2_CAP_READWRITE``”h]”hŒV4L2_CAP_READWRITE”…””}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hùhhíubhŒ flag in the ”…””}”(hhíh²hh³Nh´Nubhú)”}”(hŒ``capabilities``”h]”hŒ capabilities”…””}”(hjbh²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ú)”}”(hjvh]”hŒv4l2_capability”…””}”(hjxh²hh³Nh´Nubah}”(h]”h ]”(jjŒc-type”eh"]”h$]”h&]”uh1hùhjtubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒ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”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1j›hj—ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ 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 ]”(jjŒc-func”eh"]”h$]”h&]”uh1hùhjîubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒ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ú)”}”(hjh]”hŒwrite()”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(jjŒc-func”eh"]”h$]”h&]”uh1hùhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒ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”…””}”(hj6h²hh³Nh´Nubah}”(h]”Œid1”ah ]”h"]”h$]”h&]”Œauto”KhÔŒf1”Œdocname”juh1j4hjæŒ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ú)”}”(hjOh]”hŒselect()”…””}”(hjQh²hh³Nh´Nubah}”(h]”h ]”(jjŒc-func”eh"]”h$]”h&]”uh1hùhjMubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jjj'Œselect”uh1hh³hÇh´KhjæubhŒ and ”…””}”(hjæh²hh³Nh´Nubh)”}”(hŒ:c:func:`poll()`”h]”hú)”}”(hjrh]”hŒpoll()”…””}”(hjth²hh³Nh´Nubah}”(h]”h ]”(jjŒc-func”eh"]”h$]”h&]”uh1hùhjpubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jjj'Œpoll”uh1hh³hÇh´KhjæubhŒ function. ”…””}”(hjæh²hh³Nh´Nubj5)”}”(hŒ[#f2]_”h]”hŒ2”…””}”(hj“h²hh³Nh´Nubah}”(h]”Œid2”ah ]”h"]”h$]”h&]”jEKhÔŒf2”jGjuh1j4hjæjHKubeh}”(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”…””}”(hj±h²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]”jFah ]”h"]”Œf1”ah$]”h&]”j@ajEKjGjuh1j©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 ]”(jjŒc-func”eh"]”h$]”h&]”uh1hùhjìubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jjj'Œselect”uh1hh³hÇh´K.hjäubhŒ and ”…””}”(hjäh²hh³Nh´Nubh)”}”(hŒ:c:func:`poll()`”h]”hú)”}”(hjh]”hŒpoll()”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(jjŒc-func”eh"]”h$]”h&]”uh1hùhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒ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ú)”}”(hj4h]”hŒselect()”…””}”(hj6h²hh³Nh´Nubah}”(h]”h ]”(jjŒc-func”eh"]”h$]”h&]”uh1hùhj2ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”jŒ refdomain”jŒ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&]”jajEKjGjuh1j©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”}”jhhÊ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”]”j6aŒf2”]”j“auŒrefids”}”(hÕ]”hÊajF]”j6aj¢]”j“auŒnameids”}”(jhhÕjgjdjÐjFj_j¢uŒ nametypes”}”(jhˆjg‰jЈj_ˆuh}”(hÕhØjdhØj@j6jj“jFj«j¢jÓuŒ footnote_refs”}”(jÒ]”j6ajÔ]”j“auŒ citation_refs”}”Œ autofootnotes”]”(j«jÓeŒautofootnote_refs”]”(j6j“eŒ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.”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”uh1hëhjubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÇŒline”Kuh1jÿubaŒ transformer”NŒ include_log”]”Œ decoration”Nh²hub.