Sophie

Sophie

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

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 MEDIA_IOC_ENUM_LINKS</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="media-user-func.html" title="Appendix&#160;L.&#160;Function Reference" /><link rel="prev" href="media-ioc-enum-entities.html" title="ioctl MEDIA_IOC_ENUM_ENTITIES" /><link rel="next" href="media-ioc-setup-link.html" title="ioctl MEDIA_IOC_SETUP_LINK" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ioctl MEDIA_IOC_ENUM_LINKS</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="media-ioc-enum-entities.html">Prev</a>&#160;</td><th width="60%" align="center">Appendix&#160;L.&#160;Function Reference</th><td width="20%" align="right">&#160;<a accesskey="n" href="media-ioc-setup-link.html">Next</a></td></tr></table><hr /></div><div class="refentry"><a id="media-ioc-enum-links"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>MEDIA_IOC_ENUM_LINKS &#8212; Enumerate all pads and links for a given entity</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 media_links_enum *<var class="pdparam">argp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a id="idm140469973266112"></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="media-func-open.html" title="media open()"><code class="function">open()</code></a>.</p></dd><dt><span class="term"><em class="parameter"><code>request</code></em></span></dt><dd><p>MEDIA_IOC_ENUM_LINKS</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="idm140469973257904"></a><h2>Description</h2><p>To enumerate pads and/or links for a given entity, applications set
    the entity field of a struct&#160;<a class="link" href="media-ioc-enum-links.html#media-links-enum" title="Table&#160;L.5.&#160;struct media_links_enum">media_links_enum</a> structure and initialize the
    struct&#160;<a class="link" href="media-ioc-enum-links.html#media-pad-desc" title="Table&#160;L.6.&#160;struct media_pad_desc">media_pad_desc</a> and struct&#160;<a class="link" href="media-ioc-enum-links.html#media-link-desc" title="Table&#160;L.8.&#160;struct media_link_desc">media_link_desc</a> structure arrays pointed by the
    <em class="structfield"><code>pads</code></em> and <em class="structfield"><code>links</code></em> fields.
    They then call the MEDIA_IOC_ENUM_LINKS ioctl with a pointer to this
    structure.</p><p>If the <em class="structfield"><code>pads</code></em> field is not NULL, the driver
    fills the <em class="structfield"><code>pads</code></em> array with information about the
    entity's pads. The array must have enough room to store all the entity's
    pads. The number of pads can be retrieved with the <a class="link" href="media-ioc-enum-entities.html" title="ioctl MEDIA_IOC_ENUM_ENTITIES"><code class="constant">MEDIA_IOC_ENUM_ENTITIES</code></a>
    ioctl.</p><p>If the <em class="structfield"><code>links</code></em> field is not NULL, the driver
    fills the <em class="structfield"><code>links</code></em> array with information about the
    entity's outbound links. The array must have enough room to store all the
    entity's outbound links. The number of outbound links can be retrieved with
    the <a class="link" href="media-ioc-enum-entities.html" title="ioctl MEDIA_IOC_ENUM_ENTITIES"><code class="constant">MEDIA_IOC_ENUM_ENTITIES</code></a> ioctl.</p><p>Only forward links that originate at one of the entity's source pads
    are returned during the enumeration process.</p><div class="table"><a id="media-links-enum"></a><p class="title"><strong>Table&#160;L.5.&#160;struct <span class="structname">media_links_enum</span></strong></p><div class="table-contents"><table summary="struct media_links_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>entity</code></em></td><td valign="top">Entity id, set by the application.</td></tr><tr><td valign="top">struct struct&#160;<a class="link" href="media-ioc-enum-links.html#media-pad-desc" title="Table&#160;L.6.&#160;struct media_pad_desc">media_pad_desc</a></td><td valign="top">*<em class="structfield"><code>pads</code></em></td><td valign="top">Pointer to a pads array allocated by the application. Ignored
	    if NULL.</td></tr><tr><td valign="top">struct struct&#160;<a class="link" href="media-ioc-enum-links.html#media-link-desc" title="Table&#160;L.8.&#160;struct media_link_desc">media_link_desc</a></td><td valign="top">*<em class="structfield"><code>links</code></em></td><td valign="top">Pointer to a links array allocated by the application. Ignored
	    if NULL.</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="media-pad-desc"></a><p class="title"><strong>Table&#160;L.6.&#160;struct <span class="structname">media_pad_desc</span></strong></p><div class="table-contents"><table summary="struct media_pad_desc" 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>entity</code></em></td><td valign="top">ID of the entity this pad belongs to.</td></tr><tr><td valign="top">__u16</td><td valign="top"><em class="structfield"><code>index</code></em></td><td valign="top">0-based pad index.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>flags</code></em></td><td valign="top">Pad flags, see <a class="xref" href="media-ioc-enum-links.html#media-pad-flag" title="Table&#160;L.7.&#160;Media pad flags">Table&#160;L.7, &#8220;Media pad flags&#8221;</a> for more details.</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="media-pad-flag"></a><p class="title"><strong>Table&#160;L.7.&#160;Media pad flags</strong></p><div class="table-contents"><table summary="Media pad flags" width="100%" border="0"><colgroup><col class="c1" /><col class="c2" /></colgroup><tbody valign="top"><tr><td valign="top"><code class="constant">MEDIA_PAD_FL_SINK</code></td><td valign="top">Input pad, relative to the entity. Input pads sink data and
	    are targets of links.</td></tr><tr><td valign="top"><code class="constant">MEDIA_PAD_FL_SOURCE</code></td><td valign="top">Output pad, relative to the entity. Output pads source data
	    and are origins of links.</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="media-link-desc"></a><p class="title"><strong>Table&#160;L.8.&#160;struct <span class="structname">media_link_desc</span></strong></p><div class="table-contents"><table summary="struct media_link_desc" width="100%" border="0"><colgroup><col class="c1" /><col class="c2" /><col class="c3" /></colgroup><tbody valign="top"><tr><td valign="top">struct struct&#160;<a class="link" href="media-ioc-enum-links.html#media-pad-desc" title="Table&#160;L.6.&#160;struct media_pad_desc">media_pad_desc</a></td><td valign="top"><em class="structfield"><code>source</code></em></td><td valign="top">Pad at the origin of this link.</td></tr><tr><td valign="top">struct struct&#160;<a class="link" href="media-ioc-enum-links.html#media-pad-desc" title="Table&#160;L.6.&#160;struct media_pad_desc">media_pad_desc</a></td><td valign="top"><em class="structfield"><code>sink</code></em></td><td valign="top">Pad at the target of this link.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>flags</code></em></td><td valign="top">Link flags, see <a class="xref" href="media-ioc-enum-links.html#media-link-flag" title="Table&#160;L.9.&#160;Media link flags">Table&#160;L.9, &#8220;Media link flags&#8221;</a> for more details.</td></tr></tbody></table></div></div><br class="table-break" /><div class="table"><a id="media-link-flag"></a><p class="title"><strong>Table&#160;L.9.&#160;Media link flags</strong></p><div class="table-contents"><table summary="Media link flags" width="100%" border="0"><colgroup><col class="c1" /><col class="c2" /></colgroup><tbody valign="top"><tr><td valign="top"><code class="constant">MEDIA_LNK_FL_ENABLED</code></td><td valign="top">The link is enabled and can be used to transfer media data.
	    When two or more links target a sink pad, only one of them can be
	    enabled at a time.</td></tr><tr><td valign="top"><code class="constant">MEDIA_LNK_FL_IMMUTABLE</code></td><td valign="top">The link enabled state can't be modified at runtime. An
	    immutable link is always enabled.</td></tr><tr><td valign="top"><code class="constant">MEDIA_LNK_FL_DYNAMIC</code></td><td valign="top">The link enabled state can be modified during streaming. This
	    flag is set by drivers and is read-only for applications.</td></tr></tbody></table></div></div><br class="table-break" /><p>One and only one of <code class="constant">MEDIA_PAD_FL_SINK</code> and
    <code class="constant">MEDIA_PAD_FL_SOURCE</code> must be set for every pad.</p></div><div class="refsect1"><a id="idm140469973189296"></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="media-ioc-enum-links.html#media-links-enum" title="Table&#160;L.5.&#160;struct media_links_enum">media_links_enum</a> <em class="structfield"><code>id</code></em> references
	  a non-existing entity.</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="media-ioc-enum-entities.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="media-user-func.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="media-ioc-setup-link.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ioctl MEDIA_IOC_ENUM_ENTITIES&#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 MEDIA_IOC_SETUP_LINK</td></tr></table></div></body></html>