Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002 .. c:namespace:: V4L
0003 
0004 .. _streaming-par:
0005 
0006 ********************
0007 Streaming Parameters
0008 ********************
0009 
0010 Streaming parameters are intended to optimize the video capture process
0011 as well as I/O. Presently applications can request a high quality
0012 capture mode with the :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl.
0013 
0014 The current video standard determines a nominal number of frames per
0015 second. If less than this number of frames is to be captured or output,
0016 applications can request frame skipping or duplicating on the driver
0017 side. This is especially useful when using the
0018 :c:func:`read()` or :c:func:`write()`, which are
0019 not augmented by timestamps or sequence counters, and to avoid
0020 unnecessary data copying.
0021 
0022 Finally these ioctls can be used to determine the number of buffers used
0023 internally by a driver in read/write mode. For implications see the
0024 section discussing the :c:func:`read()` function.
0025 
0026 To get and set the streaming parameters applications call the
0027 :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
0028 :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take
0029 a pointer to a struct :c:type:`v4l2_streamparm`, which
0030 contains a union holding separate parameters for input and output
0031 devices.
0032 
0033 These ioctls are optional, drivers need not implement them. If so, they
0034 return the ``EINVAL`` error code.