18c2ecf20Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
28c2ecf20Sopenharmony_ci.. c:namespace:: V4L
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ci.. _streaming-par:
58c2ecf20Sopenharmony_ci
68c2ecf20Sopenharmony_ci********************
78c2ecf20Sopenharmony_ciStreaming Parameters
88c2ecf20Sopenharmony_ci********************
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ciStreaming parameters are intended to optimize the video capture process
118c2ecf20Sopenharmony_cias well as I/O. Presently applications can request a high quality
128c2ecf20Sopenharmony_cicapture mode with the :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl.
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciThe current video standard determines a nominal number of frames per
158c2ecf20Sopenharmony_cisecond. If less than this number of frames is to be captured or output,
168c2ecf20Sopenharmony_ciapplications can request frame skipping or duplicating on the driver
178c2ecf20Sopenharmony_ciside. This is especially useful when using the
188c2ecf20Sopenharmony_ci:c:func:`read()` or :c:func:`write()`, which are
198c2ecf20Sopenharmony_cinot augmented by timestamps or sequence counters, and to avoid
208c2ecf20Sopenharmony_ciunnecessary data copying.
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ciFinally these ioctls can be used to determine the number of buffers used
238c2ecf20Sopenharmony_ciinternally by a driver in read/write mode. For implications see the
248c2ecf20Sopenharmony_cisection discussing the :c:func:`read()` function.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciTo get and set the streaming parameters applications call the
278c2ecf20Sopenharmony_ci:ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
288c2ecf20Sopenharmony_ci:ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take
298c2ecf20Sopenharmony_cia pointer to a struct :c:type:`v4l2_streamparm`, which
308c2ecf20Sopenharmony_cicontains a union holding separate parameters for input and output
318c2ecf20Sopenharmony_cidevices.
328c2ecf20Sopenharmony_ci
338c2ecf20Sopenharmony_ciThese ioctls are optional, drivers need not implement them. If so, they
348c2ecf20Sopenharmony_cireturn the ``EINVAL`` error code.
35