vidioc-g-output.rst 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. .. -*- coding: utf-8; mode: rst -*-
  2. .. _VIDIOC_G_OUTPUT:
  3. **************************************
  4. ioctl VIDIOC_G_OUTPUT, VIDIOC_S_OUTPUT
  5. **************************************
  6. Name
  7. ====
  8. VIDIOC_G_OUTPUT - VIDIOC_S_OUTPUT - Query or select the current video output
  9. Synopsis
  10. ========
  11. .. c:function:: int ioctl( int fd, VIDIOC_G_OUTPUT, int *argp )
  12. :name: VIDIOC_G_OUTPUT
  13. .. c:function:: int ioctl( int fd, VIDIOC_S_OUTPUT, int *argp )
  14. :name: VIDIOC_S_OUTPUT
  15. Arguments
  16. =========
  17. ``fd``
  18. File descriptor returned by :ref:`open() <func-open>`.
  19. ``argp``
  20. Description
  21. ===========
  22. To query the current video output applications call the
  23. :ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` ioctl with a pointer to an integer where the driver
  24. stores the number of the output, as in the struct
  25. :c:type:`v4l2_output` ``index`` field. This ioctl will
  26. fail only when there are no video outputs, returning the ``EINVAL`` error
  27. code.
  28. To select a video output applications store the number of the desired
  29. output in an integer and call the :ref:`VIDIOC_S_OUTPUT <VIDIOC_G_OUTPUT>` ioctl with a
  30. pointer to this integer. Side effects are possible. For example outputs
  31. may support different video standards, so the driver may implicitly
  32. switch the current standard. standard. Because of these possible side
  33. effects applications must select an output before querying or
  34. negotiating any other parameters.
  35. Information about video outputs is available using the
  36. :ref:`VIDIOC_ENUMOUTPUT` ioctl.
  37. Return Value
  38. ============
  39. On success 0 is returned, on error -1 and the ``errno`` variable is set
  40. appropriately. The generic error codes are described at the
  41. :ref:`Generic Error Codes <gen-errors>` chapter.
  42. EINVAL
  43. The number of the video output is out of bounds, or there are no
  44. video outputs at all.