Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > 2c51d8eb79f8810ada971ee8c30ce1e5 > files > 2724

kernel-doc-2.6.32-71.14.1.el6.noarch.rpm

<?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>ioctl VIDIOC_ENUM_FRAMESIZES</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="apa.html" title="Appendix&#160;A.&#160;Function Reference" /><link rel="prev" href="re28.html" title="ioctl VIDIOC_ENUM_FMT" /><link rel="next" href="re30.html" title="ioctl VIDIOC_ENUM_FRAMEINTERVALS" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ioctl VIDIOC_ENUM_FRAMESIZES</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re28.html">Prev</a>&#160;</td><th width="60%" align="center">Appendix&#160;A.&#160;Function Reference</th><td width="20%" align="right">&#160;<a accesskey="n" href="re30.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="ioctl VIDIOC_ENUM_FRAMESIZES"><a id="vidioc-enum-framesizes"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>VIDIOC_ENUM_FRAMESIZES &#8212; Enumerate frame sizes</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0" class="funcprototype-table"><tr><td><code class="funcdef">int <b class="fsfunc">ioctl</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">request</var>, </td></tr><tr><td>&#160;</td><td>struct v4l2_frmsizeenum *<var class="pdparam">argp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1" title="Arguments"><a id="id2693724"></a><h2>Arguments</h2><div class="variablelist"><dl><dt><span class="term"><em class="parameter"><code>fd</code></em></span></dt><dd><p>File descriptor returned by <a class="link" href="re64.html" title="V4L2 open()"><code class="function">open()</code></a>.</p></dd><dt><span class="term"><em class="parameter"><code>request</code></em></span></dt><dd><p>VIDIOC_ENUM_FRAMESIZES</p></dd><dt><span class="term"><em class="parameter"><code>argp</code></em></span></dt><dd><p>Pointer to a struct&#160;<a class="link" href="re29.html#v4l2-frmsizeenum" title="Table&#160;A.17.&#160;struct v4l2_frmsizeenum">v4l2_frmsizeenum</a> that contains an index
and pixel format and receives a frame width and height.</p></dd></dl></div></div><div class="refsect1" title="Description"><a id="id2693791"></a><h2>Description</h2><div class="note" title="Experimental" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Experimental</h3><p>This is an <a class="link" href="ch07s04.html" title="Experimental API Elements">experimental</a>
interface and may change in the future.</p></div><p>This ioctl allows applications to enumerate all frame sizes
(i.&#160;e. width and height in pixels) that the device supports for the
given pixel format.</p><p>The supported pixel formats can be obtained by using the
<a class="link" href="re28.html" title="ioctl VIDIOC_ENUM_FMT"><code class="constant">VIDIOC_ENUM_FMT</code></a> function.</p><p>The return value and the content of the
<em class="structfield"><code>v4l2_frmsizeenum.type</code></em> field depend on the
type of frame sizes the device supports. Here are the semantics of the
function for the different cases:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><span class="bold"><strong>Discrete:</strong></span> The function
returns success if the given index value (zero-based) is valid. The
application should increase the index by one for each call until
<code class="constant">EINVAL</code> is returned. The
<em class="structfield"><code>v4l2_frmsizeenum.type</code></em> field is set to
<code class="constant">V4L2_FRMSIZE_TYPE_DISCRETE</code> by the driver. Of the
union only the <em class="structfield"><code>discrete</code></em> member is
valid.</p></li><li class="listitem"><p><span class="bold"><strong>Step-wise:</strong></span> The function
returns success if the given index value is zero and
<code class="constant">EINVAL</code> for any other index value. The
<em class="structfield"><code>v4l2_frmsizeenum.type</code></em> field is set to
<code class="constant">V4L2_FRMSIZE_TYPE_STEPWISE</code> by the driver. Of the
union only the <em class="structfield"><code>stepwise</code></em> member is
valid.</p></li><li class="listitem"><p><span class="bold"><strong>Continuous:</strong></span> This is a
special case of the step-wise type above. The function returns success
if the given index value is zero and <code class="constant">EINVAL</code> for
any other index value. The
<em class="structfield"><code>v4l2_frmsizeenum.type</code></em> field is set to
<code class="constant">V4L2_FRMSIZE_TYPE_CONTINUOUS</code> by the driver. Of
the union only the <em class="structfield"><code>stepwise</code></em> member is valid
and the <em class="structfield"><code>step_width</code></em> and
<em class="structfield"><code>step_height</code></em> values are set to 1.</p></li></ul></div><p>When the application calls the function with index zero, it
must check the <em class="structfield"><code>type</code></em> field to determine the
type of frame size enumeration the device supports. Only for the
<code class="constant">V4L2_FRMSIZE_TYPE_DISCRETE</code> type does it make
sense to increase the index value to receive more frame sizes.</p><p>Note that the order in which the frame sizes are returned
has no special meaning. In particular does it not say anything about
potential default format sizes.</p><p>Applications can assume that the enumeration data does not
change without any interaction from the application itself. This means
that the enumeration data is consistent if the application does not
perform any other ioctl calls while it runs the frame size
enumeration.</p></div><div class="refsect1" title="Structs"><a id="id2693985"></a><h2>Structs</h2><p>In the structs below, <span class="emphasis"><em>IN</em></span> denotes a
value that has to be filled in by the application,
<span class="emphasis"><em>OUT</em></span> denotes values that the driver fills in. The
application should zero out all members except for the
<span class="emphasis"><em>IN</em></span> fields.</p><div class="table"><a id="v4l2-frmsize-discrete"></a><p class="title"><b>Table&#160;A.15.&#160;struct <span class="structname">v4l2_frmsize_discrete</span></b></p><div class="table-contents"><table summary="struct v4l2_frmsize_discrete" width="100%" border="0"><colgroup><col /><col /><col /></colgroup><tbody valign="top"><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>width</code></em></td><td valign="top">Width of the frame [pixel].</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>height</code></em></td><td valign="top">Height of the frame [pixel].</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="v4l2-frmsize-stepwise"></a><p class="title"><b>Table&#160;A.16.&#160;struct <span class="structname">v4l2_frmsize_stepwise</span></b></p><div class="table-contents"><table summary="struct v4l2_frmsize_stepwise" width="100%" border="0"><colgroup><col /><col /><col /></colgroup><tbody valign="top"><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>min_width</code></em></td><td valign="top">Minimum frame width [pixel].</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>max_width</code></em></td><td valign="top">Maximum frame width [pixel].</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>step_width</code></em></td><td valign="top">Frame width step size [pixel].</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>min_height</code></em></td><td valign="top">Minimum frame height [pixel].</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>max_height</code></em></td><td valign="top">Maximum frame height [pixel].</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>step_height</code></em></td><td valign="top">Frame height step size [pixel].</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="v4l2-frmsizeenum"></a><p class="title"><b>Table&#160;A.17.&#160;struct <span class="structname">v4l2_frmsizeenum</span></b></p><div class="table-contents"><table summary="struct v4l2_frmsizeenum" width="100%" border="0"><colgroup><col /><col /><col /><col /></colgroup><tbody valign="top"><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>index</code></em></td><td valign="top">&#160;</td><td valign="top">IN: Index of the given frame size in the enumeration.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>pixel_format</code></em></td><td valign="top">&#160;</td><td valign="top">IN: Pixel format for which the frame sizes are enumerated.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>type</code></em></td><td valign="top">&#160;</td><td valign="top">OUT: Frame size type the device supports.</td></tr><tr><td valign="top">union</td><td valign="top">&#160;</td><td valign="top">&#160;</td><td valign="top">OUT: Frame size with the given index.</td></tr><tr><td valign="top">&#160;</td><td valign="top">struct&#160;<a class="link" href="re29.html#v4l2-frmsize-discrete" title="Table&#160;A.15.&#160;struct v4l2_frmsize_discrete">v4l2_frmsize_discrete</a></td><td valign="top"><em class="structfield"><code>discrete</code></em></td><td valign="top">&#160;</td></tr><tr><td valign="top">&#160;</td><td valign="top">struct&#160;<a class="link" href="re29.html#v4l2-frmsize-stepwise" title="Table&#160;A.16.&#160;struct v4l2_frmsize_stepwise">v4l2_frmsize_stepwise</a></td><td valign="top"><em class="structfield"><code>stepwise</code></em></td><td valign="top">&#160;</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>reserved[2]</code></em></td><td valign="top">&#160;</td><td valign="top">Reserved space for future use.</td></tr></tbody></table></div></div><br class="table-break" /></div><div class="refsect1" title="Enums"><a id="id2694406"></a><h2>Enums</h2><div class="table"><a id="v4l2-frmsizetypes"></a><p class="title"><b>Table&#160;A.18.&#160;enum <span class="structname">v4l2_frmsizetypes</span></b></p><div class="table-contents"><table summary="enum v4l2_frmsizetypes" width="100%" border="0"><colgroup><col /><col /><col /></colgroup><tbody valign="top"><tr><td valign="top"><code class="constant">V4L2_FRMSIZE_TYPE_DISCRETE</code></td><td valign="top">1</td><td valign="top">Discrete frame size.</td></tr><tr><td valign="top"><code class="constant">V4L2_FRMSIZE_TYPE_CONTINUOUS</code></td><td valign="top">2</td><td valign="top">Continuous frame size.</td></tr><tr><td valign="top"><code class="constant">V4L2_FRMSIZE_TYPE_STEPWISE</code></td><td valign="top">3</td><td valign="top">Step-wise defined frame size.</td></tr></tbody></table></div></div><br class="table-break" /></div><div class="refsect1" title="Return Value"><a id="id2694514"></a><h2>Return Value</h2><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately:</p><p>See the description section above for a list of return
values that <code class="varname">errno</code> can have.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re28.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="apa.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="re30.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ioctl VIDIOC_ENUM_FMT&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;ioctl VIDIOC_ENUM_FRAMEINTERVALS</td></tr></table></div></body></html>