Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > a3df0d9d8542dc1f46770d317f9f7add > files > 51

libvpx-devel-0.9.6-1.fc15.i686.rpm

<!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/xhtml;charset=UTF-8"/>
<title>WebM VP8 Codec SDK: External Memory Allocation Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">WebM VP8 Codec SDK</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<h1>External Memory Allocation Functions</h1>  </div>
<div class="ingroups"><a class="el" href="group__codec.html">Common Algorithm Interface</a></div></div>
<div class="contents">
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structvpx__codec__mmap.html">vpx_codec_mmap</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Memory Map Entry.  <a href="structvpx__codec__mmap.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structvpx__codec__mmap.html">vpx_codec_mmap</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cap__xma.html#gaca7501932c5ec8a876729f661b752f07">vpx_codec_mmap_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Memory Map Entry.  <a href="#gaca7501932c5ec8a876729f661b752f07"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__codec.html#gada1084710837ad363b92f2379dd2b8d2">vpx_codec_err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cap__xma.html#ga802003c8ed203def368a361fe0e92f13">vpx_codec_get_mem_map</a> (<a class="el" href="structvpx__codec__ctx.html">vpx_codec_ctx_t</a> *ctx, <a class="el" href="structvpx__codec__mmap.html">vpx_codec_mmap_t</a> *mmap, <a class="el" href="group__codec.html#ga6ea348f76b1f8a1fe50e14db684146c6">vpx_codec_iter_t</a> *iter)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Iterate over the list of segments to allocate.  <a href="#ga802003c8ed203def368a361fe0e92f13"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__codec.html#gada1084710837ad363b92f2379dd2b8d2">vpx_codec_err_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cap__xma.html#gac2df376a4d76282a5c117313182dcf53">vpx_codec_set_mem_map</a> (<a class="el" href="structvpx__codec__ctx.html">vpx_codec_ctx_t</a> *ctx, <a class="el" href="structvpx__codec__mmap.html">vpx_codec_mmap_t</a> *mmaps, unsigned int num_maps)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Identify allocated segments to codec instance.  <a href="#gac2df376a4d76282a5c117313182dcf53"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>The following functions are required to be implemented for all codecs that advertise the VPX_CODEC_CAP_XMA capability. Calling these functions for codecs that don't advertise this capability will result in an error code being returned, usually VPX_CODEC_INCAPABLE </p>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="gaca7501932c5ec8a876729f661b752f07"></a><!-- doxytag: member="vpx_codec.h::vpx_codec_mmap_t" ref="gaca7501932c5ec8a876729f661b752f07" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="structvpx__codec__mmap.html">vpx_codec_mmap</a>  <a class="el" href="structvpx__codec__mmap.html">vpx_codec_mmap_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Memory Map Entry. </p>
<p>This structure is used to contain the properties of a memory segment. It is populated by the codec in the request phase, and by the calling application once the requested allocation has been performed. alias for struct <a class="el" href="structvpx__codec__mmap.html" title="Memory Map Entry.">vpx_codec_mmap</a> </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga802003c8ed203def368a361fe0e92f13"></a><!-- doxytag: member="vpx_codec.h::vpx_codec_get_mem_map" ref="ga802003c8ed203def368a361fe0e92f13" args="(vpx_codec_ctx_t *ctx, vpx_codec_mmap_t *mmap, vpx_codec_iter_t *iter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__codec.html#gada1084710837ad363b92f2379dd2b8d2">vpx_codec_err_t</a> vpx_codec_get_mem_map </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structvpx__codec__ctx.html">vpx_codec_ctx_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structvpx__codec__mmap.html">vpx_codec_mmap_t</a> *&#160;</td>
          <td class="paramname"><em>mmap</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__codec.html#ga6ea348f76b1f8a1fe50e14db684146c6">vpx_codec_iter_t</a> *&#160;</td>
          <td class="paramname"><em>iter</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Iterate over the list of segments to allocate. </p>
<p>Iterates over a list of the segments to allocate. The iterator storage should be initialized to NULL to start the iteration. Iteration is complete when this function returns VPX_CODEC_LIST_END. The amount of memory needed to allocate is dependant upon the size of the encoded stream. In cases where the stream is not available at allocation time, a fixed size must be requested. The codec will not be able to operate on streams larger than the size used at allocation time.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ctx</td><td>Pointer to this instance's context. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">mmap</td><td>Pointer to the memory map entry to populate. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">iter</td><td>Iterator storage, initialized to NULL</td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname"><a class="el" href="group__codec.html#ggada1084710837ad363b92f2379dd2b8d2af1dcde74b1c5ff7b29f31246dfd90986" title="Operation completed without error.">VPX_CODEC_OK</a></td><td>The memory map entry was populated. </td></tr>
    <tr><td class="paramname"><a class="el" href="group__codec.html#ggada1084710837ad363b92f2379dd2b8d2abd8a8f9c2588adab5d764d957e265135" title="Unspecified error.">VPX_CODEC_ERROR</a></td><td>Codec does not support XMA mode. </td></tr>
    <tr><td class="paramname"><a class="el" href="group__codec.html#ggada1084710837ad363b92f2379dd2b8d2a96c6d2600dc0ec25c2cb798e8d2f4760" title="Memory operation failed.">VPX_CODEC_MEM_ERROR</a></td><td>Unable to determine segment size from stream info. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gac2df376a4d76282a5c117313182dcf53"></a><!-- doxytag: member="vpx_codec.h::vpx_codec_set_mem_map" ref="gac2df376a4d76282a5c117313182dcf53" args="(vpx_codec_ctx_t *ctx, vpx_codec_mmap_t *mmaps, unsigned int num_maps)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__codec.html#gada1084710837ad363b92f2379dd2b8d2">vpx_codec_err_t</a> vpx_codec_set_mem_map </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structvpx__codec__ctx.html">vpx_codec_ctx_t</a> *&#160;</td>
          <td class="paramname"><em>ctx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structvpx__codec__mmap.html">vpx_codec_mmap_t</a> *&#160;</td>
          <td class="paramname"><em>mmaps</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>num_maps</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Identify allocated segments to codec instance. </p>
<p>Stores a list of allocated segments in the codec. Segments <a class="el" href="rfc2119.html#MUST">MUST</a> be passed in the order they are read from <a class="el" href="group__cap__xma.html#ga802003c8ed203def368a361fe0e92f13" title="Iterate over the list of segments to allocate.">vpx_codec_get_mem_map()</a>, but may be passed in groups of any size. Segments <a class="el" href="rfc2119.html#MUST">MUST</a> be set only once. The allocation function <a class="el" href="rfc2119.html#MUST">MUST</a> ensure that the <a class="el" href="structvpx__codec__mmap.html#a0f7580ef4f5680df53c1ef3bd5f66d01">vpx_codec_mmap_t::base</a> member is non-NULL. If the segment requires cleanup handling (e.g., calling free() or close()) then the <a class="el" href="structvpx__codec__mmap.html#a39476b4d60e41d0867e0966f09dc1e45">vpx_codec_mmap_t::dtor</a> member <a class="el" href="rfc2119.html#MUST">MUST</a> be populated.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">ctx</td><td>Pointer to this instance's context. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">mmaps</td><td>Pointer to the first memory map entry in the list. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">num_maps</td><td>Number of entries being set at this time</td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table class="retval">
    <tr><td class="paramname"><a class="el" href="group__codec.html#ggada1084710837ad363b92f2379dd2b8d2af1dcde74b1c5ff7b29f31246dfd90986" title="Operation completed without error.">VPX_CODEC_OK</a></td><td>The segment was stored in the codec context. </td></tr>
    <tr><td class="paramname"><a class="el" href="group__codec.html#ggada1084710837ad363b92f2379dd2b8d2a4470784ba5a3ef84dc0697d5489dd292" title="Algorithm does not have required capability.">VPX_CODEC_INCAPABLE</a></td><td>Codec does not support XMA mode. </td></tr>
    <tr><td class="paramname"><a class="el" href="group__codec.html#ggada1084710837ad363b92f2379dd2b8d2a96c6d2600dc0ec25c2cb798e8d2f4760" title="Memory operation failed.">VPX_CODEC_MEM_ERROR</a></td><td>Segment base address was not set, or segment was already stored. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Mar 10 2011 for WebM VP8 Codec SDK by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>