Sophie

Sophie

distrib > Fedora > 18 > x86_64 > media > updates > by-pkgid > 1a595394b241504ff370a8d12ebfcea7 > files > 3813

kernel-doc-3.11.10-100.fc18.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.78.1" /><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API" /><link rel="up" href="user-func.html" title="Appendix&#160;A.&#160;Function Reference" /><link rel="prev" href="vidioc-enum-fmt.html" title="ioctl VIDIOC_ENUM_FMT" /><link rel="next" href="vidioc-enum-frameintervals.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="vidioc-enum-fmt.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="vidioc-enum-frameintervals.html">Next</a></td></tr></table><hr /></div><div class="refentry"><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"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <strong class="fsfunc">ioctl</strong>(</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"><a id="idm140470010871856"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>fd</code></em></span></dt><dd><p>File descriptor returned by <a class="link" href="func-open.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="vidioc-enum-framesizes.html#v4l2-frmsizeenum" title="Table&#160;A.28.&#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"><a id="idm140470010863568"></a><h2>Description</h2><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="vidioc-enum-fmt.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" style="list-style-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"><a id="idm140470010844480"></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"><strong>Table&#160;A.26.&#160;struct <span class="structname">v4l2_frmsize_discrete</span></strong></p><div class="table-contents"><table summary="struct v4l2_frmsize_discrete" width="100%" border="0"><colgroup><col class="c1" /><col class="c2" /><col class="c3" /></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"><strong>Table&#160;A.27.&#160;struct <span class="structname">v4l2_frmsize_stepwise</span></strong></p><div class="table-contents"><table summary="struct v4l2_frmsize_stepwise" width="100%" border="0"><colgroup><col class="c1" /><col class="c2" /><col class="c3" /></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"><strong>Table&#160;A.28.&#160;struct <span class="structname">v4l2_frmsizeenum</span></strong></p><div class="table-contents"><table summary="struct v4l2_frmsizeenum" width="100%" border="0"><colgroup><col class="c1" /><col class="c2" /><col class="c3" /><col class="c4" /></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="vidioc-enum-framesizes.html#v4l2-frmsize-discrete" title="Table&#160;A.26.&#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="vidioc-enum-framesizes.html#v4l2-frmsize-stepwise" title="Table&#160;A.27.&#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"><a id="idm140470010792880"></a><h2>Enums</h2><div class="table"><a id="v4l2-frmsizetypes"></a><p class="title"><strong>Table&#160;A.29.&#160;enum <span class="structname">v4l2_frmsizetypes</span></strong></p><div class="table-contents"><table summary="enum v4l2_frmsizetypes" width="100%" border="0"><colgroup><col class="c1" /><col class="c2" /><col class="c3" /></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"><a id="idm140470010780480"></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. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="vidioc-enum-fmt.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="user-func.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="vidioc-enum-frameintervals.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>