examples/sfexamples/oggvorbiscodec/src/libvorbis/doc/vorbisenc/vorbis_encode_init.html

00001 <html>
00002 
00003 <head>
00004 <title>libvorbisenc - function - vorbis_encode_init</title>
00005 <link rel=stylesheet href="style.css" type="text/css">
00006 </head>
00007 
00008 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
00009 <table border=0 width=100%>
00010 <tr>
00011 <td><p class=tiny>libvorbisenc documentation</p></td>
00012 <td align=right><p class=tiny>libvorbisenc release 1.1 - 20040709</p></td>
00013 </tr>
00014 </table>
00015 
00016 <h1>vorbis_encode_init</h1>
00017 
00018 <p><i>declared in "vorbis/libvorbisenc.h";</i></p>
00019 
00020 <p>This is the primary function within libvorbisenc for setting up managed bitrate modes.
00021 <p>Before this function is called, the <a href="vorbis_info.html">vorbis_info</a> struct should be initialized by using vorbis_info_init() from the libvorbis API.  After encoding, vorbis_info_clear should be called.
00022 <p>The max_bitrate, nominal_bitrate, and min_bitrate settings are used to set constraints for the encoded file.  This function uses these settings to select the appropriate encoding mode and set it up.
00023 <p>
00024 <br><br>
00025 <table border=0 color=black cellspacing=0 cellpadding=7>
00026 <tr bgcolor=#cccccc>
00027         <td>
00028 <pre><b>
00029 extern int vorbis_encode_init(<a href="vorbis_info.html">vorbis_info</a> *vi,
00030                               long channels,
00031                               long rate,
00032                               
00033                               long max_bitrate,
00034                               long nominal_bitrate,
00035                               long min_bitrate);
00036 
00037 </b></pre>
00038         </td>
00039 </tr>
00040 </table>
00041 
00042 <h3>Parameters</h3>
00043 <dl>
00044 <dt><i>vi</i></dt>
00045 <dd>File pointer to an initialized <a href="vorbis_info.html">vorbis_info</a> struct.</dd>
00046 <dt><i>channels</i></dt>
00047 <dd>The number of channels to be encoded.</dd>
00048 <dt><i>rate</i></dt>
00049 <dd>The sampling rate of the source audio.</dd>
00050 <dt><i>max_bitrate</i></dt>
00051 <dd>Desired maximum bitrate (limit). -1 indicates unset.</dd>
00052 <dt><i>nominal_bitrate</i></dt>
00053 <dd>Desired average, or central, bitrate. -1 indicates unset.</dd>
00054 <dt><i>min_bitrate</i></dt>
00055 <dd>Desired minimum bitrate. -1 indicates unset.</dd>
00056 </dl>
00057 
00058 
00059 <h3>Return Values</h3>
00060 <blockquote>
00061 <li>
00062 0 for success</li>
00063 
00064 <li>less than zero for failure:</li>
00065 <ul>
00066 <li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li>
00067 <li>OV_EINVAL - Invalid setup request, eg, out of range argument. </li>
00068 <li>OV_EIMPL  - Unimplemented mode; unable to comply with bitrate request.</li>
00069 </ul>
00070 </blockquote>
00071 <p>
00072 
00073 <br><br>
00074 <hr noshade>
00075 <table border=0 width=100%>
00076 <tr valign=top>
00077 <td><p class=tiny>copyright &copy; 2004 xiph.org</p></td>
00078 <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a><br><a href="mailto:team@vorbis.org">team@vorbis.org</a></p></td>
00079 </tr><tr>
00080 <td><p class=tiny>libvorbisenc documentation</p></td>
00081 <td align=right><p class=tiny>libvorbisenc release 1.1 - 20040709</p></td>
00082 </tr>
00083 </table>
00084 
00085 
00086 </body>
00087 
00088 </html>

Generated by  doxygen 1.6.2