<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>Streaming Parameters</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API" /><link rel="up" href="ch01.html" title="Chapter 1. Common API Elements" /><link rel="prev" href="ch01s11.html" title="Image Cropping, Insertion and Scaling" /><link rel="next" href="ch02.html" title="Chapter 2. Image Formats" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Streaming Parameters</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s11.html">Prev</a> </td><th width="60%" align="center">Chapter 1. Common API Elements</th><td width="20%" align="right"> <a accesskey="n" href="ch02.html">Next</a></td></tr></table><hr /></div><div class="section" title="Streaming Parameters"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="streaming-par"></a>Streaming Parameters</h2></div></div></div><p>Streaming parameters are intended to optimize the video capture process as well as I/O. Presently applications can request a high quality capture mode with the <a class="link" href="re47.html" title="ioctl VIDIOC_G_PARM, VIDIOC_S_PARM"><code class="constant">VIDIOC_S_PARM</code></a> ioctl.</p><p>The current video standard determines a nominal number of frames per second. If less than this number of frames is to be captured or output, applications can request frame skipping or duplicating on the driver side. This is especially useful when using the <a class="link" href="re66.html" title="V4L2 read()"><code class="function">read()</code></a> or <a class="link" href="re68.html" title="V4L2 write()"><code class="function">write()</code></a>, which are not augmented by timestamps or sequence counters, and to avoid unneccessary data copying.</p><p>Finally these ioctls can be used to determine the number of buffers used internally by a driver in read/write mode. For implications see the section discussing the <a class="link" href="re66.html" title="V4L2 read()"><code class="function">read()</code></a> function.</p><p>To get and set the streaming parameters applications call the <a class="link" href="re47.html" title="ioctl VIDIOC_G_PARM, VIDIOC_S_PARM"><code class="constant">VIDIOC_G_PARM</code></a> and <a class="link" href="re47.html" title="ioctl VIDIOC_G_PARM, VIDIOC_S_PARM"><code class="constant">VIDIOC_S_PARM</code></a> ioctl, respectively. They take a pointer to a struct <a class="link" href="re47.html#v4l2-streamparm" title="Table A.52. struct v4l2_streamparm">v4l2_streamparm</a>, which contains a union holding separate parameters for input and output devices.</p><p>These ioctls are optional, drivers need not implement them. If so, they return the <span class="errorcode">EINVAL</span> error code.</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s11.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch01.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Image Cropping, Insertion and Scaling </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 2. Image Formats</td></tr></table></div></body></html>