streaming-par.rst 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2. .. c:namespace:: V4L
  3. .. _streaming-par:
  4. ********************
  5. Streaming Parameters
  6. ********************
  7. Streaming parameters are intended to optimize the video capture process
  8. as well as I/O. Presently applications can request a high quality
  9. capture mode with the :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl.
  10. The current video standard determines a nominal number of frames per
  11. second. If less than this number of frames is to be captured or output,
  12. applications can request frame skipping or duplicating on the driver
  13. side. This is especially useful when using the
  14. :c:func:`read()` or :c:func:`write()`, which are
  15. not augmented by timestamps or sequence counters, and to avoid
  16. unnecessary data copying.
  17. Finally these ioctls can be used to determine the number of buffers used
  18. internally by a driver in read/write mode. For implications see the
  19. section discussing the :c:func:`read()` function.
  20. To get and set the streaming parameters applications call the
  21. :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
  22. :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take
  23. a pointer to a struct :c:type:`v4l2_streamparm`, which
  24. contains a union holding separate parameters for input and output
  25. devices.
  26. These ioctls are optional, drivers need not implement them. If so, they
  27. return the ``EINVAL`` error code.