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

1/* automatically generated by rust-bindgen 0.72.0 */
2
3pub const OPUS_OK: i32 = 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: i32 = 4000;
12pub const OPUS_GET_APPLICATION_REQUEST: i32 = 4001;
13pub const OPUS_SET_BITRATE_REQUEST: i32 = 4002;
14pub const OPUS_GET_BITRATE_REQUEST: i32 = 4003;
15pub const OPUS_SET_MAX_BANDWIDTH_REQUEST: i32 = 4004;
16pub const OPUS_GET_MAX_BANDWIDTH_REQUEST: i32 = 4005;
17pub const OPUS_SET_VBR_REQUEST: i32 = 4006;
18pub const OPUS_GET_VBR_REQUEST: i32 = 4007;
19pub const OPUS_SET_BANDWIDTH_REQUEST: i32 = 4008;
20pub const OPUS_GET_BANDWIDTH_REQUEST: i32 = 4009;
21pub const OPUS_SET_COMPLEXITY_REQUEST: i32 = 4010;
22pub const OPUS_GET_COMPLEXITY_REQUEST: i32 = 4011;
23pub const OPUS_SET_INBAND_FEC_REQUEST: i32 = 4012;
24pub const OPUS_GET_INBAND_FEC_REQUEST: i32 = 4013;
25pub const OPUS_SET_PACKET_LOSS_PERC_REQUEST: i32 = 4014;
26pub const OPUS_GET_PACKET_LOSS_PERC_REQUEST: i32 = 4015;
27pub const OPUS_SET_DTX_REQUEST: i32 = 4016;
28pub const OPUS_GET_DTX_REQUEST: i32 = 4017;
29pub const OPUS_SET_VBR_CONSTRAINT_REQUEST: i32 = 4020;
30pub const OPUS_GET_VBR_CONSTRAINT_REQUEST: i32 = 4021;
31pub const OPUS_SET_FORCE_CHANNELS_REQUEST: i32 = 4022;
32pub const OPUS_GET_FORCE_CHANNELS_REQUEST: i32 = 4023;
33pub const OPUS_SET_SIGNAL_REQUEST: i32 = 4024;
34pub const OPUS_GET_SIGNAL_REQUEST: i32 = 4025;
35pub const OPUS_GET_LOOKAHEAD_REQUEST: i32 = 4027;
36pub const OPUS_GET_SAMPLE_RATE_REQUEST: i32 = 4029;
37pub const OPUS_GET_FINAL_RANGE_REQUEST: i32 = 4031;
38pub const OPUS_GET_PITCH_REQUEST: i32 = 4033;
39pub const OPUS_SET_GAIN_REQUEST: i32 = 4034;
40pub const OPUS_GET_GAIN_REQUEST: i32 = 4045;
41pub const OPUS_SET_LSB_DEPTH_REQUEST: i32 = 4036;
42pub const OPUS_GET_LSB_DEPTH_REQUEST: i32 = 4037;
43pub const OPUS_GET_LAST_PACKET_DURATION_REQUEST: i32 = 4039;
44pub const OPUS_SET_EXPERT_FRAME_DURATION_REQUEST: i32 = 4040;
45pub const OPUS_GET_EXPERT_FRAME_DURATION_REQUEST: i32 = 4041;
46pub const OPUS_SET_PREDICTION_DISABLED_REQUEST: i32 = 4042;
47pub const OPUS_GET_PREDICTION_DISABLED_REQUEST: i32 = 4043;
48pub const OPUS_SET_PHASE_INVERSION_DISABLED_REQUEST: i32 = 4046;
49pub const OPUS_GET_PHASE_INVERSION_DISABLED_REQUEST: i32 = 4047;
50pub const OPUS_GET_IN_DTX_REQUEST: i32 = 4049;
51pub const OPUS_SET_DRED_DURATION_REQUEST: i32 = 4050;
52pub const OPUS_GET_DRED_DURATION_REQUEST: i32 = 4051;
53pub const OPUS_SET_DNN_BLOB_REQUEST: i32 = 4052;
54pub const OPUS_AUTO: i32 = -1000;
55pub const OPUS_BITRATE_MAX: i32 = -1;
56pub const OPUS_APPLICATION_VOIP: i32 = 2048;
57pub const OPUS_APPLICATION_AUDIO: i32 = 2049;
58pub const OPUS_APPLICATION_RESTRICTED_LOWDELAY: i32 = 2051;
59pub const OPUS_SIGNAL_VOICE: i32 = 3001;
60pub const OPUS_SIGNAL_MUSIC: i32 = 3002;
61pub const OPUS_BANDWIDTH_NARROWBAND: i32 = 1101;
62pub const OPUS_BANDWIDTH_MEDIUMBAND: i32 = 1102;
63pub const OPUS_BANDWIDTH_WIDEBAND: i32 = 1103;
64pub const OPUS_BANDWIDTH_SUPERWIDEBAND: i32 = 1104;
65pub const OPUS_BANDWIDTH_FULLBAND: i32 = 1105;
66pub const OPUS_FRAMESIZE_ARG: i32 = 5000;
67pub const OPUS_FRAMESIZE_2_5_MS: i32 = 5001;
68pub const OPUS_FRAMESIZE_5_MS: i32 = 5002;
69pub const OPUS_FRAMESIZE_10_MS: i32 = 5003;
70pub const OPUS_FRAMESIZE_20_MS: i32 = 5004;
71pub const OPUS_FRAMESIZE_40_MS: i32 = 5005;
72pub const OPUS_FRAMESIZE_60_MS: i32 = 5006;
73pub const OPUS_FRAMESIZE_80_MS: i32 = 5007;
74pub const OPUS_FRAMESIZE_100_MS: i32 = 5008;
75pub const OPUS_FRAMESIZE_120_MS: i32 = 5009;
76pub const OPUS_RESET_STATE: i32 = 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;
81#[repr(C)]
82#[derive(Debug, Copy, Clone)]
83pub struct OpusEncoder {
84    _unused: [u8; 0],
85}
86#[repr(C)]
87#[derive(Debug, Copy, Clone)]
88pub struct OpusDecoder {
89    _unused: [u8; 0],
90}
91#[repr(C)]
92#[derive(Debug, Copy, Clone)]
93pub struct OpusDREDDecoder {
94    _unused: [u8; 0],
95}
96#[repr(C)]
97#[derive(Debug, Copy, Clone)]
98pub struct OpusDRED {
99    _unused: [u8; 0],
100}
101#[repr(C)]
102#[derive(Debug, Copy, Clone)]
103pub struct OpusRepacketizer {
104    _unused: [u8; 0],
105}
106unsafe extern "C" {
107    pub fn opus_strerror(error: ::std::os::raw::c_int) -> *const ::std::os::raw::c_char;
108    pub fn opus_get_version_string() -> *const ::std::os::raw::c_char;
109    pub fn opus_encoder_get_size(channels: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
110    pub fn opus_encoder_create(
111        Fs: opus_int32,
112        channels: ::std::os::raw::c_int,
113        application: ::std::os::raw::c_int,
114        error: *mut ::std::os::raw::c_int,
115    ) -> *mut OpusEncoder;
116    pub fn opus_encoder_init(
117        st: *mut OpusEncoder,
118        Fs: opus_int32,
119        channels: ::std::os::raw::c_int,
120        application: ::std::os::raw::c_int,
121    ) -> ::std::os::raw::c_int;
122    pub fn opus_encode(
123        st: *mut OpusEncoder,
124        pcm: *const opus_int16,
125        frame_size: ::std::os::raw::c_int,
126        data: *mut ::std::os::raw::c_uchar,
127        max_data_bytes: opus_int32,
128    ) -> opus_int32;
129    pub fn opus_encode_float(
130        st: *mut OpusEncoder,
131        pcm: *const f32,
132        frame_size: ::std::os::raw::c_int,
133        data: *mut ::std::os::raw::c_uchar,
134        max_data_bytes: opus_int32,
135    ) -> opus_int32;
136    pub fn opus_encoder_destroy(st: *mut OpusEncoder);
137    pub fn opus_encoder_ctl(st: *mut OpusEncoder, request: ::std::os::raw::c_int, ...) -> ::std::os::raw::c_int;
138    pub fn opus_decoder_get_size(channels: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
139    pub fn opus_decoder_create(Fs: opus_int32, channels: ::std::os::raw::c_int, error: *mut ::std::os::raw::c_int) -> *mut OpusDecoder;
140    pub fn opus_decoder_init(st: *mut OpusDecoder, Fs: opus_int32, channels: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
141    pub fn opus_decode(
142        st: *mut OpusDecoder,
143        data: *const ::std::os::raw::c_uchar,
144        len: opus_int32,
145        pcm: *mut opus_int16,
146        frame_size: ::std::os::raw::c_int,
147        decode_fec: ::std::os::raw::c_int,
148    ) -> ::std::os::raw::c_int;
149    pub fn opus_decode_float(
150        st: *mut OpusDecoder,
151        data: *const ::std::os::raw::c_uchar,
152        len: opus_int32,
153        pcm: *mut f32,
154        frame_size: ::std::os::raw::c_int,
155        decode_fec: ::std::os::raw::c_int,
156    ) -> ::std::os::raw::c_int;
157    pub fn opus_decoder_ctl(st: *mut OpusDecoder, request: ::std::os::raw::c_int, ...) -> ::std::os::raw::c_int;
158    pub fn opus_decoder_destroy(st: *mut OpusDecoder);
159    pub fn opus_dred_decoder_get_size() -> ::std::os::raw::c_int;
160    pub fn opus_dred_decoder_create(error: *mut ::std::os::raw::c_int) -> *mut OpusDREDDecoder;
161    pub fn opus_dred_decoder_init(dec: *mut OpusDREDDecoder) -> ::std::os::raw::c_int;
162    pub fn opus_dred_decoder_destroy(dec: *mut OpusDREDDecoder);
163    pub fn opus_dred_decoder_ctl(dred_dec: *mut OpusDREDDecoder, request: ::std::os::raw::c_int, ...) -> ::std::os::raw::c_int;
164    pub fn opus_dred_get_size() -> ::std::os::raw::c_int;
165    pub fn opus_dred_alloc(error: *mut ::std::os::raw::c_int) -> *mut OpusDRED;
166    pub fn opus_dred_free(dec: *mut OpusDRED);
167    pub fn opus_dred_parse(
168        dred_dec: *mut OpusDREDDecoder,
169        dred: *mut OpusDRED,
170        data: *const ::std::os::raw::c_uchar,
171        len: opus_int32,
172        max_dred_samples: opus_int32,
173        sampling_rate: opus_int32,
174        dred_end: *mut ::std::os::raw::c_int,
175        defer_processing: ::std::os::raw::c_int,
176    ) -> ::std::os::raw::c_int;
177    pub fn opus_dred_process(dred_dec: *mut OpusDREDDecoder, src: *const OpusDRED, dst: *mut OpusDRED) -> ::std::os::raw::c_int;
178    pub fn opus_decoder_dred_decode(
179        st: *mut OpusDecoder,
180        dred: *const OpusDRED,
181        dred_offset: opus_int32,
182        pcm: *mut opus_int16,
183        frame_size: opus_int32,
184    ) -> ::std::os::raw::c_int;
185    pub fn opus_decoder_dred_decode_float(
186        st: *mut OpusDecoder,
187        dred: *const OpusDRED,
188        dred_offset: opus_int32,
189        pcm: *mut f32,
190        frame_size: opus_int32,
191    ) -> ::std::os::raw::c_int;
192    pub fn opus_packet_parse(
193        data: *const ::std::os::raw::c_uchar,
194        len: opus_int32,
195        out_toc: *mut ::std::os::raw::c_uchar,
196        frames: *mut *const ::std::os::raw::c_uchar,
197        size: *mut opus_int16,
198        payload_offset: *mut ::std::os::raw::c_int,
199    ) -> ::std::os::raw::c_int;
200    pub fn opus_packet_get_bandwidth(data: *const ::std::os::raw::c_uchar) -> ::std::os::raw::c_int;
201    pub fn opus_packet_get_samples_per_frame(data: *const ::std::os::raw::c_uchar, Fs: opus_int32) -> ::std::os::raw::c_int;
202    pub fn opus_packet_get_nb_channels(data: *const ::std::os::raw::c_uchar) -> ::std::os::raw::c_int;
203    pub fn opus_packet_get_nb_frames(packet: *const ::std::os::raw::c_uchar, len: opus_int32) -> ::std::os::raw::c_int;
204    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;
205    pub fn opus_packet_has_lbrr(packet: *const ::std::os::raw::c_uchar, len: opus_int32) -> ::std::os::raw::c_int;
206    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;
207    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);
208    pub fn opus_repacketizer_get_size() -> ::std::os::raw::c_int;
209    pub fn opus_repacketizer_init(rp: *mut OpusRepacketizer) -> *mut OpusRepacketizer;
210    pub fn opus_repacketizer_create() -> *mut OpusRepacketizer;
211    pub fn opus_repacketizer_destroy(rp: *mut OpusRepacketizer);
212    pub fn opus_repacketizer_cat(rp: *mut OpusRepacketizer, data: *const ::std::os::raw::c_uchar, len: opus_int32) -> ::std::os::raw::c_int;
213    pub fn opus_repacketizer_out_range(
214        rp: *mut OpusRepacketizer,
215        begin: ::std::os::raw::c_int,
216        end: ::std::os::raw::c_int,
217        data: *mut ::std::os::raw::c_uchar,
218        maxlen: opus_int32,
219    ) -> opus_int32;
220    pub fn opus_repacketizer_get_nb_frames(rp: *mut OpusRepacketizer) -> ::std::os::raw::c_int;
221    pub fn opus_repacketizer_out(rp: *mut OpusRepacketizer, data: *mut ::std::os::raw::c_uchar, maxlen: opus_int32) -> opus_int32;
222    pub fn opus_packet_pad(data: *mut ::std::os::raw::c_uchar, len: opus_int32, new_len: opus_int32) -> ::std::os::raw::c_int;
223    pub fn opus_packet_unpad(data: *mut ::std::os::raw::c_uchar, len: opus_int32) -> opus_int32;
224    pub fn opus_multistream_packet_pad(
225        data: *mut ::std::os::raw::c_uchar,
226        len: opus_int32,
227        new_len: opus_int32,
228        nb_streams: ::std::os::raw::c_int,
229    ) -> ::std::os::raw::c_int;
230    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;
231}