Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/libvorbis-1.2.0/doc/vorbisenc/vorbis_encode_setup_managed.html @ 16

Last change on this file since 16 was 16, checked in by landauf, 16 years ago

added libvorbis

File size: 3.0 KB
Line 
1<html>
2
3<head>
4<title>libvorbisenc - function - vorbis_encode_setup_managed</title>
5<link rel=stylesheet href="style.css" type="text/css">
6</head>
7
8<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
9<table border=0 width=100%>
10<tr>
11<td><p class=tiny>libvorbisenc documentation</p></td>
12<td align=right><p class=tiny>libvorbisenc release 1.1 - 20040709</p></td>
13</tr>
14</table>
15
16<h1>vorbis_encode_setup_managed</h1>
17
18<p><i>declared in "vorbis/libvorbisenc.h";</i></p>
19
20<p>This function performs step-one of a three-step bitrate-managed
21encode setup.  It functions similarly to the one-step setup performed
22by <a href="vorbis_encode_init.html">vorbis_encode_init()</a> but
23allows an application to make further encode setup tweaks using <a
24href="vorbis_encode_ctl.html">vorbis_encode_ctl()</a> before finally
25calling <a
26href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a> to
27complete the setup process.
28
29<p>Before this function is called, the <a
30href="vorbis_info.html">vorbis_info</a> struct should be initialized
31by using vorbis_info_init() from the libvorbis API.  After encoding,
32vorbis_info_clear should be called.
33
34<p>The max_bitrate, nominal_bitrate, and min_bitrate settings are used
35to set constraints for the encoded file.  This function uses these
36settings to select the appropriate encoding mode and set it up.
37<p>
38<br><br>
39<table border=0 color=black cellspacing=0 cellpadding=7>
40<tr bgcolor=#cccccc>
41        <td>
42<pre><b>
43extern int vorbis_encode_init(<a href="vorbis_info.html">vorbis_info</a> *vi,
44                              long channels,
45                              long rate,
46                             
47                              long max_bitrate,
48                              long nominal_bitrate,
49                              long min_bitrate);
50
51</b></pre>
52        </td>
53</tr>
54</table>
55
56<h3>Parameters</h3>
57<dl>
58<dt><i>vi</i></dt>
59<dd>File pointer to an initialized <a href="vorbis_info.html">vorbis_info</a> struct.</dd>
60<dt><i>channels</i></dt>
61<dd>The number of channels to be encoded.</dd>
62<dt><i>rate</i></dt>
63<dd>The sampling rate of the source audio.</dd>
64<dt><i>max_bitrate</i></dt>
65<dd>Desired maximum bitrate (limit). -1 indicates unset.</dd>
66<dt><i>nominal_bitrate</i></dt>
67<dd>Desired average, or central, bitrate. -1 indicates unset.</dd>
68<dt><i>min_bitrate</i></dt>
69<dd>Desired minimum bitrate. -1 indicates unset.</dd>
70</dl>
71
72
73<h3>Return Values</h3>
74<blockquote>
75<li>
760 for success</li>
77
78<li>less than zero for failure:</li>
79<ul>
80<li>OV_EFAULT - Internal logic fault; indicates a bug or heap/stack corruption.</li>
81<li>OV_EINVAL - Invalid setup request, eg, out of range argument. </li>
82<li>OV_EIMPL  - Unimplemented mode; unable to comply with bitrate request.</li>
83</ul>
84</blockquote>
85<p>
86
87<br><br>
88<hr noshade>
89<table border=0 width=100%>
90<tr valign=top>
91<td><p class=tiny>copyright &copy; 2004 xiph.org</p></td>
92<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>
93</tr><tr>
94<td><p class=tiny>libvorbisenc documentation</p></td>
95<td align=right><p class=tiny>libvorbisenc release 1.1 - 20040709</p></td>
96</tr>
97</table>
98
99
100</body>
101
102</html>
Note: See TracBrowser for help on using the repository browser.