media_codec_opus_sys/opt/rustwide/workdir/generated/
opus.rs

1/* automatically generated by rust-bindgen 0.72.0 */
2
3pub const OPUS_OK: u32 = 0;
4pub const OPUS_BAD_ARG: i32 = -1;
5pub const OPUS_BUFFER_TOO_SMALL: i32 = -2;
6pub const OPUS_INTERNAL_ERROR: i32 = -3;
7pub const OPUS_INVALID_PACKET: i32 = -4;
8pub const OPUS_UNIMPLEMENTED: i32 = -5;
9pub const OPUS_INVALID_STATE: i32 = -6;
10pub const OPUS_ALLOC_FAIL: i32 = -7;
11pub const OPUS_SET_APPLICATION_REQUEST: u32 = 4000;
12pub const OPUS_GET_APPLICATION_REQUEST: u32 = 4001;
13pub const OPUS_SET_BITRATE_REQUEST: u32 = 4002;
14pub const OPUS_GET_BITRATE_REQUEST: u32 = 4003;
15pub const OPUS_SET_MAX_BANDWIDTH_REQUEST: u32 = 4004;
16pub const OPUS_GET_MAX_BANDWIDTH_REQUEST: u32 = 4005;
17pub const OPUS_SET_VBR_REQUEST: u32 = 4006;
18pub const OPUS_GET_VBR_REQUEST: u32 = 4007;
19pub const OPUS_SET_BANDWIDTH_REQUEST: u32 = 4008;
20pub const OPUS_GET_BANDWIDTH_REQUEST: u32 = 4009;
21pub const OPUS_SET_COMPLEXITY_REQUEST: u32 = 4010;
22pub const OPUS_GET_COMPLEXITY_REQUEST: u32 = 4011;
23pub const OPUS_SET_INBAND_FEC_REQUEST: u32 = 4012;
24pub const OPUS_GET_INBAND_FEC_REQUEST: u32 = 4013;
25pub const OPUS_SET_PACKET_LOSS_PERC_REQUEST: u32 = 4014;
26pub const OPUS_GET_PACKET_LOSS_PERC_REQUEST: u32 = 4015;
27pub const OPUS_SET_DTX_REQUEST: u32 = 4016;
28pub const OPUS_GET_DTX_REQUEST: u32 = 4017;
29pub const OPUS_SET_VBR_CONSTRAINT_REQUEST: u32 = 4020;
30pub const OPUS_GET_VBR_CONSTRAINT_REQUEST: u32 = 4021;
31pub const OPUS_SET_FORCE_CHANNELS_REQUEST: u32 = 4022;
32pub const OPUS_GET_FORCE_CHANNELS_REQUEST: u32 = 4023;
33pub const OPUS_SET_SIGNAL_REQUEST: u32 = 4024;
34pub const OPUS_GET_SIGNAL_REQUEST: u32 = 4025;
35pub const OPUS_GET_LOOKAHEAD_REQUEST: u32 = 4027;
36pub const OPUS_GET_SAMPLE_RATE_REQUEST: u32 = 4029;
37pub const OPUS_GET_FINAL_RANGE_REQUEST: u32 = 4031;
38pub const OPUS_GET_PITCH_REQUEST: u32 = 4033;
39pub const OPUS_SET_GAIN_REQUEST: u32 = 4034;
40pub const OPUS_GET_GAIN_REQUEST: u32 = 4045;
41pub const OPUS_SET_LSB_DEPTH_REQUEST: u32 = 4036;
42pub const OPUS_GET_LSB_DEPTH_REQUEST: u32 = 4037;
43pub const OPUS_GET_LAST_PACKET_DURATION_REQUEST: u32 = 4039;
44pub const OPUS_SET_EXPERT_FRAME_DURATION_REQUEST: u32 = 4040;
45pub const OPUS_GET_EXPERT_FRAME_DURATION_REQUEST: u32 = 4041;
46pub const OPUS_SET_PREDICTION_DISABLED_REQUEST: u32 = 4042;
47pub const OPUS_GET_PREDICTION_DISABLED_REQUEST: u32 = 4043;
48pub const OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST: u32 = 4046;
49pub const OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST: u32 = 4047;
50pub const OPUS_GET_IN_DTX_REQUEST: u32 = 4049;
51pub const OPUS_SET_DRED_DURATION_REQUEST: u32 = 4050;
52pub const OPUS_GET_DRED_DURATION_REQUEST: u32 = 4051;
53pub const OPUS_SET_DNN_BLOB_REQUEST: u32 = 4052;
54pub const OPUS_AUTO: i32 = -1000;
55pub const OPUS_BITRATE_MAX: i32 = -1;
56pub const OPUS_APPLICATION_VOIP: u32 = 2048;
57pub const OPUS_APPLICATION_AUDIO: u32 = 2049;
58pub const OPUS_APPLICATION_RESTRICTED_LOWDELAY: u32 = 2051;
59pub const OPUS_SIGNAL_VOICE: u32 = 3001;
60pub const OPUS_SIGNAL_MUSIC: u32 = 3002;
61pub const OPUS_BANDWIDTH_NARROWBAND: u32 = 1101;
62pub const OPUS_BANDWIDTH_MEDIUMBAND: u32 = 1102;
63pub const OPUS_BANDWIDTH_WIDEBAND: u32 = 1103;
64pub const OPUS_BANDWIDTH_SUPERWIDEBAND: u32 = 1104;
65pub const OPUS_BANDWIDTH_FULLBAND: u32 = 1105;
66pub const OPUS_FRAMESIZE_ARG: u32 = 5000;
67pub const OPUS_FRAMESIZE_2_5_MS: u32 = 5001;
68pub const OPUS_FRAMESIZE_5_MS: u32 = 5002;
69pub const OPUS_FRAMESIZE_10_MS: u32 = 5003;
70pub const OPUS_FRAMESIZE_20_MS: u32 = 5004;
71pub const OPUS_FRAMESIZE_40_MS: u32 = 5005;
72pub const OPUS_FRAMESIZE_60_MS: u32 = 5006;
73pub const OPUS_FRAMESIZE_80_MS: u32 = 5007;
74pub const OPUS_FRAMESIZE_100_MS: u32 = 5008;
75pub const OPUS_FRAMESIZE_120_MS: u32 = 5009;
76pub const OPUS_RESET_STATE: u32 = 4028;
77pub type opus_int32 = ::std::os::raw::c_int;
78pub type opus_uint32 = ::std::os::raw::c_uint;
79pub type opus_int16 = ::std::os::raw::c_short;
80pub type opus_uint16 = ::std::os::raw::c_ushort;
81unsafe extern "C" {
82    pub fn opus_strerror(error: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
83}
84unsafe extern "C" {
85    pub fn opus_get_version_string() -> *const ::std::os::raw::c_char;
86}
87#[repr(C)]
88#[derive(Debug, Copy, Clone)]
89pub struct OpusEncoder {
90    _unused: [u8; 0],
91}
92unsafe extern "C" {
93    pub fn opus_encoder_get_size(channels: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
94}
95unsafe extern "C" {
96    pub fn opus_encoder_create(
97        Fs: opus_int32,
98        channels: ::std::os::raw::c_int,
99        application: ::std::os::raw::c_int,
100        error: *mut ::std::os::raw::c_int,
101    ) -> *mut OpusEncoder;
102}
103unsafe extern "C" {
104    pub fn opus_encoder_init(
105        st: *mut OpusEncoder,
106        Fs: opus_int32,
107        channels: ::std::os::raw::c_int,
108        application: ::std::os::raw::c_int,
109    ) -> ::std::os::raw::c_int;
110}
111unsafe extern "C" {
112    pub fn opus_encode(
113        st: *mut OpusEncoder,
114        pcm: *const opus_int16,
115        frame_size: ::std::os::raw::c_int,
116        data: *mut ::std::os::raw::c_uchar,
117        max_data_bytes: opus_int32,
118    ) -> opus_int32;
119}
120unsafe extern "C" {
121    pub fn opus_encode_float(
122        st: *mut OpusEncoder,
123        pcm: *const f32,
124        frame_size: ::std::os::raw::c_int,
125        data: *mut ::std::os::raw::c_uchar,
126        max_data_bytes: opus_int32,
127    ) -> opus_int32;
128}
129unsafe extern "C" {
130    pub fn opus_encoder_destroy(st: *mut OpusEncoder);
131}
132unsafe extern "C" {
133    pub fn opus_encoder_ctl(st: *mut OpusEncoder, request: ::std::os::raw::c_int, ...) -> ::std::os::raw::c_int;
134}
135#[repr(C)]
136#[derive(Debug, Copy, Clone)]
137pub struct OpusDecoder {
138    _unused: [u8; 0],
139}
140#[repr(C)]
141#[derive(Debug, Copy, Clone)]
142pub struct OpusDREDDecoder {
143    _unused: [u8; 0],
144}
145#[repr(C)]
146#[derive(Debug, Copy, Clone)]
147pub struct OpusDRED {
148    _unused: [u8; 0],
149}
150unsafe extern "C" {
151    pub fn opus_decoder_get_size(channels: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
152}
153unsafe extern "C" {
154    pub fn opus_decoder_create(Fs: opus_int32, channels: ::std::os::raw::c_int, error: *mut ::std::os::raw::c_int) -> *mut OpusDecoder;
155}
156unsafe extern "C" {
157    pub fn opus_decoder_init(st: *mut OpusDecoder, Fs: opus_int32, channels: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
158}
159unsafe extern "C" {
160    pub fn opus_decode(
161        st: *mut OpusDecoder,
162        data: *const ::std::os::raw::c_uchar,
163        len: opus_int32,
164        pcm: *mut opus_int16,
165        frame_size: ::std::os::raw::c_int,
166        decode_fec: ::std::os::raw::c_int,
167    ) -> ::std::os::raw::c_int;
168}
169unsafe extern "C" {
170    pub fn opus_decode_float(
171        st: *mut OpusDecoder,
172        data: *const ::std::os::raw::c_uchar,
173        len: opus_int32,
174        pcm: *mut f32,
175        frame_size: ::std::os::raw::c_int,
176        decode_fec: ::std::os::raw::c_int,
177    ) -> ::std::os::raw::c_int;
178}
179unsafe extern "C" {
180    pub fn opus_decoder_ctl(st: *mut OpusDecoder, request: ::std::os::raw::c_int, ...) -> ::std::os::raw::c_int;
181}
182unsafe extern "C" {
183    pub fn opus_decoder_destroy(st: *mut OpusDecoder);
184}
185unsafe extern "C" {
186    pub fn opus_dred_decoder_get_size() -> ::std::os::raw::c_int;
187}
188unsafe extern "C" {
189    pub fn opus_dred_decoder_create(error: *mut ::std::os::raw::c_int) -> *mut OpusDREDDecoder;
190}
191unsafe extern "C" {
192    pub fn opus_dred_decoder_init(dec: *mut OpusDREDDecoder) -> ::std::os::raw::c_int;
193}
194unsafe extern "C" {
195    pub fn opus_dred_decoder_destroy(dec: *mut OpusDREDDecoder);
196}
197unsafe extern "C" {
198    pub fn opus_dred_decoder_ctl(dred_dec: *mut OpusDREDDecoder, request: ::std::os::raw::c_int, ...) -> ::std::os::raw::c_int;
199}
200unsafe extern "C" {
201    pub fn opus_dred_get_size() -> ::std::os::raw::c_int;
202}
203unsafe extern "C" {
204    pub fn opus_dred_alloc(error: *mut ::std::os::raw::c_int) -> *mut OpusDRED;
205}
206unsafe extern "C" {
207    pub fn opus_dred_free(dec: *mut OpusDRED);
208}
209unsafe extern "C" {
210    pub fn opus_dred_parse(
211        dred_dec: *mut OpusDREDDecoder,
212        dred: *mut OpusDRED,
213        data: *const ::std::os::raw::c_uchar,
214        len: opus_int32,
215        max_dred_samples: opus_int32,
216        sampling_rate: opus_int32,
217        dred_end: *mut ::std::os::raw::c_int,
218        defer_processing: ::std::os::raw::c_int,
219    ) -> ::std::os::raw::c_int;
220}
221unsafe extern "C" {
222    pub fn opus_dred_process(dred_dec: *mut OpusDREDDecoder, src: *const OpusDRED, dst: *mut OpusDRED) -> ::std::os::raw::c_int;
223}
224unsafe extern "C" {
225    pub fn opus_decoder_dred_decode(
226        st: *mut OpusDecoder,
227        dred: *const OpusDRED,
228        dred_offset: opus_int32,
229        pcm: *mut opus_int16,
230        frame_size: opus_int32,
231    ) -> ::std::os::raw::c_int;
232}
233unsafe extern "C" {
234    pub fn opus_decoder_dred_decode_float(
235        st: *mut OpusDecoder,
236        dred: *const OpusDRED,
237        dred_offset: opus_int32,
238        pcm: *mut f32,
239        frame_size: opus_int32,
240    ) -> ::std::os::raw::c_int;
241}
242unsafe extern "C" {
243    pub fn opus_packet_parse(
244        data: *const ::std::os::raw::c_uchar,
245        len: opus_int32,
246        out_toc: *mut ::std::os::raw::c_uchar,
247        frames: *mut *const ::std::os::raw::c_uchar,
248        size: *mut opus_int16,
249        payload_offset: *mut ::std::os::raw::c_int,
250    ) -> ::std::os::raw::c_int;
251}
252unsafe extern "C" {
253    pub fn opus_packet_get_bandwidth(data: *const ::std::os::raw::c_uchar) -> ::std::os::raw::c_int;
254}
255unsafe extern "C" {
256    pub fn opus_packet_get_samples_per_frame(data: *const ::std::os::raw::c_uchar, Fs: opus_int32) -> ::std::os::raw::c_int;
257}
258unsafe extern "C" {
259    pub fn opus_packet_get_nb_channels(data: *const ::std::os::raw::c_uchar) -> ::std::os::raw::c_int;
260}
261unsafe extern "C" {
262    pub fn opus_packet_get_nb_frames(packet: *const ::std::os::raw::c_uchar, len: opus_int32) -> ::std::os::raw::c_int;
263}
264unsafe extern "C" {
265    pub fn opus_packet_get_nb_samples(packet: *const ::std::os::raw::c_uchar, len: opus_int32, Fs: opus_int32) -> ::std::os::raw::c_int;
266}
267unsafe extern "C" {
268    pub fn opus_packet_has_lbrr(packet: *const ::std::os::raw::c_uchar, len: opus_int32) -> ::std::os::raw::c_int;
269}
270unsafe extern "C" {
271    pub fn opus_decoder_get_nb_samples(dec: *const OpusDecoder, packet: *const ::std::os::raw::c_uchar, len: opus_int32) -> ::std::os::raw::c_int;
272}
273unsafe extern "C" {
274    pub fn opus_pcm_soft_clip(pcm: *mut f32, frame_size: ::std::os::raw::c_int, channels: ::std::os::raw::c_int, softclip_mem: *mut f32);
275}
276#[repr(C)]
277#[derive(Debug, Copy, Clone)]
278pub struct OpusRepacketizer {
279    _unused: [u8; 0],
280}
281unsafe extern "C" {
282    pub fn opus_repacketizer_get_size() -> ::std::os::raw::c_int;
283}
284unsafe extern "C" {
285    pub fn opus_repacketizer_init(rp: *mut OpusRepacketizer) -> *mut OpusRepacketizer;
286}
287unsafe extern "C" {
288    pub fn opus_repacketizer_create() -> *mut OpusRepacketizer;
289}
290unsafe extern "C" {
291    pub fn opus_repacketizer_destroy(rp: *mut OpusRepacketizer);
292}
293unsafe extern "C" {
294    pub fn opus_repacketizer_cat(rp: *mut OpusRepacketizer, data: *const ::std::os::raw::c_uchar, len: opus_int32) -> ::std::os::raw::c_int;
295}
296unsafe extern "C" {
297    pub fn opus_repacketizer_out_range(
298        rp: *mut OpusRepacketizer,
299        begin: ::std::os::raw::c_int,
300        end: ::std::os::raw::c_int,
301        data: *mut ::std::os::raw::c_uchar,
302        maxlen: opus_int32,
303    ) -> opus_int32;
304}
305unsafe extern "C" {
306    pub fn opus_repacketizer_get_nb_frames(rp: *mut OpusRepacketizer) -> ::std::os::raw::c_int;
307}
308unsafe extern "C" {
309    pub fn opus_repacketizer_out(rp: *mut OpusRepacketizer, data: *mut ::std::os::raw::c_uchar, maxlen: opus_int32) -> opus_int32;
310}
311unsafe extern "C" {
312    pub fn opus_packet_pad(data: *mut ::std::os::raw::c_uchar, len: opus_int32, new_len: opus_int32) -> ::std::os::raw::c_int;
313}
314unsafe extern "C" {
315    pub fn opus_packet_unpad(data: *mut ::std::os::raw::c_uchar, len: opus_int32) -> opus_int32;
316}
317unsafe extern "C" {
318    pub fn opus_multistream_packet_pad(
319        data: *mut ::std::os::raw::c_uchar,
320        len: opus_int32,
321        new_len: opus_int32,
322        nb_streams: ::std::os::raw::c_int,
323    ) -> ::std::os::raw::c_int;
324}
325unsafe extern "C" {
326    pub fn opus_multistream_packet_unpad(data: *mut ::std::os::raw::c_uchar, len: opus_int32, nb_streams: ::std::os::raw::c_int) -> opus_int32;
327}