€•Þ/Œ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”Œ1/translations/zh_CN/userspace-api/media/v4l/video”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ1/translations/zh_TW/userspace-api/media/v4l/video”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ1/translations/it_IT/userspace-api/media/v4l/video”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ1/translations/ja_JP/userspace-api/media/v4l/video”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ1/translations/ko_KR/userspace-api/media/v4l/video”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ1/translations/pt_BR/userspace-api/media/v4l/video”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ1/translations/sp_SP/userspace-api/media/v4l/video”Œ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³ŒK/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/video.rst”h´KubhŒtarget”“”)”}”(hŒ .. _video:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œvideo”uh1hÈh´Khhh²hh³hÇubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒVideo Inputs and Outputs”h]”hŒVideo Inputs and Outputs”…””}”(hhÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhhØh²hh³hÇh´KubhŒ paragraph”“”)”}”(hXVideo inputs and outputs are physical connectors of a device. These can be for example: RF connectors (antenna/cable), CVBS a.k.a. Composite Video, S-Video and RGB connectors. Camera sensors are also considered to be a video input. Video and VBI capture devices have inputs. Video and VBI output devices have outputs, at least one each. Radio devices have no video inputs or outputs.”h]”hXVideo inputs and outputs are physical connectors of a device. These can be for example: RF connectors (antenna/cable), CVBS a.k.a. Composite Video, S-Video and RGB connectors. Camera sensors are also considered to be a video input. Video and VBI capture devices have inputs. Video and VBI output devices have outputs, at least one each. Radio devices have no video inputs or outputs.”…””}”(hhíh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´K hhØh²hubhì)”}”(hXiTo learn about the number and attributes of the available inputs and outputs applications can enumerate them with the :ref:`VIDIOC_ENUMINPUT` and :ref:`VIDIOC_ENUMOUTPUT` ioctl, respectively. The struct :c:type:`v4l2_input` returned by the :ref:`VIDIOC_ENUMINPUT` ioctl also contains signal status information applicable when the current video input is queried.”h]”(hŒvTo learn about the number and attributes of the available inputs and outputs applications can enumerate them with the ”…””}”(hhûh²hh³Nh´Nubh)”}”(hŒ:ref:`VIDIOC_ENUMINPUT`”h]”hŒinline”“”)”}”(hjh]”hŒVIDIOC_ENUMINPUT”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”(Œxref”Œstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œuserspace-api/media/v4l/video”Œ refdomain”jŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆŒ reftarget”Œvidioc_enuminput”uh1hh³hÇh´KhhûubhŒ and ”…””}”(hhûh²hh³Nh´Nubh)”}”(hŒ:ref:`VIDIOC_ENUMOUTPUT`”h]”j)”}”(hj.h]”hŒVIDIOC_ENUMOUTPUT”…””}”(hj0h²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj,ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”j:Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj&Œvidioc_enumoutput”uh1hh³hÇh´KhhûubhŒ! ioctl, respectively. The struct ”…””}”(hhûh²hh³Nh´Nubh)”}”(hŒ:c:type:`v4l2_input`”h]”hŒliteral”“”)”}”(hjRh]”hŒ v4l2_input”…””}”(hjVh²hh³Nh´Nubah}”(h]”h ]”(jŒc”Œc-type”eh"]”h$]”h&]”uh1jThjPubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”j`Œreftype”Œtype”Œ refexplicit”‰Œrefwarn”‰Œ c:parent_key”Œsphinx.domains.c”Œ LookupKey”“”)”}”Œdata”]”jrŒ ASTIdentifier”“”)”}”Œ identifier”ŒV4L”sbN†”asbj&Œ v4l2_input”uh1hh³hÇh´KhhûubhŒ returned by the ”…””}”(hhûh²hh³Nh´Nubh)”}”(hŒ:ref:`VIDIOC_ENUMINPUT`”h]”j)”}”(hj‡h]”hŒVIDIOC_ENUMINPUT”…””}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj…ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”j“Œreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆj&Œvidioc_enuminput”uh1hh³hÇh´KhhûubhŒb ioctl also contains signal status information applicable when the current video input is queried.”…””}”(hhûh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KhhØh²hubhì)”}”(hXÀThe :ref:`VIDIOC_G_INPUT ` and :ref:`VIDIOC_G_OUTPUT ` ioctls return the index of the current video input or output. To select a different input or output applications call the :ref:`VIDIOC_S_INPUT ` and :ref:`VIDIOC_S_OUTPUT ` ioctls. Drivers must implement all the input ioctls when the device has one or more inputs, all the output ioctls when the device has one or more outputs.”h]”(hŒThe ”…””}”(hj¯h²hh³Nh´Nubh)”}”(hŒ&:ref:`VIDIOC_G_INPUT `”h]”j)”}”(hj¹h]”hŒVIDIOC_G_INPUT”…””}”(hj»h²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj·ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”jÅŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj&Œvidioc_g_input”uh1hh³hÇh´Khj¯ubhŒ and ”…””}”(hj¯h²hh³Nh´Nubh)”}”(hŒ(:ref:`VIDIOC_G_OUTPUT `”h]”j)”}”(hjÝh]”hŒVIDIOC_G_OUTPUT”…””}”(hjßh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÛubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”jéŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj&Œvidioc_g_output”uh1hh³hÇh´Khj¯ubhŒ{ ioctls return the index of the current video input or output. To select a different input or output applications call the ”…””}”(hj¯h²hh³Nh´Nubh)”}”(hŒ&:ref:`VIDIOC_S_INPUT `”h]”j)”}”(hjh]”hŒVIDIOC_S_INPUT”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhjÿubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”j Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj&Œvidioc_g_input”uh1hh³hÇh´Khj¯ubhŒ and ”…””}”hj¯sbh)”}”(hŒ(:ref:`VIDIOC_S_OUTPUT `”h]”j)”}”(hj%h]”hŒVIDIOC_S_OUTPUT”…””}”(hj'h²hh³Nh´Nubah}”(h]”h ]”(jŒstd”Œstd-ref”eh"]”h$]”h&]”uh1jhj#ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j Œ refdomain”j1Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆj&Œvidioc_g_output”uh1hh³hÇh´Khj¯ubhŒ› ioctls. Drivers must implement all the input ioctls when the device has one or more inputs, all the output ioctls when the device has one or more outputs.”…””}”(hj¯h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hëh³hÇh´KhhØh²hubh×)”}”(hhh]”(hÜ)”}”(hŒ2Example: Information about the current video input”h]”hŒ2Example: Information about the current video input”…””}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjMh²hh³hÇh´K"ubhŒ literal_block”“”)”}”(hX\struct v4l2_input input; int index; if (-1 == ioctl(fd, VIDIOC_G_INPUT, &index)) { perror("VIDIOC_G_INPUT"); exit(EXIT_FAILURE); } memset(&input, 0, sizeof(input)); input.index = index; if (-1 == ioctl(fd, VIDIOC_ENUMINPUT, &input)) { perror("VIDIOC_ENUMINPUT"); exit(EXIT_FAILURE); } printf("Current input: %s\\n", input.name);”h]”hX\struct v4l2_input input; int index; if (-1 == ioctl(fd, VIDIOC_G_INPUT, &index)) { perror("VIDIOC_G_INPUT"); exit(EXIT_FAILURE); } memset(&input, 0, sizeof(input)); input.index = index; if (-1 == ioctl(fd, VIDIOC_ENUMINPUT, &input)) { perror("VIDIOC_ENUMINPUT"); exit(EXIT_FAILURE); } printf("Current input: %s\\n", input.name);”…””}”hj`sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆŒforce”‰Œlanguage”j`Œhighlight_args”}”uh1j^h³hÇh´K$hjMh²hubeh}”(h]”Œ1example-information-about-the-current-video-input”ah ]”h"]”Œ2example: information about the current video input”ah$]”h&]”uh1hÖhhØh²hh³hÇh´K"ubh×)”}”(hhh]”(hÜ)”}”(hŒ+Example: Switching to the first video input”h]”hŒ+Example: Switching to the first video input”…””}”(hj}h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjzh²hh³hÇh´K:ubj_)”}”(hŒ~int index; index = 0; if (-1 == ioctl(fd, VIDIOC_S_INPUT, &index)) { perror("VIDIOC_S_INPUT"); exit(EXIT_FAILURE); }”h]”hŒ~int index; index = 0; if (-1 == ioctl(fd, VIDIOC_S_INPUT, &index)) { perror("VIDIOC_S_INPUT"); exit(EXIT_FAILURE); }”…””}”hj‹sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆjn‰joj`jp}”uh1j^h³hÇh´K