4 <title>libvorbisenc - function - vorbis_encode_ctl</title>
5 <link rel=stylesheet href="style.css" type="text/css">
8 <body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
9 <table border=0 width=100%>
11 <td><p class=tiny>libvorbisenc documentation</p></td>
12 <td align=right><p class=tiny>libvorbisenc release 1.1 - 20040709</p></td>
16 <h1>vorbis_encode_ctl</h1>
18 <p><i>declared in "vorbis/libvorbisenc.h";</i></p>
20 <p>This function implements a generic interface to miscellaneous
21 encoder settings similar to the clasasic UNIX 'ioctl()' system call.
22 Applications may use vorbis_encode_ctl() to query or set bitrate
23 management or quality mode details by using one of several
24 <i>request</i> arguments detailed below. Vorbis_encode_ctl() must be
25 called after one of <a
26 href="vorbis_encode_setup_managed.html">vorbis_encode_setup_managed()</a>
28 href="vorbis_encode_setup_vbr.html">vorbis_encode_setup_vbr()</a>.
29 When used to modify settings, vorbis_encode_ctl() must be called
31 href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a>.
35 <table border=0 color=black cellspacing=0 cellpadding=7>
39 extern int vorbis_encode_ctl(vorbis_info *vi,int request,void *arg);
49 <dd>File pointer to an initialized <a href="vorbis_info.html">vorbis_info</a> struct.</dd><p>
50 <dt><i>request</i></dt>
51 <dd>Specifies the desired action; possible request fields are detailed below.</dd><p>
53 <dd>void * pointing to a data structure matching the request argument.</dd><p>
59 <dt><i>OV_ECTL_RATEMANAGE2_GET</i></dt>
61 <dd><b>Argument: <a href="ovectl_ratemanage2_arg.html">struct
62 ovectl_ratemanage2_arg *</a></b><br> Used to query the current
63 encoder bitrate management setting. Also used to initialize fields of
64 an ovectl_ratemanage2_arg structure for use with
65 OV_ECTL_RATEMANAGE2_SET.</dd><p>
67 <dt><i>OV_ECTL_RATEMANAGE2_SET</i></dt>
68 <dd><b>Argument: <a href="ovectl_ratemanage2_arg.html">struct
69 ovectl_ratemanage2_arg *</a></b><br> Used to set the current
70 encoder bitrate management settings to the values listed in the
71 ovectl_ratemanage2_arg. Passing a NULL pointer will disable bitrate
75 <dt><i>OV_ECTL_LOWPASS_GET</i></dt>
76 <dd><b>Argument: double *</b><br> Returns the current encoder hard-lowpass
77 setting (kHz) in the double pointed to by arg.
80 <dt><i>OV_ECTL_LOWPASS_SET</i></dt>
81 <dd><b>Argument: double *</b><br> Sets the encoder hard-lowpass to the value
82 (kHz) pointed to by arg. Valid lowpass settings range from 2 to 99.
85 <dt><i>OV_ECTL_IBLOCK_GET</i></dt>
86 <dd><b>Argument: double *</b><br> Returns the current encoder impulse
87 block setting in the double pointed to by arg.</dd><p>
89 <dt><i>OV_ECTL_IBLOCK_SET</i></dt> <dd><b>Argument: double *</b><br> Sets
90 the impulse block bias to the the value pointed to by arg; valid range
91 is -15.0 to 0.0 [default]. A negative impulse block bias will direct
92 to encoder to use more bits when incoding short blocks that contain
93 strong impulses, thus improving the accuracy of impulse encoding.</dd><p>
95 <dt><i>OV_ECTL_RATEMANAGE_GET [deprecated]</i></dt>
98 <b>Argument: <a href="ovectl_ratemanage_arg.html">struct
99 ovectl_ratemanage_arg *</a></b><br> Old interface to querying bitrate
100 management settings; deprecated after move to bit-reservoir style
101 management in 1.1 rendered this interface partially obsolete. Please
102 use OV_ECTL_RATEMANGE2_GET instead.
106 <dt><i>OV_ECTL_RATEMANAGE_SET [deprecated]</i></dt>
108 <b>Argument: <a href="ovectl_ratemanage_arg.html">struct
109 ovectl_ratemanage_arg *</a></b><br> Old interface to modifying bitrate
110 management settings; deprecated after move to bit-reservoir style
111 management in 1.1 rendered this interface partially obsolete. Please
112 use OV_ECTL_RATEMANGE2_SET instead.
115 <dt><i>OV_ECTL_RATEMANAGE_AVG [deprecated]</i></dt>
117 <b>Argument: <a href="ovectl_ratemanage_arg.html">struct
118 ovectl_ratemanage_arg *</a></b><br> Old interface to setting
119 average-bitrate encoding mode; deprecated after move to bit-reservoir
120 style management in 1.1 rendered this interface partially obsolete.
121 Please use OV_ECTL_RATEMANGE2_SET instead.
124 <dt><i>OV_ECTL_RATEMANAGE_HARD [deprecated]</i></dt>
126 <b>Argument: <a href="ovectl_ratemanage_arg.html">struct
127 ovectl_ratemanage_arg *</a></b><br> Old interface to setting
128 bounded-bitrate encoding modes; deprecated after move to bit-reservoir
129 style management in 1.1 rendered this interface partially obsolete.
130 Please use OV_ECTL_RATEMANGE2_SET instead.
137 <h3>Return Values</h3> vorbis_encode_ctl() returns zero on success,
138 placing any further return information (such as the result of a query)
139 into the storage pointed to by <i>*arg</i>. On error,
140 vorbis_encode_ctl() may return one of the following error codes:
144 <dt>OV_EINVAL</dt><dd>Invalid argument, or an attempt to modify a
145 setting after calling <a
146 href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a>.</dd><p>
148 <dt>OV_EIMPL</dt><dd>Unimplemented or unknown request</dd><p>
156 <table border=0 width=100%>
158 <td><p class=tiny>copyright © 2004 xiph.org</p></td>
159 <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>
161 <td><p class=tiny>libvorbisenc documentation</p></td>
162 <td align=right><p class=tiny>libvorbisenc release 1.1 - 20040709</p></td>