1.. Permission is granted to copy, distribute and/or modify this
2.. document under the terms of the GNU Free Documentation License,
3.. Version 1.1 or any later version published by the Free Software
4.. Foundation, with no Invariant Sections, no Front-Cover Texts
5.. and no Back-Cover Texts. A copy of the license is included at
6.. Documentation/userspace-api/media/fdl-appendix.rst.
7..
8.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
9
10.. _streaming-par:
11
12********************
13Streaming Parameters
14********************
15
16Streaming parameters are intended to optimize the video capture process
17as well as I/O. Presently applications can request a high quality
18capture mode with the :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl.
19
20The current video standard determines a nominal number of frames per
21second. If less than this number of frames is to be captured or output,
22applications can request frame skipping or duplicating on the driver
23side. This is especially useful when using the
24:ref:`read() <func-read>` or :ref:`write() <func-write>`, which are
25not augmented by timestamps or sequence counters, and to avoid
26unnecessary data copying.
27
28Finally these ioctls can be used to determine the number of buffers used
29internally by a driver in read/write mode. For implications see the
30section discussing the :ref:`read() <func-read>` function.
31
32To get and set the streaming parameters applications call the
33:ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
34:ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take
35a pointer to a struct :c:type:`v4l2_streamparm`, which
36contains a union holding separate parameters for input and output
37devices.
38
39These ioctls are optional, drivers need not implement them. If so, they
40return the ``EINVAL`` error code.
41