summaryrefslogtreecommitdiff
path: root/doc/vorbisenc/vorbis_encode_ctl.html
blob: 7f98dfe059f59067bd193da38d36794a707ac381 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<html>

<head>
<title>libvorbisenc - function - vorbis_encode_ctl</title>
<link rel=stylesheet href="style.css" type="text/css">
</head>

<body bgcolor=white text=black link="#5555ff" alink="#5555ff" vlink="#5555ff">
<table border=0 width=100%>
<tr>
<td><p class=tiny>libvorbisenc documentation</p></td>
<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td>
</tr>
</table>

<h1>vorbis_encode_ctl</h1>

<p><i>declared in "vorbis/vorbisenc.h";</i></p>

<p>This function implements a generic interface to miscellaneous
encoder settings similar to the clasasic UNIX 'ioctl()' system call.
Applications may use vorbis_encode_ctl() to query or set bitrate
management or quality mode details by using one of several
<i>request</i> arguments detailed below.  Vorbis_encode_ctl() must be
called after one of <a
href="vorbis_encode_setup_managed.html">vorbis_encode_setup_managed()</a>
or <a
href="vorbis_encode_setup_vbr.html">vorbis_encode_setup_vbr()</a>.
When used to modify settings, vorbis_encode_ctl() must be called
before <a
href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a>.

<p>
<br><br>
<table border=0 color=black cellspacing=0 cellpadding=7>
<tr bgcolor=#cccccc>
	<td>
<pre><b>
extern int vorbis_encode_ctl(vorbis_info *vi,int request,void *arg);

</b></pre>
	</td>
</tr>
</table>

<h3>Parameters</h3>
<dl>
<dt><i>vi</i></dt>
<dd>Pointer to an initialized <a href="../libvorbis/vorbis_info.html">vorbis_info</a> struct.</dd><p>
<dt><i>request</i></dt>
<dd>Specifies the desired action; possible request fields are detailed below.</dd><p>
<dt><i>arg</i></dt>
<dd>void * pointing to a data structure matching the request argument.</dd><p>
</dl><p>

<h3>Requests</h3>
<dl>

<dt><i>OV_ECTL_RATEMANAGE2_GET</i></dt>

<dd><b>Argument: <a href="ovectl_ratemanage2_arg.html">struct
ovectl_ratemanage2_arg *</a></b><br> Used to query the current
encoder bitrate management setting.  Also used to initialize fields of
an ovectl_ratemanage2_arg structure for use with
OV_ECTL_RATEMANAGE2_SET.</dd><p>

<dt><i>OV_ECTL_RATEMANAGE2_SET</i></dt>
<dd><b>Argument: <a href="ovectl_ratemanage2_arg.html">struct
ovectl_ratemanage2_arg *</a></b><br> Used to set the current
encoder bitrate management settings to the values listed in the
ovectl_ratemanage2_arg.  Passing a NULL pointer will disable bitrate
management.
</dd><p>

<dt><i>OV_ECTL_LOWPASS_GET</i></dt>
<dd><b>Argument: double *</b><br> Returns the current encoder hard-lowpass
setting (kHz) in the double pointed to by arg.
</dd><p>

<dt><i>OV_ECTL_LOWPASS_SET</i></dt>
<dd><b>Argument: double *</b><br> Sets the encoder hard-lowpass to the value
(kHz) pointed to by arg. Valid lowpass settings range from 2 to 99.
</dd><p>

<dt><i>OV_ECTL_IBLOCK_GET</i></dt>
<dd><b>Argument: double *</b><br> Returns the current encoder impulse
block setting in the double pointed to by arg.</dd><p>

<dt><i>OV_ECTL_IBLOCK_SET</i></dt> <dd><b>Argument: double *</b><br> Sets
the impulse block bias to the the value pointed to by arg; valid range
is -15.0 to 0.0 [default].  A negative impulse block bias will direct
to encoder to use more bits when incoding short blocks that contain
strong impulses, thus improving the accuracy of impulse encoding.</dd><p>

<dt><i>OV_ECTL_COUPLING_GET</i></dt>
<dd><b>Argument: int *</b><br>
Returns the current encoder coupling enabled/disabled 
setting in the int pointed to by arg.
</dd><p>

<dt><i>OV_ECTL_COUPLING_SET</i></dt> 
<dd><b>Argument: int *</b><br>
Enables/disables channel coupling in multichannel encoding according to arg.
*arg of zero disables all channel coupling, nonzero allows the encoder to use
coupling if a coupled mode is available for the input.  At present, coupling 
is available for stereo and 5.1 input modes.
</dd><p>

<dt><i>OV_ECTL_RATEMANAGE_GET [deprecated]</i></dt>
<dd>

<b>Argument: <a href="ovectl_ratemanage_arg.html">struct
ovectl_ratemanage_arg *</a></b><br> Old interface to querying bitrate
management settings; deprecated after move to bit-reservoir style
management in 1.1 rendered this interface partially obsolete.  Please
use OV_ECTL_RATEMANGE2_GET instead.

</dd><p>

<dt><i>OV_ECTL_RATEMANAGE_SET [deprecated]</i></dt>
<dd>
<b>Argument: <a href="ovectl_ratemanage_arg.html">struct
ovectl_ratemanage_arg *</a></b><br> Old interface to modifying bitrate
management settings; deprecated after move to bit-reservoir style
management in 1.1 rendered this interface partially obsolete.  Please
use OV_ECTL_RATEMANGE2_SET instead.
</dd><p>

<dt><i>OV_ECTL_RATEMANAGE_AVG [deprecated]</i></dt>
<dd>
<b>Argument: <a href="ovectl_ratemanage_arg.html">struct
ovectl_ratemanage_arg *</a></b><br> Old interface to setting
average-bitrate encoding mode; deprecated after move to bit-reservoir
style management in 1.1 rendered this interface partially obsolete.
Please use OV_ECTL_RATEMANGE2_SET instead.  
</dd><p>

<dt><i>OV_ECTL_RATEMANAGE_HARD [deprecated]</i></dt>
<dd>
<b>Argument: <a href="ovectl_ratemanage_arg.html">struct
ovectl_ratemanage_arg *</a></b><br> Old interface to setting
bounded-bitrate encoding modes; deprecated after move to bit-reservoir
style management in 1.1 rendered this interface partially obsolete.
Please use OV_ECTL_RATEMANGE2_SET instead.  
</dd><p>


</dl>


<h3>Return Values</h3> vorbis_encode_ctl() returns zero on success,
placing any further return information (such as the result of a query)
into the storage pointed to by <i>*arg</i>.  On error,
vorbis_encode_ctl() may return one of the following error codes:

<dl>

<dt>OV_EINVAL</dt><dd>Invalid argument, or an attempt to modify a
setting after calling <a
href="vorbis_encode_setup_init.html">vorbis_encode_setup_init()</a>.</dd><p>

<dt>OV_EIMPL</dt><dd>Unimplemented or unknown request</dd><p>

</dl>

<p>

<br><br>
<hr noshade>
<table border=0 width=100%>
<tr valign=top>
<td><p class=tiny>copyright &copy; 2000-2010 Xiph.Org</p></td>
<td align=right><p class=tiny><a href="https://xiph.org/vorbis/index.html">Ogg Vorbis</a></p></td>
</tr><tr>
<td><p class=tiny>libvorbisenc documentation</p></td>
<td align=right><p class=tiny>libvorbisenc version 1.3.2 - 20101101</p></td>
</tr>
</table>


</body>

</html>