vorbis_encode_ctl.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <html>
  2. <head>
  3. <title>libvorbisenc - function - vorbis_encode_ctl</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 version 1.3.2 - 20101101</p></td>
  11. </tr>
  12. </table>
  13. <h1>vorbis_encode_ctl</h1>
  14. <p><i>declared in "vorbis/vorbisenc.h";</i></p>
  15. <p>This function implements a generic interface to miscellaneous
  16. encoder settings similar to the clasasic UNIX 'ioctl()' system call.
  17. Applications may use vorbis_encode_ctl() to query or set bitrate
  18. management or quality mode details by using one of several
  19. <i>request</i> arguments detailed below. Vorbis_encode_ctl() must be
  20. called after one of <a
  21. href="vorbis_encode_setup_managed.html">vorbis_encode_setup_managed()</a>
  22. or <a
  23. href="vorbis_encode_setup_vbr.html">vorbis_encode_setup_vbr()</a>.
  24. When used to modify settings, vorbis_encode_ctl() must be called
  25. before <a
  26. href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a>.
  27. <p>
  28. <br><br>
  29. <table border=0 color=black cellspacing=0 cellpadding=7>
  30. <tr bgcolor=#cccccc>
  31. <td>
  32. <pre><b>
  33. extern int vorbis_encode_ctl(vorbis_info *vi,int request,void *arg);
  34. </b></pre>
  35. </td>
  36. </tr>
  37. </table>
  38. <h3>Parameters</h3>
  39. <dl>
  40. <dt><i>vi</i></dt>
  41. <dd>Pointer to an initialized <a href="../libvorbis/vorbis_info.html">vorbis_info</a> struct.</dd><p>
  42. <dt><i>request</i></dt>
  43. <dd>Specifies the desired action; possible request fields are detailed below.</dd><p>
  44. <dt><i>arg</i></dt>
  45. <dd>void * pointing to a data structure matching the request argument.</dd><p>
  46. </dl><p>
  47. <h3>Requests</h3>
  48. <dl>
  49. <dt><i>OV_ECTL_RATEMANAGE2_GET</i></dt>
  50. <dd><b>Argument: <a href="ovectl_ratemanage2_arg.html">struct
  51. ovectl_ratemanage2_arg *</a></b><br> Used to query the current
  52. encoder bitrate management setting. Also used to initialize fields of
  53. an ovectl_ratemanage2_arg structure for use with
  54. OV_ECTL_RATEMANAGE2_SET.</dd><p>
  55. <dt><i>OV_ECTL_RATEMANAGE2_SET</i></dt>
  56. <dd><b>Argument: <a href="ovectl_ratemanage2_arg.html">struct
  57. ovectl_ratemanage2_arg *</a></b><br> Used to set the current
  58. encoder bitrate management settings to the values listed in the
  59. ovectl_ratemanage2_arg. Passing a NULL pointer will disable bitrate
  60. management.
  61. </dd><p>
  62. <dt><i>OV_ECTL_LOWPASS_GET</i></dt>
  63. <dd><b>Argument: double *</b><br> Returns the current encoder hard-lowpass
  64. setting (kHz) in the double pointed to by arg.
  65. </dd><p>
  66. <dt><i>OV_ECTL_LOWPASS_SET</i></dt>
  67. <dd><b>Argument: double *</b><br> Sets the encoder hard-lowpass to the value
  68. (kHz) pointed to by arg. Valid lowpass settings range from 2 to 99.
  69. </dd><p>
  70. <dt><i>OV_ECTL_IBLOCK_GET</i></dt>
  71. <dd><b>Argument: double *</b><br> Returns the current encoder impulse
  72. block setting in the double pointed to by arg.</dd><p>
  73. <dt><i>OV_ECTL_IBLOCK_SET</i></dt> <dd><b>Argument: double *</b><br> Sets
  74. the impulse block bias to the the value pointed to by arg; valid range
  75. is -15.0 to 0.0 [default]. A negative impulse block bias will direct
  76. to encoder to use more bits when incoding short blocks that contain
  77. strong impulses, thus improving the accuracy of impulse encoding.</dd><p>
  78. <dt><i>OV_ECTL_COUPLING_GET</i></dt>
  79. <dd><b>Argument: int *</b><br>
  80. Returns the current encoder coupling enabled/disabled
  81. setting in the int pointed to by arg.
  82. </dd><p>
  83. <dt><i>OV_ECTL_COUPLING_SET</i></dt>
  84. <dd><b>Argument: int *</b><br>
  85. Enables/disables channel coupling in multichannel encoding according to arg.
  86. *arg of zero disables all channel coupling, nonzero allows the encoder to use
  87. coupling if a coupled mode is available for the input. At present, coupling
  88. is available for stereo and 5.1 input modes.
  89. </dd><p>
  90. <dt><i>OV_ECTL_RATEMANAGE_GET [deprecated]</i></dt>
  91. <dd>
  92. <b>Argument: <a href="ovectl_ratemanage_arg.html">struct
  93. ovectl_ratemanage_arg *</a></b><br> Old interface to querying bitrate
  94. management settings; deprecated after move to bit-reservoir style
  95. management in 1.1 rendered this interface partially obsolete. Please
  96. use OV_ECTL_RATEMANGE2_GET instead.
  97. </dd><p>
  98. <dt><i>OV_ECTL_RATEMANAGE_SET [deprecated]</i></dt>
  99. <dd>
  100. <b>Argument: <a href="ovectl_ratemanage_arg.html">struct
  101. ovectl_ratemanage_arg *</a></b><br> Old interface to modifying bitrate
  102. management settings; deprecated after move to bit-reservoir style
  103. management in 1.1 rendered this interface partially obsolete. Please
  104. use OV_ECTL_RATEMANGE2_SET instead.
  105. </dd><p>
  106. <dt><i>OV_ECTL_RATEMANAGE_AVG [deprecated]</i></dt>
  107. <dd>
  108. <b>Argument: <a href="ovectl_ratemanage_arg.html">struct
  109. ovectl_ratemanage_arg *</a></b><br> Old interface to setting
  110. average-bitrate encoding mode; deprecated after move to bit-reservoir
  111. style management in 1.1 rendered this interface partially obsolete.
  112. Please use OV_ECTL_RATEMANGE2_SET instead.
  113. </dd><p>
  114. <dt><i>OV_ECTL_RATEMANAGE_HARD [deprecated]</i></dt>
  115. <dd>
  116. <b>Argument: <a href="ovectl_ratemanage_arg.html">struct
  117. ovectl_ratemanage_arg *</a></b><br> Old interface to setting
  118. bounded-bitrate encoding modes; deprecated after move to bit-reservoir
  119. style management in 1.1 rendered this interface partially obsolete.
  120. Please use OV_ECTL_RATEMANGE2_SET instead.
  121. </dd><p>
  122. </dl>
  123. <h3>Return Values</h3> vorbis_encode_ctl() returns zero on success,
  124. placing any further return information (such as the result of a query)
  125. into the storage pointed to by <i>*arg</i>. On error,
  126. vorbis_encode_ctl() may return one of the following error codes:
  127. <dl>
  128. <dt>OV_EINVAL</dt><dd>Invalid argument, or an attempt to modify a
  129. setting after calling <a
  130. href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a>.</dd><p>
  131. <dt>OV_EIMPL</dt><dd>Unimplemented or unknown request</dd><p>
  132. </dl>
  133. <p>
  134. <br><br>
  135. <hr noshade>
  136. <table border=0 width=100%>
  137. <tr valign=top>
  138. <td><p class=tiny>copyright &copy; 2000-2010 Xiph.Org</p></td>
  139. <td align=right><p class=tiny><a href="http://www.xiph.org/ogg/vorbis/index.html">Ogg Vorbis</a></p></td>
  140. </tr><tr>
  141. <td><p class=tiny>libvorbisenc documentation</p></td>
  142. <td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td>
  143. </tr>
  144. </table>
  145. </body>
  146. </html>