1*4882a593Smuzhiyun.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later 2*4882a593Smuzhiyun.. c:namespace:: V4L 3*4882a593Smuzhiyun 4*4882a593Smuzhiyun.. _streaming-par: 5*4882a593Smuzhiyun 6*4882a593Smuzhiyun******************** 7*4882a593SmuzhiyunStreaming Parameters 8*4882a593Smuzhiyun******************** 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunStreaming parameters are intended to optimize the video capture process 11*4882a593Smuzhiyunas well as I/O. Presently applications can request a high quality 12*4882a593Smuzhiyuncapture mode with the :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl. 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunThe current video standard determines a nominal number of frames per 15*4882a593Smuzhiyunsecond. If less than this number of frames is to be captured or output, 16*4882a593Smuzhiyunapplications can request frame skipping or duplicating on the driver 17*4882a593Smuzhiyunside. This is especially useful when using the 18*4882a593Smuzhiyun:c:func:`read()` or :c:func:`write()`, which are 19*4882a593Smuzhiyunnot augmented by timestamps or sequence counters, and to avoid 20*4882a593Smuzhiyununnecessary data copying. 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunFinally these ioctls can be used to determine the number of buffers used 23*4882a593Smuzhiyuninternally by a driver in read/write mode. For implications see the 24*4882a593Smuzhiyunsection discussing the :c:func:`read()` function. 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunTo get and set the streaming parameters applications call the 27*4882a593Smuzhiyun:ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and 28*4882a593Smuzhiyun:ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take 29*4882a593Smuzhiyuna pointer to a struct :c:type:`v4l2_streamparm`, which 30*4882a593Smuzhiyuncontains a union holding separate parameters for input and output 31*4882a593Smuzhiyundevices. 32*4882a593Smuzhiyun 33*4882a593SmuzhiyunThese ioctls are optional, drivers need not implement them. If so, they 34*4882a593Smuzhiyunreturn the ``EINVAL`` error code. 35