vorbis_encode_setup_managed.html 3.0 KB

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