Sophie

Sophie

distrib > Fedora > 20 > x86_64 > by-pkgid > 888a2f3d4ea212b694328c0525364729 > files > 4842

kernel-doc-3.19.8-100.fc20.noarch.rpm

<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>ioctl VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL</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-streamon.html" title="ioctl VIDIOC_STREAMON, VIDIOC_STREAMOFF"><link rel="next" href="vidioc-subdev-enum-frame-size.html" title="ioctl VIDIOC_SUBDEV_ENUM_FRAME_SIZE"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ioctl VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="vidioc-streamon.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-frame-size.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="vidioc-subdev-enum-frame-interval"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL &#8212; Enumerate frame intervals</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 <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_subdev_frame_interval_enum *
	<var class="pdparam">argp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp324398724"></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_INTERVAL</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 name="idp324462076"></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 lets applications enumerate available frame intervals on a
    given sub-device pad. Frame intervals only makes sense for sub-devices that
    can control the frame period on their own. This includes, for instance,
    image sensors and TV tuners.</p><p>For the common use case of image sensors, the frame intervals
    available on the sub-device output pad depend on the frame format and size
    on the same pad. Applications must thus specify the desired format and size
    when enumerating frame intervals.</p><p>To enumerate frame intervals applications initialize the
    <em class="structfield"><code>index</code></em>, <em class="structfield"><code>pad</code></em>,
    <em class="structfield"><code>code</code></em>, <em class="structfield"><code>width</code></em> and
    <em class="structfield"><code>height</code></em> fields of
    struct&#160;<a class="link" href="vidioc-subdev-enum-frame-interval.html#v4l2-subdev-frame-interval-enum" title="Table&#160;A.101.&#160;struct v4l2_subdev_frame_interval_enum">v4l2_subdev_frame_interval_enum</a> and call the
    <code class="constant">VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL</code> ioctl with a pointer
    to this structure. Drivers fill the rest of the structure or return
    an <span class="errorcode">EINVAL</span> error code if one of the input fields is invalid. All frame intervals are
    enumerable by beginning at index zero and incrementing by one until
    <span class="errorcode">EINVAL</span> is returned.</p><p>Available frame intervals may depend on the current 'try' formats
    at other pads of the sub-device, as well as on the current active links. 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 the try formats.</p><p>Sub-devices that support the frame interval enumeration ioctl should
    implemented it on a single pad only. Its behaviour when supported on
    multiple pads of the same sub-device is not defined.</p><div class="table"><a name="v4l2-subdev-frame-interval-enum"></a><p class="title"><b>Table&#160;A.101.&#160;struct <span class="structname">v4l2_subdev_frame_interval_enum</span></b></p><div class="table-contents"><table summary="struct v4l2_subdev_frame_interval_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>width</code></em></td><td valign="top">Frame width, in pixels.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>height</code></em></td><td valign="top">Frame height, in pixels.</td></tr><tr><td valign="top">struct&#160;<a class="link" href="vidioc-enumstd.html#v4l2-fract" title="Table&#160;A.46.&#160;struct v4l2_fract">v4l2_fract</a></td><td valign="top"><em class="structfield"><code>interval</code></em></td><td valign="top">Period, in seconds, between consecutive video frames.</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 name="idp324479796"></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-interval.html#v4l2-subdev-frame-interval-enum" title="Table&#160;A.101.&#160;struct v4l2_subdev_frame_interval_enum">v4l2_subdev_frame_interval_enum</a>
	  <em class="structfield"><code>pad</code></em> references a non-existing pad, one of
	  the <em class="structfield"><code>code</code></em>, <em class="structfield"><code>width</code></em>
	  or <em class="structfield"><code>height</code></em> fields are 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-streamon.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-frame-size.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ioctl VIDIOC_STREAMON, VIDIOC_STREAMOFF&#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_FRAME_SIZE</td></tr></table></div></body></html>