Sophie

Sophie

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

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_SUBDEV_ENUM_FRAME_SIZE</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-subdev-enum-frame-interval.html" title="ioctl VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL" /><link rel="next" href="vidioc-subdev-enum-mbus-code.html" title="ioctl VIDIOC_SUBDEV_ENUM_MBUS_CODE" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ioctl VIDIOC_SUBDEV_ENUM_FRAME_SIZE</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="vidioc-subdev-enum-frame-interval.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-subdev-enum-mbus-code.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="vidioc-subdev-enum-frame-size"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>VIDIOC_SUBDEV_ENUM_FRAME_SIZE &#8212; Enumerate media bus 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_subdev_frame_size_enum *
	<var class="pdparam">argp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a id="idm140470004352864"></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_SUBDEV_ENUM_FRAME_SIZE</p></dd><dt><span class="term"><em class="parameter"><code>argp</code></em></span></dt><dd><p></p></dd></dl></div></div><div class="refsect1"><a id="idm140470004344720"></a><h2>Description</h2><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Experimental</h3><p>This is an <a class="link" href="hist-v4l2.html#experimental" 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
    supported by a sub-device on the given pad for the given media bus format.
    Supported formats can be retrieved with the <a class="link" href="vidioc-subdev-enum-mbus-code.html" title="ioctl VIDIOC_SUBDEV_ENUM_MBUS_CODE"><code class="constant">VIDIOC_SUBDEV_ENUM_MBUS_CODE</code></a>
    ioctl.</p><p>To enumerate frame sizes applications initialize the
    <em class="structfield"><code>pad</code></em>, <em class="structfield"><code>code</code></em> and
    <em class="structfield"><code>index</code></em> fields of the
    struct&#160;<a class="link" href="vidioc-subdev-enum-mbus-code.html#v4l2-subdev-mbus-code-enum" title="Table&#160;A.98.&#160;struct v4l2_subdev_mbus_code_enum">v4l2_subdev_mbus_code_enum</a> and call the
    <code class="constant">VIDIOC_SUBDEV_ENUM_FRAME_SIZE</code> ioctl with a pointer to
    the structure. Drivers fill the minimum and maximum frame sizes or return
    an <span class="errorcode">EINVAL</span> error code if one of the input parameters is invalid.</p><p>Sub-devices that only support discrete frame sizes (such as most
    sensors) will return one or more frame sizes with identical minimum and
    maximum values.</p><p>Not all possible sizes in given [minimum, maximum] ranges need to be
    supported. For instance, a scaler that uses a fixed-point scaling ratio
    might not be able to produce every frame size between the minimum and
    maximum values. Applications must use the <a class="link" href="vidioc-subdev-g-fmt.html" title="ioctl VIDIOC_SUBDEV_G_FMT, VIDIOC_SUBDEV_S_FMT"><code class="constant">VIDIOC_SUBDEV_S_FMT</code></a> ioctl to
    try the sub-device for an exact supported frame size.</p><p>Available frame sizes may depend on the current 'try' formats at other
    pads of the sub-device, as well as on the current active links and the
    current values of V4L2 controls. See <a class="link" href="vidioc-subdev-g-fmt.html" title="ioctl VIDIOC_SUBDEV_G_FMT, VIDIOC_SUBDEV_S_FMT"><code class="constant">VIDIOC_SUBDEV_G_FMT</code></a> for more
    information about try formats.</p><div class="table"><a id="v4l2-subdev-frame-size-enum"></a><p class="title"><strong>Table&#160;A.97.&#160;struct <span class="structname">v4l2_subdev_frame_size_enum</span></strong></p><div class="table-contents"><table summary="struct v4l2_subdev_frame_size_enum" 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>index</code></em></td><td valign="top">Number of the format in the enumeration, set by the
	    application.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>pad</code></em></td><td valign="top">Pad number as reported by the media controller API.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>code</code></em></td><td valign="top">The media bus format code, as defined in
	    <a class="xref" href="subdev.html#v4l2-mbus-format" title="Media Bus Formats">the section called &#8220;Media Bus Formats&#8221;</a>.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>min_width</code></em></td><td valign="top">Minimum frame width, in pixels.</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, in pixels.</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, in pixels.</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, in pixels.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>reserved</code></em>[9]</td><td valign="top">Reserved for future extensions. Applications and drivers must
	    set the array to zero.</td></tr></tbody></table></div></div><br class="table-break" /></div><div class="refsect1"><a id="idm140470004309808"></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 class="variablelist"><dl class="variablelist"><dt><span class="term"><span class="errorcode">EINVAL</span></span></dt><dd><p>The struct&#160;<a class="link" href="vidioc-subdev-enum-frame-size.html#v4l2-subdev-frame-size-enum" title="Table&#160;A.97.&#160;struct v4l2_subdev_frame_size_enum">v4l2_subdev_frame_size_enum</a> <em class="structfield"><code>pad</code></em>
	  references a non-existing pad, the <em class="structfield"><code>code</code></em> is
	  invalid for the given pad or the <em class="structfield"><code>index</code></em>
	  field is out of bounds.</p></dd></dl></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="vidioc-subdev-enum-frame-interval.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-subdev-enum-mbus-code.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ioctl VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL&#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_SUBDEV_ENUM_MBUS_CODE</td></tr></table></div></body></html>