vidioc-enumoutput.rst 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. .. -*- coding: utf-8; mode: rst -*-
  2. .. _VIDIOC_ENUMOUTPUT:
  3. ***********************
  4. ioctl VIDIOC_ENUMOUTPUT
  5. ***********************
  6. Name
  7. ====
  8. VIDIOC_ENUMOUTPUT - Enumerate video outputs
  9. Synopsis
  10. ========
  11. .. c:function:: int ioctl( int fd, VIDIOC_ENUMOUTPUT, struct v4l2_output *argp )
  12. :name: VIDIOC_ENUMOUTPUT
  13. Arguments
  14. =========
  15. ``fd``
  16. File descriptor returned by :ref:`open() <func-open>`.
  17. ``argp``
  18. Description
  19. ===========
  20. To query the attributes of a video outputs applications initialize the
  21. ``index`` field of struct :c:type:`v4l2_output` and call
  22. the :ref:`VIDIOC_ENUMOUTPUT` ioctl with a pointer to this structure.
  23. Drivers fill the rest of the structure or return an ``EINVAL`` error code
  24. when the index is out of bounds. To enumerate all outputs applications
  25. shall begin at index zero, incrementing by one until the driver returns
  26. EINVAL.
  27. .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
  28. .. c:type:: v4l2_output
  29. .. flat-table:: struct v4l2_output
  30. :header-rows: 0
  31. :stub-columns: 0
  32. :widths: 1 1 2
  33. * - __u32
  34. - ``index``
  35. - Identifies the output, set by the application.
  36. * - __u8
  37. - ``name``\ [32]
  38. - Name of the video output, a NUL-terminated ASCII string, for
  39. example: "Vout". This information is intended for the user,
  40. preferably the connector label on the device itself.
  41. * - __u32
  42. - ``type``
  43. - Type of the output, see :ref:`output-type`.
  44. * - __u32
  45. - ``audioset``
  46. - Drivers can enumerate up to 32 video and audio outputs. This field
  47. shows which audio outputs were selectable as the current output if
  48. this was the currently selected video output. It is a bit mask.
  49. The LSB corresponds to audio output 0, the MSB to output 31. Any
  50. number of bits can be set, or none.
  51. When the driver does not enumerate audio outputs no bits must be
  52. set. Applications shall not interpret this as lack of audio
  53. support. Drivers may automatically select audio outputs without
  54. enumerating them.
  55. For details on audio outputs and how to select the current output
  56. see :ref:`audio`.
  57. * - __u32
  58. - ``modulator``
  59. - Output devices can have zero or more RF modulators. When the
  60. ``type`` is ``V4L2_OUTPUT_TYPE_MODULATOR`` this is an RF connector
  61. and this field identifies the modulator. It corresponds to struct
  62. :c:type:`v4l2_modulator` field ``index``. For
  63. details on modulators see :ref:`tuner`.
  64. * - :ref:`v4l2_std_id <v4l2-std-id>`
  65. - ``std``
  66. - Every video output supports one or more different video standards.
  67. This field is a set of all supported standards. For details on
  68. video standards and how to switch see :ref:`standard`.
  69. * - __u32
  70. - ``capabilities``
  71. - This field provides capabilities for the output. See
  72. :ref:`output-capabilities` for flags.
  73. * - __u32
  74. - ``reserved``\ [3]
  75. - Reserved for future extensions. Drivers must set the array to
  76. zero.
  77. .. tabularcolumns:: |p{7.0cm}|p{1.8cm}|p{8.7cm}|
  78. .. _output-type:
  79. .. flat-table:: Output Type
  80. :header-rows: 0
  81. :stub-columns: 0
  82. :widths: 3 1 4
  83. * - ``V4L2_OUTPUT_TYPE_MODULATOR``
  84. - 1
  85. - This output is an analog TV modulator.
  86. * - ``V4L2_OUTPUT_TYPE_ANALOG``
  87. - 2
  88. - Analog baseband output, for example Composite / CVBS, S-Video,
  89. RGB.
  90. * - ``V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY``
  91. - 3
  92. - [?]
  93. .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
  94. .. _output-capabilities:
  95. .. flat-table:: Output capabilities
  96. :header-rows: 0
  97. :stub-columns: 0
  98. :widths: 3 1 4
  99. * - ``V4L2_OUT_CAP_DV_TIMINGS``
  100. - 0x00000002
  101. - This output supports setting video timings by using
  102. VIDIOC_S_DV_TIMINGS.
  103. * - ``V4L2_OUT_CAP_STD``
  104. - 0x00000004
  105. - This output supports setting the TV standard by using
  106. VIDIOC_S_STD.
  107. * - ``V4L2_OUT_CAP_NATIVE_SIZE``
  108. - 0x00000008
  109. - This output supports setting the native size using the
  110. ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see
  111. :ref:`v4l2-selections-common`.
  112. Return Value
  113. ============
  114. On success 0 is returned, on error -1 and the ``errno`` variable is set
  115. appropriately. The generic error codes are described at the
  116. :ref:`Generic Error Codes <gen-errors>` chapter.
  117. EINVAL
  118. The struct :c:type:`v4l2_output` ``index`` is out of
  119. bounds.