vidioc-g-input.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. Because of these possible side effects applications
  58. must select an input before 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.</para>
  69. </listitem>
  70. </varlistentry>
  71. </variablelist>
  72. </refsect1>
  73. </refentry>