vorbis_encode_ctl.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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 release 1.1 - 20040709</p></td>
  11. </tr>
  12. </table>
  13. <h1>vorbis_encode_ctl</h1>
  14. <p><i>declared in "vorbis/libvorbisenc.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>File pointer to an initialized <a href="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_RATEMANAGE_GET [deprecated]</i></dt>
  79. <dd>
  80. <b>Argument: <a href="ovectl_ratemanage_arg.html">struct
  81. ovectl_ratemanage_arg *</a></b><br> Old interface to querying bitrate
  82. management settings; deprecated after move to bit-reservoir style
  83. management in 1.1 rendered this interface partially obsolete. Please
  84. use OV_ECTL_RATEMANGE2_GET instead.
  85. </dd><p>
  86. <dt><i>OV_ECTL_RATEMANAGE_SET [deprecated]</i></dt>
  87. <dd>
  88. <b>Argument: <a href="ovectl_ratemanage_arg.html">struct
  89. ovectl_ratemanage_arg *</a></b><br> Old interface to modifying bitrate
  90. management settings; deprecated after move to bit-reservoir style
  91. management in 1.1 rendered this interface partially obsolete. Please
  92. use OV_ECTL_RATEMANGE2_SET instead.
  93. </dd><p>
  94. <dt><i>OV_ECTL_RATEMANAGE_AVG [deprecated]</i></dt>
  95. <dd>
  96. <b>Argument: <a href="ovectl_ratemanage_arg.html">struct
  97. ovectl_ratemanage_arg *</a></b><br> Old interface to setting
  98. average-bitrate encoding mode; deprecated after move to bit-reservoir
  99. style management in 1.1 rendered this interface partially obsolete.
  100. Please use OV_ECTL_RATEMANGE2_SET instead.
  101. </dd><p>
  102. <dt><i>OV_ECTL_RATEMANAGE_HARD [deprecated]</i></dt>
  103. <dd>
  104. <b>Argument: <a href="ovectl_ratemanage_arg.html">struct
  105. ovectl_ratemanage_arg *</a></b><br> Old interface to setting
  106. bounded-bitrate encoding modes; deprecated after move to bit-reservoir
  107. style management in 1.1 rendered this interface partially obsolete.
  108. Please use OV_ECTL_RATEMANGE2_SET instead.
  109. </dd><p>
  110. </dl>
  111. <h3>Return Values</h3> vorbis_encode_ctl() returns zero on success,
  112. placing any further return information (such as the result of a query)
  113. into the storage pointed to by <i>*arg</i>. On error,
  114. vorbis_encode_ctl() may return one of the following error codes:
  115. <dl>
  116. <dt>OV_EINVAL</dt><dd>Invalid argument, or an attempt to modify a
  117. setting after calling <a
  118. href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a>.</dd><p>
  119. <dt>OV_EIMPL</dt><dd>Unimplemented or unknown request</dd><p>
  120. </dl>
  121. <p>
  122. <br><br>
  123. <hr noshade>
  124. <table border=0 width=100%>
  125. <tr valign=top>
  126. <td><p class=tiny>copyright &copy; 2004 xiph.org</p></td>
  127. <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>
  128. </tr><tr>
  129. <td><p class=tiny>libvorbisenc documentation</p></td>
  130. <td align=right><p class=tiny>libvorbisenc release 1.1 - 20040709</p></td>
  131. </tr>
  132. </table>
  133. </body>
  134. </html>