vidioc-g-input.xml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <refentry id="vidioc-g-input">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_G_INPUT</refname>
  8. <refname>VIDIOC_S_INPUT</refname>
  9. <refpurpose>Query or select the current video input</refpurpose>
  10. </refnamediv>
  11. <refsynopsisdiv>
  12. <funcsynopsis>
  13. <funcprototype>
  14. <funcdef>int <function>ioctl</function></funcdef>
  15. <paramdef>int <parameter>fd</parameter></paramdef>
  16. <paramdef>int <parameter>request</parameter></paramdef>
  17. <paramdef>int *<parameter>argp</parameter></paramdef>
  18. </funcprototype>
  19. </funcsynopsis>
  20. </refsynopsisdiv>
  21. <refsect1>
  22. <title>Arguments</title>
  23. <variablelist>
  24. <varlistentry>
  25. <term><parameter>fd</parameter></term>
  26. <listitem>
  27. <para>&fd;</para>
  28. </listitem>
  29. </varlistentry>
  30. <varlistentry>
  31. <term><parameter>request</parameter></term>
  32. <listitem>
  33. <para>VIDIOC_G_INPUT, VIDIOC_S_INPUT</para>
  34. </listitem>
  35. </varlistentry>
  36. <varlistentry>
  37. <term><parameter>argp</parameter></term>
  38. <listitem>
  39. <para></para>
  40. </listitem>
  41. </varlistentry>
  42. </variablelist>
  43. </refsect1>
  44. <refsect1>
  45. <title>Description</title>
  46. <para>To query the current video input applications call the
  47. <constant>VIDIOC_G_INPUT</constant> ioctl with a pointer to an integer
  48. where the driver stores the number of the input, as in the
  49. &v4l2-input; <structfield>index</structfield> field. This ioctl will
  50. fail only when there are no video inputs, returning
  51. <errorcode>EINVAL</errorcode>.</para>
  52. <para>To select a video input applications store the number of the
  53. desired input in an integer and call the
  54. <constant>VIDIOC_S_INPUT</constant> ioctl with a pointer to this
  55. integer. Side effects are possible. For example inputs may support
  56. different video standards, so the driver may implicitly switch the
  57. current standard. It is good practice to select an input before
  58. querying or negotiating any other parameters.</para>
  59. <para>Information about video inputs is available using the
  60. &VIDIOC-ENUMINPUT; ioctl.</para>
  61. </refsect1>
  62. <refsect1>
  63. &return-value;
  64. <variablelist>
  65. <varlistentry>
  66. <term><errorcode>EINVAL</errorcode></term>
  67. <listitem>
  68. <para>The number of the video input is out of bounds, or
  69. there are no video inputs at all and this ioctl is not
  70. supported.</para>
  71. </listitem>
  72. </varlistentry>
  73. <varlistentry>
  74. <term><errorcode>EBUSY</errorcode></term>
  75. <listitem>
  76. <para>I/O is in progress, the input cannot be
  77. switched.</para>
  78. </listitem>
  79. </varlistentry>
  80. </variablelist>
  81. </refsect1>
  82. </refentry>
  83. <!--
  84. Local Variables:
  85. mode: sgml
  86. sgml-parent-document: "v4l2.sgml"
  87. indent-tabs-mode: nil
  88. End:
  89. -->