streaming-par.rst 1.3 KB

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