162306a36Sopenharmony_ci.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 262306a36Sopenharmony_ci.. c:namespace:: V4L 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci.. _streaming-par: 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci******************** 762306a36Sopenharmony_ciStreaming Parameters 862306a36Sopenharmony_ci******************** 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ciStreaming parameters are intended to optimize the video capture process 1162306a36Sopenharmony_cias well as I/O. Presently applications can request a high quality 1262306a36Sopenharmony_cicapture mode with the :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl. 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ciThe current video standard determines a nominal number of frames per 1562306a36Sopenharmony_cisecond. If less than this number of frames is to be captured or output, 1662306a36Sopenharmony_ciapplications can request frame skipping or duplicating on the driver 1762306a36Sopenharmony_ciside. This is especially useful when using the 1862306a36Sopenharmony_ci:c:func:`read()` or :c:func:`write()`, which are 1962306a36Sopenharmony_cinot augmented by timestamps or sequence counters, and to avoid 2062306a36Sopenharmony_ciunnecessary data copying. 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ciFinally these ioctls can be used to determine the number of buffers used 2362306a36Sopenharmony_ciinternally by a driver in read/write mode. For implications see the 2462306a36Sopenharmony_cisection discussing the :c:func:`read()` function. 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ciTo get and set the streaming parameters applications call the 2762306a36Sopenharmony_ci:ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and 2862306a36Sopenharmony_ci:ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take 2962306a36Sopenharmony_cia pointer to a struct :c:type:`v4l2_streamparm`, which 3062306a36Sopenharmony_cicontains a union holding separate parameters for input and output 3162306a36Sopenharmony_cidevices. 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ciThese ioctls are optional, drivers need not implement them. If so, they 3462306a36Sopenharmony_cireturn the ``EINVAL`` error code. 35