flac_sys/
lib.rs

1/* automatically generated by rust-bindgen */
2
3#[link(name = "flac")] extern { }
4
5#[repr(C)]
6#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
7pub struct __BindgenBitfieldUnit<Storage, Align>
8where
9    Storage: AsRef<[u8]> + AsMut<[u8]>,
10{
11    storage: Storage,
12    align: [Align; 0],
13}
14impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align>
15where
16    Storage: AsRef<[u8]> + AsMut<[u8]>,
17{
18    #[inline]
19    pub fn new(storage: Storage) -> Self {
20        Self { storage, align: [] }
21    }
22    #[inline]
23    pub fn get_bit(&self, index: usize) -> bool {
24        debug_assert!(index / 8 < self.storage.as_ref().len());
25        let byte_index = index / 8;
26        let byte = self.storage.as_ref()[byte_index];
27        let bit_index = if cfg!(target_endian = "big") {
28            7 - (index % 8)
29        } else {
30            index % 8
31        };
32        let mask = 1 << bit_index;
33        byte & mask == mask
34    }
35    #[inline]
36    pub fn set_bit(&mut self, index: usize, val: bool) {
37        debug_assert!(index / 8 < self.storage.as_ref().len());
38        let byte_index = index / 8;
39        let byte = &mut self.storage.as_mut()[byte_index];
40        let bit_index = if cfg!(target_endian = "big") {
41            7 - (index % 8)
42        } else {
43            index % 8
44        };
45        let mask = 1 << bit_index;
46        if val {
47            *byte |= mask;
48        } else {
49            *byte &= !mask;
50        }
51    }
52    #[inline]
53    pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
54        debug_assert!(bit_width <= 64);
55        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
56        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
57        let mut val = 0;
58        for i in 0..(bit_width as usize) {
59            if self.get_bit(i + bit_offset) {
60                let index = if cfg!(target_endian = "big") {
61                    bit_width as usize - 1 - i
62                } else {
63                    i
64                };
65                val |= 1 << index;
66            }
67        }
68        val
69    }
70    #[inline]
71    pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
72        debug_assert!(bit_width <= 64);
73        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
74        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
75        for i in 0..(bit_width as usize) {
76            let mask = 1 << i;
77            let val_bit_is_set = val & mask == mask;
78            let index = if cfg!(target_endian = "big") {
79                bit_width as usize - 1 - i
80            } else {
81                i
82            };
83            self.set_bit(index + bit_offset, val_bit_is_set);
84        }
85    }
86}
87pub const FLAC_API_VERSION_CURRENT: u32 = 11;
88pub const FLAC_API_VERSION_REVISION: u32 = 0;
89pub const FLAC_API_VERSION_AGE: u32 = 3;
90pub const _STDINT_H: u32 = 1;
91pub const _FEATURES_H: u32 = 1;
92pub const _DEFAULT_SOURCE: u32 = 1;
93pub const __USE_ISOC11: u32 = 1;
94pub const __USE_ISOC99: u32 = 1;
95pub const __USE_ISOC95: u32 = 1;
96pub const __USE_POSIX_IMPLICITLY: u32 = 1;
97pub const _POSIX_SOURCE: u32 = 1;
98pub const _POSIX_C_SOURCE: u32 = 200809;
99pub const __USE_POSIX: u32 = 1;
100pub const __USE_POSIX2: u32 = 1;
101pub const __USE_POSIX199309: u32 = 1;
102pub const __USE_POSIX199506: u32 = 1;
103pub const __USE_XOPEN2K: u32 = 1;
104pub const __USE_XOPEN2K8: u32 = 1;
105pub const _ATFILE_SOURCE: u32 = 1;
106pub const __USE_MISC: u32 = 1;
107pub const __USE_ATFILE: u32 = 1;
108pub const __USE_FORTIFY_LEVEL: u32 = 0;
109pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
110pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
111pub const _STDC_PREDEF_H: u32 = 1;
112pub const __STDC_IEC_559__: u32 = 1;
113pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
114pub const __STDC_ISO_10646__: u32 = 201706;
115pub const __GNU_LIBRARY__: u32 = 6;
116pub const __GLIBC__: u32 = 2;
117pub const __GLIBC_MINOR__: u32 = 29;
118pub const _SYS_CDEFS_H: u32 = 1;
119pub const __glibc_c99_flexarr_available: u32 = 1;
120pub const __WORDSIZE: u32 = 64;
121pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
122pub const __SYSCALL_WORDSIZE: u32 = 64;
123pub const __HAVE_GENERIC_SELECTION: u32 = 1;
124pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
125pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
126pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
127pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
128pub const _BITS_TYPES_H: u32 = 1;
129pub const __TIMESIZE: u32 = 64;
130pub const _BITS_TYPESIZES_H: u32 = 1;
131pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
132pub const __INO_T_MATCHES_INO64_T: u32 = 1;
133pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
134pub const __FD_SETSIZE: u32 = 1024;
135pub const _BITS_TIME64_H: u32 = 1;
136pub const _BITS_WCHAR_H: u32 = 1;
137pub const _BITS_STDINT_INTN_H: u32 = 1;
138pub const _BITS_STDINT_UINTN_H: u32 = 1;
139pub const INT8_MIN: i32 = -128;
140pub const INT16_MIN: i32 = -32768;
141pub const INT32_MIN: i32 = -2147483648;
142pub const INT8_MAX: u32 = 127;
143pub const INT16_MAX: u32 = 32767;
144pub const INT32_MAX: u32 = 2147483647;
145pub const UINT8_MAX: u32 = 255;
146pub const UINT16_MAX: u32 = 65535;
147pub const UINT32_MAX: u32 = 4294967295;
148pub const INT_LEAST8_MIN: i32 = -128;
149pub const INT_LEAST16_MIN: i32 = -32768;
150pub const INT_LEAST32_MIN: i32 = -2147483648;
151pub const INT_LEAST8_MAX: u32 = 127;
152pub const INT_LEAST16_MAX: u32 = 32767;
153pub const INT_LEAST32_MAX: u32 = 2147483647;
154pub const UINT_LEAST8_MAX: u32 = 255;
155pub const UINT_LEAST16_MAX: u32 = 65535;
156pub const UINT_LEAST32_MAX: u32 = 4294967295;
157pub const INT_FAST8_MIN: i32 = -128;
158pub const INT_FAST16_MIN: i64 = -9223372036854775808;
159pub const INT_FAST32_MIN: i64 = -9223372036854775808;
160pub const INT_FAST8_MAX: u32 = 127;
161pub const INT_FAST16_MAX: u64 = 9223372036854775807;
162pub const INT_FAST32_MAX: u64 = 9223372036854775807;
163pub const UINT_FAST8_MAX: u32 = 255;
164pub const UINT_FAST16_MAX: i32 = -1;
165pub const UINT_FAST32_MAX: i32 = -1;
166pub const INTPTR_MIN: i64 = -9223372036854775808;
167pub const INTPTR_MAX: u64 = 9223372036854775807;
168pub const UINTPTR_MAX: i32 = -1;
169pub const PTRDIFF_MIN: i64 = -9223372036854775808;
170pub const PTRDIFF_MAX: u64 = 9223372036854775807;
171pub const SIG_ATOMIC_MIN: i32 = -2147483648;
172pub const SIG_ATOMIC_MAX: u32 = 2147483647;
173pub const SIZE_MAX: i32 = -1;
174pub const WINT_MIN: u32 = 0;
175pub const WINT_MAX: u32 = 4294967295;
176pub const true_: u32 = 1;
177pub const false_: u32 = 0;
178pub const _STDLIB_H: u32 = 1;
179pub const WNOHANG: u32 = 1;
180pub const WUNTRACED: u32 = 2;
181pub const WSTOPPED: u32 = 2;
182pub const WEXITED: u32 = 4;
183pub const WCONTINUED: u32 = 8;
184pub const WNOWAIT: u32 = 16777216;
185pub const __WNOTHREAD: u32 = 536870912;
186pub const __WALL: u32 = 1073741824;
187pub const __WCLONE: u32 = 2147483648;
188pub const __W_CONTINUED: u32 = 65535;
189pub const __WCOREFLAG: u32 = 128;
190pub const __HAVE_FLOAT128: u32 = 0;
191pub const __HAVE_DISTINCT_FLOAT128: u32 = 0;
192pub const __HAVE_FLOAT64X: u32 = 1;
193pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1;
194pub const __HAVE_FLOAT16: u32 = 0;
195pub const __HAVE_FLOAT32: u32 = 1;
196pub const __HAVE_FLOAT64: u32 = 1;
197pub const __HAVE_FLOAT32X: u32 = 1;
198pub const __HAVE_FLOAT128X: u32 = 0;
199pub const __HAVE_DISTINCT_FLOAT16: u32 = 0;
200pub const __HAVE_DISTINCT_FLOAT32: u32 = 0;
201pub const __HAVE_DISTINCT_FLOAT64: u32 = 0;
202pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0;
203pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0;
204pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0;
205pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0;
206pub const __ldiv_t_defined: u32 = 1;
207pub const __lldiv_t_defined: u32 = 1;
208pub const RAND_MAX: u32 = 2147483647;
209pub const EXIT_FAILURE: u32 = 1;
210pub const EXIT_SUCCESS: u32 = 0;
211pub const _SYS_TYPES_H: u32 = 1;
212pub const __clock_t_defined: u32 = 1;
213pub const __clockid_t_defined: u32 = 1;
214pub const __time_t_defined: u32 = 1;
215pub const __timer_t_defined: u32 = 1;
216pub const __BIT_TYPES_DEFINED__: u32 = 1;
217pub const _ENDIAN_H: u32 = 1;
218pub const __LITTLE_ENDIAN: u32 = 1234;
219pub const __BIG_ENDIAN: u32 = 4321;
220pub const __PDP_ENDIAN: u32 = 3412;
221pub const __BYTE_ORDER: u32 = 1234;
222pub const __FLOAT_WORD_ORDER: u32 = 1234;
223pub const LITTLE_ENDIAN: u32 = 1234;
224pub const BIG_ENDIAN: u32 = 4321;
225pub const PDP_ENDIAN: u32 = 3412;
226pub const BYTE_ORDER: u32 = 1234;
227pub const _BITS_BYTESWAP_H: u32 = 1;
228pub const _BITS_UINTN_IDENTITY_H: u32 = 1;
229pub const _SYS_SELECT_H: u32 = 1;
230pub const __FD_ZERO_STOS: &'static [u8; 6usize] = b"stosq\0";
231pub const __sigset_t_defined: u32 = 1;
232pub const __timeval_defined: u32 = 1;
233pub const _STRUCT_TIMESPEC: u32 = 1;
234pub const FD_SETSIZE: u32 = 1024;
235pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1;
236pub const _THREAD_SHARED_TYPES_H: u32 = 1;
237pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1;
238pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40;
239pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56;
240pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56;
241pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32;
242pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4;
243pub const __SIZEOF_PTHREAD_COND_T: u32 = 48;
244pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4;
245pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8;
246pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4;
247pub const __PTHREAD_MUTEX_LOCK_ELISION: u32 = 1;
248pub const __PTHREAD_MUTEX_NUSERS_AFTER_KIND: u32 = 0;
249pub const __PTHREAD_MUTEX_USE_UNION: u32 = 0;
250pub const __PTHREAD_RWLOCK_INT_FLAGS_SHARED: u32 = 1;
251pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1;
252pub const __have_pthread_attr_t: u32 = 1;
253pub const _ALLOCA_H: u32 = 1;
254pub const FLAC__MAX_METADATA_TYPE_CODE: u32 = 126;
255pub const FLAC__MIN_BLOCK_SIZE: u32 = 16;
256pub const FLAC__MAX_BLOCK_SIZE: u32 = 65535;
257pub const FLAC__SUBSET_MAX_BLOCK_SIZE_48000HZ: u32 = 4608;
258pub const FLAC__MAX_CHANNELS: u32 = 8;
259pub const FLAC__MIN_BITS_PER_SAMPLE: u32 = 4;
260pub const FLAC__MAX_BITS_PER_SAMPLE: u32 = 32;
261pub const FLAC__REFERENCE_CODEC_MAX_BITS_PER_SAMPLE: u32 = 24;
262pub const FLAC__MAX_SAMPLE_RATE: u32 = 655350;
263pub const FLAC__MAX_LPC_ORDER: u32 = 32;
264pub const FLAC__SUBSET_MAX_LPC_ORDER_48000HZ: u32 = 12;
265pub const FLAC__MIN_QLP_COEFF_PRECISION: u32 = 5;
266pub const FLAC__MAX_QLP_COEFF_PRECISION: u32 = 15;
267pub const FLAC__MAX_FIXED_ORDER: u32 = 4;
268pub const FLAC__MAX_RICE_PARTITION_ORDER: u32 = 15;
269pub const FLAC__SUBSET_MAX_RICE_PARTITION_ORDER: u32 = 8;
270pub const FLAC__STREAM_SYNC_LENGTH: u32 = 4;
271pub const FLAC__STREAM_METADATA_STREAMINFO_LENGTH: u32 = 34;
272pub const FLAC__STREAM_METADATA_SEEKPOINT_LENGTH: u32 = 18;
273pub const FLAC__STREAM_METADATA_HEADER_LENGTH: u32 = 4;
274pub const _STDIO_H: u32 = 1;
275pub const __GNUC_VA_LIST: u32 = 1;
276pub const _____fpos_t_defined: u32 = 1;
277pub const ____mbstate_t_defined: u32 = 1;
278pub const _____fpos64_t_defined: u32 = 1;
279pub const ____FILE_defined: u32 = 1;
280pub const __FILE_defined: u32 = 1;
281pub const __struct_FILE_defined: u32 = 1;
282pub const _IO_EOF_SEEN: u32 = 16;
283pub const _IO_ERR_SEEN: u32 = 32;
284pub const _IO_USER_LOCK: u32 = 32768;
285pub const _IOFBF: u32 = 0;
286pub const _IOLBF: u32 = 1;
287pub const _IONBF: u32 = 2;
288pub const BUFSIZ: u32 = 8192;
289pub const EOF: i32 = -1;
290pub const SEEK_SET: u32 = 0;
291pub const SEEK_CUR: u32 = 1;
292pub const SEEK_END: u32 = 2;
293pub const P_tmpdir: &'static [u8; 5usize] = b"/tmp\0";
294pub const _BITS_STDIO_LIM_H: u32 = 1;
295pub const L_tmpnam: u32 = 20;
296pub const TMP_MAX: u32 = 238328;
297pub const FILENAME_MAX: u32 = 4096;
298pub const L_ctermid: u32 = 9;
299pub const FOPEN_MAX: u32 = 16;
300extern "C" {
301    #[link_name = "\u{1}FLAC_API_SUPPORTS_OGG_FLAC"]
302    pub static mut FLAC_API_SUPPORTS_OGG_FLAC: ::std::os::raw::c_int;
303}
304pub type __u_char = ::std::os::raw::c_uchar;
305pub type __u_short = ::std::os::raw::c_ushort;
306pub type __u_int = ::std::os::raw::c_uint;
307pub type __u_long = ::std::os::raw::c_ulong;
308pub type __int8_t = ::std::os::raw::c_schar;
309pub type __uint8_t = ::std::os::raw::c_uchar;
310pub type __int16_t = ::std::os::raw::c_short;
311pub type __uint16_t = ::std::os::raw::c_ushort;
312pub type __int32_t = ::std::os::raw::c_int;
313pub type __uint32_t = ::std::os::raw::c_uint;
314pub type __int64_t = ::std::os::raw::c_long;
315pub type __uint64_t = ::std::os::raw::c_ulong;
316pub type __int_least8_t = __int8_t;
317pub type __uint_least8_t = __uint8_t;
318pub type __int_least16_t = __int16_t;
319pub type __uint_least16_t = __uint16_t;
320pub type __int_least32_t = __int32_t;
321pub type __uint_least32_t = __uint32_t;
322pub type __int_least64_t = __int64_t;
323pub type __uint_least64_t = __uint64_t;
324pub type __quad_t = ::std::os::raw::c_long;
325pub type __u_quad_t = ::std::os::raw::c_ulong;
326pub type __intmax_t = ::std::os::raw::c_long;
327pub type __uintmax_t = ::std::os::raw::c_ulong;
328pub type __dev_t = ::std::os::raw::c_ulong;
329pub type __uid_t = ::std::os::raw::c_uint;
330pub type __gid_t = ::std::os::raw::c_uint;
331pub type __ino_t = ::std::os::raw::c_ulong;
332pub type __ino64_t = ::std::os::raw::c_ulong;
333pub type __mode_t = ::std::os::raw::c_uint;
334pub type __nlink_t = ::std::os::raw::c_ulong;
335pub type __off_t = ::std::os::raw::c_long;
336pub type __off64_t = ::std::os::raw::c_long;
337pub type __pid_t = ::std::os::raw::c_int;
338#[repr(C)]
339#[derive(Debug, Copy, Clone)]
340pub struct __fsid_t {
341    pub __val: [::std::os::raw::c_int; 2usize],
342}
343pub type __clock_t = ::std::os::raw::c_long;
344pub type __rlim_t = ::std::os::raw::c_ulong;
345pub type __rlim64_t = ::std::os::raw::c_ulong;
346pub type __id_t = ::std::os::raw::c_uint;
347pub type __time_t = ::std::os::raw::c_long;
348pub type __useconds_t = ::std::os::raw::c_uint;
349pub type __suseconds_t = ::std::os::raw::c_long;
350pub type __daddr_t = ::std::os::raw::c_int;
351pub type __key_t = ::std::os::raw::c_int;
352pub type __clockid_t = ::std::os::raw::c_int;
353pub type __timer_t = *mut ::std::os::raw::c_void;
354pub type __blksize_t = ::std::os::raw::c_long;
355pub type __blkcnt_t = ::std::os::raw::c_long;
356pub type __blkcnt64_t = ::std::os::raw::c_long;
357pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
358pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
359pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
360pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
361pub type __fsword_t = ::std::os::raw::c_long;
362pub type __ssize_t = ::std::os::raw::c_long;
363pub type __syscall_slong_t = ::std::os::raw::c_long;
364pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
365pub type __loff_t = __off64_t;
366pub type __caddr_t = *mut ::std::os::raw::c_char;
367pub type __intptr_t = ::std::os::raw::c_long;
368pub type __socklen_t = ::std::os::raw::c_uint;
369pub type __sig_atomic_t = ::std::os::raw::c_int;
370pub type int_least8_t = __int_least8_t;
371pub type int_least16_t = __int_least16_t;
372pub type int_least32_t = __int_least32_t;
373pub type int_least64_t = __int_least64_t;
374pub type uint_least8_t = __uint_least8_t;
375pub type uint_least16_t = __uint_least16_t;
376pub type uint_least32_t = __uint_least32_t;
377pub type uint_least64_t = __uint_least64_t;
378pub type int_fast8_t = ::std::os::raw::c_schar;
379pub type int_fast16_t = ::std::os::raw::c_long;
380pub type int_fast32_t = ::std::os::raw::c_long;
381pub type int_fast64_t = ::std::os::raw::c_long;
382pub type uint_fast8_t = ::std::os::raw::c_uchar;
383pub type uint_fast16_t = ::std::os::raw::c_ulong;
384pub type uint_fast32_t = ::std::os::raw::c_ulong;
385pub type uint_fast64_t = ::std::os::raw::c_ulong;
386pub type intmax_t = __intmax_t;
387pub type uintmax_t = __uintmax_t;
388pub type FLAC__int8 = i8;
389pub type FLAC__uint8 = u8;
390pub type FLAC__int16 = i16;
391pub type FLAC__int32 = i32;
392pub type FLAC__int64 = i64;
393pub type FLAC__uint16 = u16;
394pub type FLAC__uint32 = u32;
395pub type FLAC__uint64 = u64;
396pub type FLAC__bool = ::std::os::raw::c_int;
397pub type FLAC__byte = FLAC__uint8;
398pub type wchar_t = ::std::os::raw::c_int;
399pub type _Float32 = f32;
400pub type _Float64 = f64;
401pub type _Float32x = f64;
402pub type _Float64x = u128;
403#[repr(C)]
404#[derive(Debug, Copy, Clone)]
405pub struct div_t {
406    pub quot: ::std::os::raw::c_int,
407    pub rem: ::std::os::raw::c_int,
408}
409#[repr(C)]
410#[derive(Debug, Copy, Clone)]
411pub struct ldiv_t {
412    pub quot: ::std::os::raw::c_long,
413    pub rem: ::std::os::raw::c_long,
414}
415#[repr(C)]
416#[derive(Debug, Copy, Clone)]
417pub struct lldiv_t {
418    pub quot: ::std::os::raw::c_longlong,
419    pub rem: ::std::os::raw::c_longlong,
420}
421extern "C" {
422    pub fn __ctype_get_mb_cur_max() -> usize;
423}
424extern "C" {
425    pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64;
426}
427extern "C" {
428    pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
429}
430extern "C" {
431    pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
432}
433extern "C" {
434    pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong;
435}
436extern "C" {
437    pub fn strtod(
438        __nptr: *const ::std::os::raw::c_char,
439        __endptr: *mut *mut ::std::os::raw::c_char,
440    ) -> f64;
441}
442extern "C" {
443    pub fn strtof(
444        __nptr: *const ::std::os::raw::c_char,
445        __endptr: *mut *mut ::std::os::raw::c_char,
446    ) -> f32;
447}
448extern "C" {
449    pub fn strtold(
450        __nptr: *const ::std::os::raw::c_char,
451        __endptr: *mut *mut ::std::os::raw::c_char,
452    ) -> u128;
453}
454extern "C" {
455    pub fn strtol(
456        __nptr: *const ::std::os::raw::c_char,
457        __endptr: *mut *mut ::std::os::raw::c_char,
458        __base: ::std::os::raw::c_int,
459    ) -> ::std::os::raw::c_long;
460}
461extern "C" {
462    pub fn strtoul(
463        __nptr: *const ::std::os::raw::c_char,
464        __endptr: *mut *mut ::std::os::raw::c_char,
465        __base: ::std::os::raw::c_int,
466    ) -> ::std::os::raw::c_ulong;
467}
468extern "C" {
469    pub fn strtoq(
470        __nptr: *const ::std::os::raw::c_char,
471        __endptr: *mut *mut ::std::os::raw::c_char,
472        __base: ::std::os::raw::c_int,
473    ) -> ::std::os::raw::c_longlong;
474}
475extern "C" {
476    pub fn strtouq(
477        __nptr: *const ::std::os::raw::c_char,
478        __endptr: *mut *mut ::std::os::raw::c_char,
479        __base: ::std::os::raw::c_int,
480    ) -> ::std::os::raw::c_ulonglong;
481}
482extern "C" {
483    pub fn strtoll(
484        __nptr: *const ::std::os::raw::c_char,
485        __endptr: *mut *mut ::std::os::raw::c_char,
486        __base: ::std::os::raw::c_int,
487    ) -> ::std::os::raw::c_longlong;
488}
489extern "C" {
490    pub fn strtoull(
491        __nptr: *const ::std::os::raw::c_char,
492        __endptr: *mut *mut ::std::os::raw::c_char,
493        __base: ::std::os::raw::c_int,
494    ) -> ::std::os::raw::c_ulonglong;
495}
496extern "C" {
497    pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char;
498}
499extern "C" {
500    pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long;
501}
502pub type u_char = __u_char;
503pub type u_short = __u_short;
504pub type u_int = __u_int;
505pub type u_long = __u_long;
506pub type quad_t = __quad_t;
507pub type u_quad_t = __u_quad_t;
508pub type fsid_t = __fsid_t;
509pub type loff_t = __loff_t;
510pub type ino_t = __ino_t;
511pub type dev_t = __dev_t;
512pub type gid_t = __gid_t;
513pub type mode_t = __mode_t;
514pub type nlink_t = __nlink_t;
515pub type uid_t = __uid_t;
516pub type off_t = __off_t;
517pub type pid_t = __pid_t;
518pub type id_t = __id_t;
519pub type daddr_t = __daddr_t;
520pub type caddr_t = __caddr_t;
521pub type key_t = __key_t;
522pub type clock_t = __clock_t;
523pub type clockid_t = __clockid_t;
524pub type time_t = __time_t;
525pub type timer_t = __timer_t;
526pub type ulong = ::std::os::raw::c_ulong;
527pub type ushort = ::std::os::raw::c_ushort;
528pub type uint = ::std::os::raw::c_uint;
529pub type u_int8_t = ::std::os::raw::c_uchar;
530pub type u_int16_t = ::std::os::raw::c_ushort;
531pub type u_int32_t = ::std::os::raw::c_uint;
532pub type u_int64_t = ::std::os::raw::c_ulong;
533pub type register_t = ::std::os::raw::c_long;
534#[repr(C)]
535#[derive(Debug, Copy, Clone)]
536pub struct __sigset_t {
537    pub __val: [::std::os::raw::c_ulong; 16usize],
538}
539pub type sigset_t = __sigset_t;
540#[repr(C)]
541#[derive(Debug, Copy, Clone)]
542pub struct timeval {
543    pub tv_sec: __time_t,
544    pub tv_usec: __suseconds_t,
545}
546#[repr(C)]
547#[derive(Debug, Copy, Clone)]
548pub struct timespec {
549    pub tv_sec: __time_t,
550    pub tv_nsec: __syscall_slong_t,
551}
552pub type suseconds_t = __suseconds_t;
553pub type __fd_mask = ::std::os::raw::c_long;
554#[repr(C)]
555#[derive(Debug, Copy, Clone)]
556pub struct fd_set {
557    pub __fds_bits: [__fd_mask; 16usize],
558}
559pub type fd_mask = __fd_mask;
560extern "C" {
561    pub fn select(
562        __nfds: ::std::os::raw::c_int,
563        __readfds: *mut fd_set,
564        __writefds: *mut fd_set,
565        __exceptfds: *mut fd_set,
566        __timeout: *mut timeval,
567    ) -> ::std::os::raw::c_int;
568}
569extern "C" {
570    pub fn pselect(
571        __nfds: ::std::os::raw::c_int,
572        __readfds: *mut fd_set,
573        __writefds: *mut fd_set,
574        __exceptfds: *mut fd_set,
575        __timeout: *const timespec,
576        __sigmask: *const __sigset_t,
577    ) -> ::std::os::raw::c_int;
578}
579pub type blksize_t = __blksize_t;
580pub type blkcnt_t = __blkcnt_t;
581pub type fsblkcnt_t = __fsblkcnt_t;
582pub type fsfilcnt_t = __fsfilcnt_t;
583#[repr(C)]
584#[derive(Debug, Copy, Clone)]
585pub struct __pthread_rwlock_arch_t {
586    pub __readers: ::std::os::raw::c_uint,
587    pub __writers: ::std::os::raw::c_uint,
588    pub __wrphase_futex: ::std::os::raw::c_uint,
589    pub __writers_futex: ::std::os::raw::c_uint,
590    pub __pad3: ::std::os::raw::c_uint,
591    pub __pad4: ::std::os::raw::c_uint,
592    pub __cur_writer: ::std::os::raw::c_int,
593    pub __shared: ::std::os::raw::c_int,
594    pub __rwelision: ::std::os::raw::c_schar,
595    pub __pad1: [::std::os::raw::c_uchar; 7usize],
596    pub __pad2: ::std::os::raw::c_ulong,
597    pub __flags: ::std::os::raw::c_uint,
598}
599#[repr(C)]
600#[derive(Debug, Copy, Clone)]
601pub struct __pthread_internal_list {
602    pub __prev: *mut __pthread_internal_list,
603    pub __next: *mut __pthread_internal_list,
604}
605pub type __pthread_list_t = __pthread_internal_list;
606#[repr(C)]
607#[derive(Debug, Copy, Clone)]
608pub struct __pthread_mutex_s {
609    pub __lock: ::std::os::raw::c_int,
610    pub __count: ::std::os::raw::c_uint,
611    pub __owner: ::std::os::raw::c_int,
612    pub __nusers: ::std::os::raw::c_uint,
613    pub __kind: ::std::os::raw::c_int,
614    pub __spins: ::std::os::raw::c_short,
615    pub __elision: ::std::os::raw::c_short,
616    pub __list: __pthread_list_t,
617}
618#[repr(C)]
619#[derive(Copy, Clone)]
620pub struct __pthread_cond_s {
621    pub __bindgen_anon_1: __pthread_cond_s__bindgen_ty_1,
622    pub __bindgen_anon_2: __pthread_cond_s__bindgen_ty_2,
623    pub __g_refs: [::std::os::raw::c_uint; 2usize],
624    pub __g_size: [::std::os::raw::c_uint; 2usize],
625    pub __g1_orig_size: ::std::os::raw::c_uint,
626    pub __wrefs: ::std::os::raw::c_uint,
627    pub __g_signals: [::std::os::raw::c_uint; 2usize],
628}
629#[repr(C)]
630#[derive(Copy, Clone)]
631pub union __pthread_cond_s__bindgen_ty_1 {
632    pub __wseq: ::std::os::raw::c_ulonglong,
633    pub __wseq32: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1,
634    _bindgen_union_align: u64,
635}
636#[repr(C)]
637#[derive(Debug, Copy, Clone)]
638pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 {
639    pub __low: ::std::os::raw::c_uint,
640    pub __high: ::std::os::raw::c_uint,
641}
642#[repr(C)]
643#[derive(Copy, Clone)]
644pub union __pthread_cond_s__bindgen_ty_2 {
645    pub __g1_start: ::std::os::raw::c_ulonglong,
646    pub __g1_start32: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1,
647    _bindgen_union_align: u64,
648}
649#[repr(C)]
650#[derive(Debug, Copy, Clone)]
651pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 {
652    pub __low: ::std::os::raw::c_uint,
653    pub __high: ::std::os::raw::c_uint,
654}
655pub type pthread_t = ::std::os::raw::c_ulong;
656#[repr(C)]
657#[derive(Copy, Clone)]
658pub union pthread_mutexattr_t {
659    pub __size: [::std::os::raw::c_char; 4usize],
660    pub __align: ::std::os::raw::c_int,
661    _bindgen_union_align: u32,
662}
663#[repr(C)]
664#[derive(Copy, Clone)]
665pub union pthread_condattr_t {
666    pub __size: [::std::os::raw::c_char; 4usize],
667    pub __align: ::std::os::raw::c_int,
668    _bindgen_union_align: u32,
669}
670pub type pthread_key_t = ::std::os::raw::c_uint;
671pub type pthread_once_t = ::std::os::raw::c_int;
672#[repr(C)]
673#[derive(Copy, Clone)]
674pub union pthread_attr_t {
675    pub __size: [::std::os::raw::c_char; 56usize],
676    pub __align: ::std::os::raw::c_long,
677    _bindgen_union_align: [u64; 7usize],
678}
679#[repr(C)]
680#[derive(Copy, Clone)]
681pub union pthread_mutex_t {
682    pub __data: __pthread_mutex_s,
683    pub __size: [::std::os::raw::c_char; 40usize],
684    pub __align: ::std::os::raw::c_long,
685    _bindgen_union_align: [u64; 5usize],
686}
687#[repr(C)]
688#[derive(Copy, Clone)]
689pub union pthread_cond_t {
690    pub __data: __pthread_cond_s,
691    pub __size: [::std::os::raw::c_char; 48usize],
692    pub __align: ::std::os::raw::c_longlong,
693    _bindgen_union_align: [u64; 6usize],
694}
695#[repr(C)]
696#[derive(Copy, Clone)]
697pub union pthread_rwlock_t {
698    pub __data: __pthread_rwlock_arch_t,
699    pub __size: [::std::os::raw::c_char; 56usize],
700    pub __align: ::std::os::raw::c_long,
701    _bindgen_union_align: [u64; 7usize],
702}
703#[repr(C)]
704#[derive(Copy, Clone)]
705pub union pthread_rwlockattr_t {
706    pub __size: [::std::os::raw::c_char; 8usize],
707    pub __align: ::std::os::raw::c_long,
708    _bindgen_union_align: u64,
709}
710pub type pthread_spinlock_t = ::std::os::raw::c_int;
711#[repr(C)]
712#[derive(Copy, Clone)]
713pub union pthread_barrier_t {
714    pub __size: [::std::os::raw::c_char; 32usize],
715    pub __align: ::std::os::raw::c_long,
716    _bindgen_union_align: [u64; 4usize],
717}
718#[repr(C)]
719#[derive(Copy, Clone)]
720pub union pthread_barrierattr_t {
721    pub __size: [::std::os::raw::c_char; 4usize],
722    pub __align: ::std::os::raw::c_int,
723    _bindgen_union_align: u32,
724}
725extern "C" {
726    pub fn random() -> ::std::os::raw::c_long;
727}
728extern "C" {
729    pub fn srandom(__seed: ::std::os::raw::c_uint);
730}
731extern "C" {
732    pub fn initstate(
733        __seed: ::std::os::raw::c_uint,
734        __statebuf: *mut ::std::os::raw::c_char,
735        __statelen: usize,
736    ) -> *mut ::std::os::raw::c_char;
737}
738extern "C" {
739    pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
740}
741#[repr(C)]
742#[derive(Debug, Copy, Clone)]
743pub struct random_data {
744    pub fptr: *mut i32,
745    pub rptr: *mut i32,
746    pub state: *mut i32,
747    pub rand_type: ::std::os::raw::c_int,
748    pub rand_deg: ::std::os::raw::c_int,
749    pub rand_sep: ::std::os::raw::c_int,
750    pub end_ptr: *mut i32,
751}
752extern "C" {
753    pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int;
754}
755extern "C" {
756    pub fn srandom_r(
757        __seed: ::std::os::raw::c_uint,
758        __buf: *mut random_data,
759    ) -> ::std::os::raw::c_int;
760}
761extern "C" {
762    pub fn initstate_r(
763        __seed: ::std::os::raw::c_uint,
764        __statebuf: *mut ::std::os::raw::c_char,
765        __statelen: usize,
766        __buf: *mut random_data,
767    ) -> ::std::os::raw::c_int;
768}
769extern "C" {
770    pub fn setstate_r(
771        __statebuf: *mut ::std::os::raw::c_char,
772        __buf: *mut random_data,
773    ) -> ::std::os::raw::c_int;
774}
775extern "C" {
776    pub fn rand() -> ::std::os::raw::c_int;
777}
778extern "C" {
779    pub fn srand(__seed: ::std::os::raw::c_uint);
780}
781extern "C" {
782    pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int;
783}
784extern "C" {
785    pub fn drand48() -> f64;
786}
787extern "C" {
788    pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) -> f64;
789}
790extern "C" {
791    pub fn lrand48() -> ::std::os::raw::c_long;
792}
793extern "C" {
794    pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
795}
796extern "C" {
797    pub fn mrand48() -> ::std::os::raw::c_long;
798}
799extern "C" {
800    pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long;
801}
802extern "C" {
803    pub fn srand48(__seedval: ::std::os::raw::c_long);
804}
805extern "C" {
806    pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort;
807}
808extern "C" {
809    pub fn lcong48(__param: *mut ::std::os::raw::c_ushort);
810}
811#[repr(C)]
812#[derive(Debug, Copy, Clone)]
813pub struct drand48_data {
814    pub __x: [::std::os::raw::c_ushort; 3usize],
815    pub __old_x: [::std::os::raw::c_ushort; 3usize],
816    pub __c: ::std::os::raw::c_ushort,
817    pub __init: ::std::os::raw::c_ushort,
818    pub __a: ::std::os::raw::c_ulonglong,
819}
820extern "C" {
821    pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int;
822}
823extern "C" {
824    pub fn erand48_r(
825        __xsubi: *mut ::std::os::raw::c_ushort,
826        __buffer: *mut drand48_data,
827        __result: *mut f64,
828    ) -> ::std::os::raw::c_int;
829}
830extern "C" {
831    pub fn lrand48_r(
832        __buffer: *mut drand48_data,
833        __result: *mut ::std::os::raw::c_long,
834    ) -> ::std::os::raw::c_int;
835}
836extern "C" {
837    pub fn nrand48_r(
838        __xsubi: *mut ::std::os::raw::c_ushort,
839        __buffer: *mut drand48_data,
840        __result: *mut ::std::os::raw::c_long,
841    ) -> ::std::os::raw::c_int;
842}
843extern "C" {
844    pub fn mrand48_r(
845        __buffer: *mut drand48_data,
846        __result: *mut ::std::os::raw::c_long,
847    ) -> ::std::os::raw::c_int;
848}
849extern "C" {
850    pub fn jrand48_r(
851        __xsubi: *mut ::std::os::raw::c_ushort,
852        __buffer: *mut drand48_data,
853        __result: *mut ::std::os::raw::c_long,
854    ) -> ::std::os::raw::c_int;
855}
856extern "C" {
857    pub fn srand48_r(
858        __seedval: ::std::os::raw::c_long,
859        __buffer: *mut drand48_data,
860    ) -> ::std::os::raw::c_int;
861}
862extern "C" {
863    pub fn seed48_r(
864        __seed16v: *mut ::std::os::raw::c_ushort,
865        __buffer: *mut drand48_data,
866    ) -> ::std::os::raw::c_int;
867}
868extern "C" {
869    pub fn lcong48_r(
870        __param: *mut ::std::os::raw::c_ushort,
871        __buffer: *mut drand48_data,
872    ) -> ::std::os::raw::c_int;
873}
874extern "C" {
875    pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
876}
877extern "C" {
878    pub fn calloc(
879        __nmemb: ::std::os::raw::c_ulong,
880        __size: ::std::os::raw::c_ulong,
881    ) -> *mut ::std::os::raw::c_void;
882}
883extern "C" {
884    pub fn realloc(
885        __ptr: *mut ::std::os::raw::c_void,
886        __size: ::std::os::raw::c_ulong,
887    ) -> *mut ::std::os::raw::c_void;
888}
889extern "C" {
890    pub fn reallocarray(
891        __ptr: *mut ::std::os::raw::c_void,
892        __nmemb: usize,
893        __size: usize,
894    ) -> *mut ::std::os::raw::c_void;
895}
896extern "C" {
897    pub fn free(__ptr: *mut ::std::os::raw::c_void);
898}
899extern "C" {
900    pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void;
901}
902extern "C" {
903    pub fn valloc(__size: usize) -> *mut ::std::os::raw::c_void;
904}
905extern "C" {
906    pub fn posix_memalign(
907        __memptr: *mut *mut ::std::os::raw::c_void,
908        __alignment: usize,
909        __size: usize,
910    ) -> ::std::os::raw::c_int;
911}
912extern "C" {
913    pub fn aligned_alloc(__alignment: usize, __size: usize) -> *mut ::std::os::raw::c_void;
914}
915extern "C" {
916    pub fn abort();
917}
918extern "C" {
919    pub fn atexit(__func: ::std::option::Option<unsafe extern "C" fn()>) -> ::std::os::raw::c_int;
920}
921extern "C" {
922    pub fn at_quick_exit(
923        __func: ::std::option::Option<unsafe extern "C" fn()>,
924    ) -> ::std::os::raw::c_int;
925}
926extern "C" {
927    pub fn on_exit(
928        __func: ::std::option::Option<
929            unsafe extern "C" fn(__func: ::std::os::raw::c_int, __arg: *mut ::std::os::raw::c_void),
930        >,
931        __arg: *mut ::std::os::raw::c_void,
932    ) -> ::std::os::raw::c_int;
933}
934extern "C" {
935    pub fn exit(__status: ::std::os::raw::c_int);
936}
937extern "C" {
938    pub fn quick_exit(__status: ::std::os::raw::c_int);
939}
940extern "C" {
941    pub fn _Exit(__status: ::std::os::raw::c_int);
942}
943extern "C" {
944    pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
945}
946extern "C" {
947    pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
948}
949extern "C" {
950    pub fn setenv(
951        __name: *const ::std::os::raw::c_char,
952        __value: *const ::std::os::raw::c_char,
953        __replace: ::std::os::raw::c_int,
954    ) -> ::std::os::raw::c_int;
955}
956extern "C" {
957    pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
958}
959extern "C" {
960    pub fn clearenv() -> ::std::os::raw::c_int;
961}
962extern "C" {
963    pub fn mktemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
964}
965extern "C" {
966    pub fn mkstemp(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int;
967}
968extern "C" {
969    pub fn mkstemps(
970        __template: *mut ::std::os::raw::c_char,
971        __suffixlen: ::std::os::raw::c_int,
972    ) -> ::std::os::raw::c_int;
973}
974extern "C" {
975    pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
976}
977extern "C" {
978    pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
979}
980extern "C" {
981    pub fn realpath(
982        __name: *const ::std::os::raw::c_char,
983        __resolved: *mut ::std::os::raw::c_char,
984    ) -> *mut ::std::os::raw::c_char;
985}
986pub type __compar_fn_t = ::std::option::Option<
987    unsafe extern "C" fn(
988        arg1: *const ::std::os::raw::c_void,
989        arg2: *const ::std::os::raw::c_void,
990    ) -> ::std::os::raw::c_int,
991>;
992extern "C" {
993    pub fn bsearch(
994        __key: *const ::std::os::raw::c_void,
995        __base: *const ::std::os::raw::c_void,
996        __nmemb: usize,
997        __size: usize,
998        __compar: __compar_fn_t,
999    ) -> *mut ::std::os::raw::c_void;
1000}
1001extern "C" {
1002    pub fn qsort(
1003        __base: *mut ::std::os::raw::c_void,
1004        __nmemb: usize,
1005        __size: usize,
1006        __compar: __compar_fn_t,
1007    );
1008}
1009extern "C" {
1010    pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
1011}
1012extern "C" {
1013    pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long;
1014}
1015extern "C" {
1016    pub fn llabs(__x: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong;
1017}
1018extern "C" {
1019    pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) -> div_t;
1020}
1021extern "C" {
1022    pub fn ldiv(__numer: ::std::os::raw::c_long, __denom: ::std::os::raw::c_long) -> ldiv_t;
1023}
1024extern "C" {
1025    pub fn lldiv(
1026        __numer: ::std::os::raw::c_longlong,
1027        __denom: ::std::os::raw::c_longlong,
1028    ) -> lldiv_t;
1029}
1030extern "C" {
1031    pub fn ecvt(
1032        __value: f64,
1033        __ndigit: ::std::os::raw::c_int,
1034        __decpt: *mut ::std::os::raw::c_int,
1035        __sign: *mut ::std::os::raw::c_int,
1036    ) -> *mut ::std::os::raw::c_char;
1037}
1038extern "C" {
1039    pub fn fcvt(
1040        __value: f64,
1041        __ndigit: ::std::os::raw::c_int,
1042        __decpt: *mut ::std::os::raw::c_int,
1043        __sign: *mut ::std::os::raw::c_int,
1044    ) -> *mut ::std::os::raw::c_char;
1045}
1046extern "C" {
1047    pub fn gcvt(
1048        __value: f64,
1049        __ndigit: ::std::os::raw::c_int,
1050        __buf: *mut ::std::os::raw::c_char,
1051    ) -> *mut ::std::os::raw::c_char;
1052}
1053extern "C" {
1054    pub fn qecvt(
1055        __value: u128,
1056        __ndigit: ::std::os::raw::c_int,
1057        __decpt: *mut ::std::os::raw::c_int,
1058        __sign: *mut ::std::os::raw::c_int,
1059    ) -> *mut ::std::os::raw::c_char;
1060}
1061extern "C" {
1062    pub fn qfcvt(
1063        __value: u128,
1064        __ndigit: ::std::os::raw::c_int,
1065        __decpt: *mut ::std::os::raw::c_int,
1066        __sign: *mut ::std::os::raw::c_int,
1067    ) -> *mut ::std::os::raw::c_char;
1068}
1069extern "C" {
1070    pub fn qgcvt(
1071        __value: u128,
1072        __ndigit: ::std::os::raw::c_int,
1073        __buf: *mut ::std::os::raw::c_char,
1074    ) -> *mut ::std::os::raw::c_char;
1075}
1076extern "C" {
1077    pub fn ecvt_r(
1078        __value: f64,
1079        __ndigit: ::std::os::raw::c_int,
1080        __decpt: *mut ::std::os::raw::c_int,
1081        __sign: *mut ::std::os::raw::c_int,
1082        __buf: *mut ::std::os::raw::c_char,
1083        __len: usize,
1084    ) -> ::std::os::raw::c_int;
1085}
1086extern "C" {
1087    pub fn fcvt_r(
1088        __value: f64,
1089        __ndigit: ::std::os::raw::c_int,
1090        __decpt: *mut ::std::os::raw::c_int,
1091        __sign: *mut ::std::os::raw::c_int,
1092        __buf: *mut ::std::os::raw::c_char,
1093        __len: usize,
1094    ) -> ::std::os::raw::c_int;
1095}
1096extern "C" {
1097    pub fn qecvt_r(
1098        __value: u128,
1099        __ndigit: ::std::os::raw::c_int,
1100        __decpt: *mut ::std::os::raw::c_int,
1101        __sign: *mut ::std::os::raw::c_int,
1102        __buf: *mut ::std::os::raw::c_char,
1103        __len: usize,
1104    ) -> ::std::os::raw::c_int;
1105}
1106extern "C" {
1107    pub fn qfcvt_r(
1108        __value: u128,
1109        __ndigit: ::std::os::raw::c_int,
1110        __decpt: *mut ::std::os::raw::c_int,
1111        __sign: *mut ::std::os::raw::c_int,
1112        __buf: *mut ::std::os::raw::c_char,
1113        __len: usize,
1114    ) -> ::std::os::raw::c_int;
1115}
1116extern "C" {
1117    pub fn mblen(__s: *const ::std::os::raw::c_char, __n: usize) -> ::std::os::raw::c_int;
1118}
1119extern "C" {
1120    pub fn mbtowc(
1121        __pwc: *mut wchar_t,
1122        __s: *const ::std::os::raw::c_char,
1123        __n: usize,
1124    ) -> ::std::os::raw::c_int;
1125}
1126extern "C" {
1127    pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) -> ::std::os::raw::c_int;
1128}
1129extern "C" {
1130    pub fn mbstowcs(__pwcs: *mut wchar_t, __s: *const ::std::os::raw::c_char, __n: usize) -> usize;
1131}
1132extern "C" {
1133    pub fn wcstombs(__s: *mut ::std::os::raw::c_char, __pwcs: *const wchar_t, __n: usize) -> usize;
1134}
1135extern "C" {
1136    pub fn rpmatch(__response: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
1137}
1138extern "C" {
1139    pub fn getsubopt(
1140        __optionp: *mut *mut ::std::os::raw::c_char,
1141        __tokens: *const *mut ::std::os::raw::c_char,
1142        __valuep: *mut *mut ::std::os::raw::c_char,
1143    ) -> ::std::os::raw::c_int;
1144}
1145extern "C" {
1146    pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int)
1147        -> ::std::os::raw::c_int;
1148}
1149#[doc = " This is the opaque handle type used by the callbacks.  Typically"]
1150#[doc = "  this is a \\c FILE* or address of a file descriptor."]
1151pub type FLAC__IOHandle = *mut ::std::os::raw::c_void;
1152#[doc = " Signature for the read callback."]
1153#[doc = "  The signature and semantics match POSIX fread() implementations"]
1154#[doc = "  and can generally be used interchangeably."]
1155#[doc = ""]
1156#[doc = " \\param  ptr      The address of the read buffer."]
1157#[doc = " \\param  size     The size of the records to be read."]
1158#[doc = " \\param  nmemb    The number of records to be read."]
1159#[doc = " \\param  handle   The handle to the data source."]
1160#[doc = " \\retval size_t"]
1161#[doc = "    The number of records read."]
1162pub type FLAC__IOCallback_Read = ::std::option::Option<
1163    unsafe extern "C" fn(
1164        ptr: *mut ::std::os::raw::c_void,
1165        size: usize,
1166        nmemb: usize,
1167        handle: FLAC__IOHandle,
1168    ) -> usize,
1169>;
1170#[doc = " Signature for the write callback."]
1171#[doc = "  The signature and semantics match POSIX fwrite() implementations"]
1172#[doc = "  and can generally be used interchangeably."]
1173#[doc = ""]
1174#[doc = " \\param  ptr      The address of the write buffer."]
1175#[doc = " \\param  size     The size of the records to be written."]
1176#[doc = " \\param  nmemb    The number of records to be written."]
1177#[doc = " \\param  handle   The handle to the data source."]
1178#[doc = " \\retval size_t"]
1179#[doc = "    The number of records written."]
1180pub type FLAC__IOCallback_Write = ::std::option::Option<
1181    unsafe extern "C" fn(
1182        ptr: *const ::std::os::raw::c_void,
1183        size: usize,
1184        nmemb: usize,
1185        handle: FLAC__IOHandle,
1186    ) -> usize,
1187>;
1188#[doc = " Signature for the seek callback."]
1189#[doc = "  The signature and semantics mostly match POSIX fseek() WITH ONE IMPORTANT"]
1190#[doc = "  EXCEPTION: the offset is a 64-bit type whereas fseek() is generally \'long\'"]
1191#[doc = "  and 32-bits wide."]
1192#[doc = ""]
1193#[doc = " \\param  handle   The handle to the data source."]
1194#[doc = " \\param  offset   The new position, relative to \\a whence"]
1195#[doc = " \\param  whence   \\c SEEK_SET, \\c SEEK_CUR, or \\c SEEK_END"]
1196#[doc = " \\retval int"]
1197#[doc = "    \\c 0 on success, \\c -1 on error."]
1198pub type FLAC__IOCallback_Seek = ::std::option::Option<
1199    unsafe extern "C" fn(
1200        handle: FLAC__IOHandle,
1201        offset: FLAC__int64,
1202        whence: ::std::os::raw::c_int,
1203    ) -> ::std::os::raw::c_int,
1204>;
1205#[doc = " Signature for the tell callback."]
1206#[doc = "  The signature and semantics mostly match POSIX ftell() WITH ONE IMPORTANT"]
1207#[doc = "  EXCEPTION: the offset is a 64-bit type whereas ftell() is generally \'long\'"]
1208#[doc = "  and 32-bits wide."]
1209#[doc = ""]
1210#[doc = " \\param  handle   The handle to the data source."]
1211#[doc = " \\retval FLAC__int64"]
1212#[doc = "    The current position on success, \\c -1 on error."]
1213pub type FLAC__IOCallback_Tell =
1214    ::std::option::Option<unsafe extern "C" fn(handle: FLAC__IOHandle) -> FLAC__int64>;
1215#[doc = " Signature for the EOF callback."]
1216#[doc = "  The signature and semantics mostly match POSIX feof() but WATCHOUT:"]
1217#[doc = "  on many systems, feof() is a macro, so in this case a wrapper function"]
1218#[doc = "  must be provided instead."]
1219#[doc = ""]
1220#[doc = " \\param  handle   The handle to the data source."]
1221#[doc = " \\retval int"]
1222#[doc = "    \\c 0 if not at end of file, nonzero if at end of file."]
1223pub type FLAC__IOCallback_Eof =
1224    ::std::option::Option<unsafe extern "C" fn(handle: FLAC__IOHandle) -> ::std::os::raw::c_int>;
1225#[doc = " Signature for the close callback."]
1226#[doc = "  The signature and semantics match POSIX fclose() implementations"]
1227#[doc = "  and can generally be used interchangeably."]
1228#[doc = ""]
1229#[doc = " \\param  handle   The handle to the data source."]
1230#[doc = " \\retval int"]
1231#[doc = "    \\c 0 on success, \\c EOF on error."]
1232pub type FLAC__IOCallback_Close =
1233    ::std::option::Option<unsafe extern "C" fn(handle: FLAC__IOHandle) -> ::std::os::raw::c_int>;
1234#[doc = " A structure for holding a set of callbacks."]
1235#[doc = "  Each FLAC interface that requires a FLAC__IOCallbacks structure will"]
1236#[doc = "  describe which of the callbacks are required.  The ones that are not"]
1237#[doc = "  required may be set to NULL."]
1238#[doc = ""]
1239#[doc = "  If the seek requirement for an interface is optional, you can signify that"]
1240#[doc = "  a data sorce is not seekable by setting the \\a seek field to \\c NULL."]
1241#[repr(C)]
1242#[derive(Debug, Copy, Clone)]
1243pub struct FLAC__IOCallbacks {
1244    pub read: FLAC__IOCallback_Read,
1245    pub write: FLAC__IOCallback_Write,
1246    pub seek: FLAC__IOCallback_Seek,
1247    pub tell: FLAC__IOCallback_Tell,
1248    pub eof: FLAC__IOCallback_Eof,
1249    pub close: FLAC__IOCallback_Close,
1250}
1251extern "C" {
1252    #[link_name = "\u{1}FLAC__VERSION_STRING"]
1253    pub static mut FLAC__VERSION_STRING: *const ::std::os::raw::c_char;
1254}
1255extern "C" {
1256    #[link_name = "\u{1}FLAC__VENDOR_STRING"]
1257    pub static mut FLAC__VENDOR_STRING: *const ::std::os::raw::c_char;
1258}
1259extern "C" {
1260    #[link_name = "\u{1}FLAC__STREAM_SYNC_STRING"]
1261    pub static mut FLAC__STREAM_SYNC_STRING: [FLAC__byte; 4usize];
1262}
1263extern "C" {
1264    #[link_name = "\u{1}FLAC__STREAM_SYNC"]
1265    pub static FLAC__STREAM_SYNC: ::std::os::raw::c_uint;
1266}
1267extern "C" {
1268    #[link_name = "\u{1}FLAC__STREAM_SYNC_LEN"]
1269    pub static FLAC__STREAM_SYNC_LEN: ::std::os::raw::c_uint;
1270}
1271pub const FLAC__EntropyCodingMethodType_FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE:
1272    FLAC__EntropyCodingMethodType = 0;
1273pub const FLAC__EntropyCodingMethodType_FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2:
1274    FLAC__EntropyCodingMethodType = 1;
1275#[doc = " An enumeration of the available entropy coding methods."]
1276pub type FLAC__EntropyCodingMethodType = u32;
1277extern "C" {
1278    #[link_name = "\u{1}FLAC__EntropyCodingMethodTypeString"]
1279    pub static mut FLAC__EntropyCodingMethodTypeString: [*const ::std::os::raw::c_char; 0usize];
1280}
1281#[doc = " Contents of a Rice partitioned residual"]
1282#[repr(C)]
1283#[derive(Debug, Copy, Clone)]
1284pub struct FLAC__EntropyCodingMethod_PartitionedRiceContents {
1285    pub parameters: *mut ::std::os::raw::c_uint,
1286    pub raw_bits: *mut ::std::os::raw::c_uint,
1287    pub capacity_by_order: ::std::os::raw::c_uint,
1288}
1289#[doc = " Header for a Rice partitioned residual.  (c.f. <A HREF=\"../format.html#partitioned_rice\">format specification</A>)"]
1290#[repr(C)]
1291#[derive(Debug, Copy, Clone)]
1292pub struct FLAC__EntropyCodingMethod_PartitionedRice {
1293    pub order: ::std::os::raw::c_uint,
1294    pub contents: *const FLAC__EntropyCodingMethod_PartitionedRiceContents,
1295}
1296extern "C" {
1297    #[link_name = "\u{1}FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ORDER_LEN"]
1298    pub static FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ORDER_LEN: ::std::os::raw::c_uint;
1299}
1300extern "C" {
1301    #[link_name = "\u{1}FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_PARAMETER_LEN"]
1302    pub static FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_PARAMETER_LEN: ::std::os::raw::c_uint;
1303}
1304extern "C" {
1305    #[link_name = "\u{1}FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2_PARAMETER_LEN"]
1306    pub static FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2_PARAMETER_LEN: ::std::os::raw::c_uint;
1307}
1308extern "C" {
1309    #[link_name = "\u{1}FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_RAW_LEN"]
1310    pub static FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_RAW_LEN: ::std::os::raw::c_uint;
1311}
1312extern "C" {
1313    #[link_name = "\u{1}FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ESCAPE_PARAMETER"]
1314    pub static FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ESCAPE_PARAMETER:
1315        ::std::os::raw::c_uint;
1316}
1317extern "C" {
1318    #[link_name = "\u{1}FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2_ESCAPE_PARAMETER"]
1319    pub static FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2_ESCAPE_PARAMETER:
1320        ::std::os::raw::c_uint;
1321}
1322#[doc = " Header for the entropy coding method.  (c.f. <A HREF=\"../format.html#residual\">format specification</A>)"]
1323#[repr(C)]
1324#[derive(Copy, Clone)]
1325pub struct FLAC__EntropyCodingMethod {
1326    pub type_: FLAC__EntropyCodingMethodType,
1327    pub data: FLAC__EntropyCodingMethod__bindgen_ty_1,
1328}
1329#[repr(C)]
1330#[derive(Copy, Clone)]
1331pub union FLAC__EntropyCodingMethod__bindgen_ty_1 {
1332    pub partitioned_rice: FLAC__EntropyCodingMethod_PartitionedRice,
1333    _bindgen_union_align: [u64; 2usize],
1334}
1335extern "C" {
1336    #[link_name = "\u{1}FLAC__ENTROPY_CODING_METHOD_TYPE_LEN"]
1337    pub static FLAC__ENTROPY_CODING_METHOD_TYPE_LEN: ::std::os::raw::c_uint;
1338}
1339#[doc = "< constant signal"]
1340pub const FLAC__SubframeType_FLAC__SUBFRAME_TYPE_CONSTANT: FLAC__SubframeType = 0;
1341#[doc = "< uncompressed signal"]
1342pub const FLAC__SubframeType_FLAC__SUBFRAME_TYPE_VERBATIM: FLAC__SubframeType = 1;
1343#[doc = "< fixed polynomial prediction"]
1344pub const FLAC__SubframeType_FLAC__SUBFRAME_TYPE_FIXED: FLAC__SubframeType = 2;
1345#[doc = "< linear prediction"]
1346pub const FLAC__SubframeType_FLAC__SUBFRAME_TYPE_LPC: FLAC__SubframeType = 3;
1347#[doc = " An enumeration of the available subframe types."]
1348pub type FLAC__SubframeType = u32;
1349extern "C" {
1350    #[link_name = "\u{1}FLAC__SubframeTypeString"]
1351    pub static mut FLAC__SubframeTypeString: [*const ::std::os::raw::c_char; 0usize];
1352}
1353#[doc = " CONSTANT subframe.  (c.f. <A HREF=\"../format.html#subframe_constant\">format specification</A>)"]
1354#[repr(C)]
1355#[derive(Debug, Copy, Clone)]
1356pub struct FLAC__Subframe_Constant {
1357    #[doc = "< The constant signal value."]
1358    pub value: FLAC__int32,
1359}
1360#[doc = " VERBATIM subframe.  (c.f. <A HREF=\"../format.html#subframe_verbatim\">format specification</A>)"]
1361#[repr(C)]
1362#[derive(Debug, Copy, Clone)]
1363pub struct FLAC__Subframe_Verbatim {
1364    #[doc = "< A pointer to verbatim signal."]
1365    pub data: *const FLAC__int32,
1366}
1367#[doc = " FIXED subframe.  (c.f. <A HREF=\"../format.html#subframe_fixed\">format specification</A>)"]
1368#[repr(C)]
1369#[derive(Copy, Clone)]
1370pub struct FLAC__Subframe_Fixed {
1371    pub entropy_coding_method: FLAC__EntropyCodingMethod,
1372    pub order: ::std::os::raw::c_uint,
1373    pub warmup: [FLAC__int32; 4usize],
1374    pub residual: *const FLAC__int32,
1375}
1376#[doc = " LPC subframe.  (c.f. <A HREF=\"../format.html#subframe_lpc\">format specification</A>)"]
1377#[repr(C)]
1378#[derive(Copy, Clone)]
1379pub struct FLAC__Subframe_LPC {
1380    pub entropy_coding_method: FLAC__EntropyCodingMethod,
1381    pub order: ::std::os::raw::c_uint,
1382    pub qlp_coeff_precision: ::std::os::raw::c_uint,
1383    pub quantization_level: ::std::os::raw::c_int,
1384    pub qlp_coeff: [FLAC__int32; 32usize],
1385    pub warmup: [FLAC__int32; 32usize],
1386    pub residual: *const FLAC__int32,
1387}
1388extern "C" {
1389    #[link_name = "\u{1}FLAC__SUBFRAME_LPC_QLP_COEFF_PRECISION_LEN"]
1390    pub static FLAC__SUBFRAME_LPC_QLP_COEFF_PRECISION_LEN: ::std::os::raw::c_uint;
1391}
1392extern "C" {
1393    #[link_name = "\u{1}FLAC__SUBFRAME_LPC_QLP_SHIFT_LEN"]
1394    pub static FLAC__SUBFRAME_LPC_QLP_SHIFT_LEN: ::std::os::raw::c_uint;
1395}
1396#[doc = " FLAC subframe structure.  (c.f. <A HREF=\"../format.html#subframe\">format specification</A>)"]
1397#[repr(C)]
1398#[derive(Copy, Clone)]
1399pub struct FLAC__Subframe {
1400    pub type_: FLAC__SubframeType,
1401    pub data: FLAC__Subframe__bindgen_ty_1,
1402    pub wasted_bits: ::std::os::raw::c_uint,
1403}
1404#[repr(C)]
1405#[derive(Copy, Clone)]
1406pub union FLAC__Subframe__bindgen_ty_1 {
1407    pub constant: FLAC__Subframe_Constant,
1408    pub fixed: FLAC__Subframe_Fixed,
1409    pub lpc: FLAC__Subframe_LPC,
1410    pub verbatim: FLAC__Subframe_Verbatim,
1411    _bindgen_union_align: [u64; 38usize],
1412}
1413extern "C" {
1414    #[link_name = "\u{1}FLAC__SUBFRAME_ZERO_PAD_LEN"]
1415    pub static FLAC__SUBFRAME_ZERO_PAD_LEN: ::std::os::raw::c_uint;
1416}
1417extern "C" {
1418    #[link_name = "\u{1}FLAC__SUBFRAME_TYPE_LEN"]
1419    pub static FLAC__SUBFRAME_TYPE_LEN: ::std::os::raw::c_uint;
1420}
1421extern "C" {
1422    #[link_name = "\u{1}FLAC__SUBFRAME_WASTED_BITS_FLAG_LEN"]
1423    pub static FLAC__SUBFRAME_WASTED_BITS_FLAG_LEN: ::std::os::raw::c_uint;
1424}
1425extern "C" {
1426    #[link_name = "\u{1}FLAC__SUBFRAME_TYPE_CONSTANT_BYTE_ALIGNED_MASK"]
1427    pub static FLAC__SUBFRAME_TYPE_CONSTANT_BYTE_ALIGNED_MASK: ::std::os::raw::c_uint;
1428}
1429extern "C" {
1430    #[link_name = "\u{1}FLAC__SUBFRAME_TYPE_VERBATIM_BYTE_ALIGNED_MASK"]
1431    pub static FLAC__SUBFRAME_TYPE_VERBATIM_BYTE_ALIGNED_MASK: ::std::os::raw::c_uint;
1432}
1433extern "C" {
1434    #[link_name = "\u{1}FLAC__SUBFRAME_TYPE_FIXED_BYTE_ALIGNED_MASK"]
1435    pub static FLAC__SUBFRAME_TYPE_FIXED_BYTE_ALIGNED_MASK: ::std::os::raw::c_uint;
1436}
1437extern "C" {
1438    #[link_name = "\u{1}FLAC__SUBFRAME_TYPE_LPC_BYTE_ALIGNED_MASK"]
1439    pub static FLAC__SUBFRAME_TYPE_LPC_BYTE_ALIGNED_MASK: ::std::os::raw::c_uint;
1440}
1441#[doc = "< independent channels"]
1442pub const FLAC__ChannelAssignment_FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT: FLAC__ChannelAssignment = 0;
1443#[doc = "< left+side stereo"]
1444pub const FLAC__ChannelAssignment_FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDE: FLAC__ChannelAssignment = 1;
1445#[doc = "< right+side stereo"]
1446pub const FLAC__ChannelAssignment_FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE: FLAC__ChannelAssignment = 2;
1447#[doc = "< mid+side stereo"]
1448pub const FLAC__ChannelAssignment_FLAC__CHANNEL_ASSIGNMENT_MID_SIDE: FLAC__ChannelAssignment = 3;
1449#[doc = " An enumeration of the available channel assignments."]
1450pub type FLAC__ChannelAssignment = u32;
1451extern "C" {
1452    #[link_name = "\u{1}FLAC__ChannelAssignmentString"]
1453    pub static mut FLAC__ChannelAssignmentString: [*const ::std::os::raw::c_char; 0usize];
1454}
1455#[doc = "< number contains the frame number"]
1456pub const FLAC__FrameNumberType_FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER: FLAC__FrameNumberType = 0;
1457#[doc = "< number contains the sample number of first sample in frame"]
1458pub const FLAC__FrameNumberType_FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER: FLAC__FrameNumberType = 1;
1459#[doc = " An enumeration of the possible frame numbering methods."]
1460pub type FLAC__FrameNumberType = u32;
1461extern "C" {
1462    #[link_name = "\u{1}FLAC__FrameNumberTypeString"]
1463    pub static mut FLAC__FrameNumberTypeString: [*const ::std::os::raw::c_char; 0usize];
1464}
1465#[doc = " FLAC frame header structure.  (c.f. <A HREF=\"../format.html#frame_header\">format specification</A>)"]
1466#[repr(C)]
1467#[derive(Copy, Clone)]
1468pub struct FLAC__FrameHeader {
1469    pub blocksize: ::std::os::raw::c_uint,
1470    pub sample_rate: ::std::os::raw::c_uint,
1471    pub channels: ::std::os::raw::c_uint,
1472    pub channel_assignment: FLAC__ChannelAssignment,
1473    pub bits_per_sample: ::std::os::raw::c_uint,
1474    pub number_type: FLAC__FrameNumberType,
1475    pub number: FLAC__FrameHeader__bindgen_ty_1,
1476    pub crc: FLAC__uint8,
1477}
1478#[repr(C)]
1479#[derive(Copy, Clone)]
1480pub union FLAC__FrameHeader__bindgen_ty_1 {
1481    pub frame_number: FLAC__uint32,
1482    pub sample_number: FLAC__uint64,
1483    _bindgen_union_align: u64,
1484}
1485extern "C" {
1486    #[link_name = "\u{1}FLAC__FRAME_HEADER_SYNC"]
1487    pub static FLAC__FRAME_HEADER_SYNC: ::std::os::raw::c_uint;
1488}
1489extern "C" {
1490    #[link_name = "\u{1}FLAC__FRAME_HEADER_SYNC_LEN"]
1491    pub static FLAC__FRAME_HEADER_SYNC_LEN: ::std::os::raw::c_uint;
1492}
1493extern "C" {
1494    #[link_name = "\u{1}FLAC__FRAME_HEADER_RESERVED_LEN"]
1495    pub static FLAC__FRAME_HEADER_RESERVED_LEN: ::std::os::raw::c_uint;
1496}
1497extern "C" {
1498    #[link_name = "\u{1}FLAC__FRAME_HEADER_BLOCKING_STRATEGY_LEN"]
1499    pub static FLAC__FRAME_HEADER_BLOCKING_STRATEGY_LEN: ::std::os::raw::c_uint;
1500}
1501extern "C" {
1502    #[link_name = "\u{1}FLAC__FRAME_HEADER_BLOCK_SIZE_LEN"]
1503    pub static FLAC__FRAME_HEADER_BLOCK_SIZE_LEN: ::std::os::raw::c_uint;
1504}
1505extern "C" {
1506    #[link_name = "\u{1}FLAC__FRAME_HEADER_SAMPLE_RATE_LEN"]
1507    pub static FLAC__FRAME_HEADER_SAMPLE_RATE_LEN: ::std::os::raw::c_uint;
1508}
1509extern "C" {
1510    #[link_name = "\u{1}FLAC__FRAME_HEADER_CHANNEL_ASSIGNMENT_LEN"]
1511    pub static FLAC__FRAME_HEADER_CHANNEL_ASSIGNMENT_LEN: ::std::os::raw::c_uint;
1512}
1513extern "C" {
1514    #[link_name = "\u{1}FLAC__FRAME_HEADER_BITS_PER_SAMPLE_LEN"]
1515    pub static FLAC__FRAME_HEADER_BITS_PER_SAMPLE_LEN: ::std::os::raw::c_uint;
1516}
1517extern "C" {
1518    #[link_name = "\u{1}FLAC__FRAME_HEADER_ZERO_PAD_LEN"]
1519    pub static FLAC__FRAME_HEADER_ZERO_PAD_LEN: ::std::os::raw::c_uint;
1520}
1521extern "C" {
1522    #[link_name = "\u{1}FLAC__FRAME_HEADER_CRC_LEN"]
1523    pub static FLAC__FRAME_HEADER_CRC_LEN: ::std::os::raw::c_uint;
1524}
1525#[doc = " FLAC frame footer structure.  (c.f. <A HREF=\"../format.html#frame_footer\">format specification</A>)"]
1526#[repr(C)]
1527#[derive(Debug, Copy, Clone)]
1528pub struct FLAC__FrameFooter {
1529    pub crc: FLAC__uint16,
1530}
1531extern "C" {
1532    #[link_name = "\u{1}FLAC__FRAME_FOOTER_CRC_LEN"]
1533    pub static FLAC__FRAME_FOOTER_CRC_LEN: ::std::os::raw::c_uint;
1534}
1535#[doc = " FLAC frame structure.  (c.f. <A HREF=\"../format.html#frame\">format specification</A>)"]
1536#[repr(C)]
1537#[derive(Copy, Clone)]
1538pub struct FLAC__Frame {
1539    pub header: FLAC__FrameHeader,
1540    pub subframes: [FLAC__Subframe; 8usize],
1541    pub footer: FLAC__FrameFooter,
1542}
1543pub const FLAC__MetadataType_FLAC__METADATA_TYPE_STREAMINFO: FLAC__MetadataType = 0;
1544pub const FLAC__MetadataType_FLAC__METADATA_TYPE_PADDING: FLAC__MetadataType = 1;
1545pub const FLAC__MetadataType_FLAC__METADATA_TYPE_APPLICATION: FLAC__MetadataType = 2;
1546pub const FLAC__MetadataType_FLAC__METADATA_TYPE_SEEKTABLE: FLAC__MetadataType = 3;
1547pub const FLAC__MetadataType_FLAC__METADATA_TYPE_VORBIS_COMMENT: FLAC__MetadataType = 4;
1548pub const FLAC__MetadataType_FLAC__METADATA_TYPE_CUESHEET: FLAC__MetadataType = 5;
1549pub const FLAC__MetadataType_FLAC__METADATA_TYPE_PICTURE: FLAC__MetadataType = 6;
1550pub const FLAC__MetadataType_FLAC__METADATA_TYPE_UNDEFINED: FLAC__MetadataType = 7;
1551pub const FLAC__MetadataType_FLAC__MAX_METADATA_TYPE: FLAC__MetadataType = 126;
1552#[doc = " An enumeration of the available metadata block types."]
1553pub type FLAC__MetadataType = u32;
1554extern "C" {
1555    #[link_name = "\u{1}FLAC__MetadataTypeString"]
1556    pub static mut FLAC__MetadataTypeString: [*const ::std::os::raw::c_char; 0usize];
1557}
1558#[doc = " FLAC STREAMINFO structure.  (c.f. <A HREF=\"../format.html#metadata_block_streaminfo\">format specification</A>)"]
1559#[repr(C)]
1560#[derive(Debug, Copy, Clone)]
1561pub struct FLAC__StreamMetadata_StreamInfo {
1562    pub min_blocksize: ::std::os::raw::c_uint,
1563    pub max_blocksize: ::std::os::raw::c_uint,
1564    pub min_framesize: ::std::os::raw::c_uint,
1565    pub max_framesize: ::std::os::raw::c_uint,
1566    pub sample_rate: ::std::os::raw::c_uint,
1567    pub channels: ::std::os::raw::c_uint,
1568    pub bits_per_sample: ::std::os::raw::c_uint,
1569    pub total_samples: FLAC__uint64,
1570    pub md5sum: [FLAC__byte; 16usize],
1571}
1572extern "C" {
1573    #[link_name = "\u{1}FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN"]
1574    pub static FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN: ::std::os::raw::c_uint;
1575}
1576extern "C" {
1577    #[link_name = "\u{1}FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN"]
1578    pub static FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN: ::std::os::raw::c_uint;
1579}
1580extern "C" {
1581    #[link_name = "\u{1}FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN"]
1582    pub static FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN: ::std::os::raw::c_uint;
1583}
1584extern "C" {
1585    #[link_name = "\u{1}FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN"]
1586    pub static FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN: ::std::os::raw::c_uint;
1587}
1588extern "C" {
1589    #[link_name = "\u{1}FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN"]
1590    pub static FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN: ::std::os::raw::c_uint;
1591}
1592extern "C" {
1593    #[link_name = "\u{1}FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN"]
1594    pub static FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN: ::std::os::raw::c_uint;
1595}
1596extern "C" {
1597    #[link_name = "\u{1}FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN"]
1598    pub static FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN: ::std::os::raw::c_uint;
1599}
1600extern "C" {
1601    #[link_name = "\u{1}FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN"]
1602    pub static FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN: ::std::os::raw::c_uint;
1603}
1604extern "C" {
1605    #[link_name = "\u{1}FLAC__STREAM_METADATA_STREAMINFO_MD5SUM_LEN"]
1606    pub static FLAC__STREAM_METADATA_STREAMINFO_MD5SUM_LEN: ::std::os::raw::c_uint;
1607}
1608#[doc = " FLAC PADDING structure.  (c.f. <A HREF=\"../format.html#metadata_block_padding\">format specification</A>)"]
1609#[repr(C)]
1610#[derive(Debug, Copy, Clone)]
1611pub struct FLAC__StreamMetadata_Padding {
1612    pub dummy: ::std::os::raw::c_int,
1613}
1614#[doc = " FLAC APPLICATION structure.  (c.f. <A HREF=\"../format.html#metadata_block_application\">format specification</A>)"]
1615#[repr(C)]
1616#[derive(Debug, Copy, Clone)]
1617pub struct FLAC__StreamMetadata_Application {
1618    pub id: [FLAC__byte; 4usize],
1619    pub data: *mut FLAC__byte,
1620}
1621extern "C" {
1622    #[link_name = "\u{1}FLAC__STREAM_METADATA_APPLICATION_ID_LEN"]
1623    pub static FLAC__STREAM_METADATA_APPLICATION_ID_LEN: ::std::os::raw::c_uint;
1624}
1625#[doc = " SeekPoint structure used in SEEKTABLE blocks.  (c.f. <A HREF=\"../format.html#seekpoint\">format specification</A>)"]
1626#[repr(C)]
1627#[derive(Debug, Copy, Clone)]
1628pub struct FLAC__StreamMetadata_SeekPoint {
1629    pub sample_number: FLAC__uint64,
1630    pub stream_offset: FLAC__uint64,
1631    pub frame_samples: ::std::os::raw::c_uint,
1632}
1633extern "C" {
1634    #[link_name = "\u{1}FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN"]
1635    pub static FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN: ::std::os::raw::c_uint;
1636}
1637extern "C" {
1638    #[link_name = "\u{1}FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN"]
1639    pub static FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN: ::std::os::raw::c_uint;
1640}
1641extern "C" {
1642    #[link_name = "\u{1}FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN"]
1643    pub static FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN: ::std::os::raw::c_uint;
1644}
1645extern "C" {
1646    #[link_name = "\u{1}FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER"]
1647    pub static FLAC__STREAM_METADATA_SEEKPOINT_PLACEHOLDER: FLAC__uint64;
1648}
1649#[doc = " FLAC SEEKTABLE structure.  (c.f. <A HREF=\"../format.html#metadata_block_seektable\">format specification</A>)"]
1650#[doc = ""]
1651#[doc = " \\note From the format specification:"]
1652#[doc = " - The seek points must be sorted by ascending sample number."]
1653#[doc = " - Each seek point\'s sample number must be the first sample of the"]
1654#[doc = "   target frame."]
1655#[doc = " - Each seek point\'s sample number must be unique within the table."]
1656#[doc = " - Existence of a SEEKTABLE block implies a correct setting of"]
1657#[doc = "   total_samples in the stream_info block."]
1658#[doc = " - Behavior is undefined when more than one SEEKTABLE block is"]
1659#[doc = "   present in a stream."]
1660#[repr(C)]
1661#[derive(Debug, Copy, Clone)]
1662pub struct FLAC__StreamMetadata_SeekTable {
1663    pub num_points: ::std::os::raw::c_uint,
1664    pub points: *mut FLAC__StreamMetadata_SeekPoint,
1665}
1666#[doc = " Vorbis comment entry structure used in VORBIS_COMMENT blocks.  (c.f. <A HREF=\"../format.html#metadata_block_vorbis_comment\">format specification</A>)"]
1667#[doc = ""]
1668#[doc = "  For convenience, the APIs maintain a trailing NUL character at the end of"]
1669#[doc = "  \\a entry which is not counted toward \\a length, i.e."]
1670#[doc = "  \\code strlen(entry) == length \\endcode"]
1671#[repr(C)]
1672#[derive(Debug, Copy, Clone)]
1673pub struct FLAC__StreamMetadata_VorbisComment_Entry {
1674    pub length: FLAC__uint32,
1675    pub entry: *mut FLAC__byte,
1676}
1677extern "C" {
1678    #[link_name = "\u{1}FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN"]
1679    pub static FLAC__STREAM_METADATA_VORBIS_COMMENT_ENTRY_LENGTH_LEN: ::std::os::raw::c_uint;
1680}
1681#[doc = " FLAC VORBIS_COMMENT structure.  (c.f. <A HREF=\"../format.html#metadata_block_vorbis_comment\">format specification</A>)"]
1682#[repr(C)]
1683#[derive(Debug, Copy, Clone)]
1684pub struct FLAC__StreamMetadata_VorbisComment {
1685    pub vendor_string: FLAC__StreamMetadata_VorbisComment_Entry,
1686    pub num_comments: FLAC__uint32,
1687    pub comments: *mut FLAC__StreamMetadata_VorbisComment_Entry,
1688}
1689extern "C" {
1690    #[link_name = "\u{1}FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN"]
1691    pub static FLAC__STREAM_METADATA_VORBIS_COMMENT_NUM_COMMENTS_LEN: ::std::os::raw::c_uint;
1692}
1693#[doc = " FLAC CUESHEET track index structure.  (See the"]
1694#[doc = " <A HREF=\"../format.html#cuesheet_track_index\">format specification</A> for"]
1695#[doc = " the full description of each field.)"]
1696#[repr(C)]
1697#[derive(Debug, Copy, Clone)]
1698pub struct FLAC__StreamMetadata_CueSheet_Index {
1699    pub offset: FLAC__uint64,
1700    pub number: FLAC__byte,
1701}
1702extern "C" {
1703    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN"]
1704    pub static FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN: ::std::os::raw::c_uint;
1705}
1706extern "C" {
1707    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN"]
1708    pub static FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN: ::std::os::raw::c_uint;
1709}
1710extern "C" {
1711    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN"]
1712    pub static FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN: ::std::os::raw::c_uint;
1713}
1714#[doc = " FLAC CUESHEET track structure.  (See the"]
1715#[doc = " <A HREF=\"../format.html#cuesheet_track\">format specification</A> for"]
1716#[doc = " the full description of each field.)"]
1717#[repr(C)]
1718#[derive(Debug, Copy, Clone)]
1719pub struct FLAC__StreamMetadata_CueSheet_Track {
1720    pub offset: FLAC__uint64,
1721    pub number: FLAC__byte,
1722    pub isrc: [::std::os::raw::c_char; 13usize],
1723    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>,
1724    pub num_indices: FLAC__byte,
1725    pub indices: *mut FLAC__StreamMetadata_CueSheet_Index,
1726}
1727impl FLAC__StreamMetadata_CueSheet_Track {
1728    #[inline]
1729    pub fn type_(&self) -> ::std::os::raw::c_uint {
1730        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
1731    }
1732    #[inline]
1733    pub fn set_type(&mut self, val: ::std::os::raw::c_uint) {
1734        unsafe {
1735            let val: u32 = ::std::mem::transmute(val);
1736            self._bitfield_1.set(0usize, 1u8, val as u64)
1737        }
1738    }
1739    #[inline]
1740    pub fn pre_emphasis(&self) -> ::std::os::raw::c_uint {
1741        unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
1742    }
1743    #[inline]
1744    pub fn set_pre_emphasis(&mut self, val: ::std::os::raw::c_uint) {
1745        unsafe {
1746            let val: u32 = ::std::mem::transmute(val);
1747            self._bitfield_1.set(1usize, 1u8, val as u64)
1748        }
1749    }
1750    #[inline]
1751    pub fn new_bitfield_1(
1752        type_: ::std::os::raw::c_uint,
1753        pre_emphasis: ::std::os::raw::c_uint,
1754    ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> {
1755        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> =
1756            Default::default();
1757        __bindgen_bitfield_unit.set(0usize, 1u8, {
1758            let type_: u32 = unsafe { ::std::mem::transmute(type_) };
1759            type_ as u64
1760        });
1761        __bindgen_bitfield_unit.set(1usize, 1u8, {
1762            let pre_emphasis: u32 = unsafe { ::std::mem::transmute(pre_emphasis) };
1763            pre_emphasis as u64
1764        });
1765        __bindgen_bitfield_unit
1766    }
1767}
1768extern "C" {
1769    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN"]
1770    pub static FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN: ::std::os::raw::c_uint;
1771}
1772extern "C" {
1773    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LEN"]
1774    pub static FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LEN: ::std::os::raw::c_uint;
1775}
1776extern "C" {
1777    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN"]
1778    pub static FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN: ::std::os::raw::c_uint;
1779}
1780extern "C" {
1781    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN"]
1782    pub static FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN: ::std::os::raw::c_uint;
1783}
1784extern "C" {
1785    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN"]
1786    pub static FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN: ::std::os::raw::c_uint;
1787}
1788extern "C" {
1789    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN"]
1790    pub static FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN: ::std::os::raw::c_uint;
1791}
1792extern "C" {
1793    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN"]
1794    pub static FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN: ::std::os::raw::c_uint;
1795}
1796#[doc = " FLAC CUESHEET structure.  (See the"]
1797#[doc = " <A HREF=\"../format.html#metadata_block_cuesheet\">format specification</A>"]
1798#[doc = " for the full description of each field.)"]
1799#[repr(C)]
1800#[derive(Copy, Clone)]
1801pub struct FLAC__StreamMetadata_CueSheet {
1802    pub media_catalog_number: [::std::os::raw::c_char; 129usize],
1803    pub lead_in: FLAC__uint64,
1804    pub is_cd: FLAC__bool,
1805    pub num_tracks: ::std::os::raw::c_uint,
1806    pub tracks: *mut FLAC__StreamMetadata_CueSheet_Track,
1807}
1808extern "C" {
1809    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN"]
1810    pub static FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN: ::std::os::raw::c_uint;
1811}
1812extern "C" {
1813    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN"]
1814    pub static FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN: ::std::os::raw::c_uint;
1815}
1816extern "C" {
1817    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN"]
1818    pub static FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN: ::std::os::raw::c_uint;
1819}
1820extern "C" {
1821    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN"]
1822    pub static FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN: ::std::os::raw::c_uint;
1823}
1824extern "C" {
1825    #[link_name = "\u{1}FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN"]
1826    pub static FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN: ::std::os::raw::c_uint;
1827}
1828#[doc = "< Other"]
1829pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_OTHER:
1830    FLAC__StreamMetadata_Picture_Type = 0;
1831#[doc = "< 32x32 pixels \'file icon\' (PNG only)"]
1832pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON_STANDARD : FLAC__StreamMetadata_Picture_Type = 1 ;
1833#[doc = "< Other file icon"]
1834pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_FILE_ICON:
1835    FLAC__StreamMetadata_Picture_Type = 2;
1836#[doc = "< Cover (front)"]
1837pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_FRONT_COVER:
1838    FLAC__StreamMetadata_Picture_Type = 3;
1839#[doc = "< Cover (back)"]
1840pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_BACK_COVER:
1841    FLAC__StreamMetadata_Picture_Type = 4;
1842#[doc = "< Leaflet page"]
1843pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_LEAFLET_PAGE:
1844    FLAC__StreamMetadata_Picture_Type = 5;
1845#[doc = "< Media (e.g. label side of CD)"]
1846pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_MEDIA:
1847    FLAC__StreamMetadata_Picture_Type = 6;
1848#[doc = "< Lead artist/lead performer/soloist"]
1849pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_LEAD_ARTIST:
1850    FLAC__StreamMetadata_Picture_Type = 7;
1851#[doc = "< Artist/performer"]
1852pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_ARTIST:
1853    FLAC__StreamMetadata_Picture_Type = 8;
1854#[doc = "< Conductor"]
1855pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_CONDUCTOR:
1856    FLAC__StreamMetadata_Picture_Type = 9;
1857#[doc = "< Band/Orchestra"]
1858pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_BAND:
1859    FLAC__StreamMetadata_Picture_Type = 10;
1860#[doc = "< Composer"]
1861pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_COMPOSER:
1862    FLAC__StreamMetadata_Picture_Type = 11;
1863#[doc = "< Lyricist/text writer"]
1864pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_LYRICIST:
1865    FLAC__StreamMetadata_Picture_Type = 12;
1866#[doc = "< Recording Location"]
1867pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_RECORDING_LOCATION : FLAC__StreamMetadata_Picture_Type = 13 ;
1868#[doc = "< During recording"]
1869pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_DURING_RECORDING:
1870    FLAC__StreamMetadata_Picture_Type = 14;
1871#[doc = "< During performance"]
1872pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_DURING_PERFORMANCE : FLAC__StreamMetadata_Picture_Type = 15 ;
1873#[doc = "< Movie/video screen capture"]
1874pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_VIDEO_SCREEN_CAPTURE : FLAC__StreamMetadata_Picture_Type = 16 ;
1875#[doc = "< A bright coloured fish"]
1876pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_FISH:
1877    FLAC__StreamMetadata_Picture_Type = 17;
1878#[doc = "< Illustration"]
1879pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_ILLUSTRATION:
1880    FLAC__StreamMetadata_Picture_Type = 18;
1881#[doc = "< Band/artist logotype"]
1882pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_BAND_LOGOTYPE:
1883    FLAC__StreamMetadata_Picture_Type = 19;
1884#[doc = "< Publisher/Studio logotype"]
1885pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_PUBLISHER_LOGOTYPE : FLAC__StreamMetadata_Picture_Type = 20 ;
1886pub const FLAC__StreamMetadata_Picture_Type_FLAC__STREAM_METADATA_PICTURE_TYPE_UNDEFINED:
1887    FLAC__StreamMetadata_Picture_Type = 21;
1888#[doc = " An enumeration of the PICTURE types (see FLAC__StreamMetadataPicture and id3 v2.4 APIC tag)."]
1889pub type FLAC__StreamMetadata_Picture_Type = u32;
1890extern "C" {
1891    #[link_name = "\u{1}FLAC__StreamMetadata_Picture_TypeString"]
1892    pub static mut FLAC__StreamMetadata_Picture_TypeString: [*const ::std::os::raw::c_char; 0usize];
1893}
1894#[doc = " FLAC PICTURE structure.  (See the"]
1895#[doc = " <A HREF=\"../format.html#metadata_block_picture\">format specification</A>"]
1896#[doc = " for the full description of each field.)"]
1897#[repr(C)]
1898#[derive(Debug, Copy, Clone)]
1899pub struct FLAC__StreamMetadata_Picture {
1900    pub type_: FLAC__StreamMetadata_Picture_Type,
1901    pub mime_type: *mut ::std::os::raw::c_char,
1902    pub description: *mut FLAC__byte,
1903    pub width: FLAC__uint32,
1904    pub height: FLAC__uint32,
1905    pub depth: FLAC__uint32,
1906    pub colors: FLAC__uint32,
1907    pub data_length: FLAC__uint32,
1908    pub data: *mut FLAC__byte,
1909}
1910extern "C" {
1911    #[link_name = "\u{1}FLAC__STREAM_METADATA_PICTURE_TYPE_LEN"]
1912    pub static FLAC__STREAM_METADATA_PICTURE_TYPE_LEN: ::std::os::raw::c_uint;
1913}
1914extern "C" {
1915    #[link_name = "\u{1}FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN"]
1916    pub static FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN: ::std::os::raw::c_uint;
1917}
1918extern "C" {
1919    #[link_name = "\u{1}FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN"]
1920    pub static FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN: ::std::os::raw::c_uint;
1921}
1922extern "C" {
1923    #[link_name = "\u{1}FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN"]
1924    pub static FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN: ::std::os::raw::c_uint;
1925}
1926extern "C" {
1927    #[link_name = "\u{1}FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN"]
1928    pub static FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN: ::std::os::raw::c_uint;
1929}
1930extern "C" {
1931    #[link_name = "\u{1}FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN"]
1932    pub static FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN: ::std::os::raw::c_uint;
1933}
1934extern "C" {
1935    #[link_name = "\u{1}FLAC__STREAM_METADATA_PICTURE_COLORS_LEN"]
1936    pub static FLAC__STREAM_METADATA_PICTURE_COLORS_LEN: ::std::os::raw::c_uint;
1937}
1938extern "C" {
1939    #[link_name = "\u{1}FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN"]
1940    pub static FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN: ::std::os::raw::c_uint;
1941}
1942#[doc = " Structure that is used when a metadata block of unknown type is loaded."]
1943#[doc = "  The contents are opaque.  The structure is used only internally to"]
1944#[doc = "  correctly handle unknown metadata."]
1945#[repr(C)]
1946#[derive(Debug, Copy, Clone)]
1947pub struct FLAC__StreamMetadata_Unknown {
1948    pub data: *mut FLAC__byte,
1949}
1950#[doc = " FLAC metadata block structure.  (c.f. <A HREF=\"../format.html#metadata_block\">format specification</A>)"]
1951#[repr(C)]
1952#[derive(Copy, Clone)]
1953pub struct FLAC__StreamMetadata {
1954    pub type_: FLAC__MetadataType,
1955    pub is_last: FLAC__bool,
1956    pub length: ::std::os::raw::c_uint,
1957    pub data: FLAC__StreamMetadata__bindgen_ty_1,
1958}
1959#[repr(C)]
1960#[derive(Copy, Clone)]
1961pub union FLAC__StreamMetadata__bindgen_ty_1 {
1962    pub stream_info: FLAC__StreamMetadata_StreamInfo,
1963    pub padding: FLAC__StreamMetadata_Padding,
1964    pub application: FLAC__StreamMetadata_Application,
1965    pub seek_table: FLAC__StreamMetadata_SeekTable,
1966    pub vorbis_comment: FLAC__StreamMetadata_VorbisComment,
1967    pub cue_sheet: FLAC__StreamMetadata_CueSheet,
1968    pub picture: FLAC__StreamMetadata_Picture,
1969    pub unknown: FLAC__StreamMetadata_Unknown,
1970    _bindgen_union_align: [u64; 20usize],
1971}
1972extern "C" {
1973    #[link_name = "\u{1}FLAC__STREAM_METADATA_IS_LAST_LEN"]
1974    pub static FLAC__STREAM_METADATA_IS_LAST_LEN: ::std::os::raw::c_uint;
1975}
1976extern "C" {
1977    #[link_name = "\u{1}FLAC__STREAM_METADATA_TYPE_LEN"]
1978    pub static FLAC__STREAM_METADATA_TYPE_LEN: ::std::os::raw::c_uint;
1979}
1980extern "C" {
1981    #[link_name = "\u{1}FLAC__STREAM_METADATA_LENGTH_LEN"]
1982    pub static FLAC__STREAM_METADATA_LENGTH_LEN: ::std::os::raw::c_uint;
1983}
1984extern "C" {
1985    #[doc = " Tests that a sample rate is valid for FLAC."]
1986    #[doc = ""]
1987    #[doc = " \\param sample_rate  The sample rate to test for compliance."]
1988    #[doc = " \\retval FLAC__bool"]
1989    #[doc = "    \\c true if the given sample rate conforms to the specification, else"]
1990    #[doc = "    \\c false."]
1991    pub fn FLAC__format_sample_rate_is_valid(sample_rate: ::std::os::raw::c_uint) -> FLAC__bool;
1992}
1993extern "C" {
1994    #[doc = " Tests that a blocksize at the given sample rate is valid for the FLAC"]
1995    #[doc = "  subset."]
1996    #[doc = ""]
1997    #[doc = " \\param blocksize    The blocksize to test for compliance."]
1998    #[doc = " \\param sample_rate  The sample rate is needed, since the valid subset"]
1999    #[doc = "                     blocksize depends on the sample rate."]
2000    #[doc = " \\retval FLAC__bool"]
2001    #[doc = "    \\c true if the given blocksize conforms to the specification for the"]
2002    #[doc = "    subset at the given sample rate, else \\c false."]
2003    pub fn FLAC__format_blocksize_is_subset(
2004        blocksize: ::std::os::raw::c_uint,
2005        sample_rate: ::std::os::raw::c_uint,
2006    ) -> FLAC__bool;
2007}
2008extern "C" {
2009    #[doc = " Tests that a sample rate is valid for the FLAC subset.  The subset rules"]
2010    #[doc = "  for valid sample rates are slightly more complex since the rate has to"]
2011    #[doc = "  be expressible completely in the frame header."]
2012    #[doc = ""]
2013    #[doc = " \\param sample_rate  The sample rate to test for compliance."]
2014    #[doc = " \\retval FLAC__bool"]
2015    #[doc = "    \\c true if the given sample rate conforms to the specification for the"]
2016    #[doc = "    subset, else \\c false."]
2017    pub fn FLAC__format_sample_rate_is_subset(sample_rate: ::std::os::raw::c_uint) -> FLAC__bool;
2018}
2019extern "C" {
2020    #[doc = " Check a Vorbis comment entry name to see if it conforms to the Vorbis"]
2021    #[doc = "  comment specification."]
2022    #[doc = ""]
2023    #[doc = "  Vorbis comment names must be composed only of characters from"]
2024    #[doc = "  [0x20-0x3C,0x3E-0x7D]."]
2025    #[doc = ""]
2026    #[doc = " \\param name       A NUL-terminated string to be checked."]
2027    #[doc = " \\assert"]
2028    #[doc = "    \\code name != NULL \\endcode"]
2029    #[doc = " \\retval FLAC__bool"]
2030    #[doc = "    \\c false if entry name is illegal, else \\c true."]
2031    pub fn FLAC__format_vorbiscomment_entry_name_is_legal(
2032        name: *const ::std::os::raw::c_char,
2033    ) -> FLAC__bool;
2034}
2035extern "C" {
2036    #[doc = " Check a Vorbis comment entry value to see if it conforms to the Vorbis"]
2037    #[doc = "  comment specification."]
2038    #[doc = ""]
2039    #[doc = "  Vorbis comment values must be valid UTF-8 sequences."]
2040    #[doc = ""]
2041    #[doc = " \\param value      A string to be checked."]
2042    #[doc = " \\param length     A the length of \\a value in bytes.  May be"]
2043    #[doc = "                   \\c (unsigned)(-1) to indicate that \\a value is a plain"]
2044    #[doc = "                   UTF-8 NUL-terminated string."]
2045    #[doc = " \\assert"]
2046    #[doc = "    \\code value != NULL \\endcode"]
2047    #[doc = " \\retval FLAC__bool"]
2048    #[doc = "    \\c false if entry name is illegal, else \\c true."]
2049    pub fn FLAC__format_vorbiscomment_entry_value_is_legal(
2050        value: *const FLAC__byte,
2051        length: ::std::os::raw::c_uint,
2052    ) -> FLAC__bool;
2053}
2054extern "C" {
2055    #[doc = " Check a Vorbis comment entry to see if it conforms to the Vorbis"]
2056    #[doc = "  comment specification."]
2057    #[doc = ""]
2058    #[doc = "  Vorbis comment entries must be of the form \'name=value\', and \'name\' and"]
2059    #[doc = "  \'value\' must be legal according to"]
2060    #[doc = "  FLAC__format_vorbiscomment_entry_name_is_legal() and"]
2061    #[doc = "  FLAC__format_vorbiscomment_entry_value_is_legal() respectively."]
2062    #[doc = ""]
2063    #[doc = " \\param entry      An entry to be checked."]
2064    #[doc = " \\param length     The length of \\a entry in bytes."]
2065    #[doc = " \\assert"]
2066    #[doc = "    \\code value != NULL \\endcode"]
2067    #[doc = " \\retval FLAC__bool"]
2068    #[doc = "    \\c false if entry name is illegal, else \\c true."]
2069    pub fn FLAC__format_vorbiscomment_entry_is_legal(
2070        entry: *const FLAC__byte,
2071        length: ::std::os::raw::c_uint,
2072    ) -> FLAC__bool;
2073}
2074extern "C" {
2075    #[doc = " Check a seek table to see if it conforms to the FLAC specification."]
2076    #[doc = "  See the format specification for limits on the contents of the"]
2077    #[doc = "  seek table."]
2078    #[doc = ""]
2079    #[doc = " \\param seek_table  A pointer to a seek table to be checked."]
2080    #[doc = " \\assert"]
2081    #[doc = "    \\code seek_table != NULL \\endcode"]
2082    #[doc = " \\retval FLAC__bool"]
2083    #[doc = "    \\c false if seek table is illegal, else \\c true."]
2084    pub fn FLAC__format_seektable_is_legal(
2085        seek_table: *const FLAC__StreamMetadata_SeekTable,
2086    ) -> FLAC__bool;
2087}
2088extern "C" {
2089    #[doc = " Sort a seek table\'s seek points according to the format specification."]
2090    #[doc = "  This includes a \"unique-ification\" step to remove duplicates, i.e."]
2091    #[doc = "  seek points with identical \\a sample_number values.  Duplicate seek"]
2092    #[doc = "  points are converted into placeholder points and sorted to the end of"]
2093    #[doc = "  the table."]
2094    #[doc = ""]
2095    #[doc = " \\param seek_table  A pointer to a seek table to be sorted."]
2096    #[doc = " \\assert"]
2097    #[doc = "    \\code seek_table != NULL \\endcode"]
2098    #[doc = " \\retval unsigned"]
2099    #[doc = "    The number of duplicate seek points converted into placeholders."]
2100    pub fn FLAC__format_seektable_sort(
2101        seek_table: *mut FLAC__StreamMetadata_SeekTable,
2102    ) -> ::std::os::raw::c_uint;
2103}
2104extern "C" {
2105    #[doc = " Check a cue sheet to see if it conforms to the FLAC specification."]
2106    #[doc = "  See the format specification for limits on the contents of the"]
2107    #[doc = "  cue sheet."]
2108    #[doc = ""]
2109    #[doc = " \\param cue_sheet  A pointer to an existing cue sheet to be checked."]
2110    #[doc = " \\param check_cd_da_subset  If \\c true, check CUESHEET against more"]
2111    #[doc = "                   stringent requirements for a CD-DA (audio) disc."]
2112    #[doc = " \\param violation  Address of a pointer to a string.  If there is a"]
2113    #[doc = "                   violation, a pointer to a string explanation of the"]
2114    #[doc = "                   violation will be returned here. \\a violation may be"]
2115    #[doc = "                   \\c NULL if you don\'t need the returned string.  Do not"]
2116    #[doc = "                   free the returned string; it will always point to static"]
2117    #[doc = "                   data."]
2118    #[doc = " \\assert"]
2119    #[doc = "    \\code cue_sheet != NULL \\endcode"]
2120    #[doc = " \\retval FLAC__bool"]
2121    #[doc = "    \\c false if cue sheet is illegal, else \\c true."]
2122    pub fn FLAC__format_cuesheet_is_legal(
2123        cue_sheet: *const FLAC__StreamMetadata_CueSheet,
2124        check_cd_da_subset: FLAC__bool,
2125        violation: *mut *const ::std::os::raw::c_char,
2126    ) -> FLAC__bool;
2127}
2128extern "C" {
2129    #[doc = " Check picture data to see if it conforms to the FLAC specification."]
2130    #[doc = "  See the format specification for limits on the contents of the"]
2131    #[doc = "  PICTURE block."]
2132    #[doc = ""]
2133    #[doc = " \\param picture    A pointer to existing picture data to be checked."]
2134    #[doc = " \\param violation  Address of a pointer to a string.  If there is a"]
2135    #[doc = "                   violation, a pointer to a string explanation of the"]
2136    #[doc = "                   violation will be returned here. \\a violation may be"]
2137    #[doc = "                   \\c NULL if you don\'t need the returned string.  Do not"]
2138    #[doc = "                   free the returned string; it will always point to static"]
2139    #[doc = "                   data."]
2140    #[doc = " \\assert"]
2141    #[doc = "    \\code picture != NULL \\endcode"]
2142    #[doc = " \\retval FLAC__bool"]
2143    #[doc = "    \\c false if picture data is illegal, else \\c true."]
2144    pub fn FLAC__format_picture_is_legal(
2145        picture: *const FLAC__StreamMetadata_Picture,
2146        violation: *mut *const ::std::os::raw::c_char,
2147    ) -> FLAC__bool;
2148}
2149extern "C" {
2150    #[doc = " Read the STREAMINFO metadata block of the given FLAC file.  This function"]
2151    #[doc = "  will try to skip any ID3v2 tag at the head of the file."]
2152    #[doc = ""]
2153    #[doc = " \\param filename    The path to the FLAC file to read."]
2154    #[doc = " \\param streaminfo  A pointer to space for the STREAMINFO block.  Since"]
2155    #[doc = "                    FLAC__StreamMetadata is a simple structure with no"]
2156    #[doc = "                    memory allocation involved, you pass the address of"]
2157    #[doc = "                    an existing structure.  It need not be initialized."]
2158    #[doc = " \\assert"]
2159    #[doc = "    \\code filename != NULL \\endcode"]
2160    #[doc = "    \\code streaminfo != NULL \\endcode"]
2161    #[doc = " \\retval FLAC__bool"]
2162    #[doc = "    \\c true if a valid STREAMINFO block was read from \\a filename.  Returns"]
2163    #[doc = "    \\c false if there was a memory allocation error, a file decoder error,"]
2164    #[doc = "    or the file contained no STREAMINFO block.  (A memory allocation error"]
2165    #[doc = "    is possible because this function must set up a file decoder.)"]
2166    pub fn FLAC__metadata_get_streaminfo(
2167        filename: *const ::std::os::raw::c_char,
2168        streaminfo: *mut FLAC__StreamMetadata,
2169    ) -> FLAC__bool;
2170}
2171extern "C" {
2172    #[doc = " Read the VORBIS_COMMENT metadata block of the given FLAC file.  This"]
2173    #[doc = "  function will try to skip any ID3v2 tag at the head of the file."]
2174    #[doc = ""]
2175    #[doc = " \\param filename    The path to the FLAC file to read."]
2176    #[doc = " \\param tags        The address where the returned pointer will be"]
2177    #[doc = "                    stored.  The \\a tags object must be deleted by"]
2178    #[doc = "                    the caller using FLAC__metadata_object_delete()."]
2179    #[doc = " \\assert"]
2180    #[doc = "    \\code filename != NULL \\endcode"]
2181    #[doc = "    \\code tags != NULL \\endcode"]
2182    #[doc = " \\retval FLAC__bool"]
2183    #[doc = "    \\c true if a valid VORBIS_COMMENT block was read from \\a filename,"]
2184    #[doc = "    and \\a *tags will be set to the address of the metadata structure."]
2185    #[doc = "    Returns \\c false if there was a memory allocation error, a file"]
2186    #[doc = "    decoder error, or the file contained no VORBIS_COMMENT block, and"]
2187    #[doc = "    \\a *tags will be set to \\c NULL."]
2188    pub fn FLAC__metadata_get_tags(
2189        filename: *const ::std::os::raw::c_char,
2190        tags: *mut *mut FLAC__StreamMetadata,
2191    ) -> FLAC__bool;
2192}
2193extern "C" {
2194    #[doc = " Read the CUESHEET metadata block of the given FLAC file.  This"]
2195    #[doc = "  function will try to skip any ID3v2 tag at the head of the file."]
2196    #[doc = ""]
2197    #[doc = " \\param filename    The path to the FLAC file to read."]
2198    #[doc = " \\param cuesheet    The address where the returned pointer will be"]
2199    #[doc = "                    stored.  The \\a cuesheet object must be deleted by"]
2200    #[doc = "                    the caller using FLAC__metadata_object_delete()."]
2201    #[doc = " \\assert"]
2202    #[doc = "    \\code filename != NULL \\endcode"]
2203    #[doc = "    \\code cuesheet != NULL \\endcode"]
2204    #[doc = " \\retval FLAC__bool"]
2205    #[doc = "    \\c true if a valid CUESHEET block was read from \\a filename,"]
2206    #[doc = "    and \\a *cuesheet will be set to the address of the metadata"]
2207    #[doc = "    structure.  Returns \\c false if there was a memory allocation"]
2208    #[doc = "    error, a file decoder error, or the file contained no CUESHEET"]
2209    #[doc = "    block, and \\a *cuesheet will be set to \\c NULL."]
2210    pub fn FLAC__metadata_get_cuesheet(
2211        filename: *const ::std::os::raw::c_char,
2212        cuesheet: *mut *mut FLAC__StreamMetadata,
2213    ) -> FLAC__bool;
2214}
2215extern "C" {
2216    #[doc = " Read a PICTURE metadata block of the given FLAC file.  This"]
2217    #[doc = "  function will try to skip any ID3v2 tag at the head of the file."]
2218    #[doc = "  Since there can be more than one PICTURE block in a file, this"]
2219    #[doc = "  function takes a number of parameters that act as constraints to"]
2220    #[doc = "  the search.  The PICTURE block with the largest area matching all"]
2221    #[doc = "  the constraints will be returned, or \\a *picture will be set to"]
2222    #[doc = "  \\c NULL if there was no such block."]
2223    #[doc = ""]
2224    #[doc = " \\param filename    The path to the FLAC file to read."]
2225    #[doc = " \\param picture     The address where the returned pointer will be"]
2226    #[doc = "                    stored.  The \\a picture object must be deleted by"]
2227    #[doc = "                    the caller using FLAC__metadata_object_delete()."]
2228    #[doc = " \\param type        The desired picture type.  Use \\c -1 to mean"]
2229    #[doc = "                    \"any type\"."]
2230    #[doc = " \\param mime_type   The desired MIME type, e.g. \"image/jpeg\".  The"]
2231    #[doc = "                    string will be matched exactly.  Use \\c NULL to"]
2232    #[doc = "                    mean \"any MIME type\"."]
2233    #[doc = " \\param description The desired description.  The string will be"]
2234    #[doc = "                    matched exactly.  Use \\c NULL to mean \"any"]
2235    #[doc = "                    description\"."]
2236    #[doc = " \\param max_width   The maximum width in pixels desired.  Use"]
2237    #[doc = "                    \\c (unsigned)(-1) to mean \"any width\"."]
2238    #[doc = " \\param max_height  The maximum height in pixels desired.  Use"]
2239    #[doc = "                    \\c (unsigned)(-1) to mean \"any height\"."]
2240    #[doc = " \\param max_depth   The maximum color depth in bits-per-pixel desired."]
2241    #[doc = "                    Use \\c (unsigned)(-1) to mean \"any depth\"."]
2242    #[doc = " \\param max_colors  The maximum number of colors desired.  Use"]
2243    #[doc = "                    \\c (unsigned)(-1) to mean \"any number of colors\"."]
2244    #[doc = " \\assert"]
2245    #[doc = "    \\code filename != NULL \\endcode"]
2246    #[doc = "    \\code picture != NULL \\endcode"]
2247    #[doc = " \\retval FLAC__bool"]
2248    #[doc = "    \\c true if a valid PICTURE block was read from \\a filename,"]
2249    #[doc = "    and \\a *picture will be set to the address of the metadata"]
2250    #[doc = "    structure.  Returns \\c false if there was a memory allocation"]
2251    #[doc = "    error, a file decoder error, or the file contained no PICTURE"]
2252    #[doc = "    block, and \\a *picture will be set to \\c NULL."]
2253    pub fn FLAC__metadata_get_picture(
2254        filename: *const ::std::os::raw::c_char,
2255        picture: *mut *mut FLAC__StreamMetadata,
2256        type_: FLAC__StreamMetadata_Picture_Type,
2257        mime_type: *const ::std::os::raw::c_char,
2258        description: *const FLAC__byte,
2259        max_width: ::std::os::raw::c_uint,
2260        max_height: ::std::os::raw::c_uint,
2261        max_depth: ::std::os::raw::c_uint,
2262        max_colors: ::std::os::raw::c_uint,
2263    ) -> FLAC__bool;
2264}
2265#[doc = " \\defgroup flac_metadata_level1 FLAC/metadata.h: metadata level 1 interface"]
2266#[doc = "  \\ingroup flac_metadata"]
2267#[doc = ""]
2268#[doc = " \\brief"]
2269#[doc = " The level 1 interface provides read-write access to FLAC file metadata and"]
2270#[doc = " operates directly on the FLAC file."]
2271#[doc = ""]
2272#[doc = " The general usage of this interface is:"]
2273#[doc = ""]
2274#[doc = " - Create an iterator using FLAC__metadata_simple_iterator_new()"]
2275#[doc = " - Attach it to a file using FLAC__metadata_simple_iterator_init() and check"]
2276#[doc = "   the exit code.  Call FLAC__metadata_simple_iterator_is_writable() to"]
2277#[doc = "   see if the file is writable, or only read access is allowed."]
2278#[doc = " - Use FLAC__metadata_simple_iterator_next() and"]
2279#[doc = "   FLAC__metadata_simple_iterator_prev() to traverse the blocks."]
2280#[doc = "   This is does not read the actual blocks themselves."]
2281#[doc = "   FLAC__metadata_simple_iterator_next() is relatively fast."]
2282#[doc = "   FLAC__metadata_simple_iterator_prev() is slower since it needs to search"]
2283#[doc = "   forward from the front of the file."]
2284#[doc = " - Use FLAC__metadata_simple_iterator_get_block_type() or"]
2285#[doc = "   FLAC__metadata_simple_iterator_get_block() to access the actual data at"]
2286#[doc = "   the current iterator position.  The returned object is yours to modify"]
2287#[doc = "   and free."]
2288#[doc = " - Use FLAC__metadata_simple_iterator_set_block() to write a modified block"]
2289#[doc = "   back.  You must have write permission to the original file.  Make sure to"]
2290#[doc = "   read the whole comment to FLAC__metadata_simple_iterator_set_block()"]
2291#[doc = "   below."]
2292#[doc = " - Use FLAC__metadata_simple_iterator_insert_block_after() to add new blocks."]
2293#[doc = "   Use the object creation functions from"]
2294#[doc = "   \\link flac_metadata_object here \\endlink to generate new objects."]
2295#[doc = " - Use FLAC__metadata_simple_iterator_delete_block() to remove the block"]
2296#[doc = "   currently referred to by the iterator, or replace it with padding."]
2297#[doc = " - Destroy the iterator with FLAC__metadata_simple_iterator_delete() when"]
2298#[doc = "   finished."]
2299#[doc = ""]
2300#[doc = " \\note"]
2301#[doc = " The FLAC file remains open the whole time between"]
2302#[doc = " FLAC__metadata_simple_iterator_init() and"]
2303#[doc = " FLAC__metadata_simple_iterator_delete(), so make sure you are not altering"]
2304#[doc = " the file during this time."]
2305#[doc = ""]
2306#[doc = " \\note"]
2307#[doc = " Do not modify the \\a is_last, \\a length, or \\a type fields of returned"]
2308#[doc = " FLAC__StreamMetadata objects.  These are managed automatically."]
2309#[doc = ""]
2310#[doc = " \\note"]
2311#[doc = " If any of the modification functions"]
2312#[doc = " (FLAC__metadata_simple_iterator_set_block(),"]
2313#[doc = " FLAC__metadata_simple_iterator_delete_block(),"]
2314#[doc = " FLAC__metadata_simple_iterator_insert_block_after(), etc.) return \\c false,"]
2315#[doc = " you should delete the iterator as it may no longer be valid."]
2316#[doc = ""]
2317#[doc = " \\{"]
2318#[repr(C)]
2319#[derive(Debug, Copy, Clone)]
2320pub struct FLAC__Metadata_SimpleIterator {
2321    _unused: [u8; 0],
2322}
2323pub const FLAC__Metadata_SimpleIteratorStatus_FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK:
2324    FLAC__Metadata_SimpleIteratorStatus = 0;
2325pub const FLAC__Metadata_SimpleIteratorStatus_FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT : FLAC__Metadata_SimpleIteratorStatus = 1 ;
2326pub const FLAC__Metadata_SimpleIteratorStatus_FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ERROR_OPENING_FILE : FLAC__Metadata_SimpleIteratorStatus = 2 ;
2327pub const FLAC__Metadata_SimpleIteratorStatus_FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_A_FLAC_FILE : FLAC__Metadata_SimpleIteratorStatus = 3 ;
2328pub const FLAC__Metadata_SimpleIteratorStatus_FLAC__METADATA_SIMPLE_ITERATOR_STATUS_NOT_WRITABLE:
2329    FLAC__Metadata_SimpleIteratorStatus = 4;
2330pub const FLAC__Metadata_SimpleIteratorStatus_FLAC__METADATA_SIMPLE_ITERATOR_STATUS_BAD_METADATA:
2331    FLAC__Metadata_SimpleIteratorStatus = 5;
2332pub const FLAC__Metadata_SimpleIteratorStatus_FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR:
2333    FLAC__Metadata_SimpleIteratorStatus = 6;
2334pub const FLAC__Metadata_SimpleIteratorStatus_FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR:
2335    FLAC__Metadata_SimpleIteratorStatus = 7;
2336pub const FLAC__Metadata_SimpleIteratorStatus_FLAC__METADATA_SIMPLE_ITERATOR_STATUS_WRITE_ERROR:
2337    FLAC__Metadata_SimpleIteratorStatus = 8;
2338pub const FLAC__Metadata_SimpleIteratorStatus_FLAC__METADATA_SIMPLE_ITERATOR_STATUS_RENAME_ERROR:
2339    FLAC__Metadata_SimpleIteratorStatus = 9;
2340pub const FLAC__Metadata_SimpleIteratorStatus_FLAC__METADATA_SIMPLE_ITERATOR_STATUS_UNLINK_ERROR:
2341    FLAC__Metadata_SimpleIteratorStatus = 10;
2342pub const FLAC__Metadata_SimpleIteratorStatus_FLAC__METADATA_SIMPLE_ITERATOR_STATUS_MEMORY_ALLOCATION_ERROR : FLAC__Metadata_SimpleIteratorStatus = 11 ;
2343pub const FLAC__Metadata_SimpleIteratorStatus_FLAC__METADATA_SIMPLE_ITERATOR_STATUS_INTERNAL_ERROR : FLAC__Metadata_SimpleIteratorStatus = 12 ;
2344#[doc = " Status type for FLAC__Metadata_SimpleIterator."]
2345#[doc = ""]
2346#[doc = "  The iterator\'s current status can be obtained by calling FLAC__metadata_simple_iterator_status()."]
2347pub type FLAC__Metadata_SimpleIteratorStatus = u32;
2348extern "C" {
2349    #[link_name = "\u{1}FLAC__Metadata_SimpleIteratorStatusString"]
2350    pub static mut FLAC__Metadata_SimpleIteratorStatusString:
2351        [*const ::std::os::raw::c_char; 0usize];
2352}
2353extern "C" {
2354    #[doc = " Create a new iterator instance."]
2355    #[doc = ""]
2356    #[doc = " \\retval FLAC__Metadata_SimpleIterator*"]
2357    #[doc = "    \\c NULL if there was an error allocating memory, else the new instance."]
2358    pub fn FLAC__metadata_simple_iterator_new() -> *mut FLAC__Metadata_SimpleIterator;
2359}
2360extern "C" {
2361    #[doc = " Free an iterator instance.  Deletes the object pointed to by \\a iterator."]
2362    #[doc = ""]
2363    #[doc = " \\param iterator  A pointer to an existing iterator."]
2364    #[doc = " \\assert"]
2365    #[doc = "    \\code iterator != NULL \\endcode"]
2366    pub fn FLAC__metadata_simple_iterator_delete(iterator: *mut FLAC__Metadata_SimpleIterator);
2367}
2368extern "C" {
2369    #[doc = " Get the current status of the iterator.  Call this after a function"]
2370    #[doc = "  returns \\c false to get the reason for the error.  Also resets the status"]
2371    #[doc = "  to FLAC__METADATA_SIMPLE_ITERATOR_STATUS_OK."]
2372    #[doc = ""]
2373    #[doc = " \\param iterator  A pointer to an existing iterator."]
2374    #[doc = " \\assert"]
2375    #[doc = "    \\code iterator != NULL \\endcode"]
2376    #[doc = " \\retval FLAC__Metadata_SimpleIteratorStatus"]
2377    #[doc = "    The current status of the iterator."]
2378    pub fn FLAC__metadata_simple_iterator_status(
2379        iterator: *mut FLAC__Metadata_SimpleIterator,
2380    ) -> FLAC__Metadata_SimpleIteratorStatus;
2381}
2382extern "C" {
2383    #[doc = " Initialize the iterator to point to the first metadata block in the"]
2384    #[doc = "  given FLAC file."]
2385    #[doc = ""]
2386    #[doc = " \\param iterator             A pointer to an existing iterator."]
2387    #[doc = " \\param filename             The path to the FLAC file."]
2388    #[doc = " \\param read_only            If \\c true, the FLAC file will be opened"]
2389    #[doc = "                             in read-only mode; if \\c false, the FLAC"]
2390    #[doc = "                             file will be opened for edit even if no"]
2391    #[doc = "                             edits are performed."]
2392    #[doc = " \\param preserve_file_stats  If \\c true, the owner and modification"]
2393    #[doc = "                             time will be preserved even if the FLAC"]
2394    #[doc = "                             file is written to."]
2395    #[doc = " \\assert"]
2396    #[doc = "    \\code iterator != NULL \\endcode"]
2397    #[doc = "    \\code filename != NULL \\endcode"]
2398    #[doc = " \\retval FLAC__bool"]
2399    #[doc = "    \\c false if a memory allocation error occurs, the file can\'t be"]
2400    #[doc = "    opened, or another error occurs, else \\c true."]
2401    pub fn FLAC__metadata_simple_iterator_init(
2402        iterator: *mut FLAC__Metadata_SimpleIterator,
2403        filename: *const ::std::os::raw::c_char,
2404        read_only: FLAC__bool,
2405        preserve_file_stats: FLAC__bool,
2406    ) -> FLAC__bool;
2407}
2408extern "C" {
2409    #[doc = " Returns \\c true if the FLAC file is writable.  If \\c false, calls to"]
2410    #[doc = "  FLAC__metadata_simple_iterator_set_block() and"]
2411    #[doc = "  FLAC__metadata_simple_iterator_insert_block_after() will fail."]
2412    #[doc = ""]
2413    #[doc = " \\param iterator             A pointer to an existing iterator."]
2414    #[doc = " \\assert"]
2415    #[doc = "    \\code iterator != NULL \\endcode"]
2416    #[doc = " \\retval FLAC__bool"]
2417    #[doc = "    See above."]
2418    pub fn FLAC__metadata_simple_iterator_is_writable(
2419        iterator: *const FLAC__Metadata_SimpleIterator,
2420    ) -> FLAC__bool;
2421}
2422extern "C" {
2423    #[doc = " Moves the iterator forward one metadata block, returning \\c false if"]
2424    #[doc = "  already at the end."]
2425    #[doc = ""]
2426    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
2427    #[doc = " \\assert"]
2428    #[doc = "    \\code iterator != NULL \\endcode"]
2429    #[doc = "    \\a iterator has been successfully initialized with"]
2430    #[doc = "    FLAC__metadata_simple_iterator_init()"]
2431    #[doc = " \\retval FLAC__bool"]
2432    #[doc = "    \\c false if already at the last metadata block of the chain, else"]
2433    #[doc = "    \\c true."]
2434    pub fn FLAC__metadata_simple_iterator_next(
2435        iterator: *mut FLAC__Metadata_SimpleIterator,
2436    ) -> FLAC__bool;
2437}
2438extern "C" {
2439    #[doc = " Moves the iterator backward one metadata block, returning \\c false if"]
2440    #[doc = "  already at the beginning."]
2441    #[doc = ""]
2442    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
2443    #[doc = " \\assert"]
2444    #[doc = "    \\code iterator != NULL \\endcode"]
2445    #[doc = "    \\a iterator has been successfully initialized with"]
2446    #[doc = "    FLAC__metadata_simple_iterator_init()"]
2447    #[doc = " \\retval FLAC__bool"]
2448    #[doc = "    \\c false if already at the first metadata block of the chain, else"]
2449    #[doc = "    \\c true."]
2450    pub fn FLAC__metadata_simple_iterator_prev(
2451        iterator: *mut FLAC__Metadata_SimpleIterator,
2452    ) -> FLAC__bool;
2453}
2454extern "C" {
2455    #[doc = " Returns a flag telling if the current metadata block is the last."]
2456    #[doc = ""]
2457    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
2458    #[doc = " \\assert"]
2459    #[doc = "    \\code iterator != NULL \\endcode"]
2460    #[doc = "    \\a iterator has been successfully initialized with"]
2461    #[doc = "    FLAC__metadata_simple_iterator_init()"]
2462    #[doc = " \\retval FLAC__bool"]
2463    #[doc = "    \\c true if the current metadata block is the last in the file,"]
2464    #[doc = "    else \\c false."]
2465    pub fn FLAC__metadata_simple_iterator_is_last(
2466        iterator: *const FLAC__Metadata_SimpleIterator,
2467    ) -> FLAC__bool;
2468}
2469extern "C" {
2470    #[doc = " Get the offset of the metadata block at the current position.  This"]
2471    #[doc = "  avoids reading the actual block data which can save time for large"]
2472    #[doc = "  blocks."]
2473    #[doc = ""]
2474    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
2475    #[doc = " \\assert"]
2476    #[doc = "    \\code iterator != NULL \\endcode"]
2477    #[doc = "    \\a iterator has been successfully initialized with"]
2478    #[doc = "    FLAC__metadata_simple_iterator_init()"]
2479    #[doc = " \\retval off_t"]
2480    #[doc = "    The offset of the metadata block at the current iterator position."]
2481    #[doc = "    This is the byte offset relative to the beginning of the file of"]
2482    #[doc = "    the current metadata block\'s header."]
2483    pub fn FLAC__metadata_simple_iterator_get_block_offset(
2484        iterator: *const FLAC__Metadata_SimpleIterator,
2485    ) -> off_t;
2486}
2487extern "C" {
2488    #[doc = " Get the type of the metadata block at the current position.  This"]
2489    #[doc = "  avoids reading the actual block data which can save time for large"]
2490    #[doc = "  blocks."]
2491    #[doc = ""]
2492    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
2493    #[doc = " \\assert"]
2494    #[doc = "    \\code iterator != NULL \\endcode"]
2495    #[doc = "    \\a iterator has been successfully initialized with"]
2496    #[doc = "    FLAC__metadata_simple_iterator_init()"]
2497    #[doc = " \\retval FLAC__MetadataType"]
2498    #[doc = "    The type of the metadata block at the current iterator position."]
2499    pub fn FLAC__metadata_simple_iterator_get_block_type(
2500        iterator: *const FLAC__Metadata_SimpleIterator,
2501    ) -> FLAC__MetadataType;
2502}
2503extern "C" {
2504    #[doc = " Get the length of the metadata block at the current position.  This"]
2505    #[doc = "  avoids reading the actual block data which can save time for large"]
2506    #[doc = "  blocks."]
2507    #[doc = ""]
2508    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
2509    #[doc = " \\assert"]
2510    #[doc = "    \\code iterator != NULL \\endcode"]
2511    #[doc = "    \\a iterator has been successfully initialized with"]
2512    #[doc = "    FLAC__metadata_simple_iterator_init()"]
2513    #[doc = " \\retval unsigned"]
2514    #[doc = "    The length of the metadata block at the current iterator position."]
2515    #[doc = "    The is same length as that in the"]
2516    #[doc = "    <a href=\"http://xiph.org/flac/format.html#metadata_block_header\">metadata block header</a>,"]
2517    #[doc = "    i.e. the length of the metadata body that follows the header."]
2518    pub fn FLAC__metadata_simple_iterator_get_block_length(
2519        iterator: *const FLAC__Metadata_SimpleIterator,
2520    ) -> ::std::os::raw::c_uint;
2521}
2522extern "C" {
2523    #[doc = " Get the application ID of the \\c APPLICATION block at the current"]
2524    #[doc = "  position.  This avoids reading the actual block data which can save"]
2525    #[doc = "  time for large blocks."]
2526    #[doc = ""]
2527    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
2528    #[doc = " \\param id        A pointer to a buffer of at least \\c 4 bytes where"]
2529    #[doc = "                  the ID will be stored."]
2530    #[doc = " \\assert"]
2531    #[doc = "    \\code iterator != NULL \\endcode"]
2532    #[doc = "    \\code id != NULL \\endcode"]
2533    #[doc = "    \\a iterator has been successfully initialized with"]
2534    #[doc = "    FLAC__metadata_simple_iterator_init()"]
2535    #[doc = " \\retval FLAC__bool"]
2536    #[doc = "    \\c true if the ID was successfully read, else \\c false, in which"]
2537    #[doc = "    case you should check FLAC__metadata_simple_iterator_status() to"]
2538    #[doc = "    find out why.  If the status is"]
2539    #[doc = "    \\c FLAC__METADATA_SIMPLE_ITERATOR_STATUS_ILLEGAL_INPUT, then the"]
2540    #[doc = "    current metadata block is not an \\c APPLICATION block.  Otherwise"]
2541    #[doc = "    if the status is"]
2542    #[doc = "    \\c FLAC__METADATA_SIMPLE_ITERATOR_STATUS_READ_ERROR or"]
2543    #[doc = "    \\c FLAC__METADATA_SIMPLE_ITERATOR_STATUS_SEEK_ERROR, an I/O error"]
2544    #[doc = "    occurred and the iterator can no longer be used."]
2545    pub fn FLAC__metadata_simple_iterator_get_application_id(
2546        iterator: *mut FLAC__Metadata_SimpleIterator,
2547        id: *mut FLAC__byte,
2548    ) -> FLAC__bool;
2549}
2550extern "C" {
2551    #[doc = " Get the metadata block at the current position.  You can modify the"]
2552    #[doc = "  block but must use FLAC__metadata_simple_iterator_set_block() to"]
2553    #[doc = "  write it back to the FLAC file."]
2554    #[doc = ""]
2555    #[doc = "  You must call FLAC__metadata_object_delete() on the returned object"]
2556    #[doc = "  when you are finished with it."]
2557    #[doc = ""]
2558    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
2559    #[doc = " \\assert"]
2560    #[doc = "    \\code iterator != NULL \\endcode"]
2561    #[doc = "    \\a iterator has been successfully initialized with"]
2562    #[doc = "    FLAC__metadata_simple_iterator_init()"]
2563    #[doc = " \\retval FLAC__StreamMetadata*"]
2564    #[doc = "    The current metadata block, or \\c NULL if there was a memory"]
2565    #[doc = "    allocation error."]
2566    pub fn FLAC__metadata_simple_iterator_get_block(
2567        iterator: *mut FLAC__Metadata_SimpleIterator,
2568    ) -> *mut FLAC__StreamMetadata;
2569}
2570extern "C" {
2571    #[doc = " Write a block back to the FLAC file.  This function tries to be"]
2572    #[doc = "  as efficient as possible; how the block is actually written is"]
2573    #[doc = "  shown by the following:"]
2574    #[doc = ""]
2575    #[doc = "  Existing block is a STREAMINFO block and the new block is a"]
2576    #[doc = "  STREAMINFO block: the new block is written in place.  Make sure"]
2577    #[doc = "  you know what you\'re doing when changing the values of a"]
2578    #[doc = "  STREAMINFO block."]
2579    #[doc = ""]
2580    #[doc = "  Existing block is a STREAMINFO block and the new block is a"]
2581    #[doc = "  not a STREAMINFO block: this is an error since the first block"]
2582    #[doc = "  must be a STREAMINFO block.  Returns \\c false without altering the"]
2583    #[doc = "  file."]
2584    #[doc = ""]
2585    #[doc = "  Existing block is not a STREAMINFO block and the new block is a"]
2586    #[doc = "  STREAMINFO block: this is an error since there may be only one"]
2587    #[doc = "  STREAMINFO block.  Returns \\c false without altering the file."]
2588    #[doc = ""]
2589    #[doc = "  Existing block and new block are the same length: the existing"]
2590    #[doc = "  block will be replaced by the new block, written in place."]
2591    #[doc = ""]
2592    #[doc = "  Existing block is longer than new block: if use_padding is \\c true,"]
2593    #[doc = "  the existing block will be overwritten in place with the new"]
2594    #[doc = "  block followed by a PADDING block, if possible, to make the total"]
2595    #[doc = "  size the same as the existing block.  Remember that a padding"]
2596    #[doc = "  block requires at least four bytes so if the difference in size"]
2597    #[doc = "  between the new block and existing block is less than that, the"]
2598    #[doc = "  entire file will have to be rewritten, using the new block\'s"]
2599    #[doc = "  exact size.  If use_padding is \\c false, the entire file will be"]
2600    #[doc = "  rewritten, replacing the existing block by the new block."]
2601    #[doc = ""]
2602    #[doc = "  Existing block is shorter than new block: if use_padding is \\c true,"]
2603    #[doc = "  the function will try and expand the new block into the following"]
2604    #[doc = "  PADDING block, if it exists and doing so won\'t shrink the PADDING"]
2605    #[doc = "  block to less than 4 bytes.  If there is no following PADDING"]
2606    #[doc = "  block, or it will shrink to less than 4 bytes, or use_padding is"]
2607    #[doc = "  \\c false, the entire file is rewritten, replacing the existing block"]
2608    #[doc = "  with the new block.  Note that in this case any following PADDING"]
2609    #[doc = "  block is preserved as is."]
2610    #[doc = ""]
2611    #[doc = "  After writing the block, the iterator will remain in the same"]
2612    #[doc = "  place, i.e. pointing to the new block."]
2613    #[doc = ""]
2614    #[doc = " \\param iterator     A pointer to an existing initialized iterator."]
2615    #[doc = " \\param block        The block to set."]
2616    #[doc = " \\param use_padding  See above."]
2617    #[doc = " \\assert"]
2618    #[doc = "    \\code iterator != NULL \\endcode"]
2619    #[doc = "    \\a iterator has been successfully initialized with"]
2620    #[doc = "    FLAC__metadata_simple_iterator_init()"]
2621    #[doc = "    \\code block != NULL \\endcode"]
2622    #[doc = " \\retval FLAC__bool"]
2623    #[doc = "    \\c true if successful, else \\c false."]
2624    pub fn FLAC__metadata_simple_iterator_set_block(
2625        iterator: *mut FLAC__Metadata_SimpleIterator,
2626        block: *mut FLAC__StreamMetadata,
2627        use_padding: FLAC__bool,
2628    ) -> FLAC__bool;
2629}
2630extern "C" {
2631    #[doc = " This is similar to FLAC__metadata_simple_iterator_set_block()"]
2632    #[doc = "  except that instead of writing over an existing block, it appends"]
2633    #[doc = "  a block after the existing block.  \\a use_padding is again used to"]
2634    #[doc = "  tell the function to try an expand into following padding in an"]
2635    #[doc = "  attempt to avoid rewriting the entire file."]
2636    #[doc = ""]
2637    #[doc = "  This function will fail and return \\c false if given a STREAMINFO"]
2638    #[doc = "  block."]
2639    #[doc = ""]
2640    #[doc = "  After writing the block, the iterator will be pointing to the"]
2641    #[doc = "  new block."]
2642    #[doc = ""]
2643    #[doc = " \\param iterator     A pointer to an existing initialized iterator."]
2644    #[doc = " \\param block        The block to set."]
2645    #[doc = " \\param use_padding  See above."]
2646    #[doc = " \\assert"]
2647    #[doc = "    \\code iterator != NULL \\endcode"]
2648    #[doc = "    \\a iterator has been successfully initialized with"]
2649    #[doc = "    FLAC__metadata_simple_iterator_init()"]
2650    #[doc = "    \\code block != NULL \\endcode"]
2651    #[doc = " \\retval FLAC__bool"]
2652    #[doc = "    \\c true if successful, else \\c false."]
2653    pub fn FLAC__metadata_simple_iterator_insert_block_after(
2654        iterator: *mut FLAC__Metadata_SimpleIterator,
2655        block: *mut FLAC__StreamMetadata,
2656        use_padding: FLAC__bool,
2657    ) -> FLAC__bool;
2658}
2659extern "C" {
2660    #[doc = " Deletes the block at the current position.  This will cause the"]
2661    #[doc = "  entire FLAC file to be rewritten, unless \\a use_padding is \\c true,"]
2662    #[doc = "  in which case the block will be replaced by an equal-sized PADDING"]
2663    #[doc = "  block.  The iterator will be left pointing to the block before the"]
2664    #[doc = "  one just deleted."]
2665    #[doc = ""]
2666    #[doc = "  You may not delete the STREAMINFO block."]
2667    #[doc = ""]
2668    #[doc = " \\param iterator     A pointer to an existing initialized iterator."]
2669    #[doc = " \\param use_padding  See above."]
2670    #[doc = " \\assert"]
2671    #[doc = "    \\code iterator != NULL \\endcode"]
2672    #[doc = "    \\a iterator has been successfully initialized with"]
2673    #[doc = "    FLAC__metadata_simple_iterator_init()"]
2674    #[doc = " \\retval FLAC__bool"]
2675    #[doc = "    \\c true if successful, else \\c false."]
2676    pub fn FLAC__metadata_simple_iterator_delete_block(
2677        iterator: *mut FLAC__Metadata_SimpleIterator,
2678        use_padding: FLAC__bool,
2679    ) -> FLAC__bool;
2680}
2681#[doc = " \\defgroup flac_metadata_level2 FLAC/metadata.h: metadata level 2 interface"]
2682#[doc = "  \\ingroup flac_metadata"]
2683#[doc = ""]
2684#[doc = " \\brief"]
2685#[doc = " The level 2 interface provides read-write access to FLAC file metadata;"]
2686#[doc = " all metadata is read into memory, operated on in memory, and then written"]
2687#[doc = " to file, which is more efficient than level 1 when editing multiple blocks."]
2688#[doc = ""]
2689#[doc = " Currently Ogg FLAC is supported for read only, via"]
2690#[doc = " FLAC__metadata_chain_read_ogg() but a subsequent"]
2691#[doc = " FLAC__metadata_chain_write() will fail."]
2692#[doc = ""]
2693#[doc = " The general usage of this interface is:"]
2694#[doc = ""]
2695#[doc = " - Create a new chain using FLAC__metadata_chain_new().  A chain is a"]
2696#[doc = "   linked list of FLAC metadata blocks."]
2697#[doc = " - Read all metadata into the chain from a FLAC file using"]
2698#[doc = "   FLAC__metadata_chain_read() or FLAC__metadata_chain_read_ogg() and"]
2699#[doc = "   check the status."]
2700#[doc = " - Optionally, consolidate the padding using"]
2701#[doc = "   FLAC__metadata_chain_merge_padding() or"]
2702#[doc = "   FLAC__metadata_chain_sort_padding()."]
2703#[doc = " - Create a new iterator using FLAC__metadata_iterator_new()"]
2704#[doc = " - Initialize the iterator to point to the first element in the chain"]
2705#[doc = "   using FLAC__metadata_iterator_init()"]
2706#[doc = " - Traverse the chain using FLAC__metadata_iterator_next and"]
2707#[doc = "   FLAC__metadata_iterator_prev()."]
2708#[doc = " - Get a block for reading or modification using"]
2709#[doc = "   FLAC__metadata_iterator_get_block().  The pointer to the object"]
2710#[doc = "   inside the chain is returned, so the block is yours to modify."]
2711#[doc = "   Changes will be reflected in the FLAC file when you write the"]
2712#[doc = "   chain.  You can also add and delete blocks (see functions below)."]
2713#[doc = " - When done, write out the chain using FLAC__metadata_chain_write()."]
2714#[doc = "   Make sure to read the whole comment to the function below."]
2715#[doc = " - Delete the chain using FLAC__metadata_chain_delete()."]
2716#[doc = ""]
2717#[doc = " \\note"]
2718#[doc = " Even though the FLAC file is not open while the chain is being"]
2719#[doc = " manipulated, you must not alter the file externally during"]
2720#[doc = " this time.  The chain assumes the FLAC file will not change"]
2721#[doc = " between the time of FLAC__metadata_chain_read()/FLAC__metadata_chain_read_ogg()"]
2722#[doc = " and FLAC__metadata_chain_write()."]
2723#[doc = ""]
2724#[doc = " \\note"]
2725#[doc = " Do not modify the is_last, length, or type fields of returned"]
2726#[doc = " FLAC__StreamMetadata objects.  These are managed automatically."]
2727#[doc = ""]
2728#[doc = " \\note"]
2729#[doc = " The metadata objects returned by FLAC__metadata_iterator_get_block()"]
2730#[doc = " are owned by the chain; do not FLAC__metadata_object_delete() them."]
2731#[doc = " In the same way, blocks passed to FLAC__metadata_iterator_set_block()"]
2732#[doc = " become owned by the chain and they will be deleted when the chain is"]
2733#[doc = " deleted."]
2734#[doc = ""]
2735#[doc = " \\{"]
2736#[repr(C)]
2737#[derive(Debug, Copy, Clone)]
2738pub struct FLAC__Metadata_Chain {
2739    _unused: [u8; 0],
2740}
2741#[repr(C)]
2742#[derive(Debug, Copy, Clone)]
2743pub struct FLAC__Metadata_Iterator {
2744    _unused: [u8; 0],
2745}
2746pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_OK: FLAC__Metadata_ChainStatus = 0;
2747pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_ILLEGAL_INPUT:
2748    FLAC__Metadata_ChainStatus = 1;
2749pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_ERROR_OPENING_FILE:
2750    FLAC__Metadata_ChainStatus = 2;
2751pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_NOT_A_FLAC_FILE:
2752    FLAC__Metadata_ChainStatus = 3;
2753pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_NOT_WRITABLE:
2754    FLAC__Metadata_ChainStatus = 4;
2755pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_BAD_METADATA:
2756    FLAC__Metadata_ChainStatus = 5;
2757pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_READ_ERROR:
2758    FLAC__Metadata_ChainStatus = 6;
2759pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_SEEK_ERROR:
2760    FLAC__Metadata_ChainStatus = 7;
2761pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_WRITE_ERROR:
2762    FLAC__Metadata_ChainStatus = 8;
2763pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_RENAME_ERROR:
2764    FLAC__Metadata_ChainStatus = 9;
2765pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_UNLINK_ERROR:
2766    FLAC__Metadata_ChainStatus = 10;
2767pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_MEMORY_ALLOCATION_ERROR:
2768    FLAC__Metadata_ChainStatus = 11;
2769pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_INTERNAL_ERROR:
2770    FLAC__Metadata_ChainStatus = 12;
2771pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_INVALID_CALLBACKS:
2772    FLAC__Metadata_ChainStatus = 13;
2773pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_READ_WRITE_MISMATCH:
2774    FLAC__Metadata_ChainStatus = 14;
2775pub const FLAC__Metadata_ChainStatus_FLAC__METADATA_CHAIN_STATUS_WRONG_WRITE_CALL:
2776    FLAC__Metadata_ChainStatus = 15;
2777pub type FLAC__Metadata_ChainStatus = u32;
2778extern "C" {
2779    #[link_name = "\u{1}FLAC__Metadata_ChainStatusString"]
2780    pub static mut FLAC__Metadata_ChainStatusString: [*const ::std::os::raw::c_char; 0usize];
2781}
2782extern "C" {
2783    #[doc = " Create a new chain instance."]
2784    #[doc = ""]
2785    #[doc = " \\retval FLAC__Metadata_Chain*"]
2786    #[doc = "    \\c NULL if there was an error allocating memory, else the new instance."]
2787    pub fn FLAC__metadata_chain_new() -> *mut FLAC__Metadata_Chain;
2788}
2789extern "C" {
2790    #[doc = " Free a chain instance.  Deletes the object pointed to by \\a chain."]
2791    #[doc = ""]
2792    #[doc = " \\param chain  A pointer to an existing chain."]
2793    #[doc = " \\assert"]
2794    #[doc = "    \\code chain != NULL \\endcode"]
2795    pub fn FLAC__metadata_chain_delete(chain: *mut FLAC__Metadata_Chain);
2796}
2797extern "C" {
2798    #[doc = " Get the current status of the chain.  Call this after a function"]
2799    #[doc = "  returns \\c false to get the reason for the error.  Also resets the"]
2800    #[doc = "  status to FLAC__METADATA_CHAIN_STATUS_OK."]
2801    #[doc = ""]
2802    #[doc = " \\param chain    A pointer to an existing chain."]
2803    #[doc = " \\assert"]
2804    #[doc = "    \\code chain != NULL \\endcode"]
2805    #[doc = " \\retval FLAC__Metadata_ChainStatus"]
2806    #[doc = "    The current status of the chain."]
2807    pub fn FLAC__metadata_chain_status(
2808        chain: *mut FLAC__Metadata_Chain,
2809    ) -> FLAC__Metadata_ChainStatus;
2810}
2811extern "C" {
2812    #[doc = " Read all metadata from a FLAC file into the chain."]
2813    #[doc = ""]
2814    #[doc = " \\param chain    A pointer to an existing chain."]
2815    #[doc = " \\param filename The path to the FLAC file to read."]
2816    #[doc = " \\assert"]
2817    #[doc = "    \\code chain != NULL \\endcode"]
2818    #[doc = "    \\code filename != NULL \\endcode"]
2819    #[doc = " \\retval FLAC__bool"]
2820    #[doc = "    \\c true if a valid list of metadata blocks was read from"]
2821    #[doc = "    \\a filename, else \\c false.  On failure, check the status with"]
2822    #[doc = "    FLAC__metadata_chain_status()."]
2823    pub fn FLAC__metadata_chain_read(
2824        chain: *mut FLAC__Metadata_Chain,
2825        filename: *const ::std::os::raw::c_char,
2826    ) -> FLAC__bool;
2827}
2828extern "C" {
2829    #[doc = " Read all metadata from an Ogg FLAC file into the chain."]
2830    #[doc = ""]
2831    #[doc = " \\note Ogg FLAC metadata data writing is not supported yet and"]
2832    #[doc = " FLAC__metadata_chain_write() will fail."]
2833    #[doc = ""]
2834    #[doc = " \\param chain    A pointer to an existing chain."]
2835    #[doc = " \\param filename The path to the Ogg FLAC file to read."]
2836    #[doc = " \\assert"]
2837    #[doc = "    \\code chain != NULL \\endcode"]
2838    #[doc = "    \\code filename != NULL \\endcode"]
2839    #[doc = " \\retval FLAC__bool"]
2840    #[doc = "    \\c true if a valid list of metadata blocks was read from"]
2841    #[doc = "    \\a filename, else \\c false.  On failure, check the status with"]
2842    #[doc = "    FLAC__metadata_chain_status()."]
2843    pub fn FLAC__metadata_chain_read_ogg(
2844        chain: *mut FLAC__Metadata_Chain,
2845        filename: *const ::std::os::raw::c_char,
2846    ) -> FLAC__bool;
2847}
2848extern "C" {
2849    #[doc = " Read all metadata from a FLAC stream into the chain via I/O callbacks."]
2850    #[doc = ""]
2851    #[doc = "  The \\a handle need only be open for reading, but must be seekable."]
2852    #[doc = "  The equivalent minimum stdio fopen() file mode is \\c \"r\" (or \\c \"rb\""]
2853    #[doc = "  for Windows)."]
2854    #[doc = ""]
2855    #[doc = " \\param chain    A pointer to an existing chain."]
2856    #[doc = " \\param handle   The I/O handle of the FLAC stream to read.  The"]
2857    #[doc = "                 handle will NOT be closed after the metadata is read;"]
2858    #[doc = "                 that is the duty of the caller."]
2859    #[doc = " \\param callbacks"]
2860    #[doc = "                 A set of callbacks to use for I/O.  The mandatory"]
2861    #[doc = "                 callbacks are \\a read, \\a seek, and \\a tell."]
2862    #[doc = " \\assert"]
2863    #[doc = "    \\code chain != NULL \\endcode"]
2864    #[doc = " \\retval FLAC__bool"]
2865    #[doc = "    \\c true if a valid list of metadata blocks was read from"]
2866    #[doc = "    \\a handle, else \\c false.  On failure, check the status with"]
2867    #[doc = "    FLAC__metadata_chain_status()."]
2868    pub fn FLAC__metadata_chain_read_with_callbacks(
2869        chain: *mut FLAC__Metadata_Chain,
2870        handle: FLAC__IOHandle,
2871        callbacks: FLAC__IOCallbacks,
2872    ) -> FLAC__bool;
2873}
2874extern "C" {
2875    #[doc = " Read all metadata from an Ogg FLAC stream into the chain via I/O callbacks."]
2876    #[doc = ""]
2877    #[doc = "  The \\a handle need only be open for reading, but must be seekable."]
2878    #[doc = "  The equivalent minimum stdio fopen() file mode is \\c \"r\" (or \\c \"rb\""]
2879    #[doc = "  for Windows)."]
2880    #[doc = ""]
2881    #[doc = " \\note Ogg FLAC metadata data writing is not supported yet and"]
2882    #[doc = " FLAC__metadata_chain_write() will fail."]
2883    #[doc = ""]
2884    #[doc = " \\param chain    A pointer to an existing chain."]
2885    #[doc = " \\param handle   The I/O handle of the Ogg FLAC stream to read.  The"]
2886    #[doc = "                 handle will NOT be closed after the metadata is read;"]
2887    #[doc = "                 that is the duty of the caller."]
2888    #[doc = " \\param callbacks"]
2889    #[doc = "                 A set of callbacks to use for I/O.  The mandatory"]
2890    #[doc = "                 callbacks are \\a read, \\a seek, and \\a tell."]
2891    #[doc = " \\assert"]
2892    #[doc = "    \\code chain != NULL \\endcode"]
2893    #[doc = " \\retval FLAC__bool"]
2894    #[doc = "    \\c true if a valid list of metadata blocks was read from"]
2895    #[doc = "    \\a handle, else \\c false.  On failure, check the status with"]
2896    #[doc = "    FLAC__metadata_chain_status()."]
2897    pub fn FLAC__metadata_chain_read_ogg_with_callbacks(
2898        chain: *mut FLAC__Metadata_Chain,
2899        handle: FLAC__IOHandle,
2900        callbacks: FLAC__IOCallbacks,
2901    ) -> FLAC__bool;
2902}
2903extern "C" {
2904    #[doc = " Checks if writing the given chain would require the use of a"]
2905    #[doc = "  temporary file, or if it could be written in place."]
2906    #[doc = ""]
2907    #[doc = "  Under certain conditions, padding can be utilized so that writing"]
2908    #[doc = "  edited metadata back to the FLAC file does not require rewriting the"]
2909    #[doc = "  entire file.  If rewriting is required, then a temporary workfile is"]
2910    #[doc = "  required.  When writing metadata using callbacks, you must check"]
2911    #[doc = "  this function to know whether to call"]
2912    #[doc = "  FLAC__metadata_chain_write_with_callbacks() or"]
2913    #[doc = "  FLAC__metadata_chain_write_with_callbacks_and_tempfile().  When"]
2914    #[doc = "  writing with FLAC__metadata_chain_write(), the temporary file is"]
2915    #[doc = "  handled internally."]
2916    #[doc = ""]
2917    #[doc = " \\param chain    A pointer to an existing chain."]
2918    #[doc = " \\param use_padding"]
2919    #[doc = "                 Whether or not padding will be allowed to be used"]
2920    #[doc = "                 during the write.  The value of \\a use_padding given"]
2921    #[doc = "                 here must match the value later passed to"]
2922    #[doc = "                 FLAC__metadata_chain_write_with_callbacks() or"]
2923    #[doc = "                 FLAC__metadata_chain_write_with_callbacks_with_tempfile()."]
2924    #[doc = " \\assert"]
2925    #[doc = "    \\code chain != NULL \\endcode"]
2926    #[doc = " \\retval FLAC__bool"]
2927    #[doc = "    \\c true if writing the current chain would require a tempfile, or"]
2928    #[doc = "    \\c false if metadata can be written in place."]
2929    pub fn FLAC__metadata_chain_check_if_tempfile_needed(
2930        chain: *mut FLAC__Metadata_Chain,
2931        use_padding: FLAC__bool,
2932    ) -> FLAC__bool;
2933}
2934extern "C" {
2935    #[doc = " Write all metadata out to the FLAC file.  This function tries to be as"]
2936    #[doc = "  efficient as possible; how the metadata is actually written is shown by"]
2937    #[doc = "  the following:"]
2938    #[doc = ""]
2939    #[doc = "  If the current chain is the same size as the existing metadata, the new"]
2940    #[doc = "  data is written in place."]
2941    #[doc = ""]
2942    #[doc = "  If the current chain is longer than the existing metadata, and"]
2943    #[doc = "  \\a use_padding is \\c true, and the last block is a PADDING block of"]
2944    #[doc = "  sufficient length, the function will truncate the final padding block"]
2945    #[doc = "  so that the overall size of the metadata is the same as the existing"]
2946    #[doc = "  metadata, and then just rewrite the metadata.  Otherwise, if not all of"]
2947    #[doc = "  the above conditions are met, the entire FLAC file must be rewritten."]
2948    #[doc = "  If you want to use padding this way it is a good idea to call"]
2949    #[doc = "  FLAC__metadata_chain_sort_padding() first so that you have the maximum"]
2950    #[doc = "  amount of padding to work with, unless you need to preserve ordering"]
2951    #[doc = "  of the PADDING blocks for some reason."]
2952    #[doc = ""]
2953    #[doc = "  If the current chain is shorter than the existing metadata, and"]
2954    #[doc = "  \\a use_padding is \\c true, and the final block is a PADDING block, the padding"]
2955    #[doc = "  is extended to make the overall size the same as the existing data.  If"]
2956    #[doc = "  \\a use_padding is \\c true and the last block is not a PADDING block, a new"]
2957    #[doc = "  PADDING block is added to the end of the new data to make it the same"]
2958    #[doc = "  size as the existing data (if possible, see the note to"]
2959    #[doc = "  FLAC__metadata_simple_iterator_set_block() about the four byte limit)"]
2960    #[doc = "  and the new data is written in place.  If none of the above apply or"]
2961    #[doc = "  \\a use_padding is \\c false, the entire FLAC file is rewritten."]
2962    #[doc = ""]
2963    #[doc = "  If \\a preserve_file_stats is \\c true, the owner and modification time will"]
2964    #[doc = "  be preserved even if the FLAC file is written."]
2965    #[doc = ""]
2966    #[doc = "  For this write function to be used, the chain must have been read with"]
2967    #[doc = "  FLAC__metadata_chain_read()/FLAC__metadata_chain_read_ogg(), not"]
2968    #[doc = "  FLAC__metadata_chain_read_with_callbacks()/FLAC__metadata_chain_read_ogg_with_callbacks()."]
2969    #[doc = ""]
2970    #[doc = " \\param chain               A pointer to an existing chain."]
2971    #[doc = " \\param use_padding         See above."]
2972    #[doc = " \\param preserve_file_stats See above."]
2973    #[doc = " \\assert"]
2974    #[doc = "    \\code chain != NULL \\endcode"]
2975    #[doc = " \\retval FLAC__bool"]
2976    #[doc = "    \\c true if the write succeeded, else \\c false.  On failure,"]
2977    #[doc = "    check the status with FLAC__metadata_chain_status()."]
2978    pub fn FLAC__metadata_chain_write(
2979        chain: *mut FLAC__Metadata_Chain,
2980        use_padding: FLAC__bool,
2981        preserve_file_stats: FLAC__bool,
2982    ) -> FLAC__bool;
2983}
2984extern "C" {
2985    #[doc = " Write all metadata out to a FLAC stream via callbacks."]
2986    #[doc = ""]
2987    #[doc = "  (See FLAC__metadata_chain_write() for the details on how padding is"]
2988    #[doc = "  used to write metadata in place if possible.)"]
2989    #[doc = ""]
2990    #[doc = "  The \\a handle must be open for updating and be seekable.  The"]
2991    #[doc = "  equivalent minimum stdio fopen() file mode is \\c \"r+\" (or \\c \"r+b\""]
2992    #[doc = "  for Windows)."]
2993    #[doc = ""]
2994    #[doc = "  For this write function to be used, the chain must have been read with"]
2995    #[doc = "  FLAC__metadata_chain_read_with_callbacks()/FLAC__metadata_chain_read_ogg_with_callbacks(),"]
2996    #[doc = "  not FLAC__metadata_chain_read()/FLAC__metadata_chain_read_ogg()."]
2997    #[doc = "  Also, FLAC__metadata_chain_check_if_tempfile_needed() must have returned"]
2998    #[doc = "  \\c false."]
2999    #[doc = ""]
3000    #[doc = " \\param chain        A pointer to an existing chain."]
3001    #[doc = " \\param use_padding  See FLAC__metadata_chain_write()"]
3002    #[doc = " \\param handle       The I/O handle of the FLAC stream to write.  The"]
3003    #[doc = "                     handle will NOT be closed after the metadata is"]
3004    #[doc = "                     written; that is the duty of the caller."]
3005    #[doc = " \\param callbacks    A set of callbacks to use for I/O.  The mandatory"]
3006    #[doc = "                     callbacks are \\a write and \\a seek."]
3007    #[doc = " \\assert"]
3008    #[doc = "    \\code chain != NULL \\endcode"]
3009    #[doc = " \\retval FLAC__bool"]
3010    #[doc = "    \\c true if the write succeeded, else \\c false.  On failure,"]
3011    #[doc = "    check the status with FLAC__metadata_chain_status()."]
3012    pub fn FLAC__metadata_chain_write_with_callbacks(
3013        chain: *mut FLAC__Metadata_Chain,
3014        use_padding: FLAC__bool,
3015        handle: FLAC__IOHandle,
3016        callbacks: FLAC__IOCallbacks,
3017    ) -> FLAC__bool;
3018}
3019extern "C" {
3020    #[doc = " Write all metadata out to a FLAC stream via callbacks."]
3021    #[doc = ""]
3022    #[doc = "  (See FLAC__metadata_chain_write() for the details on how padding is"]
3023    #[doc = "  used to write metadata in place if possible.)"]
3024    #[doc = ""]
3025    #[doc = "  This version of the write-with-callbacks function must be used when"]
3026    #[doc = "  FLAC__metadata_chain_check_if_tempfile_needed() returns true.  In"]
3027    #[doc = "  this function, you must supply an I/O handle corresponding to the"]
3028    #[doc = "  FLAC file to edit, and a temporary handle to which the new FLAC"]
3029    #[doc = "  file will be written.  It is the caller\'s job to move this temporary"]
3030    #[doc = "  FLAC file on top of the original FLAC file to complete the metadata"]
3031    #[doc = "  edit."]
3032    #[doc = ""]
3033    #[doc = "  The \\a handle must be open for reading and be seekable.  The"]
3034    #[doc = "  equivalent minimum stdio fopen() file mode is \\c \"r\" (or \\c \"rb\""]
3035    #[doc = "  for Windows)."]
3036    #[doc = ""]
3037    #[doc = "  The \\a temp_handle must be open for writing.  The"]
3038    #[doc = "  equivalent minimum stdio fopen() file mode is \\c \"w\" (or \\c \"wb\""]
3039    #[doc = "  for Windows).  It should be an empty stream, or at least positioned"]
3040    #[doc = "  at the start-of-file (in which case it is the caller\'s duty to"]
3041    #[doc = "  truncate it on return)."]
3042    #[doc = ""]
3043    #[doc = "  For this write function to be used, the chain must have been read with"]
3044    #[doc = "  FLAC__metadata_chain_read_with_callbacks()/FLAC__metadata_chain_read_ogg_with_callbacks(),"]
3045    #[doc = "  not FLAC__metadata_chain_read()/FLAC__metadata_chain_read_ogg()."]
3046    #[doc = "  Also, FLAC__metadata_chain_check_if_tempfile_needed() must have returned"]
3047    #[doc = "  \\c true."]
3048    #[doc = ""]
3049    #[doc = " \\param chain        A pointer to an existing chain."]
3050    #[doc = " \\param use_padding  See FLAC__metadata_chain_write()"]
3051    #[doc = " \\param handle       The I/O handle of the original FLAC stream to read."]
3052    #[doc = "                     The handle will NOT be closed after the metadata is"]
3053    #[doc = "                     written; that is the duty of the caller."]
3054    #[doc = " \\param callbacks    A set of callbacks to use for I/O on \\a handle."]
3055    #[doc = "                     The mandatory callbacks are \\a read, \\a seek, and"]
3056    #[doc = "                     \\a eof."]
3057    #[doc = " \\param temp_handle  The I/O handle of the FLAC stream to write.  The"]
3058    #[doc = "                     handle will NOT be closed after the metadata is"]
3059    #[doc = "                     written; that is the duty of the caller."]
3060    #[doc = " \\param temp_callbacks"]
3061    #[doc = "                     A set of callbacks to use for I/O on temp_handle."]
3062    #[doc = "                     The only mandatory callback is \\a write."]
3063    #[doc = " \\assert"]
3064    #[doc = "    \\code chain != NULL \\endcode"]
3065    #[doc = " \\retval FLAC__bool"]
3066    #[doc = "    \\c true if the write succeeded, else \\c false.  On failure,"]
3067    #[doc = "    check the status with FLAC__metadata_chain_status()."]
3068    pub fn FLAC__metadata_chain_write_with_callbacks_and_tempfile(
3069        chain: *mut FLAC__Metadata_Chain,
3070        use_padding: FLAC__bool,
3071        handle: FLAC__IOHandle,
3072        callbacks: FLAC__IOCallbacks,
3073        temp_handle: FLAC__IOHandle,
3074        temp_callbacks: FLAC__IOCallbacks,
3075    ) -> FLAC__bool;
3076}
3077extern "C" {
3078    #[doc = " Merge adjacent PADDING blocks into a single block."]
3079    #[doc = ""]
3080    #[doc = " \\note This function does not write to the FLAC file, it only"]
3081    #[doc = " modifies the chain."]
3082    #[doc = ""]
3083    #[doc = " \\warning Any iterator on the current chain will become invalid after this"]
3084    #[doc = " call.  You should delete the iterator and get a new one."]
3085    #[doc = ""]
3086    #[doc = " \\param chain               A pointer to an existing chain."]
3087    #[doc = " \\assert"]
3088    #[doc = "    \\code chain != NULL \\endcode"]
3089    pub fn FLAC__metadata_chain_merge_padding(chain: *mut FLAC__Metadata_Chain);
3090}
3091extern "C" {
3092    #[doc = " This function will move all PADDING blocks to the end on the metadata,"]
3093    #[doc = "  then merge them into a single block."]
3094    #[doc = ""]
3095    #[doc = " \\note This function does not write to the FLAC file, it only"]
3096    #[doc = " modifies the chain."]
3097    #[doc = ""]
3098    #[doc = " \\warning Any iterator on the current chain will become invalid after this"]
3099    #[doc = " call.  You should delete the iterator and get a new one."]
3100    #[doc = ""]
3101    #[doc = " \\param chain  A pointer to an existing chain."]
3102    #[doc = " \\assert"]
3103    #[doc = "    \\code chain != NULL \\endcode"]
3104    pub fn FLAC__metadata_chain_sort_padding(chain: *mut FLAC__Metadata_Chain);
3105}
3106extern "C" {
3107    #[doc = " Create a new iterator instance."]
3108    #[doc = ""]
3109    #[doc = " \\retval FLAC__Metadata_Iterator*"]
3110    #[doc = "    \\c NULL if there was an error allocating memory, else the new instance."]
3111    pub fn FLAC__metadata_iterator_new() -> *mut FLAC__Metadata_Iterator;
3112}
3113extern "C" {
3114    #[doc = " Free an iterator instance.  Deletes the object pointed to by \\a iterator."]
3115    #[doc = ""]
3116    #[doc = " \\param iterator  A pointer to an existing iterator."]
3117    #[doc = " \\assert"]
3118    #[doc = "    \\code iterator != NULL \\endcode"]
3119    pub fn FLAC__metadata_iterator_delete(iterator: *mut FLAC__Metadata_Iterator);
3120}
3121extern "C" {
3122    #[doc = " Initialize the iterator to point to the first metadata block in the"]
3123    #[doc = "  given chain."]
3124    #[doc = ""]
3125    #[doc = " \\param iterator  A pointer to an existing iterator."]
3126    #[doc = " \\param chain     A pointer to an existing and initialized (read) chain."]
3127    #[doc = " \\assert"]
3128    #[doc = "    \\code iterator != NULL \\endcode"]
3129    #[doc = "    \\code chain != NULL \\endcode"]
3130    pub fn FLAC__metadata_iterator_init(
3131        iterator: *mut FLAC__Metadata_Iterator,
3132        chain: *mut FLAC__Metadata_Chain,
3133    );
3134}
3135extern "C" {
3136    #[doc = " Moves the iterator forward one metadata block, returning \\c false if"]
3137    #[doc = "  already at the end."]
3138    #[doc = ""]
3139    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
3140    #[doc = " \\assert"]
3141    #[doc = "    \\code iterator != NULL \\endcode"]
3142    #[doc = "    \\a iterator has been successfully initialized with"]
3143    #[doc = "    FLAC__metadata_iterator_init()"]
3144    #[doc = " \\retval FLAC__bool"]
3145    #[doc = "    \\c false if already at the last metadata block of the chain, else"]
3146    #[doc = "    \\c true."]
3147    pub fn FLAC__metadata_iterator_next(iterator: *mut FLAC__Metadata_Iterator) -> FLAC__bool;
3148}
3149extern "C" {
3150    #[doc = " Moves the iterator backward one metadata block, returning \\c false if"]
3151    #[doc = "  already at the beginning."]
3152    #[doc = ""]
3153    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
3154    #[doc = " \\assert"]
3155    #[doc = "    \\code iterator != NULL \\endcode"]
3156    #[doc = "    \\a iterator has been successfully initialized with"]
3157    #[doc = "    FLAC__metadata_iterator_init()"]
3158    #[doc = " \\retval FLAC__bool"]
3159    #[doc = "    \\c false if already at the first metadata block of the chain, else"]
3160    #[doc = "    \\c true."]
3161    pub fn FLAC__metadata_iterator_prev(iterator: *mut FLAC__Metadata_Iterator) -> FLAC__bool;
3162}
3163extern "C" {
3164    #[doc = " Get the type of the metadata block at the current position."]
3165    #[doc = ""]
3166    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
3167    #[doc = " \\assert"]
3168    #[doc = "    \\code iterator != NULL \\endcode"]
3169    #[doc = "    \\a iterator has been successfully initialized with"]
3170    #[doc = "    FLAC__metadata_iterator_init()"]
3171    #[doc = " \\retval FLAC__MetadataType"]
3172    #[doc = "    The type of the metadata block at the current iterator position."]
3173    pub fn FLAC__metadata_iterator_get_block_type(
3174        iterator: *const FLAC__Metadata_Iterator,
3175    ) -> FLAC__MetadataType;
3176}
3177extern "C" {
3178    #[doc = " Get the metadata block at the current position.  You can modify"]
3179    #[doc = "  the block in place but must write the chain before the changes"]
3180    #[doc = "  are reflected to the FLAC file.  You do not need to call"]
3181    #[doc = "  FLAC__metadata_iterator_set_block() to reflect the changes;"]
3182    #[doc = "  the pointer returned by FLAC__metadata_iterator_get_block()"]
3183    #[doc = "  points directly into the chain."]
3184    #[doc = ""]
3185    #[doc = " \\warning"]
3186    #[doc = " Do not call FLAC__metadata_object_delete() on the returned object;"]
3187    #[doc = " to delete a block use FLAC__metadata_iterator_delete_block()."]
3188    #[doc = ""]
3189    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
3190    #[doc = " \\assert"]
3191    #[doc = "    \\code iterator != NULL \\endcode"]
3192    #[doc = "    \\a iterator has been successfully initialized with"]
3193    #[doc = "    FLAC__metadata_iterator_init()"]
3194    #[doc = " \\retval FLAC__StreamMetadata*"]
3195    #[doc = "    The current metadata block."]
3196    pub fn FLAC__metadata_iterator_get_block(
3197        iterator: *mut FLAC__Metadata_Iterator,
3198    ) -> *mut FLAC__StreamMetadata;
3199}
3200extern "C" {
3201    #[doc = " Set the metadata block at the current position, replacing the existing"]
3202    #[doc = "  block.  The new block passed in becomes owned by the chain and it will be"]
3203    #[doc = "  deleted when the chain is deleted."]
3204    #[doc = ""]
3205    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
3206    #[doc = " \\param block     A pointer to a metadata block."]
3207    #[doc = " \\assert"]
3208    #[doc = "    \\code iterator != NULL \\endcode"]
3209    #[doc = "    \\a iterator has been successfully initialized with"]
3210    #[doc = "    FLAC__metadata_iterator_init()"]
3211    #[doc = "    \\code block != NULL \\endcode"]
3212    #[doc = " \\retval FLAC__bool"]
3213    #[doc = "    \\c false if the conditions in the above description are not met, or"]
3214    #[doc = "    a memory allocation error occurs, otherwise \\c true."]
3215    pub fn FLAC__metadata_iterator_set_block(
3216        iterator: *mut FLAC__Metadata_Iterator,
3217        block: *mut FLAC__StreamMetadata,
3218    ) -> FLAC__bool;
3219}
3220extern "C" {
3221    #[doc = " Removes the current block from the chain.  If \\a replace_with_padding is"]
3222    #[doc = "  \\c true, the block will instead be replaced with a padding block of equal"]
3223    #[doc = "  size.  You can not delete the STREAMINFO block.  The iterator will be"]
3224    #[doc = "  left pointing to the block before the one just \"deleted\", even if"]
3225    #[doc = "  \\a replace_with_padding is \\c true."]
3226    #[doc = ""]
3227    #[doc = " \\param iterator              A pointer to an existing initialized iterator."]
3228    #[doc = " \\param replace_with_padding  See above."]
3229    #[doc = " \\assert"]
3230    #[doc = "    \\code iterator != NULL \\endcode"]
3231    #[doc = "    \\a iterator has been successfully initialized with"]
3232    #[doc = "    FLAC__metadata_iterator_init()"]
3233    #[doc = " \\retval FLAC__bool"]
3234    #[doc = "    \\c false if the conditions in the above description are not met,"]
3235    #[doc = "    otherwise \\c true."]
3236    pub fn FLAC__metadata_iterator_delete_block(
3237        iterator: *mut FLAC__Metadata_Iterator,
3238        replace_with_padding: FLAC__bool,
3239    ) -> FLAC__bool;
3240}
3241extern "C" {
3242    #[doc = " Insert a new block before the current block.  You cannot insert a block"]
3243    #[doc = "  before the first STREAMINFO block.  You cannot insert a STREAMINFO block"]
3244    #[doc = "  as there can be only one, the one that already exists at the head when you"]
3245    #[doc = "  read in a chain.  The chain takes ownership of the new block and it will be"]
3246    #[doc = "  deleted when the chain is deleted.  The iterator will be left pointing to"]
3247    #[doc = "  the new block."]
3248    #[doc = ""]
3249    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
3250    #[doc = " \\param block     A pointer to a metadata block to insert."]
3251    #[doc = " \\assert"]
3252    #[doc = "    \\code iterator != NULL \\endcode"]
3253    #[doc = "    \\a iterator has been successfully initialized with"]
3254    #[doc = "    FLAC__metadata_iterator_init()"]
3255    #[doc = " \\retval FLAC__bool"]
3256    #[doc = "    \\c false if the conditions in the above description are not met, or"]
3257    #[doc = "    a memory allocation error occurs, otherwise \\c true."]
3258    pub fn FLAC__metadata_iterator_insert_block_before(
3259        iterator: *mut FLAC__Metadata_Iterator,
3260        block: *mut FLAC__StreamMetadata,
3261    ) -> FLAC__bool;
3262}
3263extern "C" {
3264    #[doc = " Insert a new block after the current block.  You cannot insert a STREAMINFO"]
3265    #[doc = "  block as there can be only one, the one that already exists at the head when"]
3266    #[doc = "  you read in a chain.  The chain takes ownership of the new block and it will"]
3267    #[doc = "  be deleted when the chain is deleted.  The iterator will be left pointing to"]
3268    #[doc = "  the new block."]
3269    #[doc = ""]
3270    #[doc = " \\param iterator  A pointer to an existing initialized iterator."]
3271    #[doc = " \\param block     A pointer to a metadata block to insert."]
3272    #[doc = " \\assert"]
3273    #[doc = "    \\code iterator != NULL \\endcode"]
3274    #[doc = "    \\a iterator has been successfully initialized with"]
3275    #[doc = "    FLAC__metadata_iterator_init()"]
3276    #[doc = " \\retval FLAC__bool"]
3277    #[doc = "    \\c false if the conditions in the above description are not met, or"]
3278    #[doc = "    a memory allocation error occurs, otherwise \\c true."]
3279    pub fn FLAC__metadata_iterator_insert_block_after(
3280        iterator: *mut FLAC__Metadata_Iterator,
3281        block: *mut FLAC__StreamMetadata,
3282    ) -> FLAC__bool;
3283}
3284extern "C" {
3285    #[doc = " Create a new metadata object instance of the given type."]
3286    #[doc = ""]
3287    #[doc = "  The object will be \"empty\"; i.e. values and data pointers will be \\c 0,"]
3288    #[doc = "  with the exception of FLAC__METADATA_TYPE_VORBIS_COMMENT, which will have"]
3289    #[doc = "  the vendor string set (but zero comments)."]
3290    #[doc = ""]
3291    #[doc = "  Do not pass in a value greater than or equal to"]
3292    #[doc = "  \\a FLAC__METADATA_TYPE_UNDEFINED unless you really know what you\'re"]
3293    #[doc = "  doing."]
3294    #[doc = ""]
3295    #[doc = " \\param type  Type of object to create"]
3296    #[doc = " \\retval FLAC__StreamMetadata*"]
3297    #[doc = "    \\c NULL if there was an error allocating memory or the type code is"]
3298    #[doc = "    greater than FLAC__MAX_METADATA_TYPE_CODE, else the new instance."]
3299    pub fn FLAC__metadata_object_new(type_: FLAC__MetadataType) -> *mut FLAC__StreamMetadata;
3300}
3301extern "C" {
3302    #[doc = " Create a copy of an existing metadata object."]
3303    #[doc = ""]
3304    #[doc = "  The copy is a \"deep\" copy, i.e. dynamically allocated data within the"]
3305    #[doc = "  object is also copied.  The caller takes ownership of the new block and"]
3306    #[doc = "  is responsible for freeing it with FLAC__metadata_object_delete()."]
3307    #[doc = ""]
3308    #[doc = " \\param object  Pointer to object to copy."]
3309    #[doc = " \\assert"]
3310    #[doc = "    \\code object != NULL \\endcode"]
3311    #[doc = " \\retval FLAC__StreamMetadata*"]
3312    #[doc = "    \\c NULL if there was an error allocating memory, else the new instance."]
3313    pub fn FLAC__metadata_object_clone(
3314        object: *const FLAC__StreamMetadata,
3315    ) -> *mut FLAC__StreamMetadata;
3316}
3317extern "C" {
3318    #[doc = " Free a metadata object.  Deletes the object pointed to by \\a object."]
3319    #[doc = ""]
3320    #[doc = "  The delete is a \"deep\" delete, i.e. dynamically allocated data within the"]
3321    #[doc = "  object is also deleted."]
3322    #[doc = ""]
3323    #[doc = " \\param object  A pointer to an existing object."]
3324    #[doc = " \\assert"]
3325    #[doc = "    \\code object != NULL \\endcode"]
3326    pub fn FLAC__metadata_object_delete(object: *mut FLAC__StreamMetadata);
3327}
3328extern "C" {
3329    #[doc = " Compares two metadata objects."]
3330    #[doc = ""]
3331    #[doc = "  The compare is \"deep\", i.e. dynamically allocated data within the"]
3332    #[doc = "  object is also compared."]
3333    #[doc = ""]
3334    #[doc = " \\param block1  A pointer to an existing object."]
3335    #[doc = " \\param block2  A pointer to an existing object."]
3336    #[doc = " \\assert"]
3337    #[doc = "    \\code block1 != NULL \\endcode"]
3338    #[doc = "    \\code block2 != NULL \\endcode"]
3339    #[doc = " \\retval FLAC__bool"]
3340    #[doc = "    \\c true if objects are identical, else \\c false."]
3341    pub fn FLAC__metadata_object_is_equal(
3342        block1: *const FLAC__StreamMetadata,
3343        block2: *const FLAC__StreamMetadata,
3344    ) -> FLAC__bool;
3345}
3346extern "C" {
3347    #[doc = " Sets the application data of an APPLICATION block."]
3348    #[doc = ""]
3349    #[doc = "  If \\a copy is \\c true, a copy of the data is stored; otherwise, the object"]
3350    #[doc = "  takes ownership of the pointer.  The existing data will be freed if this"]
3351    #[doc = "  function is successful, otherwise the original data will remain if \\a copy"]
3352    #[doc = "  is \\c true and malloc() fails."]
3353    #[doc = ""]
3354    #[doc = " \\note It is safe to pass a const pointer to \\a data if \\a copy is \\c true."]
3355    #[doc = ""]
3356    #[doc = " \\param object  A pointer to an existing APPLICATION object."]
3357    #[doc = " \\param data    A pointer to the data to set."]
3358    #[doc = " \\param length  The length of \\a data in bytes."]
3359    #[doc = " \\param copy    See above."]
3360    #[doc = " \\assert"]
3361    #[doc = "    \\code object != NULL \\endcode"]
3362    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_APPLICATION \\endcode"]
3363    #[doc = "    \\code (data != NULL && length > 0) ||"]
3364    #[doc = " (data == NULL && length == 0 && copy == false) \\endcode"]
3365    #[doc = " \\retval FLAC__bool"]
3366    #[doc = "    \\c false if \\a copy is \\c true and malloc() fails, else \\c true."]
3367    pub fn FLAC__metadata_object_application_set_data(
3368        object: *mut FLAC__StreamMetadata,
3369        data: *mut FLAC__byte,
3370        length: ::std::os::raw::c_uint,
3371        copy: FLAC__bool,
3372    ) -> FLAC__bool;
3373}
3374extern "C" {
3375    #[doc = " Resize the seekpoint array."]
3376    #[doc = ""]
3377    #[doc = "  If the size shrinks, elements will truncated; if it grows, new placeholder"]
3378    #[doc = "  points will be added to the end."]
3379    #[doc = ""]
3380    #[doc = " \\param object          A pointer to an existing SEEKTABLE object."]
3381    #[doc = " \\param new_num_points  The desired length of the array; may be \\c 0."]
3382    #[doc = " \\assert"]
3383    #[doc = "    \\code object != NULL \\endcode"]
3384    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_SEEKTABLE \\endcode"]
3385    #[doc = "    \\code (object->data.seek_table.points == NULL && object->data.seek_table.num_points == 0) ||"]
3386    #[doc = " (object->data.seek_table.points != NULL && object->data.seek_table.num_points > 0) \\endcode"]
3387    #[doc = " \\retval FLAC__bool"]
3388    #[doc = "    \\c false if memory allocation error, else \\c true."]
3389    pub fn FLAC__metadata_object_seektable_resize_points(
3390        object: *mut FLAC__StreamMetadata,
3391        new_num_points: ::std::os::raw::c_uint,
3392    ) -> FLAC__bool;
3393}
3394extern "C" {
3395    #[doc = " Set a seekpoint in a seektable."]
3396    #[doc = ""]
3397    #[doc = " \\param object     A pointer to an existing SEEKTABLE object."]
3398    #[doc = " \\param point_num  Index into seekpoint array to set."]
3399    #[doc = " \\param point      The point to set."]
3400    #[doc = " \\assert"]
3401    #[doc = "    \\code object != NULL \\endcode"]
3402    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_SEEKTABLE \\endcode"]
3403    #[doc = "    \\code object->data.seek_table.num_points > point_num \\endcode"]
3404    pub fn FLAC__metadata_object_seektable_set_point(
3405        object: *mut FLAC__StreamMetadata,
3406        point_num: ::std::os::raw::c_uint,
3407        point: FLAC__StreamMetadata_SeekPoint,
3408    );
3409}
3410extern "C" {
3411    #[doc = " Insert a seekpoint into a seektable."]
3412    #[doc = ""]
3413    #[doc = " \\param object     A pointer to an existing SEEKTABLE object."]
3414    #[doc = " \\param point_num  Index into seekpoint array to set."]
3415    #[doc = " \\param point      The point to set."]
3416    #[doc = " \\assert"]
3417    #[doc = "    \\code object != NULL \\endcode"]
3418    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_SEEKTABLE \\endcode"]
3419    #[doc = "    \\code object->data.seek_table.num_points >= point_num \\endcode"]
3420    #[doc = " \\retval FLAC__bool"]
3421    #[doc = "    \\c false if memory allocation error, else \\c true."]
3422    pub fn FLAC__metadata_object_seektable_insert_point(
3423        object: *mut FLAC__StreamMetadata,
3424        point_num: ::std::os::raw::c_uint,
3425        point: FLAC__StreamMetadata_SeekPoint,
3426    ) -> FLAC__bool;
3427}
3428extern "C" {
3429    #[doc = " Delete a seekpoint from a seektable."]
3430    #[doc = ""]
3431    #[doc = " \\param object     A pointer to an existing SEEKTABLE object."]
3432    #[doc = " \\param point_num  Index into seekpoint array to set."]
3433    #[doc = " \\assert"]
3434    #[doc = "    \\code object != NULL \\endcode"]
3435    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_SEEKTABLE \\endcode"]
3436    #[doc = "    \\code object->data.seek_table.num_points > point_num \\endcode"]
3437    #[doc = " \\retval FLAC__bool"]
3438    #[doc = "    \\c false if memory allocation error, else \\c true."]
3439    pub fn FLAC__metadata_object_seektable_delete_point(
3440        object: *mut FLAC__StreamMetadata,
3441        point_num: ::std::os::raw::c_uint,
3442    ) -> FLAC__bool;
3443}
3444extern "C" {
3445    #[doc = " Check a seektable to see if it conforms to the FLAC specification."]
3446    #[doc = "  See the format specification for limits on the contents of the"]
3447    #[doc = "  seektable."]
3448    #[doc = ""]
3449    #[doc = " \\param object  A pointer to an existing SEEKTABLE object."]
3450    #[doc = " \\assert"]
3451    #[doc = "    \\code object != NULL \\endcode"]
3452    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_SEEKTABLE \\endcode"]
3453    #[doc = " \\retval FLAC__bool"]
3454    #[doc = "    \\c false if seek table is illegal, else \\c true."]
3455    pub fn FLAC__metadata_object_seektable_is_legal(
3456        object: *const FLAC__StreamMetadata,
3457    ) -> FLAC__bool;
3458}
3459extern "C" {
3460    #[doc = " Append a number of placeholder points to the end of a seek table."]
3461    #[doc = ""]
3462    #[doc = " \\note"]
3463    #[doc = " As with the other ..._seektable_template_... functions, you should"]
3464    #[doc = " call FLAC__metadata_object_seektable_template_sort() when finished"]
3465    #[doc = " to make the seek table legal."]
3466    #[doc = ""]
3467    #[doc = " \\param object  A pointer to an existing SEEKTABLE object."]
3468    #[doc = " \\param num     The number of placeholder points to append."]
3469    #[doc = " \\assert"]
3470    #[doc = "    \\code object != NULL \\endcode"]
3471    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_SEEKTABLE \\endcode"]
3472    #[doc = " \\retval FLAC__bool"]
3473    #[doc = "    \\c false if memory allocation fails, else \\c true."]
3474    pub fn FLAC__metadata_object_seektable_template_append_placeholders(
3475        object: *mut FLAC__StreamMetadata,
3476        num: ::std::os::raw::c_uint,
3477    ) -> FLAC__bool;
3478}
3479extern "C" {
3480    #[doc = " Append a specific seek point template to the end of a seek table."]
3481    #[doc = ""]
3482    #[doc = " \\note"]
3483    #[doc = " As with the other ..._seektable_template_... functions, you should"]
3484    #[doc = " call FLAC__metadata_object_seektable_template_sort() when finished"]
3485    #[doc = " to make the seek table legal."]
3486    #[doc = ""]
3487    #[doc = " \\param object  A pointer to an existing SEEKTABLE object."]
3488    #[doc = " \\param sample_number  The sample number of the seek point template."]
3489    #[doc = " \\assert"]
3490    #[doc = "    \\code object != NULL \\endcode"]
3491    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_SEEKTABLE \\endcode"]
3492    #[doc = " \\retval FLAC__bool"]
3493    #[doc = "    \\c false if memory allocation fails, else \\c true."]
3494    pub fn FLAC__metadata_object_seektable_template_append_point(
3495        object: *mut FLAC__StreamMetadata,
3496        sample_number: FLAC__uint64,
3497    ) -> FLAC__bool;
3498}
3499extern "C" {
3500    #[doc = " Append specific seek point templates to the end of a seek table."]
3501    #[doc = ""]
3502    #[doc = " \\note"]
3503    #[doc = " As with the other ..._seektable_template_... functions, you should"]
3504    #[doc = " call FLAC__metadata_object_seektable_template_sort() when finished"]
3505    #[doc = " to make the seek table legal."]
3506    #[doc = ""]
3507    #[doc = " \\param object  A pointer to an existing SEEKTABLE object."]
3508    #[doc = " \\param sample_numbers  An array of sample numbers for the seek points."]
3509    #[doc = " \\param num     The number of seek point templates to append."]
3510    #[doc = " \\assert"]
3511    #[doc = "    \\code object != NULL \\endcode"]
3512    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_SEEKTABLE \\endcode"]
3513    #[doc = " \\retval FLAC__bool"]
3514    #[doc = "    \\c false if memory allocation fails, else \\c true."]
3515    pub fn FLAC__metadata_object_seektable_template_append_points(
3516        object: *mut FLAC__StreamMetadata,
3517        sample_numbers: *mut FLAC__uint64,
3518        num: ::std::os::raw::c_uint,
3519    ) -> FLAC__bool;
3520}
3521extern "C" {
3522    #[doc = " Append a set of evenly-spaced seek point templates to the end of a"]
3523    #[doc = "  seek table."]
3524    #[doc = ""]
3525    #[doc = " \\note"]
3526    #[doc = " As with the other ..._seektable_template_... functions, you should"]
3527    #[doc = " call FLAC__metadata_object_seektable_template_sort() when finished"]
3528    #[doc = " to make the seek table legal."]
3529    #[doc = ""]
3530    #[doc = " \\param object  A pointer to an existing SEEKTABLE object."]
3531    #[doc = " \\param num     The number of placeholder points to append."]
3532    #[doc = " \\param total_samples  The total number of samples to be encoded;"]
3533    #[doc = "                       the seekpoints will be spaced approximately"]
3534    #[doc = "                       \\a total_samples / \\a num samples apart."]
3535    #[doc = " \\assert"]
3536    #[doc = "    \\code object != NULL \\endcode"]
3537    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_SEEKTABLE \\endcode"]
3538    #[doc = "    \\code total_samples > 0 \\endcode"]
3539    #[doc = " \\retval FLAC__bool"]
3540    #[doc = "    \\c false if memory allocation fails, else \\c true."]
3541    pub fn FLAC__metadata_object_seektable_template_append_spaced_points(
3542        object: *mut FLAC__StreamMetadata,
3543        num: ::std::os::raw::c_uint,
3544        total_samples: FLAC__uint64,
3545    ) -> FLAC__bool;
3546}
3547extern "C" {
3548    #[doc = " Append a set of evenly-spaced seek point templates to the end of a"]
3549    #[doc = "  seek table."]
3550    #[doc = ""]
3551    #[doc = " \\note"]
3552    #[doc = " As with the other ..._seektable_template_... functions, you should"]
3553    #[doc = " call FLAC__metadata_object_seektable_template_sort() when finished"]
3554    #[doc = " to make the seek table legal."]
3555    #[doc = ""]
3556    #[doc = " \\param object  A pointer to an existing SEEKTABLE object."]
3557    #[doc = " \\param samples The number of samples apart to space the placeholder"]
3558    #[doc = "                points.  The first point will be at sample \\c 0, the"]
3559    #[doc = "                second at sample \\a samples, then 2*\\a samples, and"]
3560    #[doc = "                so on.  As long as \\a samples and \\a total_samples"]
3561    #[doc = "                are greater than \\c 0, there will always be at least"]
3562    #[doc = "                one seekpoint at sample \\c 0."]
3563    #[doc = " \\param total_samples  The total number of samples to be encoded;"]
3564    #[doc = "                       the seekpoints will be spaced"]
3565    #[doc = "                       \\a samples samples apart."]
3566    #[doc = " \\assert"]
3567    #[doc = "    \\code object != NULL \\endcode"]
3568    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_SEEKTABLE \\endcode"]
3569    #[doc = "    \\code samples > 0 \\endcode"]
3570    #[doc = "    \\code total_samples > 0 \\endcode"]
3571    #[doc = " \\retval FLAC__bool"]
3572    #[doc = "    \\c false if memory allocation fails, else \\c true."]
3573    pub fn FLAC__metadata_object_seektable_template_append_spaced_points_by_samples(
3574        object: *mut FLAC__StreamMetadata,
3575        samples: ::std::os::raw::c_uint,
3576        total_samples: FLAC__uint64,
3577    ) -> FLAC__bool;
3578}
3579extern "C" {
3580    #[doc = " Sort a seek table\'s seek points according to the format specification,"]
3581    #[doc = "  removing duplicates."]
3582    #[doc = ""]
3583    #[doc = " \\param object   A pointer to a seek table to be sorted."]
3584    #[doc = " \\param compact  If \\c false, behaves like FLAC__format_seektable_sort()."]
3585    #[doc = "                 If \\c true, duplicates are deleted and the seek table is"]
3586    #[doc = "                 shrunk appropriately; the number of placeholder points"]
3587    #[doc = "                 present in the seek table will be the same after the call"]
3588    #[doc = "                 as before."]
3589    #[doc = " \\assert"]
3590    #[doc = "    \\code object != NULL \\endcode"]
3591    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_SEEKTABLE \\endcode"]
3592    #[doc = " \\retval FLAC__bool"]
3593    #[doc = "    \\c false if realloc() fails, else \\c true."]
3594    pub fn FLAC__metadata_object_seektable_template_sort(
3595        object: *mut FLAC__StreamMetadata,
3596        compact: FLAC__bool,
3597    ) -> FLAC__bool;
3598}
3599extern "C" {
3600    #[doc = " Sets the vendor string in a VORBIS_COMMENT block."]
3601    #[doc = ""]
3602    #[doc = "  For convenience, a trailing NUL is added to the entry if it doesn\'t have"]
3603    #[doc = "  one already."]
3604    #[doc = ""]
3605    #[doc = "  If \\a copy is \\c true, a copy of the entry is stored; otherwise, the object"]
3606    #[doc = "  takes ownership of the \\c entry.entry pointer."]
3607    #[doc = ""]
3608    #[doc = "  \\note If this function returns \\c false, the caller still owns the"]
3609    #[doc = "  pointer."]
3610    #[doc = ""]
3611    #[doc = " \\param object  A pointer to an existing VORBIS_COMMENT object."]
3612    #[doc = " \\param entry   The entry to set the vendor string to."]
3613    #[doc = " \\param copy    See above."]
3614    #[doc = " \\assert"]
3615    #[doc = "    \\code object != NULL \\endcode"]
3616    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \\endcode"]
3617    #[doc = "    \\code (entry.entry != NULL && entry.length > 0) ||"]
3618    #[doc = " (entry.entry == NULL && entry.length == 0) \\endcode"]
3619    #[doc = " \\retval FLAC__bool"]
3620    #[doc = "    \\c false if memory allocation fails or \\a entry does not comply with the"]
3621    #[doc = "    Vorbis comment specification, else \\c true."]
3622    pub fn FLAC__metadata_object_vorbiscomment_set_vendor_string(
3623        object: *mut FLAC__StreamMetadata,
3624        entry: FLAC__StreamMetadata_VorbisComment_Entry,
3625        copy: FLAC__bool,
3626    ) -> FLAC__bool;
3627}
3628extern "C" {
3629    #[doc = " Resize the comment array."]
3630    #[doc = ""]
3631    #[doc = "  If the size shrinks, elements will truncated; if it grows, new empty"]
3632    #[doc = "  fields will be added to the end."]
3633    #[doc = ""]
3634    #[doc = " \\param object            A pointer to an existing VORBIS_COMMENT object."]
3635    #[doc = " \\param new_num_comments  The desired length of the array; may be \\c 0."]
3636    #[doc = " \\assert"]
3637    #[doc = "    \\code object != NULL \\endcode"]
3638    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \\endcode"]
3639    #[doc = "    \\code (object->data.vorbis_comment.comments == NULL && object->data.vorbis_comment.num_comments == 0) ||"]
3640    #[doc = " (object->data.vorbis_comment.comments != NULL && object->data.vorbis_comment.num_comments > 0) \\endcode"]
3641    #[doc = " \\retval FLAC__bool"]
3642    #[doc = "    \\c false if memory allocation fails, else \\c true."]
3643    pub fn FLAC__metadata_object_vorbiscomment_resize_comments(
3644        object: *mut FLAC__StreamMetadata,
3645        new_num_comments: ::std::os::raw::c_uint,
3646    ) -> FLAC__bool;
3647}
3648extern "C" {
3649    #[doc = " Sets a comment in a VORBIS_COMMENT block."]
3650    #[doc = ""]
3651    #[doc = "  For convenience, a trailing NUL is added to the entry if it doesn\'t have"]
3652    #[doc = "  one already."]
3653    #[doc = ""]
3654    #[doc = "  If \\a copy is \\c true, a copy of the entry is stored; otherwise, the object"]
3655    #[doc = "  takes ownership of the \\c entry.entry pointer."]
3656    #[doc = ""]
3657    #[doc = "  \\note If this function returns \\c false, the caller still owns the"]
3658    #[doc = "  pointer."]
3659    #[doc = ""]
3660    #[doc = " \\param object       A pointer to an existing VORBIS_COMMENT object."]
3661    #[doc = " \\param comment_num  Index into comment array to set."]
3662    #[doc = " \\param entry        The entry to set the comment to."]
3663    #[doc = " \\param copy         See above."]
3664    #[doc = " \\assert"]
3665    #[doc = "    \\code object != NULL \\endcode"]
3666    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \\endcode"]
3667    #[doc = "    \\code comment_num < object->data.vorbis_comment.num_comments \\endcode"]
3668    #[doc = "    \\code (entry.entry != NULL && entry.length > 0) ||"]
3669    #[doc = " (entry.entry == NULL && entry.length == 0) \\endcode"]
3670    #[doc = " \\retval FLAC__bool"]
3671    #[doc = "    \\c false if memory allocation fails or \\a entry does not comply with the"]
3672    #[doc = "    Vorbis comment specification, else \\c true."]
3673    pub fn FLAC__metadata_object_vorbiscomment_set_comment(
3674        object: *mut FLAC__StreamMetadata,
3675        comment_num: ::std::os::raw::c_uint,
3676        entry: FLAC__StreamMetadata_VorbisComment_Entry,
3677        copy: FLAC__bool,
3678    ) -> FLAC__bool;
3679}
3680extern "C" {
3681    #[doc = " Insert a comment in a VORBIS_COMMENT block at the given index."]
3682    #[doc = ""]
3683    #[doc = "  For convenience, a trailing NUL is added to the entry if it doesn\'t have"]
3684    #[doc = "  one already."]
3685    #[doc = ""]
3686    #[doc = "  If \\a copy is \\c true, a copy of the entry is stored; otherwise, the object"]
3687    #[doc = "  takes ownership of the \\c entry.entry pointer."]
3688    #[doc = ""]
3689    #[doc = "  \\note If this function returns \\c false, the caller still owns the"]
3690    #[doc = "  pointer."]
3691    #[doc = ""]
3692    #[doc = " \\param object       A pointer to an existing VORBIS_COMMENT object."]
3693    #[doc = " \\param comment_num  The index at which to insert the comment.  The comments"]
3694    #[doc = "                     at and after \\a comment_num move right one position."]
3695    #[doc = "                     To append a comment to the end, set \\a comment_num to"]
3696    #[doc = "                     \\c object->data.vorbis_comment.num_comments ."]
3697    #[doc = " \\param entry        The comment to insert."]
3698    #[doc = " \\param copy         See above."]
3699    #[doc = " \\assert"]
3700    #[doc = "    \\code object != NULL \\endcode"]
3701    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \\endcode"]
3702    #[doc = "    \\code object->data.vorbis_comment.num_comments >= comment_num \\endcode"]
3703    #[doc = "    \\code (entry.entry != NULL && entry.length > 0) ||"]
3704    #[doc = " (entry.entry == NULL && entry.length == 0 && copy == false) \\endcode"]
3705    #[doc = " \\retval FLAC__bool"]
3706    #[doc = "    \\c false if memory allocation fails or \\a entry does not comply with the"]
3707    #[doc = "    Vorbis comment specification, else \\c true."]
3708    pub fn FLAC__metadata_object_vorbiscomment_insert_comment(
3709        object: *mut FLAC__StreamMetadata,
3710        comment_num: ::std::os::raw::c_uint,
3711        entry: FLAC__StreamMetadata_VorbisComment_Entry,
3712        copy: FLAC__bool,
3713    ) -> FLAC__bool;
3714}
3715extern "C" {
3716    #[doc = " Appends a comment to a VORBIS_COMMENT block."]
3717    #[doc = ""]
3718    #[doc = "  For convenience, a trailing NUL is added to the entry if it doesn\'t have"]
3719    #[doc = "  one already."]
3720    #[doc = ""]
3721    #[doc = "  If \\a copy is \\c true, a copy of the entry is stored; otherwise, the object"]
3722    #[doc = "  takes ownership of the \\c entry.entry pointer."]
3723    #[doc = ""]
3724    #[doc = "  \\note If this function returns \\c false, the caller still owns the"]
3725    #[doc = "  pointer."]
3726    #[doc = ""]
3727    #[doc = " \\param object       A pointer to an existing VORBIS_COMMENT object."]
3728    #[doc = " \\param entry        The comment to insert."]
3729    #[doc = " \\param copy         See above."]
3730    #[doc = " \\assert"]
3731    #[doc = "    \\code object != NULL \\endcode"]
3732    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \\endcode"]
3733    #[doc = "    \\code (entry.entry != NULL && entry.length > 0) ||"]
3734    #[doc = " (entry.entry == NULL && entry.length == 0 && copy == false) \\endcode"]
3735    #[doc = " \\retval FLAC__bool"]
3736    #[doc = "    \\c false if memory allocation fails or \\a entry does not comply with the"]
3737    #[doc = "    Vorbis comment specification, else \\c true."]
3738    pub fn FLAC__metadata_object_vorbiscomment_append_comment(
3739        object: *mut FLAC__StreamMetadata,
3740        entry: FLAC__StreamMetadata_VorbisComment_Entry,
3741        copy: FLAC__bool,
3742    ) -> FLAC__bool;
3743}
3744extern "C" {
3745    #[doc = " Replaces comments in a VORBIS_COMMENT block with a new one."]
3746    #[doc = ""]
3747    #[doc = "  For convenience, a trailing NUL is added to the entry if it doesn\'t have"]
3748    #[doc = "  one already."]
3749    #[doc = ""]
3750    #[doc = "  Depending on the value of \\a all, either all or just the first comment"]
3751    #[doc = "  whose field name(s) match the given entry\'s name will be replaced by the"]
3752    #[doc = "  given entry.  If no comments match, \\a entry will simply be appended."]
3753    #[doc = ""]
3754    #[doc = "  If \\a copy is \\c true, a copy of the entry is stored; otherwise, the object"]
3755    #[doc = "  takes ownership of the \\c entry.entry pointer."]
3756    #[doc = ""]
3757    #[doc = "  \\note If this function returns \\c false, the caller still owns the"]
3758    #[doc = "  pointer."]
3759    #[doc = ""]
3760    #[doc = " \\param object       A pointer to an existing VORBIS_COMMENT object."]
3761    #[doc = " \\param entry        The comment to insert."]
3762    #[doc = " \\param all          If \\c true, all comments whose field name matches"]
3763    #[doc = "                     \\a entry\'s field name will be removed, and \\a entry will"]
3764    #[doc = "                     be inserted at the position of the first matching"]
3765    #[doc = "                     comment.  If \\c false, only the first comment whose"]
3766    #[doc = "                     field name matches \\a entry\'s field name will be"]
3767    #[doc = "                     replaced with \\a entry."]
3768    #[doc = " \\param copy         See above."]
3769    #[doc = " \\assert"]
3770    #[doc = "    \\code object != NULL \\endcode"]
3771    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \\endcode"]
3772    #[doc = "    \\code (entry.entry != NULL && entry.length > 0) ||"]
3773    #[doc = " (entry.entry == NULL && entry.length == 0 && copy == false) \\endcode"]
3774    #[doc = " \\retval FLAC__bool"]
3775    #[doc = "    \\c false if memory allocation fails or \\a entry does not comply with the"]
3776    #[doc = "    Vorbis comment specification, else \\c true."]
3777    pub fn FLAC__metadata_object_vorbiscomment_replace_comment(
3778        object: *mut FLAC__StreamMetadata,
3779        entry: FLAC__StreamMetadata_VorbisComment_Entry,
3780        all: FLAC__bool,
3781        copy: FLAC__bool,
3782    ) -> FLAC__bool;
3783}
3784extern "C" {
3785    #[doc = " Delete a comment in a VORBIS_COMMENT block at the given index."]
3786    #[doc = ""]
3787    #[doc = " \\param object       A pointer to an existing VORBIS_COMMENT object."]
3788    #[doc = " \\param comment_num  The index of the comment to delete."]
3789    #[doc = " \\assert"]
3790    #[doc = "    \\code object != NULL \\endcode"]
3791    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \\endcode"]
3792    #[doc = "    \\code object->data.vorbis_comment.num_comments > comment_num \\endcode"]
3793    #[doc = " \\retval FLAC__bool"]
3794    #[doc = "    \\c false if realloc() fails, else \\c true."]
3795    pub fn FLAC__metadata_object_vorbiscomment_delete_comment(
3796        object: *mut FLAC__StreamMetadata,
3797        comment_num: ::std::os::raw::c_uint,
3798    ) -> FLAC__bool;
3799}
3800extern "C" {
3801    #[doc = " Creates a Vorbis comment entry from NUL-terminated name and value strings."]
3802    #[doc = ""]
3803    #[doc = "  On return, the filled-in \\a entry->entry pointer will point to malloc()ed"]
3804    #[doc = "  memory and shall be owned by the caller.  For convenience the entry will"]
3805    #[doc = "  have a terminating NUL."]
3806    #[doc = ""]
3807    #[doc = " \\param entry              A pointer to a Vorbis comment entry.  The entry\'s"]
3808    #[doc = "                           \\c entry pointer should not point to allocated"]
3809    #[doc = "                           memory as it will be overwritten."]
3810    #[doc = " \\param field_name         The field name in ASCII, \\c NUL terminated."]
3811    #[doc = " \\param field_value        The field value in UTF-8, \\c NUL terminated."]
3812    #[doc = " \\assert"]
3813    #[doc = "    \\code entry != NULL \\endcode"]
3814    #[doc = "    \\code field_name != NULL \\endcode"]
3815    #[doc = "    \\code field_value != NULL \\endcode"]
3816    #[doc = " \\retval FLAC__bool"]
3817    #[doc = "    \\c false if malloc() fails, or if \\a field_name or \\a field_value does"]
3818    #[doc = "    not comply with the Vorbis comment specification, else \\c true."]
3819    pub fn FLAC__metadata_object_vorbiscomment_entry_from_name_value_pair(
3820        entry: *mut FLAC__StreamMetadata_VorbisComment_Entry,
3821        field_name: *const ::std::os::raw::c_char,
3822        field_value: *const ::std::os::raw::c_char,
3823    ) -> FLAC__bool;
3824}
3825extern "C" {
3826    #[doc = " Splits a Vorbis comment entry into NUL-terminated name and value strings."]
3827    #[doc = ""]
3828    #[doc = "  The returned pointers to name and value will be allocated by malloc()"]
3829    #[doc = "  and shall be owned by the caller."]
3830    #[doc = ""]
3831    #[doc = " \\param entry              An existing Vorbis comment entry."]
3832    #[doc = " \\param field_name         The address of where the returned pointer to the"]
3833    #[doc = "                           field name will be stored."]
3834    #[doc = " \\param field_value        The address of where the returned pointer to the"]
3835    #[doc = "                           field value will be stored."]
3836    #[doc = " \\assert"]
3837    #[doc = "    \\code (entry.entry != NULL && entry.length > 0) \\endcode"]
3838    #[doc = "    \\code memchr(entry.entry, \'=\', entry.length) != NULL \\endcode"]
3839    #[doc = "    \\code field_name != NULL \\endcode"]
3840    #[doc = "    \\code field_value != NULL \\endcode"]
3841    #[doc = " \\retval FLAC__bool"]
3842    #[doc = "    \\c false if memory allocation fails or \\a entry does not comply with the"]
3843    #[doc = "    Vorbis comment specification, else \\c true."]
3844    pub fn FLAC__metadata_object_vorbiscomment_entry_to_name_value_pair(
3845        entry: FLAC__StreamMetadata_VorbisComment_Entry,
3846        field_name: *mut *mut ::std::os::raw::c_char,
3847        field_value: *mut *mut ::std::os::raw::c_char,
3848    ) -> FLAC__bool;
3849}
3850extern "C" {
3851    #[doc = " Check if the given Vorbis comment entry\'s field name matches the given"]
3852    #[doc = "  field name."]
3853    #[doc = ""]
3854    #[doc = " \\param entry              An existing Vorbis comment entry."]
3855    #[doc = " \\param field_name         The field name to check."]
3856    #[doc = " \\param field_name_length  The length of \\a field_name, not including the"]
3857    #[doc = "                           terminating \\c NUL."]
3858    #[doc = " \\assert"]
3859    #[doc = "    \\code (entry.entry != NULL && entry.length > 0) \\endcode"]
3860    #[doc = " \\retval FLAC__bool"]
3861    #[doc = "    \\c true if the field names match, else \\c false"]
3862    pub fn FLAC__metadata_object_vorbiscomment_entry_matches(
3863        entry: FLAC__StreamMetadata_VorbisComment_Entry,
3864        field_name: *const ::std::os::raw::c_char,
3865        field_name_length: ::std::os::raw::c_uint,
3866    ) -> FLAC__bool;
3867}
3868extern "C" {
3869    #[doc = " Find a Vorbis comment with the given field name."]
3870    #[doc = ""]
3871    #[doc = "  The search begins at entry number \\a offset; use an offset of 0 to"]
3872    #[doc = "  search from the beginning of the comment array."]
3873    #[doc = ""]
3874    #[doc = " \\param object      A pointer to an existing VORBIS_COMMENT object."]
3875    #[doc = " \\param offset      The offset into the comment array from where to start"]
3876    #[doc = "                    the search."]
3877    #[doc = " \\param field_name  The field name of the comment to find."]
3878    #[doc = " \\assert"]
3879    #[doc = "    \\code object != NULL \\endcode"]
3880    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \\endcode"]
3881    #[doc = "    \\code field_name != NULL \\endcode"]
3882    #[doc = " \\retval int"]
3883    #[doc = "    The offset in the comment array of the first comment whose field"]
3884    #[doc = "    name matches \\a field_name, or \\c -1 if no match was found."]
3885    pub fn FLAC__metadata_object_vorbiscomment_find_entry_from(
3886        object: *const FLAC__StreamMetadata,
3887        offset: ::std::os::raw::c_uint,
3888        field_name: *const ::std::os::raw::c_char,
3889    ) -> ::std::os::raw::c_int;
3890}
3891extern "C" {
3892    #[doc = " Remove first Vorbis comment matching the given field name."]
3893    #[doc = ""]
3894    #[doc = " \\param object      A pointer to an existing VORBIS_COMMENT object."]
3895    #[doc = " \\param field_name  The field name of comment to delete."]
3896    #[doc = " \\assert"]
3897    #[doc = "    \\code object != NULL \\endcode"]
3898    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \\endcode"]
3899    #[doc = " \\retval int"]
3900    #[doc = "    \\c -1 for memory allocation error, \\c 0 for no matching entries,"]
3901    #[doc = "    \\c 1 for one matching entry deleted."]
3902    pub fn FLAC__metadata_object_vorbiscomment_remove_entry_matching(
3903        object: *mut FLAC__StreamMetadata,
3904        field_name: *const ::std::os::raw::c_char,
3905    ) -> ::std::os::raw::c_int;
3906}
3907extern "C" {
3908    #[doc = " Remove all Vorbis comments matching the given field name."]
3909    #[doc = ""]
3910    #[doc = " \\param object      A pointer to an existing VORBIS_COMMENT object."]
3911    #[doc = " \\param field_name  The field name of comments to delete."]
3912    #[doc = " \\assert"]
3913    #[doc = "    \\code object != NULL \\endcode"]
3914    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_VORBIS_COMMENT \\endcode"]
3915    #[doc = " \\retval int"]
3916    #[doc = "    \\c -1 for memory allocation error, \\c 0 for no matching entries,"]
3917    #[doc = "    else the number of matching entries deleted."]
3918    pub fn FLAC__metadata_object_vorbiscomment_remove_entries_matching(
3919        object: *mut FLAC__StreamMetadata,
3920        field_name: *const ::std::os::raw::c_char,
3921    ) -> ::std::os::raw::c_int;
3922}
3923extern "C" {
3924    #[doc = " Create a new CUESHEET track instance."]
3925    #[doc = ""]
3926    #[doc = "  The object will be \"empty\"; i.e. values and data pointers will be \\c 0."]
3927    #[doc = ""]
3928    #[doc = " \\retval FLAC__StreamMetadata_CueSheet_Track*"]
3929    #[doc = "    \\c NULL if there was an error allocating memory, else the new instance."]
3930    pub fn FLAC__metadata_object_cuesheet_track_new() -> *mut FLAC__StreamMetadata_CueSheet_Track;
3931}
3932extern "C" {
3933    #[doc = " Create a copy of an existing CUESHEET track object."]
3934    #[doc = ""]
3935    #[doc = "  The copy is a \"deep\" copy, i.e. dynamically allocated data within the"]
3936    #[doc = "  object is also copied.  The caller takes ownership of the new object and"]
3937    #[doc = "  is responsible for freeing it with"]
3938    #[doc = "  FLAC__metadata_object_cuesheet_track_delete()."]
3939    #[doc = ""]
3940    #[doc = " \\param object  Pointer to object to copy."]
3941    #[doc = " \\assert"]
3942    #[doc = "    \\code object != NULL \\endcode"]
3943    #[doc = " \\retval FLAC__StreamMetadata_CueSheet_Track*"]
3944    #[doc = "    \\c NULL if there was an error allocating memory, else the new instance."]
3945    pub fn FLAC__metadata_object_cuesheet_track_clone(
3946        object: *const FLAC__StreamMetadata_CueSheet_Track,
3947    ) -> *mut FLAC__StreamMetadata_CueSheet_Track;
3948}
3949extern "C" {
3950    #[doc = " Delete a CUESHEET track object"]
3951    #[doc = ""]
3952    #[doc = " \\param object       A pointer to an existing CUESHEET track object."]
3953    #[doc = " \\assert"]
3954    #[doc = "    \\code object != NULL \\endcode"]
3955    pub fn FLAC__metadata_object_cuesheet_track_delete(
3956        object: *mut FLAC__StreamMetadata_CueSheet_Track,
3957    );
3958}
3959extern "C" {
3960    #[doc = " Resize a track\'s index point array."]
3961    #[doc = ""]
3962    #[doc = "  If the size shrinks, elements will truncated; if it grows, new blank"]
3963    #[doc = "  indices will be added to the end."]
3964    #[doc = ""]
3965    #[doc = " \\param object           A pointer to an existing CUESHEET object."]
3966    #[doc = " \\param track_num        The index of the track to modify.  NOTE: this is not"]
3967    #[doc = "                         necessarily the same as the track\'s \\a number field."]
3968    #[doc = " \\param new_num_indices  The desired length of the array; may be \\c 0."]
3969    #[doc = " \\assert"]
3970    #[doc = "    \\code object != NULL \\endcode"]
3971    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_CUESHEET \\endcode"]
3972    #[doc = "    \\code object->data.cue_sheet.num_tracks > track_num \\endcode"]
3973    #[doc = "    \\code (object->data.cue_sheet.tracks[track_num].indices == NULL && object->data.cue_sheet.tracks[track_num].num_indices == 0) ||"]
3974    #[doc = " (object->data.cue_sheet.tracks[track_num].indices != NULL && object->data.cue_sheet.tracks[track_num].num_indices > 0) \\endcode"]
3975    #[doc = " \\retval FLAC__bool"]
3976    #[doc = "    \\c false if memory allocation error, else \\c true."]
3977    pub fn FLAC__metadata_object_cuesheet_track_resize_indices(
3978        object: *mut FLAC__StreamMetadata,
3979        track_num: ::std::os::raw::c_uint,
3980        new_num_indices: ::std::os::raw::c_uint,
3981    ) -> FLAC__bool;
3982}
3983extern "C" {
3984    #[doc = " Insert an index point in a CUESHEET track at the given index."]
3985    #[doc = ""]
3986    #[doc = " \\param object       A pointer to an existing CUESHEET object."]
3987    #[doc = " \\param track_num    The index of the track to modify.  NOTE: this is not"]
3988    #[doc = "                     necessarily the same as the track\'s \\a number field."]
3989    #[doc = " \\param index_num    The index into the track\'s index array at which to"]
3990    #[doc = "                     insert the index point.  NOTE: this is not necessarily"]
3991    #[doc = "                     the same as the index point\'s \\a number field.  The"]
3992    #[doc = "                     indices at and after \\a index_num move right one"]
3993    #[doc = "                     position.  To append an index point to the end, set"]
3994    #[doc = "                     \\a index_num to"]
3995    #[doc = "                     \\c object->data.cue_sheet.tracks[track_num].num_indices ."]
3996    #[doc = " \\param index        The index point to insert."]
3997    #[doc = " \\assert"]
3998    #[doc = "    \\code object != NULL \\endcode"]
3999    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_CUESHEET \\endcode"]
4000    #[doc = "    \\code object->data.cue_sheet.num_tracks > track_num \\endcode"]
4001    #[doc = "    \\code object->data.cue_sheet.tracks[track_num].num_indices >= index_num \\endcode"]
4002    #[doc = " \\retval FLAC__bool"]
4003    #[doc = "    \\c false if realloc() fails, else \\c true."]
4004    pub fn FLAC__metadata_object_cuesheet_track_insert_index(
4005        object: *mut FLAC__StreamMetadata,
4006        track_num: ::std::os::raw::c_uint,
4007        index_num: ::std::os::raw::c_uint,
4008        index: FLAC__StreamMetadata_CueSheet_Index,
4009    ) -> FLAC__bool;
4010}
4011extern "C" {
4012    #[doc = " Insert a blank index point in a CUESHEET track at the given index."]
4013    #[doc = ""]
4014    #[doc = "  A blank index point is one in which all field values are zero."]
4015    #[doc = ""]
4016    #[doc = " \\param object       A pointer to an existing CUESHEET object."]
4017    #[doc = " \\param track_num    The index of the track to modify.  NOTE: this is not"]
4018    #[doc = "                     necessarily the same as the track\'s \\a number field."]
4019    #[doc = " \\param index_num    The index into the track\'s index array at which to"]
4020    #[doc = "                     insert the index point.  NOTE: this is not necessarily"]
4021    #[doc = "                     the same as the index point\'s \\a number field.  The"]
4022    #[doc = "                     indices at and after \\a index_num move right one"]
4023    #[doc = "                     position.  To append an index point to the end, set"]
4024    #[doc = "                     \\a index_num to"]
4025    #[doc = "                     \\c object->data.cue_sheet.tracks[track_num].num_indices ."]
4026    #[doc = " \\assert"]
4027    #[doc = "    \\code object != NULL \\endcode"]
4028    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_CUESHEET \\endcode"]
4029    #[doc = "    \\code object->data.cue_sheet.num_tracks > track_num \\endcode"]
4030    #[doc = "    \\code object->data.cue_sheet.tracks[track_num].num_indices >= index_num \\endcode"]
4031    #[doc = " \\retval FLAC__bool"]
4032    #[doc = "    \\c false if realloc() fails, else \\c true."]
4033    pub fn FLAC__metadata_object_cuesheet_track_insert_blank_index(
4034        object: *mut FLAC__StreamMetadata,
4035        track_num: ::std::os::raw::c_uint,
4036        index_num: ::std::os::raw::c_uint,
4037    ) -> FLAC__bool;
4038}
4039extern "C" {
4040    #[doc = " Delete an index point in a CUESHEET track at the given index."]
4041    #[doc = ""]
4042    #[doc = " \\param object       A pointer to an existing CUESHEET object."]
4043    #[doc = " \\param track_num    The index into the track array of the track to"]
4044    #[doc = "                     modify.  NOTE: this is not necessarily the same"]
4045    #[doc = "                     as the track\'s \\a number field."]
4046    #[doc = " \\param index_num    The index into the track\'s index array of the index"]
4047    #[doc = "                     to delete.  NOTE: this is not necessarily the same"]
4048    #[doc = "                     as the index\'s \\a number field."]
4049    #[doc = " \\assert"]
4050    #[doc = "    \\code object != NULL \\endcode"]
4051    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_CUESHEET \\endcode"]
4052    #[doc = "    \\code object->data.cue_sheet.num_tracks > track_num \\endcode"]
4053    #[doc = "    \\code object->data.cue_sheet.tracks[track_num].num_indices > index_num \\endcode"]
4054    #[doc = " \\retval FLAC__bool"]
4055    #[doc = "    \\c false if realloc() fails, else \\c true."]
4056    pub fn FLAC__metadata_object_cuesheet_track_delete_index(
4057        object: *mut FLAC__StreamMetadata,
4058        track_num: ::std::os::raw::c_uint,
4059        index_num: ::std::os::raw::c_uint,
4060    ) -> FLAC__bool;
4061}
4062extern "C" {
4063    #[doc = " Resize the track array."]
4064    #[doc = ""]
4065    #[doc = "  If the size shrinks, elements will truncated; if it grows, new blank"]
4066    #[doc = "  tracks will be added to the end."]
4067    #[doc = ""]
4068    #[doc = " \\param object            A pointer to an existing CUESHEET object."]
4069    #[doc = " \\param new_num_tracks    The desired length of the array; may be \\c 0."]
4070    #[doc = " \\assert"]
4071    #[doc = "    \\code object != NULL \\endcode"]
4072    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_CUESHEET \\endcode"]
4073    #[doc = "    \\code (object->data.cue_sheet.tracks == NULL && object->data.cue_sheet.num_tracks == 0) ||"]
4074    #[doc = " (object->data.cue_sheet.tracks != NULL && object->data.cue_sheet.num_tracks > 0) \\endcode"]
4075    #[doc = " \\retval FLAC__bool"]
4076    #[doc = "    \\c false if memory allocation error, else \\c true."]
4077    pub fn FLAC__metadata_object_cuesheet_resize_tracks(
4078        object: *mut FLAC__StreamMetadata,
4079        new_num_tracks: ::std::os::raw::c_uint,
4080    ) -> FLAC__bool;
4081}
4082extern "C" {
4083    #[doc = " Sets a track in a CUESHEET block."]
4084    #[doc = ""]
4085    #[doc = "  If \\a copy is \\c true, a copy of the track is stored; otherwise, the object"]
4086    #[doc = "  takes ownership of the \\a track pointer."]
4087    #[doc = ""]
4088    #[doc = " \\param object       A pointer to an existing CUESHEET object."]
4089    #[doc = " \\param track_num    Index into track array to set.  NOTE: this is not"]
4090    #[doc = "                     necessarily the same as the track\'s \\a number field."]
4091    #[doc = " \\param track        The track to set the track to.  You may safely pass in"]
4092    #[doc = "                     a const pointer if \\a copy is \\c true."]
4093    #[doc = " \\param copy         See above."]
4094    #[doc = " \\assert"]
4095    #[doc = "    \\code object != NULL \\endcode"]
4096    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_CUESHEET \\endcode"]
4097    #[doc = "    \\code track_num < object->data.cue_sheet.num_tracks \\endcode"]
4098    #[doc = "    \\code (track->indices != NULL && track->num_indices > 0) ||"]
4099    #[doc = " (track->indices == NULL && track->num_indices == 0) \\endcode"]
4100    #[doc = " \\retval FLAC__bool"]
4101    #[doc = "    \\c false if \\a copy is \\c true and malloc() fails, else \\c true."]
4102    pub fn FLAC__metadata_object_cuesheet_set_track(
4103        object: *mut FLAC__StreamMetadata,
4104        track_num: ::std::os::raw::c_uint,
4105        track: *mut FLAC__StreamMetadata_CueSheet_Track,
4106        copy: FLAC__bool,
4107    ) -> FLAC__bool;
4108}
4109extern "C" {
4110    #[doc = " Insert a track in a CUESHEET block at the given index."]
4111    #[doc = ""]
4112    #[doc = "  If \\a copy is \\c true, a copy of the track is stored; otherwise, the object"]
4113    #[doc = "  takes ownership of the \\a track pointer."]
4114    #[doc = ""]
4115    #[doc = " \\param object       A pointer to an existing CUESHEET object."]
4116    #[doc = " \\param track_num    The index at which to insert the track.  NOTE: this"]
4117    #[doc = "                     is not necessarily the same as the track\'s \\a number"]
4118    #[doc = "                     field.  The tracks at and after \\a track_num move right"]
4119    #[doc = "                     one position.  To append a track to the end, set"]
4120    #[doc = "                     \\a track_num to \\c object->data.cue_sheet.num_tracks ."]
4121    #[doc = " \\param track        The track to insert.  You may safely pass in a const"]
4122    #[doc = "                     pointer if \\a copy is \\c true."]
4123    #[doc = " \\param copy         See above."]
4124    #[doc = " \\assert"]
4125    #[doc = "    \\code object != NULL \\endcode"]
4126    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_CUESHEET \\endcode"]
4127    #[doc = "    \\code object->data.cue_sheet.num_tracks >= track_num \\endcode"]
4128    #[doc = " \\retval FLAC__bool"]
4129    #[doc = "    \\c false if \\a copy is \\c true and malloc() fails, else \\c true."]
4130    pub fn FLAC__metadata_object_cuesheet_insert_track(
4131        object: *mut FLAC__StreamMetadata,
4132        track_num: ::std::os::raw::c_uint,
4133        track: *mut FLAC__StreamMetadata_CueSheet_Track,
4134        copy: FLAC__bool,
4135    ) -> FLAC__bool;
4136}
4137extern "C" {
4138    #[doc = " Insert a blank track in a CUESHEET block at the given index."]
4139    #[doc = ""]
4140    #[doc = "  A blank track is one in which all field values are zero."]
4141    #[doc = ""]
4142    #[doc = " \\param object       A pointer to an existing CUESHEET object."]
4143    #[doc = " \\param track_num    The index at which to insert the track.  NOTE: this"]
4144    #[doc = "                     is not necessarily the same as the track\'s \\a number"]
4145    #[doc = "                     field.  The tracks at and after \\a track_num move right"]
4146    #[doc = "                     one position.  To append a track to the end, set"]
4147    #[doc = "                     \\a track_num to \\c object->data.cue_sheet.num_tracks ."]
4148    #[doc = " \\assert"]
4149    #[doc = "    \\code object != NULL \\endcode"]
4150    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_CUESHEET \\endcode"]
4151    #[doc = "    \\code object->data.cue_sheet.num_tracks >= track_num \\endcode"]
4152    #[doc = " \\retval FLAC__bool"]
4153    #[doc = "    \\c false if \\a copy is \\c true and malloc() fails, else \\c true."]
4154    pub fn FLAC__metadata_object_cuesheet_insert_blank_track(
4155        object: *mut FLAC__StreamMetadata,
4156        track_num: ::std::os::raw::c_uint,
4157    ) -> FLAC__bool;
4158}
4159extern "C" {
4160    #[doc = " Delete a track in a CUESHEET block at the given index."]
4161    #[doc = ""]
4162    #[doc = " \\param object       A pointer to an existing CUESHEET object."]
4163    #[doc = " \\param track_num    The index into the track array of the track to"]
4164    #[doc = "                     delete.  NOTE: this is not necessarily the same"]
4165    #[doc = "                     as the track\'s \\a number field."]
4166    #[doc = " \\assert"]
4167    #[doc = "    \\code object != NULL \\endcode"]
4168    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_CUESHEET \\endcode"]
4169    #[doc = "    \\code object->data.cue_sheet.num_tracks > track_num \\endcode"]
4170    #[doc = " \\retval FLAC__bool"]
4171    #[doc = "    \\c false if realloc() fails, else \\c true."]
4172    pub fn FLAC__metadata_object_cuesheet_delete_track(
4173        object: *mut FLAC__StreamMetadata,
4174        track_num: ::std::os::raw::c_uint,
4175    ) -> FLAC__bool;
4176}
4177extern "C" {
4178    #[doc = " Check a cue sheet to see if it conforms to the FLAC specification."]
4179    #[doc = "  See the format specification for limits on the contents of the"]
4180    #[doc = "  cue sheet."]
4181    #[doc = ""]
4182    #[doc = " \\param object     A pointer to an existing CUESHEET object."]
4183    #[doc = " \\param check_cd_da_subset  If \\c true, check CUESHEET against more"]
4184    #[doc = "                   stringent requirements for a CD-DA (audio) disc."]
4185    #[doc = " \\param violation  Address of a pointer to a string.  If there is a"]
4186    #[doc = "                   violation, a pointer to a string explanation of the"]
4187    #[doc = "                   violation will be returned here. \\a violation may be"]
4188    #[doc = "                   \\c NULL if you don\'t need the returned string.  Do not"]
4189    #[doc = "                   free the returned string; it will always point to static"]
4190    #[doc = "                   data."]
4191    #[doc = " \\assert"]
4192    #[doc = "    \\code object != NULL \\endcode"]
4193    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_CUESHEET \\endcode"]
4194    #[doc = " \\retval FLAC__bool"]
4195    #[doc = "    \\c false if cue sheet is illegal, else \\c true."]
4196    pub fn FLAC__metadata_object_cuesheet_is_legal(
4197        object: *const FLAC__StreamMetadata,
4198        check_cd_da_subset: FLAC__bool,
4199        violation: *mut *const ::std::os::raw::c_char,
4200    ) -> FLAC__bool;
4201}
4202extern "C" {
4203    #[doc = " Calculate and return the CDDB/freedb ID for a cue sheet.  The function"]
4204    #[doc = "  assumes the cue sheet corresponds to a CD; the result is undefined"]
4205    #[doc = "  if the cuesheet\'s is_cd bit is not set."]
4206    #[doc = ""]
4207    #[doc = " \\param object     A pointer to an existing CUESHEET object."]
4208    #[doc = " \\assert"]
4209    #[doc = "    \\code object != NULL \\endcode"]
4210    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_CUESHEET \\endcode"]
4211    #[doc = " \\retval FLAC__uint32"]
4212    #[doc = "    The unsigned integer representation of the CDDB/freedb ID"]
4213    pub fn FLAC__metadata_object_cuesheet_calculate_cddb_id(
4214        object: *const FLAC__StreamMetadata,
4215    ) -> FLAC__uint32;
4216}
4217extern "C" {
4218    #[doc = " Sets the MIME type of a PICTURE block."]
4219    #[doc = ""]
4220    #[doc = "  If \\a copy is \\c true, a copy of the string is stored; otherwise, the object"]
4221    #[doc = "  takes ownership of the pointer.  The existing string will be freed if this"]
4222    #[doc = "  function is successful, otherwise the original string will remain if \\a copy"]
4223    #[doc = "  is \\c true and malloc() fails."]
4224    #[doc = ""]
4225    #[doc = " \\note It is safe to pass a const pointer to \\a mime_type if \\a copy is \\c true."]
4226    #[doc = ""]
4227    #[doc = " \\param object      A pointer to an existing PICTURE object."]
4228    #[doc = " \\param mime_type   A pointer to the MIME type string.  The string must be"]
4229    #[doc = "                    ASCII characters 0x20-0x7e, NUL-terminated.  No validation"]
4230    #[doc = "                    is done."]
4231    #[doc = " \\param copy        See above."]
4232    #[doc = " \\assert"]
4233    #[doc = "    \\code object != NULL \\endcode"]
4234    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_PICTURE \\endcode"]
4235    #[doc = "    \\code (mime_type != NULL) \\endcode"]
4236    #[doc = " \\retval FLAC__bool"]
4237    #[doc = "    \\c false if \\a copy is \\c true and malloc() fails, else \\c true."]
4238    pub fn FLAC__metadata_object_picture_set_mime_type(
4239        object: *mut FLAC__StreamMetadata,
4240        mime_type: *mut ::std::os::raw::c_char,
4241        copy: FLAC__bool,
4242    ) -> FLAC__bool;
4243}
4244extern "C" {
4245    #[doc = " Sets the description of a PICTURE block."]
4246    #[doc = ""]
4247    #[doc = "  If \\a copy is \\c true, a copy of the string is stored; otherwise, the object"]
4248    #[doc = "  takes ownership of the pointer.  The existing string will be freed if this"]
4249    #[doc = "  function is successful, otherwise the original string will remain if \\a copy"]
4250    #[doc = "  is \\c true and malloc() fails."]
4251    #[doc = ""]
4252    #[doc = " \\note It is safe to pass a const pointer to \\a description if \\a copy is \\c true."]
4253    #[doc = ""]
4254    #[doc = " \\param object      A pointer to an existing PICTURE object."]
4255    #[doc = " \\param description A pointer to the description string.  The string must be"]
4256    #[doc = "                    valid UTF-8, NUL-terminated.  No validation is done."]
4257    #[doc = " \\param copy        See above."]
4258    #[doc = " \\assert"]
4259    #[doc = "    \\code object != NULL \\endcode"]
4260    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_PICTURE \\endcode"]
4261    #[doc = "    \\code (description != NULL) \\endcode"]
4262    #[doc = " \\retval FLAC__bool"]
4263    #[doc = "    \\c false if \\a copy is \\c true and malloc() fails, else \\c true."]
4264    pub fn FLAC__metadata_object_picture_set_description(
4265        object: *mut FLAC__StreamMetadata,
4266        description: *mut FLAC__byte,
4267        copy: FLAC__bool,
4268    ) -> FLAC__bool;
4269}
4270extern "C" {
4271    #[doc = " Sets the picture data of a PICTURE block."]
4272    #[doc = ""]
4273    #[doc = "  If \\a copy is \\c true, a copy of the data is stored; otherwise, the object"]
4274    #[doc = "  takes ownership of the pointer.  Also sets the \\a data_length field of the"]
4275    #[doc = "  metadata object to what is passed in as the \\a length parameter.  The"]
4276    #[doc = "  existing data will be freed if this function is successful, otherwise the"]
4277    #[doc = "  original data and data_length will remain if \\a copy is \\c true and"]
4278    #[doc = "  malloc() fails."]
4279    #[doc = ""]
4280    #[doc = " \\note It is safe to pass a const pointer to \\a data if \\a copy is \\c true."]
4281    #[doc = ""]
4282    #[doc = " \\param object  A pointer to an existing PICTURE object."]
4283    #[doc = " \\param data    A pointer to the data to set."]
4284    #[doc = " \\param length  The length of \\a data in bytes."]
4285    #[doc = " \\param copy    See above."]
4286    #[doc = " \\assert"]
4287    #[doc = "    \\code object != NULL \\endcode"]
4288    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_PICTURE \\endcode"]
4289    #[doc = "    \\code (data != NULL && length > 0) ||"]
4290    #[doc = " (data == NULL && length == 0 && copy == false) \\endcode"]
4291    #[doc = " \\retval FLAC__bool"]
4292    #[doc = "    \\c false if \\a copy is \\c true and malloc() fails, else \\c true."]
4293    pub fn FLAC__metadata_object_picture_set_data(
4294        object: *mut FLAC__StreamMetadata,
4295        data: *mut FLAC__byte,
4296        length: FLAC__uint32,
4297        copy: FLAC__bool,
4298    ) -> FLAC__bool;
4299}
4300extern "C" {
4301    #[doc = " Check a PICTURE block to see if it conforms to the FLAC specification."]
4302    #[doc = "  See the format specification for limits on the contents of the"]
4303    #[doc = "  PICTURE block."]
4304    #[doc = ""]
4305    #[doc = " \\param object     A pointer to existing PICTURE block to be checked."]
4306    #[doc = " \\param violation  Address of a pointer to a string.  If there is a"]
4307    #[doc = "                   violation, a pointer to a string explanation of the"]
4308    #[doc = "                   violation will be returned here. \\a violation may be"]
4309    #[doc = "                   \\c NULL if you don\'t need the returned string.  Do not"]
4310    #[doc = "                   free the returned string; it will always point to static"]
4311    #[doc = "                   data."]
4312    #[doc = " \\assert"]
4313    #[doc = "    \\code object != NULL \\endcode"]
4314    #[doc = "    \\code object->type == FLAC__METADATA_TYPE_PICTURE \\endcode"]
4315    #[doc = " \\retval FLAC__bool"]
4316    #[doc = "    \\c false if PICTURE block is illegal, else \\c true."]
4317    pub fn FLAC__metadata_object_picture_is_legal(
4318        object: *const FLAC__StreamMetadata,
4319        violation: *mut *const ::std::os::raw::c_char,
4320    ) -> FLAC__bool;
4321}
4322pub type va_list = __builtin_va_list;
4323pub type __gnuc_va_list = __builtin_va_list;
4324#[repr(C)]
4325#[derive(Copy, Clone)]
4326pub struct __mbstate_t {
4327    pub __count: ::std::os::raw::c_int,
4328    pub __value: __mbstate_t__bindgen_ty_1,
4329}
4330#[repr(C)]
4331#[derive(Copy, Clone)]
4332pub union __mbstate_t__bindgen_ty_1 {
4333    pub __wch: ::std::os::raw::c_uint,
4334    pub __wchb: [::std::os::raw::c_char; 4usize],
4335    _bindgen_union_align: u32,
4336}
4337#[repr(C)]
4338#[derive(Copy, Clone)]
4339pub struct _G_fpos_t {
4340    pub __pos: __off_t,
4341    pub __state: __mbstate_t,
4342}
4343pub type __fpos_t = _G_fpos_t;
4344#[repr(C)]
4345#[derive(Copy, Clone)]
4346pub struct _G_fpos64_t {
4347    pub __pos: __off64_t,
4348    pub __state: __mbstate_t,
4349}
4350pub type __fpos64_t = _G_fpos64_t;
4351pub type __FILE = _IO_FILE;
4352pub type FILE = _IO_FILE;
4353#[repr(C)]
4354#[derive(Debug, Copy, Clone)]
4355pub struct _IO_marker {
4356    _unused: [u8; 0],
4357}
4358#[repr(C)]
4359#[derive(Debug, Copy, Clone)]
4360pub struct _IO_codecvt {
4361    _unused: [u8; 0],
4362}
4363#[repr(C)]
4364#[derive(Debug, Copy, Clone)]
4365pub struct _IO_wide_data {
4366    _unused: [u8; 0],
4367}
4368pub type _IO_lock_t = ::std::os::raw::c_void;
4369#[repr(C)]
4370#[derive(Debug, Copy, Clone)]
4371pub struct _IO_FILE {
4372    pub _flags: ::std::os::raw::c_int,
4373    pub _IO_read_ptr: *mut ::std::os::raw::c_char,
4374    pub _IO_read_end: *mut ::std::os::raw::c_char,
4375    pub _IO_read_base: *mut ::std::os::raw::c_char,
4376    pub _IO_write_base: *mut ::std::os::raw::c_char,
4377    pub _IO_write_ptr: *mut ::std::os::raw::c_char,
4378    pub _IO_write_end: *mut ::std::os::raw::c_char,
4379    pub _IO_buf_base: *mut ::std::os::raw::c_char,
4380    pub _IO_buf_end: *mut ::std::os::raw::c_char,
4381    pub _IO_save_base: *mut ::std::os::raw::c_char,
4382    pub _IO_backup_base: *mut ::std::os::raw::c_char,
4383    pub _IO_save_end: *mut ::std::os::raw::c_char,
4384    pub _markers: *mut _IO_marker,
4385    pub _chain: *mut _IO_FILE,
4386    pub _fileno: ::std::os::raw::c_int,
4387    pub _flags2: ::std::os::raw::c_int,
4388    pub _old_offset: __off_t,
4389    pub _cur_column: ::std::os::raw::c_ushort,
4390    pub _vtable_offset: ::std::os::raw::c_schar,
4391    pub _shortbuf: [::std::os::raw::c_char; 1usize],
4392    pub _lock: *mut _IO_lock_t,
4393    pub _offset: __off64_t,
4394    pub _codecvt: *mut _IO_codecvt,
4395    pub _wide_data: *mut _IO_wide_data,
4396    pub _freeres_list: *mut _IO_FILE,
4397    pub _freeres_buf: *mut ::std::os::raw::c_void,
4398    pub __pad5: usize,
4399    pub _mode: ::std::os::raw::c_int,
4400    pub _unused2: [::std::os::raw::c_char; 20usize],
4401}
4402pub type fpos_t = __fpos_t;
4403extern "C" {
4404    #[link_name = "\u{1}stdin"]
4405    pub static mut stdin: *mut FILE;
4406}
4407extern "C" {
4408    #[link_name = "\u{1}stdout"]
4409    pub static mut stdout: *mut FILE;
4410}
4411extern "C" {
4412    #[link_name = "\u{1}stderr"]
4413    pub static mut stderr: *mut FILE;
4414}
4415extern "C" {
4416    pub fn remove(__filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
4417}
4418extern "C" {
4419    pub fn rename(
4420        __old: *const ::std::os::raw::c_char,
4421        __new: *const ::std::os::raw::c_char,
4422    ) -> ::std::os::raw::c_int;
4423}
4424extern "C" {
4425    pub fn renameat(
4426        __oldfd: ::std::os::raw::c_int,
4427        __old: *const ::std::os::raw::c_char,
4428        __newfd: ::std::os::raw::c_int,
4429        __new: *const ::std::os::raw::c_char,
4430    ) -> ::std::os::raw::c_int;
4431}
4432extern "C" {
4433    pub fn tmpfile() -> *mut FILE;
4434}
4435extern "C" {
4436    pub fn tmpnam(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
4437}
4438extern "C" {
4439    pub fn tmpnam_r(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
4440}
4441extern "C" {
4442    pub fn tempnam(
4443        __dir: *const ::std::os::raw::c_char,
4444        __pfx: *const ::std::os::raw::c_char,
4445    ) -> *mut ::std::os::raw::c_char;
4446}
4447extern "C" {
4448    pub fn fclose(__stream: *mut FILE) -> ::std::os::raw::c_int;
4449}
4450extern "C" {
4451    pub fn fflush(__stream: *mut FILE) -> ::std::os::raw::c_int;
4452}
4453extern "C" {
4454    pub fn fflush_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
4455}
4456extern "C" {
4457    pub fn fopen(
4458        __filename: *const ::std::os::raw::c_char,
4459        __modes: *const ::std::os::raw::c_char,
4460    ) -> *mut FILE;
4461}
4462extern "C" {
4463    pub fn freopen(
4464        __filename: *const ::std::os::raw::c_char,
4465        __modes: *const ::std::os::raw::c_char,
4466        __stream: *mut FILE,
4467    ) -> *mut FILE;
4468}
4469extern "C" {
4470    pub fn fdopen(__fd: ::std::os::raw::c_int, __modes: *const ::std::os::raw::c_char)
4471        -> *mut FILE;
4472}
4473extern "C" {
4474    pub fn fmemopen(
4475        __s: *mut ::std::os::raw::c_void,
4476        __len: usize,
4477        __modes: *const ::std::os::raw::c_char,
4478    ) -> *mut FILE;
4479}
4480extern "C" {
4481    pub fn open_memstream(
4482        __bufloc: *mut *mut ::std::os::raw::c_char,
4483        __sizeloc: *mut usize,
4484    ) -> *mut FILE;
4485}
4486extern "C" {
4487    pub fn setbuf(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char);
4488}
4489extern "C" {
4490    pub fn setvbuf(
4491        __stream: *mut FILE,
4492        __buf: *mut ::std::os::raw::c_char,
4493        __modes: ::std::os::raw::c_int,
4494        __n: usize,
4495    ) -> ::std::os::raw::c_int;
4496}
4497extern "C" {
4498    pub fn setbuffer(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char, __size: usize);
4499}
4500extern "C" {
4501    pub fn setlinebuf(__stream: *mut FILE);
4502}
4503extern "C" {
4504    pub fn fprintf(
4505        __stream: *mut FILE,
4506        __format: *const ::std::os::raw::c_char,
4507        ...
4508    ) -> ::std::os::raw::c_int;
4509}
4510extern "C" {
4511    pub fn printf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
4512}
4513extern "C" {
4514    pub fn sprintf(
4515        __s: *mut ::std::os::raw::c_char,
4516        __format: *const ::std::os::raw::c_char,
4517        ...
4518    ) -> ::std::os::raw::c_int;
4519}
4520extern "C" {
4521    pub fn vfprintf(
4522        __s: *mut FILE,
4523        __format: *const ::std::os::raw::c_char,
4524        __arg: *mut __va_list_tag,
4525    ) -> ::std::os::raw::c_int;
4526}
4527extern "C" {
4528    pub fn vprintf(
4529        __format: *const ::std::os::raw::c_char,
4530        __arg: *mut __va_list_tag,
4531    ) -> ::std::os::raw::c_int;
4532}
4533extern "C" {
4534    pub fn vsprintf(
4535        __s: *mut ::std::os::raw::c_char,
4536        __format: *const ::std::os::raw::c_char,
4537        __arg: *mut __va_list_tag,
4538    ) -> ::std::os::raw::c_int;
4539}
4540extern "C" {
4541    pub fn snprintf(
4542        __s: *mut ::std::os::raw::c_char,
4543        __maxlen: ::std::os::raw::c_ulong,
4544        __format: *const ::std::os::raw::c_char,
4545        ...
4546    ) -> ::std::os::raw::c_int;
4547}
4548extern "C" {
4549    pub fn vsnprintf(
4550        __s: *mut ::std::os::raw::c_char,
4551        __maxlen: ::std::os::raw::c_ulong,
4552        __format: *const ::std::os::raw::c_char,
4553        __arg: *mut __va_list_tag,
4554    ) -> ::std::os::raw::c_int;
4555}
4556extern "C" {
4557    pub fn vdprintf(
4558        __fd: ::std::os::raw::c_int,
4559        __fmt: *const ::std::os::raw::c_char,
4560        __arg: *mut __va_list_tag,
4561    ) -> ::std::os::raw::c_int;
4562}
4563extern "C" {
4564    pub fn dprintf(
4565        __fd: ::std::os::raw::c_int,
4566        __fmt: *const ::std::os::raw::c_char,
4567        ...
4568    ) -> ::std::os::raw::c_int;
4569}
4570extern "C" {
4571    pub fn fscanf(
4572        __stream: *mut FILE,
4573        __format: *const ::std::os::raw::c_char,
4574        ...
4575    ) -> ::std::os::raw::c_int;
4576}
4577extern "C" {
4578    pub fn scanf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
4579}
4580extern "C" {
4581    pub fn sscanf(
4582        __s: *const ::std::os::raw::c_char,
4583        __format: *const ::std::os::raw::c_char,
4584        ...
4585    ) -> ::std::os::raw::c_int;
4586}
4587extern "C" {
4588    #[link_name = "\u{1}__isoc99_fscanf"]
4589    pub fn fscanf1(
4590        __stream: *mut FILE,
4591        __format: *const ::std::os::raw::c_char,
4592        ...
4593    ) -> ::std::os::raw::c_int;
4594}
4595extern "C" {
4596    #[link_name = "\u{1}__isoc99_scanf"]
4597    pub fn scanf1(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int;
4598}
4599extern "C" {
4600    #[link_name = "\u{1}__isoc99_sscanf"]
4601    pub fn sscanf1(
4602        __s: *const ::std::os::raw::c_char,
4603        __format: *const ::std::os::raw::c_char,
4604        ...
4605    ) -> ::std::os::raw::c_int;
4606}
4607extern "C" {
4608    pub fn vfscanf(
4609        __s: *mut FILE,
4610        __format: *const ::std::os::raw::c_char,
4611        __arg: *mut __va_list_tag,
4612    ) -> ::std::os::raw::c_int;
4613}
4614extern "C" {
4615    pub fn vscanf(
4616        __format: *const ::std::os::raw::c_char,
4617        __arg: *mut __va_list_tag,
4618    ) -> ::std::os::raw::c_int;
4619}
4620extern "C" {
4621    pub fn vsscanf(
4622        __s: *const ::std::os::raw::c_char,
4623        __format: *const ::std::os::raw::c_char,
4624        __arg: *mut __va_list_tag,
4625    ) -> ::std::os::raw::c_int;
4626}
4627extern "C" {
4628    #[link_name = "\u{1}__isoc99_vfscanf"]
4629    pub fn vfscanf1(
4630        __s: *mut FILE,
4631        __format: *const ::std::os::raw::c_char,
4632        __arg: *mut __va_list_tag,
4633    ) -> ::std::os::raw::c_int;
4634}
4635extern "C" {
4636    #[link_name = "\u{1}__isoc99_vscanf"]
4637    pub fn vscanf1(
4638        __format: *const ::std::os::raw::c_char,
4639        __arg: *mut __va_list_tag,
4640    ) -> ::std::os::raw::c_int;
4641}
4642extern "C" {
4643    #[link_name = "\u{1}__isoc99_vsscanf"]
4644    pub fn vsscanf1(
4645        __s: *const ::std::os::raw::c_char,
4646        __format: *const ::std::os::raw::c_char,
4647        __arg: *mut __va_list_tag,
4648    ) -> ::std::os::raw::c_int;
4649}
4650extern "C" {
4651    pub fn fgetc(__stream: *mut FILE) -> ::std::os::raw::c_int;
4652}
4653extern "C" {
4654    pub fn getc(__stream: *mut FILE) -> ::std::os::raw::c_int;
4655}
4656extern "C" {
4657    pub fn getchar() -> ::std::os::raw::c_int;
4658}
4659extern "C" {
4660    pub fn getc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
4661}
4662extern "C" {
4663    pub fn getchar_unlocked() -> ::std::os::raw::c_int;
4664}
4665extern "C" {
4666    pub fn fgetc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
4667}
4668extern "C" {
4669    pub fn fputc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
4670}
4671extern "C" {
4672    pub fn putc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
4673}
4674extern "C" {
4675    pub fn putchar(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
4676}
4677extern "C" {
4678    pub fn fputc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE)
4679        -> ::std::os::raw::c_int;
4680}
4681extern "C" {
4682    pub fn putc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
4683}
4684extern "C" {
4685    pub fn putchar_unlocked(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
4686}
4687extern "C" {
4688    pub fn getw(__stream: *mut FILE) -> ::std::os::raw::c_int;
4689}
4690extern "C" {
4691    pub fn putw(__w: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
4692}
4693extern "C" {
4694    pub fn fgets(
4695        __s: *mut ::std::os::raw::c_char,
4696        __n: ::std::os::raw::c_int,
4697        __stream: *mut FILE,
4698    ) -> *mut ::std::os::raw::c_char;
4699}
4700extern "C" {
4701    pub fn __getdelim(
4702        __lineptr: *mut *mut ::std::os::raw::c_char,
4703        __n: *mut usize,
4704        __delimiter: ::std::os::raw::c_int,
4705        __stream: *mut FILE,
4706    ) -> __ssize_t;
4707}
4708extern "C" {
4709    pub fn getdelim(
4710        __lineptr: *mut *mut ::std::os::raw::c_char,
4711        __n: *mut usize,
4712        __delimiter: ::std::os::raw::c_int,
4713        __stream: *mut FILE,
4714    ) -> __ssize_t;
4715}
4716extern "C" {
4717    pub fn getline(
4718        __lineptr: *mut *mut ::std::os::raw::c_char,
4719        __n: *mut usize,
4720        __stream: *mut FILE,
4721    ) -> __ssize_t;
4722}
4723extern "C" {
4724    pub fn fputs(__s: *const ::std::os::raw::c_char, __stream: *mut FILE) -> ::std::os::raw::c_int;
4725}
4726extern "C" {
4727    pub fn puts(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
4728}
4729extern "C" {
4730    pub fn ungetc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int;
4731}
4732extern "C" {
4733    pub fn fread(
4734        __ptr: *mut ::std::os::raw::c_void,
4735        __size: ::std::os::raw::c_ulong,
4736        __n: ::std::os::raw::c_ulong,
4737        __stream: *mut FILE,
4738    ) -> ::std::os::raw::c_ulong;
4739}
4740extern "C" {
4741    pub fn fwrite(
4742        __ptr: *const ::std::os::raw::c_void,
4743        __size: ::std::os::raw::c_ulong,
4744        __n: ::std::os::raw::c_ulong,
4745        __s: *mut FILE,
4746    ) -> ::std::os::raw::c_ulong;
4747}
4748extern "C" {
4749    pub fn fread_unlocked(
4750        __ptr: *mut ::std::os::raw::c_void,
4751        __size: usize,
4752        __n: usize,
4753        __stream: *mut FILE,
4754    ) -> usize;
4755}
4756extern "C" {
4757    pub fn fwrite_unlocked(
4758        __ptr: *const ::std::os::raw::c_void,
4759        __size: usize,
4760        __n: usize,
4761        __stream: *mut FILE,
4762    ) -> usize;
4763}
4764extern "C" {
4765    pub fn fseek(
4766        __stream: *mut FILE,
4767        __off: ::std::os::raw::c_long,
4768        __whence: ::std::os::raw::c_int,
4769    ) -> ::std::os::raw::c_int;
4770}
4771extern "C" {
4772    pub fn ftell(__stream: *mut FILE) -> ::std::os::raw::c_long;
4773}
4774extern "C" {
4775    pub fn rewind(__stream: *mut FILE);
4776}
4777extern "C" {
4778    pub fn fseeko(
4779        __stream: *mut FILE,
4780        __off: __off_t,
4781        __whence: ::std::os::raw::c_int,
4782    ) -> ::std::os::raw::c_int;
4783}
4784extern "C" {
4785    pub fn ftello(__stream: *mut FILE) -> __off_t;
4786}
4787extern "C" {
4788    pub fn fgetpos(__stream: *mut FILE, __pos: *mut fpos_t) -> ::std::os::raw::c_int;
4789}
4790extern "C" {
4791    pub fn fsetpos(__stream: *mut FILE, __pos: *const fpos_t) -> ::std::os::raw::c_int;
4792}
4793extern "C" {
4794    pub fn clearerr(__stream: *mut FILE);
4795}
4796extern "C" {
4797    pub fn feof(__stream: *mut FILE) -> ::std::os::raw::c_int;
4798}
4799extern "C" {
4800    pub fn ferror(__stream: *mut FILE) -> ::std::os::raw::c_int;
4801}
4802extern "C" {
4803    pub fn clearerr_unlocked(__stream: *mut FILE);
4804}
4805extern "C" {
4806    pub fn feof_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
4807}
4808extern "C" {
4809    pub fn ferror_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
4810}
4811extern "C" {
4812    pub fn perror(__s: *const ::std::os::raw::c_char);
4813}
4814extern "C" {
4815    #[link_name = "\u{1}sys_nerr"]
4816    pub static mut sys_nerr: ::std::os::raw::c_int;
4817}
4818extern "C" {
4819    #[link_name = "\u{1}sys_errlist"]
4820    pub static mut sys_errlist: [*const ::std::os::raw::c_char; 0usize];
4821}
4822extern "C" {
4823    pub fn fileno(__stream: *mut FILE) -> ::std::os::raw::c_int;
4824}
4825extern "C" {
4826    pub fn fileno_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int;
4827}
4828extern "C" {
4829    pub fn popen(
4830        __command: *const ::std::os::raw::c_char,
4831        __modes: *const ::std::os::raw::c_char,
4832    ) -> *mut FILE;
4833}
4834extern "C" {
4835    pub fn pclose(__stream: *mut FILE) -> ::std::os::raw::c_int;
4836}
4837extern "C" {
4838    pub fn ctermid(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char;
4839}
4840extern "C" {
4841    pub fn flockfile(__stream: *mut FILE);
4842}
4843extern "C" {
4844    pub fn ftrylockfile(__stream: *mut FILE) -> ::std::os::raw::c_int;
4845}
4846extern "C" {
4847    pub fn funlockfile(__stream: *mut FILE);
4848}
4849extern "C" {
4850    pub fn __uflow(arg1: *mut FILE) -> ::std::os::raw::c_int;
4851}
4852extern "C" {
4853    pub fn __overflow(arg1: *mut FILE, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int;
4854}
4855pub const FLAC__StreamDecoderState_FLAC__STREAM_DECODER_SEARCH_FOR_METADATA:
4856    FLAC__StreamDecoderState = 0;
4857pub const FLAC__StreamDecoderState_FLAC__STREAM_DECODER_READ_METADATA: FLAC__StreamDecoderState = 1;
4858pub const FLAC__StreamDecoderState_FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC:
4859    FLAC__StreamDecoderState = 2;
4860pub const FLAC__StreamDecoderState_FLAC__STREAM_DECODER_READ_FRAME: FLAC__StreamDecoderState = 3;
4861pub const FLAC__StreamDecoderState_FLAC__STREAM_DECODER_END_OF_STREAM: FLAC__StreamDecoderState = 4;
4862pub const FLAC__StreamDecoderState_FLAC__STREAM_DECODER_OGG_ERROR: FLAC__StreamDecoderState = 5;
4863pub const FLAC__StreamDecoderState_FLAC__STREAM_DECODER_SEEK_ERROR: FLAC__StreamDecoderState = 6;
4864pub const FLAC__StreamDecoderState_FLAC__STREAM_DECODER_ABORTED: FLAC__StreamDecoderState = 7;
4865pub const FLAC__StreamDecoderState_FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR:
4866    FLAC__StreamDecoderState = 8;
4867pub const FLAC__StreamDecoderState_FLAC__STREAM_DECODER_UNINITIALIZED: FLAC__StreamDecoderState = 9;
4868#[doc = " State values for a FLAC__StreamDecoder"]
4869#[doc = ""]
4870#[doc = " The decoder\'s state can be obtained by calling FLAC__stream_decoder_get_state()."]
4871pub type FLAC__StreamDecoderState = u32;
4872extern "C" {
4873    #[link_name = "\u{1}FLAC__StreamDecoderStateString"]
4874    pub static mut FLAC__StreamDecoderStateString: [*const ::std::os::raw::c_char; 0usize];
4875}
4876pub const FLAC__StreamDecoderInitStatus_FLAC__STREAM_DECODER_INIT_STATUS_OK:
4877    FLAC__StreamDecoderInitStatus = 0;
4878pub const FLAC__StreamDecoderInitStatus_FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER:
4879    FLAC__StreamDecoderInitStatus = 1;
4880pub const FLAC__StreamDecoderInitStatus_FLAC__STREAM_DECODER_INIT_STATUS_INVALID_CALLBACKS:
4881    FLAC__StreamDecoderInitStatus = 2;
4882pub const FLAC__StreamDecoderInitStatus_FLAC__STREAM_DECODER_INIT_STATUS_MEMORY_ALLOCATION_ERROR:
4883    FLAC__StreamDecoderInitStatus = 3;
4884pub const FLAC__StreamDecoderInitStatus_FLAC__STREAM_DECODER_INIT_STATUS_ERROR_OPENING_FILE:
4885    FLAC__StreamDecoderInitStatus = 4;
4886pub const FLAC__StreamDecoderInitStatus_FLAC__STREAM_DECODER_INIT_STATUS_ALREADY_INITIALIZED:
4887    FLAC__StreamDecoderInitStatus = 5;
4888#[doc = " Possible return values for the FLAC__stream_decoder_init_*() functions."]
4889pub type FLAC__StreamDecoderInitStatus = u32;
4890extern "C" {
4891    #[link_name = "\u{1}FLAC__StreamDecoderInitStatusString"]
4892    pub static mut FLAC__StreamDecoderInitStatusString: [*const ::std::os::raw::c_char; 0usize];
4893}
4894pub const FLAC__StreamDecoderReadStatus_FLAC__STREAM_DECODER_READ_STATUS_CONTINUE:
4895    FLAC__StreamDecoderReadStatus = 0;
4896pub const FLAC__StreamDecoderReadStatus_FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM:
4897    FLAC__StreamDecoderReadStatus = 1;
4898pub const FLAC__StreamDecoderReadStatus_FLAC__STREAM_DECODER_READ_STATUS_ABORT:
4899    FLAC__StreamDecoderReadStatus = 2;
4900#[doc = " Return values for the FLAC__StreamDecoder read callback."]
4901pub type FLAC__StreamDecoderReadStatus = u32;
4902extern "C" {
4903    #[link_name = "\u{1}FLAC__StreamDecoderReadStatusString"]
4904    pub static mut FLAC__StreamDecoderReadStatusString: [*const ::std::os::raw::c_char; 0usize];
4905}
4906pub const FLAC__StreamDecoderSeekStatus_FLAC__STREAM_DECODER_SEEK_STATUS_OK:
4907    FLAC__StreamDecoderSeekStatus = 0;
4908pub const FLAC__StreamDecoderSeekStatus_FLAC__STREAM_DECODER_SEEK_STATUS_ERROR:
4909    FLAC__StreamDecoderSeekStatus = 1;
4910pub const FLAC__StreamDecoderSeekStatus_FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED:
4911    FLAC__StreamDecoderSeekStatus = 2;
4912#[doc = " Return values for the FLAC__StreamDecoder seek callback."]
4913pub type FLAC__StreamDecoderSeekStatus = u32;
4914extern "C" {
4915    #[link_name = "\u{1}FLAC__StreamDecoderSeekStatusString"]
4916    pub static mut FLAC__StreamDecoderSeekStatusString: [*const ::std::os::raw::c_char; 0usize];
4917}
4918pub const FLAC__StreamDecoderTellStatus_FLAC__STREAM_DECODER_TELL_STATUS_OK:
4919    FLAC__StreamDecoderTellStatus = 0;
4920pub const FLAC__StreamDecoderTellStatus_FLAC__STREAM_DECODER_TELL_STATUS_ERROR:
4921    FLAC__StreamDecoderTellStatus = 1;
4922pub const FLAC__StreamDecoderTellStatus_FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED:
4923    FLAC__StreamDecoderTellStatus = 2;
4924#[doc = " Return values for the FLAC__StreamDecoder tell callback."]
4925pub type FLAC__StreamDecoderTellStatus = u32;
4926extern "C" {
4927    #[link_name = "\u{1}FLAC__StreamDecoderTellStatusString"]
4928    pub static mut FLAC__StreamDecoderTellStatusString: [*const ::std::os::raw::c_char; 0usize];
4929}
4930pub const FLAC__StreamDecoderLengthStatus_FLAC__STREAM_DECODER_LENGTH_STATUS_OK:
4931    FLAC__StreamDecoderLengthStatus = 0;
4932pub const FLAC__StreamDecoderLengthStatus_FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR:
4933    FLAC__StreamDecoderLengthStatus = 1;
4934pub const FLAC__StreamDecoderLengthStatus_FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED:
4935    FLAC__StreamDecoderLengthStatus = 2;
4936#[doc = " Return values for the FLAC__StreamDecoder length callback."]
4937pub type FLAC__StreamDecoderLengthStatus = u32;
4938extern "C" {
4939    #[link_name = "\u{1}FLAC__StreamDecoderLengthStatusString"]
4940    pub static mut FLAC__StreamDecoderLengthStatusString: [*const ::std::os::raw::c_char; 0usize];
4941}
4942pub const FLAC__StreamDecoderWriteStatus_FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE:
4943    FLAC__StreamDecoderWriteStatus = 0;
4944pub const FLAC__StreamDecoderWriteStatus_FLAC__STREAM_DECODER_WRITE_STATUS_ABORT:
4945    FLAC__StreamDecoderWriteStatus = 1;
4946#[doc = " Return values for the FLAC__StreamDecoder write callback."]
4947pub type FLAC__StreamDecoderWriteStatus = u32;
4948extern "C" {
4949    #[link_name = "\u{1}FLAC__StreamDecoderWriteStatusString"]
4950    pub static mut FLAC__StreamDecoderWriteStatusString: [*const ::std::os::raw::c_char; 0usize];
4951}
4952pub const FLAC__StreamDecoderErrorStatus_FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC:
4953    FLAC__StreamDecoderErrorStatus = 0;
4954pub const FLAC__StreamDecoderErrorStatus_FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER:
4955    FLAC__StreamDecoderErrorStatus = 1;
4956pub const FLAC__StreamDecoderErrorStatus_FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH:
4957    FLAC__StreamDecoderErrorStatus = 2;
4958pub const FLAC__StreamDecoderErrorStatus_FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM:
4959    FLAC__StreamDecoderErrorStatus = 3;
4960#[doc = " Possible values passed back to the FLAC__StreamDecoder error callback."]
4961#[doc = "  \\c FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC is the generic catch-"]
4962#[doc = "  all.  The rest could be caused by bad sync (false synchronization on"]
4963#[doc = "  data that is not the start of a frame) or corrupted data.  The error"]
4964#[doc = "  itself is the decoder\'s best guess at what happened assuming a correct"]
4965#[doc = "  sync.  For example \\c FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER"]
4966#[doc = "  could be caused by a correct sync on the start of a frame, but some"]
4967#[doc = "  data in the frame header was corrupted.  Or it could be the result of"]
4968#[doc = "  syncing on a point the stream that looked like the starting of a frame"]
4969#[doc = "  but was not.  \\c FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STREAM"]
4970#[doc = "  could be because the decoder encountered a valid frame made by a future"]
4971#[doc = "  version of the encoder which it cannot parse, or because of a false"]
4972#[doc = "  sync making it appear as though an encountered frame was generated by"]
4973#[doc = "  a future encoder."]
4974pub type FLAC__StreamDecoderErrorStatus = u32;
4975extern "C" {
4976    #[link_name = "\u{1}FLAC__StreamDecoderErrorStatusString"]
4977    pub static mut FLAC__StreamDecoderErrorStatusString: [*const ::std::os::raw::c_char; 0usize];
4978}
4979#[doc = " class FLAC__StreamDecoder"]
4980#[doc = ""]
4981#[repr(C)]
4982#[derive(Debug, Copy, Clone)]
4983pub struct FLAC__StreamDecoderProtected {
4984    _unused: [u8; 0],
4985}
4986#[repr(C)]
4987#[derive(Debug, Copy, Clone)]
4988pub struct FLAC__StreamDecoderPrivate {
4989    _unused: [u8; 0],
4990}
4991#[doc = " The opaque structure definition for the stream decoder type."]
4992#[doc = "  See the \\link flac_stream_decoder stream decoder module \\endlink"]
4993#[doc = "  for a detailed description."]
4994#[repr(C)]
4995#[derive(Debug, Copy, Clone)]
4996pub struct FLAC__StreamDecoder {
4997    pub protected_: *mut FLAC__StreamDecoderProtected,
4998    pub private_: *mut FLAC__StreamDecoderPrivate,
4999}
5000#[doc = " Signature for the read callback."]
5001#[doc = ""]
5002#[doc = "  A function pointer matching this signature must be passed to"]
5003#[doc = "  FLAC__stream_decoder_init*_stream(). The supplied function will be"]
5004#[doc = "  called when the decoder needs more input data.  The address of the"]
5005#[doc = "  buffer to be filled is supplied, along with the number of bytes the"]
5006#[doc = "  buffer can hold.  The callback may choose to supply less data and"]
5007#[doc = "  modify the byte count but must be careful not to overflow the buffer."]
5008#[doc = "  The callback then returns a status code chosen from"]
5009#[doc = "  FLAC__StreamDecoderReadStatus."]
5010#[doc = ""]
5011#[doc = " Here is an example of a read callback for stdio streams:"]
5012#[doc = " \\code"]
5013#[doc = " FLAC__StreamDecoderReadStatus read_cb(const FLAC__StreamDecoder *decoder, FLAC__byte buffer[], size_t *bytes, void *client_data)"]
5014#[doc = " {"]
5015#[doc = "   FILE *file = ((MyClientData*)client_data)->file;"]
5016#[doc = "   if(*bytes > 0) {"]
5017#[doc = "     *bytes = fread(buffer, sizeof(FLAC__byte), *bytes, file);"]
5018#[doc = "     if(ferror(file))"]
5019#[doc = "       return FLAC__STREAM_DECODER_READ_STATUS_ABORT;"]
5020#[doc = "     else if(*bytes == 0)"]
5021#[doc = "       return FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM;"]
5022#[doc = "     else"]
5023#[doc = "       return FLAC__STREAM_DECODER_READ_STATUS_CONTINUE;"]
5024#[doc = "   }"]
5025#[doc = "   else"]
5026#[doc = "     return FLAC__STREAM_DECODER_READ_STATUS_ABORT;"]
5027#[doc = " }"]
5028#[doc = " \\endcode"]
5029#[doc = ""]
5030#[doc = " \\note In general, FLAC__StreamDecoder functions which change the"]
5031#[doc = " state should not be called on the \\a decoder while in the callback."]
5032#[doc = ""]
5033#[doc = " \\param  decoder  The decoder instance calling the callback."]
5034#[doc = " \\param  buffer   A pointer to a location for the callee to store"]
5035#[doc = "                  data to be decoded."]
5036#[doc = " \\param  bytes    A pointer to the size of the buffer.  On entry"]
5037#[doc = "                  to the callback, it contains the maximum number"]
5038#[doc = "                  of bytes that may be stored in \\a buffer.  The"]
5039#[doc = "                  callee must set it to the actual number of bytes"]
5040#[doc = "                  stored (0 in case of error or end-of-stream) before"]
5041#[doc = "                  returning."]
5042#[doc = " \\param  client_data  The callee\'s client data set through"]
5043#[doc = "                      FLAC__stream_decoder_init_*()."]
5044#[doc = " \\retval FLAC__StreamDecoderReadStatus"]
5045#[doc = "    The callee\'s return status.  Note that the callback should return"]
5046#[doc = "    \\c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM if and only if"]
5047#[doc = "    zero bytes were read and there is no more data to be read."]
5048pub type FLAC__StreamDecoderReadCallback = ::std::option::Option<
5049    unsafe extern "C" fn(
5050        decoder: *const FLAC__StreamDecoder,
5051        buffer: *mut FLAC__byte,
5052        bytes: *mut usize,
5053        client_data: *mut ::std::os::raw::c_void,
5054    ) -> FLAC__StreamDecoderReadStatus,
5055>;
5056#[doc = " Signature for the seek callback."]
5057#[doc = ""]
5058#[doc = "  A function pointer matching this signature may be passed to"]
5059#[doc = "  FLAC__stream_decoder_init*_stream().  The supplied function will be"]
5060#[doc = "  called when the decoder needs to seek the input stream.  The decoder"]
5061#[doc = "  will pass the absolute byte offset to seek to, 0 meaning the"]
5062#[doc = "  beginning of the stream."]
5063#[doc = ""]
5064#[doc = " Here is an example of a seek callback for stdio streams:"]
5065#[doc = " \\code"]
5066#[doc = " FLAC__StreamDecoderSeekStatus seek_cb(const FLAC__StreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data)"]
5067#[doc = " {"]
5068#[doc = "   FILE *file = ((MyClientData*)client_data)->file;"]
5069#[doc = "   if(file == stdin)"]
5070#[doc = "     return FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED;"]
5071#[doc = "   else if(fseeko(file, (off_t)absolute_byte_offset, SEEK_SET) < 0)"]
5072#[doc = "     return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;"]
5073#[doc = "   else"]
5074#[doc = "     return FLAC__STREAM_DECODER_SEEK_STATUS_OK;"]
5075#[doc = " }"]
5076#[doc = " \\endcode"]
5077#[doc = ""]
5078#[doc = " \\note In general, FLAC__StreamDecoder functions which change the"]
5079#[doc = " state should not be called on the \\a decoder while in the callback."]
5080#[doc = ""]
5081#[doc = " \\param  decoder  The decoder instance calling the callback."]
5082#[doc = " \\param  absolute_byte_offset  The offset from the beginning of the stream"]
5083#[doc = "                               to seek to."]
5084#[doc = " \\param  client_data  The callee\'s client data set through"]
5085#[doc = "                      FLAC__stream_decoder_init_*()."]
5086#[doc = " \\retval FLAC__StreamDecoderSeekStatus"]
5087#[doc = "    The callee\'s return status."]
5088pub type FLAC__StreamDecoderSeekCallback = ::std::option::Option<
5089    unsafe extern "C" fn(
5090        decoder: *const FLAC__StreamDecoder,
5091        absolute_byte_offset: FLAC__uint64,
5092        client_data: *mut ::std::os::raw::c_void,
5093    ) -> FLAC__StreamDecoderSeekStatus,
5094>;
5095#[doc = " Signature for the tell callback."]
5096#[doc = ""]
5097#[doc = "  A function pointer matching this signature may be passed to"]
5098#[doc = "  FLAC__stream_decoder_init*_stream().  The supplied function will be"]
5099#[doc = "  called when the decoder wants to know the current position of the"]
5100#[doc = "  stream.  The callback should return the byte offset from the"]
5101#[doc = "  beginning of the stream."]
5102#[doc = ""]
5103#[doc = " Here is an example of a tell callback for stdio streams:"]
5104#[doc = " \\code"]
5105#[doc = " FLAC__StreamDecoderTellStatus tell_cb(const FLAC__StreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data)"]
5106#[doc = " {"]
5107#[doc = "   FILE *file = ((MyClientData*)client_data)->file;"]
5108#[doc = "   off_t pos;"]
5109#[doc = "   if(file == stdin)"]
5110#[doc = "     return FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED;"]
5111#[doc = "   else if((pos = ftello(file)) < 0)"]
5112#[doc = "     return FLAC__STREAM_DECODER_TELL_STATUS_ERROR;"]
5113#[doc = "   else {"]
5114#[doc = "     *absolute_byte_offset = (FLAC__uint64)pos;"]
5115#[doc = "     return FLAC__STREAM_DECODER_TELL_STATUS_OK;"]
5116#[doc = "   }"]
5117#[doc = " }"]
5118#[doc = " \\endcode"]
5119#[doc = ""]
5120#[doc = " \\note In general, FLAC__StreamDecoder functions which change the"]
5121#[doc = " state should not be called on the \\a decoder while in the callback."]
5122#[doc = ""]
5123#[doc = " \\param  decoder  The decoder instance calling the callback."]
5124#[doc = " \\param  absolute_byte_offset  A pointer to storage for the current offset"]
5125#[doc = "                               from the beginning of the stream."]
5126#[doc = " \\param  client_data  The callee\'s client data set through"]
5127#[doc = "                      FLAC__stream_decoder_init_*()."]
5128#[doc = " \\retval FLAC__StreamDecoderTellStatus"]
5129#[doc = "    The callee\'s return status."]
5130pub type FLAC__StreamDecoderTellCallback = ::std::option::Option<
5131    unsafe extern "C" fn(
5132        decoder: *const FLAC__StreamDecoder,
5133        absolute_byte_offset: *mut FLAC__uint64,
5134        client_data: *mut ::std::os::raw::c_void,
5135    ) -> FLAC__StreamDecoderTellStatus,
5136>;
5137#[doc = " Signature for the length callback."]
5138#[doc = ""]
5139#[doc = "  A function pointer matching this signature may be passed to"]
5140#[doc = "  FLAC__stream_decoder_init*_stream().  The supplied function will be"]
5141#[doc = "  called when the decoder wants to know the total length of the stream"]
5142#[doc = "  in bytes."]
5143#[doc = ""]
5144#[doc = " Here is an example of a length callback for stdio streams:"]
5145#[doc = " \\code"]
5146#[doc = " FLAC__StreamDecoderLengthStatus length_cb(const FLAC__StreamDecoder *decoder, FLAC__uint64 *stream_length, void *client_data)"]
5147#[doc = " {"]
5148#[doc = "   FILE *file = ((MyClientData*)client_data)->file;"]
5149#[doc = "   struct stat filestats;"]
5150#[doc = ""]
5151#[doc = "   if(file == stdin)"]
5152#[doc = "     return FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED;"]
5153#[doc = "   else if(fstat(fileno(file), &filestats) != 0)"]
5154#[doc = "     return FLAC__STREAM_DECODER_LENGTH_STATUS_ERROR;"]
5155#[doc = "   else {"]
5156#[doc = "     *stream_length = (FLAC__uint64)filestats.st_size;"]
5157#[doc = "     return FLAC__STREAM_DECODER_LENGTH_STATUS_OK;"]
5158#[doc = "   }"]
5159#[doc = " }"]
5160#[doc = " \\endcode"]
5161#[doc = ""]
5162#[doc = " \\note In general, FLAC__StreamDecoder functions which change the"]
5163#[doc = " state should not be called on the \\a decoder while in the callback."]
5164#[doc = ""]
5165#[doc = " \\param  decoder  The decoder instance calling the callback."]
5166#[doc = " \\param  stream_length  A pointer to storage for the length of the stream"]
5167#[doc = "                        in bytes."]
5168#[doc = " \\param  client_data  The callee\'s client data set through"]
5169#[doc = "                      FLAC__stream_decoder_init_*()."]
5170#[doc = " \\retval FLAC__StreamDecoderLengthStatus"]
5171#[doc = "    The callee\'s return status."]
5172pub type FLAC__StreamDecoderLengthCallback = ::std::option::Option<
5173    unsafe extern "C" fn(
5174        decoder: *const FLAC__StreamDecoder,
5175        stream_length: *mut FLAC__uint64,
5176        client_data: *mut ::std::os::raw::c_void,
5177    ) -> FLAC__StreamDecoderLengthStatus,
5178>;
5179#[doc = " Signature for the EOF callback."]
5180#[doc = ""]
5181#[doc = "  A function pointer matching this signature may be passed to"]
5182#[doc = "  FLAC__stream_decoder_init*_stream().  The supplied function will be"]
5183#[doc = "  called when the decoder needs to know if the end of the stream has"]
5184#[doc = "  been reached."]
5185#[doc = ""]
5186#[doc = " Here is an example of a EOF callback for stdio streams:"]
5187#[doc = " FLAC__bool eof_cb(const FLAC__StreamDecoder *decoder, void *client_data)"]
5188#[doc = " \\code"]
5189#[doc = " {"]
5190#[doc = "   FILE *file = ((MyClientData*)client_data)->file;"]
5191#[doc = "   return feof(file)? true : false;"]
5192#[doc = " }"]
5193#[doc = " \\endcode"]
5194#[doc = ""]
5195#[doc = " \\note In general, FLAC__StreamDecoder functions which change the"]
5196#[doc = " state should not be called on the \\a decoder while in the callback."]
5197#[doc = ""]
5198#[doc = " \\param  decoder  The decoder instance calling the callback."]
5199#[doc = " \\param  client_data  The callee\'s client data set through"]
5200#[doc = "                      FLAC__stream_decoder_init_*()."]
5201#[doc = " \\retval FLAC__bool"]
5202#[doc = "    \\c true if the currently at the end of the stream, else \\c false."]
5203pub type FLAC__StreamDecoderEofCallback = ::std::option::Option<
5204    unsafe extern "C" fn(
5205        decoder: *const FLAC__StreamDecoder,
5206        client_data: *mut ::std::os::raw::c_void,
5207    ) -> FLAC__bool,
5208>;
5209#[doc = " Signature for the write callback."]
5210#[doc = ""]
5211#[doc = "  A function pointer matching this signature must be passed to one of"]
5212#[doc = "  the FLAC__stream_decoder_init_*() functions."]
5213#[doc = "  The supplied function will be called when the decoder has decoded a"]
5214#[doc = "  single audio frame.  The decoder will pass the frame metadata as well"]
5215#[doc = "  as an array of pointers (one for each channel) pointing to the"]
5216#[doc = "  decoded audio."]
5217#[doc = ""]
5218#[doc = " \\note In general, FLAC__StreamDecoder functions which change the"]
5219#[doc = " state should not be called on the \\a decoder while in the callback."]
5220#[doc = ""]
5221#[doc = " \\param  decoder  The decoder instance calling the callback."]
5222#[doc = " \\param  frame    The description of the decoded frame.  See"]
5223#[doc = "                  FLAC__Frame."]
5224#[doc = " \\param  buffer   An array of pointers to decoded channels of data."]
5225#[doc = "                  Each pointer will point to an array of signed"]
5226#[doc = "                  samples of length \\a frame->header.blocksize."]
5227#[doc = "                  Channels will be ordered according to the FLAC"]
5228#[doc = "                  specification; see the documentation for the"]
5229#[doc = "                  <A HREF=\"../format.html#frame_header\">frame header</A>."]
5230#[doc = " \\param  client_data  The callee\'s client data set through"]
5231#[doc = "                      FLAC__stream_decoder_init_*()."]
5232#[doc = " \\retval FLAC__StreamDecoderWriteStatus"]
5233#[doc = "    The callee\'s return status."]
5234pub type FLAC__StreamDecoderWriteCallback = ::std::option::Option<
5235    unsafe extern "C" fn(
5236        decoder: *const FLAC__StreamDecoder,
5237        frame: *const FLAC__Frame,
5238        buffer: *const *const FLAC__int32,
5239        client_data: *mut ::std::os::raw::c_void,
5240    ) -> FLAC__StreamDecoderWriteStatus,
5241>;
5242#[doc = " Signature for the metadata callback."]
5243#[doc = ""]
5244#[doc = "  A function pointer matching this signature must be passed to one of"]
5245#[doc = "  the FLAC__stream_decoder_init_*() functions."]
5246#[doc = "  The supplied function will be called when the decoder has decoded a"]
5247#[doc = "  metadata block.  In a valid FLAC file there will always be one"]
5248#[doc = "  \\c STREAMINFO block, followed by zero or more other metadata blocks."]
5249#[doc = "  These will be supplied by the decoder in the same order as they"]
5250#[doc = "  appear in the stream and always before the first audio frame (i.e."]
5251#[doc = "  write callback).  The metadata block that is passed in must not be"]
5252#[doc = "  modified, and it doesn\'t live beyond the callback, so you should make"]
5253#[doc = "  a copy of it with FLAC__metadata_object_clone() if you will need it"]
5254#[doc = "  elsewhere.  Since metadata blocks can potentially be large, by"]
5255#[doc = "  default the decoder only calls the metadata callback for the"]
5256#[doc = "  \\c STREAMINFO block; you can instruct the decoder to pass or filter"]
5257#[doc = "  other blocks with FLAC__stream_decoder_set_metadata_*() calls."]
5258#[doc = ""]
5259#[doc = " \\note In general, FLAC__StreamDecoder functions which change the"]
5260#[doc = " state should not be called on the \\a decoder while in the callback."]
5261#[doc = ""]
5262#[doc = " \\param  decoder  The decoder instance calling the callback."]
5263#[doc = " \\param  metadata The decoded metadata block."]
5264#[doc = " \\param  client_data  The callee\'s client data set through"]
5265#[doc = "                      FLAC__stream_decoder_init_*()."]
5266pub type FLAC__StreamDecoderMetadataCallback = ::std::option::Option<
5267    unsafe extern "C" fn(
5268        decoder: *const FLAC__StreamDecoder,
5269        metadata: *const FLAC__StreamMetadata,
5270        client_data: *mut ::std::os::raw::c_void,
5271    ),
5272>;
5273#[doc = " Signature for the error callback."]
5274#[doc = ""]
5275#[doc = "  A function pointer matching this signature must be passed to one of"]
5276#[doc = "  the FLAC__stream_decoder_init_*() functions."]
5277#[doc = "  The supplied function will be called whenever an error occurs during"]
5278#[doc = "  decoding."]
5279#[doc = ""]
5280#[doc = " \\note In general, FLAC__StreamDecoder functions which change the"]
5281#[doc = " state should not be called on the \\a decoder while in the callback."]
5282#[doc = ""]
5283#[doc = " \\param  decoder  The decoder instance calling the callback."]
5284#[doc = " \\param  status   The error encountered by the decoder."]
5285#[doc = " \\param  client_data  The callee\'s client data set through"]
5286#[doc = "                      FLAC__stream_decoder_init_*()."]
5287pub type FLAC__StreamDecoderErrorCallback = ::std::option::Option<
5288    unsafe extern "C" fn(
5289        decoder: *const FLAC__StreamDecoder,
5290        status: FLAC__StreamDecoderErrorStatus,
5291        client_data: *mut ::std::os::raw::c_void,
5292    ),
5293>;
5294extern "C" {
5295    #[doc = " Create a new stream decoder instance.  The instance is created with"]
5296    #[doc = "  default settings; see the individual FLAC__stream_decoder_set_*()"]
5297    #[doc = "  functions for each setting\'s default."]
5298    #[doc = ""]
5299    #[doc = " \\retval FLAC__StreamDecoder*"]
5300    #[doc = "    \\c NULL if there was an error allocating memory, else the new instance."]
5301    pub fn FLAC__stream_decoder_new() -> *mut FLAC__StreamDecoder;
5302}
5303extern "C" {
5304    #[doc = " Free a decoder instance.  Deletes the object pointed to by \\a decoder."]
5305    #[doc = ""]
5306    #[doc = " \\param decoder  A pointer to an existing decoder."]
5307    #[doc = " \\assert"]
5308    #[doc = "    \\code decoder != NULL \\endcode"]
5309    pub fn FLAC__stream_decoder_delete(decoder: *mut FLAC__StreamDecoder);
5310}
5311extern "C" {
5312    #[doc = " Set the serial number for the FLAC stream within the Ogg container."]
5313    #[doc = "  The default behavior is to use the serial number of the first Ogg"]
5314    #[doc = "  page.  Setting a serial number here will explicitly specify which"]
5315    #[doc = "  stream is to be decoded."]
5316    #[doc = ""]
5317    #[doc = " \\note"]
5318    #[doc = " This does not need to be set for native FLAC decoding."]
5319    #[doc = ""]
5320    #[doc = " \\default \\c use serial number of first page"]
5321    #[doc = " \\param  decoder        A decoder instance to set."]
5322    #[doc = " \\param  serial_number  See above."]
5323    #[doc = " \\assert"]
5324    #[doc = "    \\code decoder != NULL \\endcode"]
5325    #[doc = " \\retval FLAC__bool"]
5326    #[doc = "    \\c false if the decoder is already initialized, else \\c true."]
5327    pub fn FLAC__stream_decoder_set_ogg_serial_number(
5328        decoder: *mut FLAC__StreamDecoder,
5329        serial_number: ::std::os::raw::c_long,
5330    ) -> FLAC__bool;
5331}
5332extern "C" {
5333    #[doc = " Set the \"MD5 signature checking\" flag.  If \\c true, the decoder will"]
5334    #[doc = "  compute the MD5 signature of the unencoded audio data while decoding"]
5335    #[doc = "  and compare it to the signature from the STREAMINFO block, if it"]
5336    #[doc = "  exists, during FLAC__stream_decoder_finish()."]
5337    #[doc = ""]
5338    #[doc = "  MD5 signature checking will be turned off (until the next"]
5339    #[doc = "  FLAC__stream_decoder_reset()) if there is no signature in the"]
5340    #[doc = "  STREAMINFO block or when a seek is attempted."]
5341    #[doc = ""]
5342    #[doc = "  Clients that do not use the MD5 check should leave this off to speed"]
5343    #[doc = "  up decoding."]
5344    #[doc = ""]
5345    #[doc = " \\default \\c false"]
5346    #[doc = " \\param  decoder  A decoder instance to set."]
5347    #[doc = " \\param  value    Flag value (see above)."]
5348    #[doc = " \\assert"]
5349    #[doc = "    \\code decoder != NULL \\endcode"]
5350    #[doc = " \\retval FLAC__bool"]
5351    #[doc = "    \\c false if the decoder is already initialized, else \\c true."]
5352    pub fn FLAC__stream_decoder_set_md5_checking(
5353        decoder: *mut FLAC__StreamDecoder,
5354        value: FLAC__bool,
5355    ) -> FLAC__bool;
5356}
5357extern "C" {
5358    #[doc = " Direct the decoder to pass on all metadata blocks of type \\a type."]
5359    #[doc = ""]
5360    #[doc = " \\default By default, only the \\c STREAMINFO block is returned via the"]
5361    #[doc = "          metadata callback."]
5362    #[doc = " \\param  decoder  A decoder instance to set."]
5363    #[doc = " \\param  type     See above."]
5364    #[doc = " \\assert"]
5365    #[doc = "    \\code decoder != NULL \\endcode"]
5366    #[doc = "    \\a type is valid"]
5367    #[doc = " \\retval FLAC__bool"]
5368    #[doc = "    \\c false if the decoder is already initialized, else \\c true."]
5369    pub fn FLAC__stream_decoder_set_metadata_respond(
5370        decoder: *mut FLAC__StreamDecoder,
5371        type_: FLAC__MetadataType,
5372    ) -> FLAC__bool;
5373}
5374extern "C" {
5375    #[doc = " Direct the decoder to pass on all APPLICATION metadata blocks of the"]
5376    #[doc = "  given \\a id."]
5377    #[doc = ""]
5378    #[doc = " \\default By default, only the \\c STREAMINFO block is returned via the"]
5379    #[doc = "          metadata callback."]
5380    #[doc = " \\param  decoder  A decoder instance to set."]
5381    #[doc = " \\param  id       See above."]
5382    #[doc = " \\assert"]
5383    #[doc = "    \\code decoder != NULL \\endcode"]
5384    #[doc = "    \\code id != NULL \\endcode"]
5385    #[doc = " \\retval FLAC__bool"]
5386    #[doc = "    \\c false if the decoder is already initialized, else \\c true."]
5387    pub fn FLAC__stream_decoder_set_metadata_respond_application(
5388        decoder: *mut FLAC__StreamDecoder,
5389        id: *const FLAC__byte,
5390    ) -> FLAC__bool;
5391}
5392extern "C" {
5393    #[doc = " Direct the decoder to pass on all metadata blocks of any type."]
5394    #[doc = ""]
5395    #[doc = " \\default By default, only the \\c STREAMINFO block is returned via the"]
5396    #[doc = "          metadata callback."]
5397    #[doc = " \\param  decoder  A decoder instance to set."]
5398    #[doc = " \\assert"]
5399    #[doc = "    \\code decoder != NULL \\endcode"]
5400    #[doc = " \\retval FLAC__bool"]
5401    #[doc = "    \\c false if the decoder is already initialized, else \\c true."]
5402    pub fn FLAC__stream_decoder_set_metadata_respond_all(
5403        decoder: *mut FLAC__StreamDecoder,
5404    ) -> FLAC__bool;
5405}
5406extern "C" {
5407    #[doc = " Direct the decoder to filter out all metadata blocks of type \\a type."]
5408    #[doc = ""]
5409    #[doc = " \\default By default, only the \\c STREAMINFO block is returned via the"]
5410    #[doc = "          metadata callback."]
5411    #[doc = " \\param  decoder  A decoder instance to set."]
5412    #[doc = " \\param  type     See above."]
5413    #[doc = " \\assert"]
5414    #[doc = "    \\code decoder != NULL \\endcode"]
5415    #[doc = "    \\a type is valid"]
5416    #[doc = " \\retval FLAC__bool"]
5417    #[doc = "    \\c false if the decoder is already initialized, else \\c true."]
5418    pub fn FLAC__stream_decoder_set_metadata_ignore(
5419        decoder: *mut FLAC__StreamDecoder,
5420        type_: FLAC__MetadataType,
5421    ) -> FLAC__bool;
5422}
5423extern "C" {
5424    #[doc = " Direct the decoder to filter out all APPLICATION metadata blocks of"]
5425    #[doc = "  the given \\a id."]
5426    #[doc = ""]
5427    #[doc = " \\default By default, only the \\c STREAMINFO block is returned via the"]
5428    #[doc = "          metadata callback."]
5429    #[doc = " \\param  decoder  A decoder instance to set."]
5430    #[doc = " \\param  id       See above."]
5431    #[doc = " \\assert"]
5432    #[doc = "    \\code decoder != NULL \\endcode"]
5433    #[doc = "    \\code id != NULL \\endcode"]
5434    #[doc = " \\retval FLAC__bool"]
5435    #[doc = "    \\c false if the decoder is already initialized, else \\c true."]
5436    pub fn FLAC__stream_decoder_set_metadata_ignore_application(
5437        decoder: *mut FLAC__StreamDecoder,
5438        id: *const FLAC__byte,
5439    ) -> FLAC__bool;
5440}
5441extern "C" {
5442    #[doc = " Direct the decoder to filter out all metadata blocks of any type."]
5443    #[doc = ""]
5444    #[doc = " \\default By default, only the \\c STREAMINFO block is returned via the"]
5445    #[doc = "          metadata callback."]
5446    #[doc = " \\param  decoder  A decoder instance to set."]
5447    #[doc = " \\assert"]
5448    #[doc = "    \\code decoder != NULL \\endcode"]
5449    #[doc = " \\retval FLAC__bool"]
5450    #[doc = "    \\c false if the decoder is already initialized, else \\c true."]
5451    pub fn FLAC__stream_decoder_set_metadata_ignore_all(
5452        decoder: *mut FLAC__StreamDecoder,
5453    ) -> FLAC__bool;
5454}
5455extern "C" {
5456    #[doc = " Get the current decoder state."]
5457    #[doc = ""]
5458    #[doc = " \\param  decoder  A decoder instance to query."]
5459    #[doc = " \\assert"]
5460    #[doc = "    \\code decoder != NULL \\endcode"]
5461    #[doc = " \\retval FLAC__StreamDecoderState"]
5462    #[doc = "    The current decoder state."]
5463    pub fn FLAC__stream_decoder_get_state(
5464        decoder: *const FLAC__StreamDecoder,
5465    ) -> FLAC__StreamDecoderState;
5466}
5467extern "C" {
5468    #[doc = " Get the current decoder state as a C string."]
5469    #[doc = ""]
5470    #[doc = " \\param  decoder  A decoder instance to query."]
5471    #[doc = " \\assert"]
5472    #[doc = "    \\code decoder != NULL \\endcode"]
5473    #[doc = " \\retval const char *"]
5474    #[doc = "    The decoder state as a C string.  Do not modify the contents."]
5475    pub fn FLAC__stream_decoder_get_resolved_state_string(
5476        decoder: *const FLAC__StreamDecoder,
5477    ) -> *const ::std::os::raw::c_char;
5478}
5479extern "C" {
5480    #[doc = " Get the \"MD5 signature checking\" flag."]
5481    #[doc = "  This is the value of the setting, not whether or not the decoder is"]
5482    #[doc = "  currently checking the MD5 (remember, it can be turned off automatically"]
5483    #[doc = "  by a seek).  When the decoder is reset the flag will be restored to the"]
5484    #[doc = "  value returned by this function."]
5485    #[doc = ""]
5486    #[doc = " \\param  decoder  A decoder instance to query."]
5487    #[doc = " \\assert"]
5488    #[doc = "    \\code decoder != NULL \\endcode"]
5489    #[doc = " \\retval FLAC__bool"]
5490    #[doc = "    See above."]
5491    pub fn FLAC__stream_decoder_get_md5_checking(decoder: *const FLAC__StreamDecoder)
5492        -> FLAC__bool;
5493}
5494extern "C" {
5495    #[doc = " Get the total number of samples in the stream being decoded."]
5496    #[doc = "  Will only be valid after decoding has started and will contain the"]
5497    #[doc = "  value from the \\c STREAMINFO block.  A value of \\c 0 means \"unknown\"."]
5498    #[doc = ""]
5499    #[doc = " \\param  decoder  A decoder instance to query."]
5500    #[doc = " \\assert"]
5501    #[doc = "    \\code decoder != NULL \\endcode"]
5502    #[doc = " \\retval unsigned"]
5503    #[doc = "    See above."]
5504    pub fn FLAC__stream_decoder_get_total_samples(
5505        decoder: *const FLAC__StreamDecoder,
5506    ) -> FLAC__uint64;
5507}
5508extern "C" {
5509    #[doc = " Get the current number of channels in the stream being decoded."]
5510    #[doc = "  Will only be valid after decoding has started and will contain the"]
5511    #[doc = "  value from the most recently decoded frame header."]
5512    #[doc = ""]
5513    #[doc = " \\param  decoder  A decoder instance to query."]
5514    #[doc = " \\assert"]
5515    #[doc = "    \\code decoder != NULL \\endcode"]
5516    #[doc = " \\retval unsigned"]
5517    #[doc = "    See above."]
5518    pub fn FLAC__stream_decoder_get_channels(
5519        decoder: *const FLAC__StreamDecoder,
5520    ) -> ::std::os::raw::c_uint;
5521}
5522extern "C" {
5523    #[doc = " Get the current channel assignment in the stream being decoded."]
5524    #[doc = "  Will only be valid after decoding has started and will contain the"]
5525    #[doc = "  value from the most recently decoded frame header."]
5526    #[doc = ""]
5527    #[doc = " \\param  decoder  A decoder instance to query."]
5528    #[doc = " \\assert"]
5529    #[doc = "    \\code decoder != NULL \\endcode"]
5530    #[doc = " \\retval FLAC__ChannelAssignment"]
5531    #[doc = "    See above."]
5532    pub fn FLAC__stream_decoder_get_channel_assignment(
5533        decoder: *const FLAC__StreamDecoder,
5534    ) -> FLAC__ChannelAssignment;
5535}
5536extern "C" {
5537    #[doc = " Get the current sample resolution in the stream being decoded."]
5538    #[doc = "  Will only be valid after decoding has started and will contain the"]
5539    #[doc = "  value from the most recently decoded frame header."]
5540    #[doc = ""]
5541    #[doc = " \\param  decoder  A decoder instance to query."]
5542    #[doc = " \\assert"]
5543    #[doc = "    \\code decoder != NULL \\endcode"]
5544    #[doc = " \\retval unsigned"]
5545    #[doc = "    See above."]
5546    pub fn FLAC__stream_decoder_get_bits_per_sample(
5547        decoder: *const FLAC__StreamDecoder,
5548    ) -> ::std::os::raw::c_uint;
5549}
5550extern "C" {
5551    #[doc = " Get the current sample rate in Hz of the stream being decoded."]
5552    #[doc = "  Will only be valid after decoding has started and will contain the"]
5553    #[doc = "  value from the most recently decoded frame header."]
5554    #[doc = ""]
5555    #[doc = " \\param  decoder  A decoder instance to query."]
5556    #[doc = " \\assert"]
5557    #[doc = "    \\code decoder != NULL \\endcode"]
5558    #[doc = " \\retval unsigned"]
5559    #[doc = "    See above."]
5560    pub fn FLAC__stream_decoder_get_sample_rate(
5561        decoder: *const FLAC__StreamDecoder,
5562    ) -> ::std::os::raw::c_uint;
5563}
5564extern "C" {
5565    #[doc = " Get the current blocksize of the stream being decoded."]
5566    #[doc = "  Will only be valid after decoding has started and will contain the"]
5567    #[doc = "  value from the most recently decoded frame header."]
5568    #[doc = ""]
5569    #[doc = " \\param  decoder  A decoder instance to query."]
5570    #[doc = " \\assert"]
5571    #[doc = "    \\code decoder != NULL \\endcode"]
5572    #[doc = " \\retval unsigned"]
5573    #[doc = "    See above."]
5574    pub fn FLAC__stream_decoder_get_blocksize(
5575        decoder: *const FLAC__StreamDecoder,
5576    ) -> ::std::os::raw::c_uint;
5577}
5578extern "C" {
5579    #[doc = " Returns the decoder\'s current read position within the stream."]
5580    #[doc = "  The position is the byte offset from the start of the stream."]
5581    #[doc = "  Bytes before this position have been fully decoded.  Note that"]
5582    #[doc = "  there may still be undecoded bytes in the decoder\'s read FIFO."]
5583    #[doc = "  The returned position is correct even after a seek."]
5584    #[doc = ""]
5585    #[doc = "  \\warning This function currently only works for native FLAC,"]
5586    #[doc = "           not Ogg FLAC streams."]
5587    #[doc = ""]
5588    #[doc = " \\param  decoder   A decoder instance to query."]
5589    #[doc = " \\param  position  Address at which to return the desired position."]
5590    #[doc = " \\assert"]
5591    #[doc = "    \\code decoder != NULL \\endcode"]
5592    #[doc = "    \\code position != NULL \\endcode"]
5593    #[doc = " \\retval FLAC__bool"]
5594    #[doc = "    \\c true if successful, \\c false if the stream is not native FLAC,"]
5595    #[doc = "    or there was an error from the \'tell\' callback or it returned"]
5596    #[doc = "    \\c FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED."]
5597    pub fn FLAC__stream_decoder_get_decode_position(
5598        decoder: *const FLAC__StreamDecoder,
5599        position: *mut FLAC__uint64,
5600    ) -> FLAC__bool;
5601}
5602extern "C" {
5603    #[doc = " Initialize the decoder instance to decode native FLAC streams."]
5604    #[doc = ""]
5605    #[doc = "  This flavor of initialization sets up the decoder to decode from a"]
5606    #[doc = "  native FLAC stream. I/O is performed via callbacks to the client."]
5607    #[doc = "  For decoding from a plain file via filename or open FILE*,"]
5608    #[doc = "  FLAC__stream_decoder_init_file() and FLAC__stream_decoder_init_FILE()"]
5609    #[doc = "  provide a simpler interface."]
5610    #[doc = ""]
5611    #[doc = "  This function should be called after FLAC__stream_decoder_new() and"]
5612    #[doc = "  FLAC__stream_decoder_set_*() but before any of the"]
5613    #[doc = "  FLAC__stream_decoder_process_*() functions.  Will set and return the"]
5614    #[doc = "  decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA"]
5615    #[doc = "  if initialization succeeded."]
5616    #[doc = ""]
5617    #[doc = " \\param  decoder            An uninitialized decoder instance."]
5618    #[doc = " \\param  read_callback      See FLAC__StreamDecoderReadCallback.  This"]
5619    #[doc = "                            pointer must not be \\c NULL."]
5620    #[doc = " \\param  seek_callback      See FLAC__StreamDecoderSeekCallback.  This"]
5621    #[doc = "                            pointer may be \\c NULL if seeking is not"]
5622    #[doc = "                            supported.  If \\a seek_callback is not \\c NULL then a"]
5623    #[doc = "                            \\a tell_callback, \\a length_callback, and \\a eof_callback must also be supplied."]
5624    #[doc = "                            Alternatively, a dummy seek callback that just"]
5625    #[doc = "                            returns \\c FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED"]
5626    #[doc = "                            may also be supplied, all though this is slightly"]
5627    #[doc = "                            less efficient for the decoder."]
5628    #[doc = " \\param  tell_callback      See FLAC__StreamDecoderTellCallback.  This"]
5629    #[doc = "                            pointer may be \\c NULL if not supported by the client.  If"]
5630    #[doc = "                            \\a seek_callback is not \\c NULL then a"]
5631    #[doc = "                            \\a tell_callback must also be supplied."]
5632    #[doc = "                            Alternatively, a dummy tell callback that just"]
5633    #[doc = "                            returns \\c FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED"]
5634    #[doc = "                            may also be supplied, all though this is slightly"]
5635    #[doc = "                            less efficient for the decoder."]
5636    #[doc = " \\param  length_callback    See FLAC__StreamDecoderLengthCallback.  This"]
5637    #[doc = "                            pointer may be \\c NULL if not supported by the client.  If"]
5638    #[doc = "                            \\a seek_callback is not \\c NULL then a"]
5639    #[doc = "                            \\a length_callback must also be supplied."]
5640    #[doc = "                            Alternatively, a dummy length callback that just"]
5641    #[doc = "                            returns \\c FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED"]
5642    #[doc = "                            may also be supplied, all though this is slightly"]
5643    #[doc = "                            less efficient for the decoder."]
5644    #[doc = " \\param  eof_callback       See FLAC__StreamDecoderEofCallback.  This"]
5645    #[doc = "                            pointer may be \\c NULL if not supported by the client.  If"]
5646    #[doc = "                            \\a seek_callback is not \\c NULL then a"]
5647    #[doc = "                            \\a eof_callback must also be supplied."]
5648    #[doc = "                            Alternatively, a dummy length callback that just"]
5649    #[doc = "                            returns \\c false"]
5650    #[doc = "                            may also be supplied, all though this is slightly"]
5651    #[doc = "                            less efficient for the decoder."]
5652    #[doc = " \\param  write_callback     See FLAC__StreamDecoderWriteCallback.  This"]
5653    #[doc = "                            pointer must not be \\c NULL."]
5654    #[doc = " \\param  metadata_callback  See FLAC__StreamDecoderMetadataCallback.  This"]
5655    #[doc = "                            pointer may be \\c NULL if the callback is not"]
5656    #[doc = "                            desired."]
5657    #[doc = " \\param  error_callback     See FLAC__StreamDecoderErrorCallback.  This"]
5658    #[doc = "                            pointer must not be \\c NULL."]
5659    #[doc = " \\param  client_data        This value will be supplied to callbacks in their"]
5660    #[doc = "                            \\a client_data argument."]
5661    #[doc = " \\assert"]
5662    #[doc = "    \\code decoder != NULL \\endcode"]
5663    #[doc = " \\retval FLAC__StreamDecoderInitStatus"]
5664    #[doc = "    \\c FLAC__STREAM_DECODER_INIT_STATUS_OK if initialization was successful;"]
5665    #[doc = "    see FLAC__StreamDecoderInitStatus for the meanings of other return values."]
5666    pub fn FLAC__stream_decoder_init_stream(
5667        decoder: *mut FLAC__StreamDecoder,
5668        read_callback: FLAC__StreamDecoderReadCallback,
5669        seek_callback: FLAC__StreamDecoderSeekCallback,
5670        tell_callback: FLAC__StreamDecoderTellCallback,
5671        length_callback: FLAC__StreamDecoderLengthCallback,
5672        eof_callback: FLAC__StreamDecoderEofCallback,
5673        write_callback: FLAC__StreamDecoderWriteCallback,
5674        metadata_callback: FLAC__StreamDecoderMetadataCallback,
5675        error_callback: FLAC__StreamDecoderErrorCallback,
5676        client_data: *mut ::std::os::raw::c_void,
5677    ) -> FLAC__StreamDecoderInitStatus;
5678}
5679extern "C" {
5680    #[doc = " Initialize the decoder instance to decode Ogg FLAC streams."]
5681    #[doc = ""]
5682    #[doc = "  This flavor of initialization sets up the decoder to decode from a"]
5683    #[doc = "  FLAC stream in an Ogg container. I/O is performed via callbacks to the"]
5684    #[doc = "  client.  For decoding from a plain file via filename or open FILE*,"]
5685    #[doc = "  FLAC__stream_decoder_init_ogg_file() and FLAC__stream_decoder_init_ogg_FILE()"]
5686    #[doc = "  provide a simpler interface."]
5687    #[doc = ""]
5688    #[doc = "  This function should be called after FLAC__stream_decoder_new() and"]
5689    #[doc = "  FLAC__stream_decoder_set_*() but before any of the"]
5690    #[doc = "  FLAC__stream_decoder_process_*() functions.  Will set and return the"]
5691    #[doc = "  decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA"]
5692    #[doc = "  if initialization succeeded."]
5693    #[doc = ""]
5694    #[doc = "  \\note Support for Ogg FLAC in the library is optional.  If this"]
5695    #[doc = "  library has been built without support for Ogg FLAC, this function"]
5696    #[doc = "  will return \\c FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER."]
5697    #[doc = ""]
5698    #[doc = " \\param  decoder            An uninitialized decoder instance."]
5699    #[doc = " \\param  read_callback      See FLAC__StreamDecoderReadCallback.  This"]
5700    #[doc = "                            pointer must not be \\c NULL."]
5701    #[doc = " \\param  seek_callback      See FLAC__StreamDecoderSeekCallback.  This"]
5702    #[doc = "                            pointer may be \\c NULL if seeking is not"]
5703    #[doc = "                            supported.  If \\a seek_callback is not \\c NULL then a"]
5704    #[doc = "                            \\a tell_callback, \\a length_callback, and \\a eof_callback must also be supplied."]
5705    #[doc = "                            Alternatively, a dummy seek callback that just"]
5706    #[doc = "                            returns \\c FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED"]
5707    #[doc = "                            may also be supplied, all though this is slightly"]
5708    #[doc = "                            less efficient for the decoder."]
5709    #[doc = " \\param  tell_callback      See FLAC__StreamDecoderTellCallback.  This"]
5710    #[doc = "                            pointer may be \\c NULL if not supported by the client.  If"]
5711    #[doc = "                            \\a seek_callback is not \\c NULL then a"]
5712    #[doc = "                            \\a tell_callback must also be supplied."]
5713    #[doc = "                            Alternatively, a dummy tell callback that just"]
5714    #[doc = "                            returns \\c FLAC__STREAM_DECODER_TELL_STATUS_UNSUPPORTED"]
5715    #[doc = "                            may also be supplied, all though this is slightly"]
5716    #[doc = "                            less efficient for the decoder."]
5717    #[doc = " \\param  length_callback    See FLAC__StreamDecoderLengthCallback.  This"]
5718    #[doc = "                            pointer may be \\c NULL if not supported by the client.  If"]
5719    #[doc = "                            \\a seek_callback is not \\c NULL then a"]
5720    #[doc = "                            \\a length_callback must also be supplied."]
5721    #[doc = "                            Alternatively, a dummy length callback that just"]
5722    #[doc = "                            returns \\c FLAC__STREAM_DECODER_LENGTH_STATUS_UNSUPPORTED"]
5723    #[doc = "                            may also be supplied, all though this is slightly"]
5724    #[doc = "                            less efficient for the decoder."]
5725    #[doc = " \\param  eof_callback       See FLAC__StreamDecoderEofCallback.  This"]
5726    #[doc = "                            pointer may be \\c NULL if not supported by the client.  If"]
5727    #[doc = "                            \\a seek_callback is not \\c NULL then a"]
5728    #[doc = "                            \\a eof_callback must also be supplied."]
5729    #[doc = "                            Alternatively, a dummy length callback that just"]
5730    #[doc = "                            returns \\c false"]
5731    #[doc = "                            may also be supplied, all though this is slightly"]
5732    #[doc = "                            less efficient for the decoder."]
5733    #[doc = " \\param  write_callback     See FLAC__StreamDecoderWriteCallback.  This"]
5734    #[doc = "                            pointer must not be \\c NULL."]
5735    #[doc = " \\param  metadata_callback  See FLAC__StreamDecoderMetadataCallback.  This"]
5736    #[doc = "                            pointer may be \\c NULL if the callback is not"]
5737    #[doc = "                            desired."]
5738    #[doc = " \\param  error_callback     See FLAC__StreamDecoderErrorCallback.  This"]
5739    #[doc = "                            pointer must not be \\c NULL."]
5740    #[doc = " \\param  client_data        This value will be supplied to callbacks in their"]
5741    #[doc = "                            \\a client_data argument."]
5742    #[doc = " \\assert"]
5743    #[doc = "    \\code decoder != NULL \\endcode"]
5744    #[doc = " \\retval FLAC__StreamDecoderInitStatus"]
5745    #[doc = "    \\c FLAC__STREAM_DECODER_INIT_STATUS_OK if initialization was successful;"]
5746    #[doc = "    see FLAC__StreamDecoderInitStatus for the meanings of other return values."]
5747    pub fn FLAC__stream_decoder_init_ogg_stream(
5748        decoder: *mut FLAC__StreamDecoder,
5749        read_callback: FLAC__StreamDecoderReadCallback,
5750        seek_callback: FLAC__StreamDecoderSeekCallback,
5751        tell_callback: FLAC__StreamDecoderTellCallback,
5752        length_callback: FLAC__StreamDecoderLengthCallback,
5753        eof_callback: FLAC__StreamDecoderEofCallback,
5754        write_callback: FLAC__StreamDecoderWriteCallback,
5755        metadata_callback: FLAC__StreamDecoderMetadataCallback,
5756        error_callback: FLAC__StreamDecoderErrorCallback,
5757        client_data: *mut ::std::os::raw::c_void,
5758    ) -> FLAC__StreamDecoderInitStatus;
5759}
5760extern "C" {
5761    #[doc = " Initialize the decoder instance to decode native FLAC files."]
5762    #[doc = ""]
5763    #[doc = "  This flavor of initialization sets up the decoder to decode from a"]
5764    #[doc = "  plain native FLAC file.  For non-stdio streams, you must use"]
5765    #[doc = "  FLAC__stream_decoder_init_stream() and provide callbacks for the I/O."]
5766    #[doc = ""]
5767    #[doc = "  This function should be called after FLAC__stream_decoder_new() and"]
5768    #[doc = "  FLAC__stream_decoder_set_*() but before any of the"]
5769    #[doc = "  FLAC__stream_decoder_process_*() functions.  Will set and return the"]
5770    #[doc = "  decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA"]
5771    #[doc = "  if initialization succeeded."]
5772    #[doc = ""]
5773    #[doc = " \\param  decoder            An uninitialized decoder instance."]
5774    #[doc = " \\param  file               An open FLAC file.  The file should have been"]
5775    #[doc = "                            opened with mode \\c \"rb\" and rewound.  The file"]
5776    #[doc = "                            becomes owned by the decoder and should not be"]
5777    #[doc = "                            manipulated by the client while decoding."]
5778    #[doc = "                            Unless \\a file is \\c stdin, it will be closed"]
5779    #[doc = "                            when FLAC__stream_decoder_finish() is called."]
5780    #[doc = "                            Note however that seeking will not work when"]
5781    #[doc = "                            decoding from \\c stdout since it is not seekable."]
5782    #[doc = " \\param  write_callback     See FLAC__StreamDecoderWriteCallback.  This"]
5783    #[doc = "                            pointer must not be \\c NULL."]
5784    #[doc = " \\param  metadata_callback  See FLAC__StreamDecoderMetadataCallback.  This"]
5785    #[doc = "                            pointer may be \\c NULL if the callback is not"]
5786    #[doc = "                            desired."]
5787    #[doc = " \\param  error_callback     See FLAC__StreamDecoderErrorCallback.  This"]
5788    #[doc = "                            pointer must not be \\c NULL."]
5789    #[doc = " \\param  client_data        This value will be supplied to callbacks in their"]
5790    #[doc = "                            \\a client_data argument."]
5791    #[doc = " \\assert"]
5792    #[doc = "    \\code decoder != NULL \\endcode"]
5793    #[doc = "    \\code file != NULL \\endcode"]
5794    #[doc = " \\retval FLAC__StreamDecoderInitStatus"]
5795    #[doc = "    \\c FLAC__STREAM_DECODER_INIT_STATUS_OK if initialization was successful;"]
5796    #[doc = "    see FLAC__StreamDecoderInitStatus for the meanings of other return values."]
5797    pub fn FLAC__stream_decoder_init_FILE(
5798        decoder: *mut FLAC__StreamDecoder,
5799        file: *mut FILE,
5800        write_callback: FLAC__StreamDecoderWriteCallback,
5801        metadata_callback: FLAC__StreamDecoderMetadataCallback,
5802        error_callback: FLAC__StreamDecoderErrorCallback,
5803        client_data: *mut ::std::os::raw::c_void,
5804    ) -> FLAC__StreamDecoderInitStatus;
5805}
5806extern "C" {
5807    #[doc = " Initialize the decoder instance to decode Ogg FLAC files."]
5808    #[doc = ""]
5809    #[doc = "  This flavor of initialization sets up the decoder to decode from a"]
5810    #[doc = "  plain Ogg FLAC file.  For non-stdio streams, you must use"]
5811    #[doc = "  FLAC__stream_decoder_init_ogg_stream() and provide callbacks for the I/O."]
5812    #[doc = ""]
5813    #[doc = "  This function should be called after FLAC__stream_decoder_new() and"]
5814    #[doc = "  FLAC__stream_decoder_set_*() but before any of the"]
5815    #[doc = "  FLAC__stream_decoder_process_*() functions.  Will set and return the"]
5816    #[doc = "  decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA"]
5817    #[doc = "  if initialization succeeded."]
5818    #[doc = ""]
5819    #[doc = "  \\note Support for Ogg FLAC in the library is optional.  If this"]
5820    #[doc = "  library has been built without support for Ogg FLAC, this function"]
5821    #[doc = "  will return \\c FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER."]
5822    #[doc = ""]
5823    #[doc = " \\param  decoder            An uninitialized decoder instance."]
5824    #[doc = " \\param  file               An open FLAC file.  The file should have been"]
5825    #[doc = "                            opened with mode \\c \"rb\" and rewound.  The file"]
5826    #[doc = "                            becomes owned by the decoder and should not be"]
5827    #[doc = "                            manipulated by the client while decoding."]
5828    #[doc = "                            Unless \\a file is \\c stdin, it will be closed"]
5829    #[doc = "                            when FLAC__stream_decoder_finish() is called."]
5830    #[doc = "                            Note however that seeking will not work when"]
5831    #[doc = "                            decoding from \\c stdout since it is not seekable."]
5832    #[doc = " \\param  write_callback     See FLAC__StreamDecoderWriteCallback.  This"]
5833    #[doc = "                            pointer must not be \\c NULL."]
5834    #[doc = " \\param  metadata_callback  See FLAC__StreamDecoderMetadataCallback.  This"]
5835    #[doc = "                            pointer may be \\c NULL if the callback is not"]
5836    #[doc = "                            desired."]
5837    #[doc = " \\param  error_callback     See FLAC__StreamDecoderErrorCallback.  This"]
5838    #[doc = "                            pointer must not be \\c NULL."]
5839    #[doc = " \\param  client_data        This value will be supplied to callbacks in their"]
5840    #[doc = "                            \\a client_data argument."]
5841    #[doc = " \\assert"]
5842    #[doc = "    \\code decoder != NULL \\endcode"]
5843    #[doc = "    \\code file != NULL \\endcode"]
5844    #[doc = " \\retval FLAC__StreamDecoderInitStatus"]
5845    #[doc = "    \\c FLAC__STREAM_DECODER_INIT_STATUS_OK if initialization was successful;"]
5846    #[doc = "    see FLAC__StreamDecoderInitStatus for the meanings of other return values."]
5847    pub fn FLAC__stream_decoder_init_ogg_FILE(
5848        decoder: *mut FLAC__StreamDecoder,
5849        file: *mut FILE,
5850        write_callback: FLAC__StreamDecoderWriteCallback,
5851        metadata_callback: FLAC__StreamDecoderMetadataCallback,
5852        error_callback: FLAC__StreamDecoderErrorCallback,
5853        client_data: *mut ::std::os::raw::c_void,
5854    ) -> FLAC__StreamDecoderInitStatus;
5855}
5856extern "C" {
5857    #[doc = " Initialize the decoder instance to decode native FLAC files."]
5858    #[doc = ""]
5859    #[doc = "  This flavor of initialization sets up the decoder to decode from a plain"]
5860    #[doc = "  native FLAC file.  If POSIX fopen() semantics are not sufficient, (for"]
5861    #[doc = "  example, with Unicode filenames on Windows), you must use"]
5862    #[doc = "  FLAC__stream_decoder_init_FILE(), or FLAC__stream_decoder_init_stream()"]
5863    #[doc = "  and provide callbacks for the I/O."]
5864    #[doc = ""]
5865    #[doc = "  This function should be called after FLAC__stream_decoder_new() and"]
5866    #[doc = "  FLAC__stream_decoder_set_*() but before any of the"]
5867    #[doc = "  FLAC__stream_decoder_process_*() functions.  Will set and return the"]
5868    #[doc = "  decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA"]
5869    #[doc = "  if initialization succeeded."]
5870    #[doc = ""]
5871    #[doc = " \\param  decoder            An uninitialized decoder instance."]
5872    #[doc = " \\param  filename           The name of the file to decode from.  The file will"]
5873    #[doc = "                            be opened with fopen().  Use \\c NULL to decode from"]
5874    #[doc = "                            \\c stdin.  Note that \\c stdin is not seekable."]
5875    #[doc = " \\param  write_callback     See FLAC__StreamDecoderWriteCallback.  This"]
5876    #[doc = "                            pointer must not be \\c NULL."]
5877    #[doc = " \\param  metadata_callback  See FLAC__StreamDecoderMetadataCallback.  This"]
5878    #[doc = "                            pointer may be \\c NULL if the callback is not"]
5879    #[doc = "                            desired."]
5880    #[doc = " \\param  error_callback     See FLAC__StreamDecoderErrorCallback.  This"]
5881    #[doc = "                            pointer must not be \\c NULL."]
5882    #[doc = " \\param  client_data        This value will be supplied to callbacks in their"]
5883    #[doc = "                            \\a client_data argument."]
5884    #[doc = " \\assert"]
5885    #[doc = "    \\code decoder != NULL \\endcode"]
5886    #[doc = " \\retval FLAC__StreamDecoderInitStatus"]
5887    #[doc = "    \\c FLAC__STREAM_DECODER_INIT_STATUS_OK if initialization was successful;"]
5888    #[doc = "    see FLAC__StreamDecoderInitStatus for the meanings of other return values."]
5889    pub fn FLAC__stream_decoder_init_file(
5890        decoder: *mut FLAC__StreamDecoder,
5891        filename: *const ::std::os::raw::c_char,
5892        write_callback: FLAC__StreamDecoderWriteCallback,
5893        metadata_callback: FLAC__StreamDecoderMetadataCallback,
5894        error_callback: FLAC__StreamDecoderErrorCallback,
5895        client_data: *mut ::std::os::raw::c_void,
5896    ) -> FLAC__StreamDecoderInitStatus;
5897}
5898extern "C" {
5899    #[doc = " Initialize the decoder instance to decode Ogg FLAC files."]
5900    #[doc = ""]
5901    #[doc = "  This flavor of initialization sets up the decoder to decode from a plain"]
5902    #[doc = "  Ogg FLAC file.  If POSIX fopen() semantics are not sufficient, (for"]
5903    #[doc = "  example, with Unicode filenames on Windows), you must use"]
5904    #[doc = "  FLAC__stream_decoder_init_ogg_FILE(), or FLAC__stream_decoder_init_ogg_stream()"]
5905    #[doc = "  and provide callbacks for the I/O."]
5906    #[doc = ""]
5907    #[doc = "  This function should be called after FLAC__stream_decoder_new() and"]
5908    #[doc = "  FLAC__stream_decoder_set_*() but before any of the"]
5909    #[doc = "  FLAC__stream_decoder_process_*() functions.  Will set and return the"]
5910    #[doc = "  decoder state, which will be FLAC__STREAM_DECODER_SEARCH_FOR_METADATA"]
5911    #[doc = "  if initialization succeeded."]
5912    #[doc = ""]
5913    #[doc = "  \\note Support for Ogg FLAC in the library is optional.  If this"]
5914    #[doc = "  library has been built without support for Ogg FLAC, this function"]
5915    #[doc = "  will return \\c FLAC__STREAM_DECODER_INIT_STATUS_UNSUPPORTED_CONTAINER."]
5916    #[doc = ""]
5917    #[doc = " \\param  decoder            An uninitialized decoder instance."]
5918    #[doc = " \\param  filename           The name of the file to decode from.  The file will"]
5919    #[doc = "                            be opened with fopen().  Use \\c NULL to decode from"]
5920    #[doc = "                            \\c stdin.  Note that \\c stdin is not seekable."]
5921    #[doc = " \\param  write_callback     See FLAC__StreamDecoderWriteCallback.  This"]
5922    #[doc = "                            pointer must not be \\c NULL."]
5923    #[doc = " \\param  metadata_callback  See FLAC__StreamDecoderMetadataCallback.  This"]
5924    #[doc = "                            pointer may be \\c NULL if the callback is not"]
5925    #[doc = "                            desired."]
5926    #[doc = " \\param  error_callback     See FLAC__StreamDecoderErrorCallback.  This"]
5927    #[doc = "                            pointer must not be \\c NULL."]
5928    #[doc = " \\param  client_data        This value will be supplied to callbacks in their"]
5929    #[doc = "                            \\a client_data argument."]
5930    #[doc = " \\assert"]
5931    #[doc = "    \\code decoder != NULL \\endcode"]
5932    #[doc = " \\retval FLAC__StreamDecoderInitStatus"]
5933    #[doc = "    \\c FLAC__STREAM_DECODER_INIT_STATUS_OK if initialization was successful;"]
5934    #[doc = "    see FLAC__StreamDecoderInitStatus for the meanings of other return values."]
5935    pub fn FLAC__stream_decoder_init_ogg_file(
5936        decoder: *mut FLAC__StreamDecoder,
5937        filename: *const ::std::os::raw::c_char,
5938        write_callback: FLAC__StreamDecoderWriteCallback,
5939        metadata_callback: FLAC__StreamDecoderMetadataCallback,
5940        error_callback: FLAC__StreamDecoderErrorCallback,
5941        client_data: *mut ::std::os::raw::c_void,
5942    ) -> FLAC__StreamDecoderInitStatus;
5943}
5944extern "C" {
5945    #[doc = " Finish the decoding process."]
5946    #[doc = "  Flushes the decoding buffer, releases resources, resets the decoder"]
5947    #[doc = "  settings to their defaults, and returns the decoder state to"]
5948    #[doc = "  FLAC__STREAM_DECODER_UNINITIALIZED."]
5949    #[doc = ""]
5950    #[doc = "  In the event of a prematurely-terminated decode, it is not strictly"]
5951    #[doc = "  necessary to call this immediately before FLAC__stream_decoder_delete()"]
5952    #[doc = "  but it is good practice to match every FLAC__stream_decoder_init_*()"]
5953    #[doc = "  with a FLAC__stream_decoder_finish()."]
5954    #[doc = ""]
5955    #[doc = " \\param  decoder  An uninitialized decoder instance."]
5956    #[doc = " \\assert"]
5957    #[doc = "    \\code decoder != NULL \\endcode"]
5958    #[doc = " \\retval FLAC__bool"]
5959    #[doc = "    \\c false if MD5 checking is on AND a STREAMINFO block was available"]
5960    #[doc = "    AND the MD5 signature in the STREAMINFO block was non-zero AND the"]
5961    #[doc = "    signature does not match the one computed by the decoder; else"]
5962    #[doc = "    \\c true."]
5963    pub fn FLAC__stream_decoder_finish(decoder: *mut FLAC__StreamDecoder) -> FLAC__bool;
5964}
5965extern "C" {
5966    #[doc = " Flush the stream input."]
5967    #[doc = "  The decoder\'s input buffer will be cleared and the state set to"]
5968    #[doc = "  \\c FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC.  This will also turn"]
5969    #[doc = "  off MD5 checking."]
5970    #[doc = ""]
5971    #[doc = " \\param  decoder  A decoder instance."]
5972    #[doc = " \\assert"]
5973    #[doc = "    \\code decoder != NULL \\endcode"]
5974    #[doc = " \\retval FLAC__bool"]
5975    #[doc = "    \\c true if successful, else \\c false if a memory allocation"]
5976    #[doc = "    error occurs (in which case the state will be set to"]
5977    #[doc = "    \\c FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR)."]
5978    pub fn FLAC__stream_decoder_flush(decoder: *mut FLAC__StreamDecoder) -> FLAC__bool;
5979}
5980extern "C" {
5981    #[doc = " Reset the decoding process."]
5982    #[doc = "  The decoder\'s input buffer will be cleared and the state set to"]
5983    #[doc = "  \\c FLAC__STREAM_DECODER_SEARCH_FOR_METADATA.  This is similar to"]
5984    #[doc = "  FLAC__stream_decoder_finish() except that the settings are"]
5985    #[doc = "  preserved; there is no need to call FLAC__stream_decoder_init_*()"]
5986    #[doc = "  before decoding again.  MD5 checking will be restored to its original"]
5987    #[doc = "  setting."]
5988    #[doc = ""]
5989    #[doc = "  If the decoder is seekable, or was initialized with"]
5990    #[doc = "  FLAC__stream_decoder_init*_FILE() or FLAC__stream_decoder_init*_file(),"]
5991    #[doc = "  the decoder will also attempt to seek to the beginning of the file."]
5992    #[doc = "  If this rewind fails, this function will return \\c false.  It follows"]
5993    #[doc = "  that FLAC__stream_decoder_reset() cannot be used when decoding from"]
5994    #[doc = "  \\c stdin."]
5995    #[doc = ""]
5996    #[doc = "  If the decoder was initialized with FLAC__stream_encoder_init*_stream()"]
5997    #[doc = "  and is not seekable (i.e. no seek callback was provided or the seek"]
5998    #[doc = "  callback returns \\c FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED), it"]
5999    #[doc = "  is the duty of the client to start feeding data from the beginning of"]
6000    #[doc = "  the stream on the next FLAC__stream_decoder_process() or"]
6001    #[doc = "  FLAC__stream_decoder_process_interleaved() call."]
6002    #[doc = ""]
6003    #[doc = " \\param  decoder  A decoder instance."]
6004    #[doc = " \\assert"]
6005    #[doc = "    \\code decoder != NULL \\endcode"]
6006    #[doc = " \\retval FLAC__bool"]
6007    #[doc = "    \\c true if successful, else \\c false if a memory allocation occurs"]
6008    #[doc = "    (in which case the state will be set to"]
6009    #[doc = "    \\c FLAC__STREAM_DECODER_MEMORY_ALLOCATION_ERROR) or a seek error"]
6010    #[doc = "    occurs (the state will be unchanged)."]
6011    pub fn FLAC__stream_decoder_reset(decoder: *mut FLAC__StreamDecoder) -> FLAC__bool;
6012}
6013extern "C" {
6014    #[doc = " Decode one metadata block or audio frame."]
6015    #[doc = "  This version instructs the decoder to decode a either a single metadata"]
6016    #[doc = "  block or a single frame and stop, unless the callbacks return a fatal"]
6017    #[doc = "  error or the read callback returns"]
6018    #[doc = "  \\c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM."]
6019    #[doc = ""]
6020    #[doc = "  As the decoder needs more input it will call the read callback."]
6021    #[doc = "  Depending on what was decoded, the metadata or write callback will be"]
6022    #[doc = "  called with the decoded metadata block or audio frame."]
6023    #[doc = ""]
6024    #[doc = "  Unless there is a fatal read error or end of stream, this function"]
6025    #[doc = "  will return once one whole frame is decoded.  In other words, if the"]
6026    #[doc = "  stream is not synchronized or points to a corrupt frame header, the"]
6027    #[doc = "  decoder will continue to try and resync until it gets to a valid"]
6028    #[doc = "  frame, then decode one frame, then return.  If the decoder points to"]
6029    #[doc = "  a frame whose frame CRC in the frame footer does not match the"]
6030    #[doc = "  computed frame CRC, this function will issue a"]
6031    #[doc = "  FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH error to the"]
6032    #[doc = "  error callback, and return, having decoded one complete, although"]
6033    #[doc = "  corrupt, frame.  (Such corrupted frames are sent as silence of the"]
6034    #[doc = "  correct length to the write callback.)"]
6035    #[doc = ""]
6036    #[doc = " \\param  decoder  An initialized decoder instance."]
6037    #[doc = " \\assert"]
6038    #[doc = "    \\code decoder != NULL \\endcode"]
6039    #[doc = " \\retval FLAC__bool"]
6040    #[doc = "    \\c false if any fatal read, write, or memory allocation error"]
6041    #[doc = "    occurred (meaning decoding must stop), else \\c true; for more"]
6042    #[doc = "    information about the decoder, check the decoder state with"]
6043    #[doc = "    FLAC__stream_decoder_get_state()."]
6044    pub fn FLAC__stream_decoder_process_single(decoder: *mut FLAC__StreamDecoder) -> FLAC__bool;
6045}
6046extern "C" {
6047    #[doc = " Decode until the end of the metadata."]
6048    #[doc = "  This version instructs the decoder to decode from the current position"]
6049    #[doc = "  and continue until all the metadata has been read, or until the"]
6050    #[doc = "  callbacks return a fatal error or the read callback returns"]
6051    #[doc = "  \\c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM."]
6052    #[doc = ""]
6053    #[doc = "  As the decoder needs more input it will call the read callback."]
6054    #[doc = "  As each metadata block is decoded, the metadata callback will be called"]
6055    #[doc = "  with the decoded metadata."]
6056    #[doc = ""]
6057    #[doc = " \\param  decoder  An initialized decoder instance."]
6058    #[doc = " \\assert"]
6059    #[doc = "    \\code decoder != NULL \\endcode"]
6060    #[doc = " \\retval FLAC__bool"]
6061    #[doc = "    \\c false if any fatal read, write, or memory allocation error"]
6062    #[doc = "    occurred (meaning decoding must stop), else \\c true; for more"]
6063    #[doc = "    information about the decoder, check the decoder state with"]
6064    #[doc = "    FLAC__stream_decoder_get_state()."]
6065    pub fn FLAC__stream_decoder_process_until_end_of_metadata(
6066        decoder: *mut FLAC__StreamDecoder,
6067    ) -> FLAC__bool;
6068}
6069extern "C" {
6070    #[doc = " Decode until the end of the stream."]
6071    #[doc = "  This version instructs the decoder to decode from the current position"]
6072    #[doc = "  and continue until the end of stream (the read callback returns"]
6073    #[doc = "  \\c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM), or until the"]
6074    #[doc = "  callbacks return a fatal error."]
6075    #[doc = ""]
6076    #[doc = "  As the decoder needs more input it will call the read callback."]
6077    #[doc = "  As each metadata block and frame is decoded, the metadata or write"]
6078    #[doc = "  callback will be called with the decoded metadata or frame."]
6079    #[doc = ""]
6080    #[doc = " \\param  decoder  An initialized decoder instance."]
6081    #[doc = " \\assert"]
6082    #[doc = "    \\code decoder != NULL \\endcode"]
6083    #[doc = " \\retval FLAC__bool"]
6084    #[doc = "    \\c false if any fatal read, write, or memory allocation error"]
6085    #[doc = "    occurred (meaning decoding must stop), else \\c true; for more"]
6086    #[doc = "    information about the decoder, check the decoder state with"]
6087    #[doc = "    FLAC__stream_decoder_get_state()."]
6088    pub fn FLAC__stream_decoder_process_until_end_of_stream(
6089        decoder: *mut FLAC__StreamDecoder,
6090    ) -> FLAC__bool;
6091}
6092extern "C" {
6093    #[doc = " Skip one audio frame."]
6094    #[doc = "  This version instructs the decoder to \'skip\' a single frame and stop,"]
6095    #[doc = "  unless the callbacks return a fatal error or the read callback returns"]
6096    #[doc = "  \\c FLAC__STREAM_DECODER_READ_STATUS_END_OF_STREAM."]
6097    #[doc = ""]
6098    #[doc = "  The decoding flow is the same as what occurs when"]
6099    #[doc = "  FLAC__stream_decoder_process_single() is called to process an audio"]
6100    #[doc = "  frame, except that this function does not decode the parsed data into"]
6101    #[doc = "  PCM or call the write callback.  The integrity of the frame is still"]
6102    #[doc = "  checked the same way as in the other process functions."]
6103    #[doc = ""]
6104    #[doc = "  This function will return once one whole frame is skipped, in the"]
6105    #[doc = "  same way that FLAC__stream_decoder_process_single() will return once"]
6106    #[doc = "  one whole frame is decoded."]
6107    #[doc = ""]
6108    #[doc = "  This function can be used in more quickly determining FLAC frame"]
6109    #[doc = "  boundaries when decoding of the actual data is not needed, for"]
6110    #[doc = "  example when an application is separating a FLAC stream into frames"]
6111    #[doc = "  for editing or storing in a container.  To do this, the application"]
6112    #[doc = "  can use FLAC__stream_decoder_skip_single_frame() to quickly advance"]
6113    #[doc = "  to the next frame, then use"]
6114    #[doc = "  FLAC__stream_decoder_get_decode_position() to find the new frame"]
6115    #[doc = "  boundary."]
6116    #[doc = ""]
6117    #[doc = "  This function should only be called when the stream has advanced"]
6118    #[doc = "  past all the metadata, otherwise it will return \\c false."]
6119    #[doc = ""]
6120    #[doc = " \\param  decoder  An initialized decoder instance not in a metadata"]
6121    #[doc = "                  state."]
6122    #[doc = " \\assert"]
6123    #[doc = "    \\code decoder != NULL \\endcode"]
6124    #[doc = " \\retval FLAC__bool"]
6125    #[doc = "    \\c false if any fatal read, write, or memory allocation error"]
6126    #[doc = "    occurred (meaning decoding must stop), or if the decoder"]
6127    #[doc = "    is in the FLAC__STREAM_DECODER_SEARCH_FOR_METADATA or"]
6128    #[doc = "    FLAC__STREAM_DECODER_READ_METADATA state, else \\c true; for more"]
6129    #[doc = "    information about the decoder, check the decoder state with"]
6130    #[doc = "    FLAC__stream_decoder_get_state()."]
6131    pub fn FLAC__stream_decoder_skip_single_frame(decoder: *mut FLAC__StreamDecoder) -> FLAC__bool;
6132}
6133extern "C" {
6134    #[doc = " Flush the input and seek to an absolute sample."]
6135    #[doc = "  Decoding will resume at the given sample.  Note that because of"]
6136    #[doc = "  this, the next write callback may contain a partial block.  The"]
6137    #[doc = "  client must support seeking the input or this function will fail"]
6138    #[doc = "  and return \\c false.  Furthermore, if the decoder state is"]
6139    #[doc = "  \\c FLAC__STREAM_DECODER_SEEK_ERROR, then the decoder must be flushed"]
6140    #[doc = "  with FLAC__stream_decoder_flush() or reset with"]
6141    #[doc = "  FLAC__stream_decoder_reset() before decoding can continue."]
6142    #[doc = ""]
6143    #[doc = " \\param  decoder  A decoder instance."]
6144    #[doc = " \\param  sample   The target sample number to seek to."]
6145    #[doc = " \\assert"]
6146    #[doc = "    \\code decoder != NULL \\endcode"]
6147    #[doc = " \\retval FLAC__bool"]
6148    #[doc = "    \\c true if successful, else \\c false."]
6149    pub fn FLAC__stream_decoder_seek_absolute(
6150        decoder: *mut FLAC__StreamDecoder,
6151        sample: FLAC__uint64,
6152    ) -> FLAC__bool;
6153}
6154pub const FLAC__StreamEncoderState_FLAC__STREAM_ENCODER_OK: FLAC__StreamEncoderState = 0;
6155pub const FLAC__StreamEncoderState_FLAC__STREAM_ENCODER_UNINITIALIZED: FLAC__StreamEncoderState = 1;
6156pub const FLAC__StreamEncoderState_FLAC__STREAM_ENCODER_OGG_ERROR: FLAC__StreamEncoderState = 2;
6157pub const FLAC__StreamEncoderState_FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR:
6158    FLAC__StreamEncoderState = 3;
6159pub const FLAC__StreamEncoderState_FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA:
6160    FLAC__StreamEncoderState = 4;
6161pub const FLAC__StreamEncoderState_FLAC__STREAM_ENCODER_CLIENT_ERROR: FLAC__StreamEncoderState = 5;
6162pub const FLAC__StreamEncoderState_FLAC__STREAM_ENCODER_IO_ERROR: FLAC__StreamEncoderState = 6;
6163pub const FLAC__StreamEncoderState_FLAC__STREAM_ENCODER_FRAMING_ERROR: FLAC__StreamEncoderState = 7;
6164pub const FLAC__StreamEncoderState_FLAC__STREAM_ENCODER_MEMORY_ALLOCATION_ERROR:
6165    FLAC__StreamEncoderState = 8;
6166#[doc = " State values for a FLAC__StreamEncoder."]
6167#[doc = ""]
6168#[doc = " The encoder\'s state can be obtained by calling FLAC__stream_encoder_get_state()."]
6169#[doc = ""]
6170#[doc = " If the encoder gets into any other state besides \\c FLAC__STREAM_ENCODER_OK"]
6171#[doc = " or \\c FLAC__STREAM_ENCODER_UNINITIALIZED, it becomes invalid for encoding and"]
6172#[doc = " must be deleted with FLAC__stream_encoder_delete()."]
6173pub type FLAC__StreamEncoderState = u32;
6174extern "C" {
6175    #[link_name = "\u{1}FLAC__StreamEncoderStateString"]
6176    pub static mut FLAC__StreamEncoderStateString: [*const ::std::os::raw::c_char; 0usize];
6177}
6178pub const FLAC__StreamEncoderInitStatus_FLAC__STREAM_ENCODER_INIT_STATUS_OK:
6179    FLAC__StreamEncoderInitStatus = 0;
6180pub const FLAC__StreamEncoderInitStatus_FLAC__STREAM_ENCODER_INIT_STATUS_ENCODER_ERROR:
6181    FLAC__StreamEncoderInitStatus = 1;
6182pub const FLAC__StreamEncoderInitStatus_FLAC__STREAM_ENCODER_INIT_STATUS_UNSUPPORTED_CONTAINER:
6183    FLAC__StreamEncoderInitStatus = 2;
6184pub const FLAC__StreamEncoderInitStatus_FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_CALLBACKS:
6185    FLAC__StreamEncoderInitStatus = 3;
6186pub const FLAC__StreamEncoderInitStatus_FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_NUMBER_OF_CHANNELS : FLAC__StreamEncoderInitStatus = 4 ;
6187pub const FLAC__StreamEncoderInitStatus_FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BITS_PER_SAMPLE:
6188    FLAC__StreamEncoderInitStatus = 5;
6189pub const FLAC__StreamEncoderInitStatus_FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_SAMPLE_RATE:
6190    FLAC__StreamEncoderInitStatus = 6;
6191pub const FLAC__StreamEncoderInitStatus_FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_BLOCK_SIZE:
6192    FLAC__StreamEncoderInitStatus = 7;
6193pub const FLAC__StreamEncoderInitStatus_FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_MAX_LPC_ORDER:
6194    FLAC__StreamEncoderInitStatus = 8;
6195pub const FLAC__StreamEncoderInitStatus_FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_QLP_COEFF_PRECISION : FLAC__StreamEncoderInitStatus = 9 ;
6196pub const FLAC__StreamEncoderInitStatus_FLAC__STREAM_ENCODER_INIT_STATUS_BLOCK_SIZE_TOO_SMALL_FOR_LPC_ORDER : FLAC__StreamEncoderInitStatus = 10 ;
6197pub const FLAC__StreamEncoderInitStatus_FLAC__STREAM_ENCODER_INIT_STATUS_NOT_STREAMABLE:
6198    FLAC__StreamEncoderInitStatus = 11;
6199pub const FLAC__StreamEncoderInitStatus_FLAC__STREAM_ENCODER_INIT_STATUS_INVALID_METADATA:
6200    FLAC__StreamEncoderInitStatus = 12;
6201pub const FLAC__StreamEncoderInitStatus_FLAC__STREAM_ENCODER_INIT_STATUS_ALREADY_INITIALIZED:
6202    FLAC__StreamEncoderInitStatus = 13;
6203#[doc = " Possible return values for the FLAC__stream_encoder_init_*() functions."]
6204pub type FLAC__StreamEncoderInitStatus = u32;
6205extern "C" {
6206    #[link_name = "\u{1}FLAC__StreamEncoderInitStatusString"]
6207    pub static mut FLAC__StreamEncoderInitStatusString: [*const ::std::os::raw::c_char; 0usize];
6208}
6209pub const FLAC__StreamEncoderReadStatus_FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE:
6210    FLAC__StreamEncoderReadStatus = 0;
6211pub const FLAC__StreamEncoderReadStatus_FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM:
6212    FLAC__StreamEncoderReadStatus = 1;
6213pub const FLAC__StreamEncoderReadStatus_FLAC__STREAM_ENCODER_READ_STATUS_ABORT:
6214    FLAC__StreamEncoderReadStatus = 2;
6215pub const FLAC__StreamEncoderReadStatus_FLAC__STREAM_ENCODER_READ_STATUS_UNSUPPORTED:
6216    FLAC__StreamEncoderReadStatus = 3;
6217#[doc = " Return values for the FLAC__StreamEncoder read callback."]
6218pub type FLAC__StreamEncoderReadStatus = u32;
6219extern "C" {
6220    #[link_name = "\u{1}FLAC__StreamEncoderReadStatusString"]
6221    pub static mut FLAC__StreamEncoderReadStatusString: [*const ::std::os::raw::c_char; 0usize];
6222}
6223pub const FLAC__StreamEncoderWriteStatus_FLAC__STREAM_ENCODER_WRITE_STATUS_OK:
6224    FLAC__StreamEncoderWriteStatus = 0;
6225pub const FLAC__StreamEncoderWriteStatus_FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR:
6226    FLAC__StreamEncoderWriteStatus = 1;
6227#[doc = " Return values for the FLAC__StreamEncoder write callback."]
6228pub type FLAC__StreamEncoderWriteStatus = u32;
6229extern "C" {
6230    #[link_name = "\u{1}FLAC__StreamEncoderWriteStatusString"]
6231    pub static mut FLAC__StreamEncoderWriteStatusString: [*const ::std::os::raw::c_char; 0usize];
6232}
6233pub const FLAC__StreamEncoderSeekStatus_FLAC__STREAM_ENCODER_SEEK_STATUS_OK:
6234    FLAC__StreamEncoderSeekStatus = 0;
6235pub const FLAC__StreamEncoderSeekStatus_FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR:
6236    FLAC__StreamEncoderSeekStatus = 1;
6237pub const FLAC__StreamEncoderSeekStatus_FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED:
6238    FLAC__StreamEncoderSeekStatus = 2;
6239#[doc = " Return values for the FLAC__StreamEncoder seek callback."]
6240pub type FLAC__StreamEncoderSeekStatus = u32;
6241extern "C" {
6242    #[link_name = "\u{1}FLAC__StreamEncoderSeekStatusString"]
6243    pub static mut FLAC__StreamEncoderSeekStatusString: [*const ::std::os::raw::c_char; 0usize];
6244}
6245pub const FLAC__StreamEncoderTellStatus_FLAC__STREAM_ENCODER_TELL_STATUS_OK:
6246    FLAC__StreamEncoderTellStatus = 0;
6247pub const FLAC__StreamEncoderTellStatus_FLAC__STREAM_ENCODER_TELL_STATUS_ERROR:
6248    FLAC__StreamEncoderTellStatus = 1;
6249pub const FLAC__StreamEncoderTellStatus_FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED:
6250    FLAC__StreamEncoderTellStatus = 2;
6251#[doc = " Return values for the FLAC__StreamEncoder tell callback."]
6252pub type FLAC__StreamEncoderTellStatus = u32;
6253extern "C" {
6254    #[link_name = "\u{1}FLAC__StreamEncoderTellStatusString"]
6255    pub static mut FLAC__StreamEncoderTellStatusString: [*const ::std::os::raw::c_char; 0usize];
6256}
6257#[doc = " class FLAC__StreamEncoder"]
6258#[doc = ""]
6259#[repr(C)]
6260#[derive(Debug, Copy, Clone)]
6261pub struct FLAC__StreamEncoderProtected {
6262    _unused: [u8; 0],
6263}
6264#[repr(C)]
6265#[derive(Debug, Copy, Clone)]
6266pub struct FLAC__StreamEncoderPrivate {
6267    _unused: [u8; 0],
6268}
6269#[doc = " The opaque structure definition for the stream encoder type."]
6270#[doc = "  See the \\link flac_stream_encoder stream encoder module \\endlink"]
6271#[doc = "  for a detailed description."]
6272#[repr(C)]
6273#[derive(Debug, Copy, Clone)]
6274pub struct FLAC__StreamEncoder {
6275    pub protected_: *mut FLAC__StreamEncoderProtected,
6276    pub private_: *mut FLAC__StreamEncoderPrivate,
6277}
6278#[doc = " Signature for the read callback."]
6279#[doc = ""]
6280#[doc = "  A function pointer matching this signature must be passed to"]
6281#[doc = "  FLAC__stream_encoder_init_ogg_stream() if seeking is supported."]
6282#[doc = "  The supplied function will be called when the encoder needs to read back"]
6283#[doc = "  encoded data.  This happens during the metadata callback, when the encoder"]
6284#[doc = "  has to read, modify, and rewrite the metadata (e.g. seekpoints) gathered"]
6285#[doc = "  while encoding.  The address of the buffer to be filled is supplied, along"]
6286#[doc = "  with the number of bytes the buffer can hold.  The callback may choose to"]
6287#[doc = "  supply less data and modify the byte count but must be careful not to"]
6288#[doc = "  overflow the buffer.  The callback then returns a status code chosen from"]
6289#[doc = "  FLAC__StreamEncoderReadStatus."]
6290#[doc = ""]
6291#[doc = " Here is an example of a read callback for stdio streams:"]
6292#[doc = " \\code"]
6293#[doc = " FLAC__StreamEncoderReadStatus read_cb(const FLAC__StreamEncoder *encoder, FLAC__byte buffer[], size_t *bytes, void *client_data)"]
6294#[doc = " {"]
6295#[doc = "   FILE *file = ((MyClientData*)client_data)->file;"]
6296#[doc = "   if(*bytes > 0) {"]
6297#[doc = "     *bytes = fread(buffer, sizeof(FLAC__byte), *bytes, file);"]
6298#[doc = "     if(ferror(file))"]
6299#[doc = "       return FLAC__STREAM_ENCODER_READ_STATUS_ABORT;"]
6300#[doc = "     else if(*bytes == 0)"]
6301#[doc = "       return FLAC__STREAM_ENCODER_READ_STATUS_END_OF_STREAM;"]
6302#[doc = "     else"]
6303#[doc = "       return FLAC__STREAM_ENCODER_READ_STATUS_CONTINUE;"]
6304#[doc = "   }"]
6305#[doc = "   else"]
6306#[doc = "     return FLAC__STREAM_ENCODER_READ_STATUS_ABORT;"]
6307#[doc = " }"]
6308#[doc = " \\endcode"]
6309#[doc = ""]
6310#[doc = " \\note In general, FLAC__StreamEncoder functions which change the"]
6311#[doc = " state should not be called on the \\a encoder while in the callback."]
6312#[doc = ""]
6313#[doc = " \\param  encoder  The encoder instance calling the callback."]
6314#[doc = " \\param  buffer   A pointer to a location for the callee to store"]
6315#[doc = "                  data to be encoded."]
6316#[doc = " \\param  bytes    A pointer to the size of the buffer.  On entry"]
6317#[doc = "                  to the callback, it contains the maximum number"]
6318#[doc = "                  of bytes that may be stored in \\a buffer.  The"]
6319#[doc = "                  callee must set it to the actual number of bytes"]
6320#[doc = "                  stored (0 in case of error or end-of-stream) before"]
6321#[doc = "                  returning."]
6322#[doc = " \\param  client_data  The callee\'s client data set through"]
6323#[doc = "                      FLAC__stream_encoder_set_client_data()."]
6324#[doc = " \\retval FLAC__StreamEncoderReadStatus"]
6325#[doc = "    The callee\'s return status."]
6326pub type FLAC__StreamEncoderReadCallback = ::std::option::Option<
6327    unsafe extern "C" fn(
6328        encoder: *const FLAC__StreamEncoder,
6329        buffer: *mut FLAC__byte,
6330        bytes: *mut usize,
6331        client_data: *mut ::std::os::raw::c_void,
6332    ) -> FLAC__StreamEncoderReadStatus,
6333>;
6334#[doc = " Signature for the write callback."]
6335#[doc = ""]
6336#[doc = "  A function pointer matching this signature must be passed to"]
6337#[doc = "  FLAC__stream_encoder_init*_stream().  The supplied function will be called"]
6338#[doc = "  by the encoder anytime there is raw encoded data ready to write.  It may"]
6339#[doc = "  include metadata mixed with encoded audio frames and the data is not"]
6340#[doc = "  guaranteed to be aligned on frame or metadata block boundaries."]
6341#[doc = ""]
6342#[doc = "  The only duty of the callback is to write out the \\a bytes worth of data"]
6343#[doc = "  in \\a buffer to the current position in the output stream.  The arguments"]
6344#[doc = "  \\a samples and \\a current_frame are purely informational.  If \\a samples"]
6345#[doc = "  is greater than \\c 0, then \\a current_frame will hold the current frame"]
6346#[doc = "  number that is being written; otherwise it indicates that the write"]
6347#[doc = "  callback is being called to write metadata."]
6348#[doc = ""]
6349#[doc = " \\note"]
6350#[doc = " Unlike when writing to native FLAC, when writing to Ogg FLAC the"]
6351#[doc = " write callback will be called twice when writing each audio"]
6352#[doc = " frame; once for the page header, and once for the page body."]
6353#[doc = " When writing the page header, the \\a samples argument to the"]
6354#[doc = " write callback will be \\c 0."]
6355#[doc = ""]
6356#[doc = " \\note In general, FLAC__StreamEncoder functions which change the"]
6357#[doc = " state should not be called on the \\a encoder while in the callback."]
6358#[doc = ""]
6359#[doc = " \\param  encoder  The encoder instance calling the callback."]
6360#[doc = " \\param  buffer   An array of encoded data of length \\a bytes."]
6361#[doc = " \\param  bytes    The byte length of \\a buffer."]
6362#[doc = " \\param  samples  The number of samples encoded by \\a buffer."]
6363#[doc = "                  \\c 0 has a special meaning; see above."]
6364#[doc = " \\param  current_frame  The number of the current frame being encoded."]
6365#[doc = " \\param  client_data  The callee\'s client data set through"]
6366#[doc = "                      FLAC__stream_encoder_init_*()."]
6367#[doc = " \\retval FLAC__StreamEncoderWriteStatus"]
6368#[doc = "    The callee\'s return status."]
6369pub type FLAC__StreamEncoderWriteCallback = ::std::option::Option<
6370    unsafe extern "C" fn(
6371        encoder: *const FLAC__StreamEncoder,
6372        buffer: *const FLAC__byte,
6373        bytes: usize,
6374        samples: ::std::os::raw::c_uint,
6375        current_frame: ::std::os::raw::c_uint,
6376        client_data: *mut ::std::os::raw::c_void,
6377    ) -> FLAC__StreamEncoderWriteStatus,
6378>;
6379#[doc = " Signature for the seek callback."]
6380#[doc = ""]
6381#[doc = "  A function pointer matching this signature may be passed to"]
6382#[doc = "  FLAC__stream_encoder_init*_stream().  The supplied function will be called"]
6383#[doc = "  when the encoder needs to seek the output stream.  The encoder will pass"]
6384#[doc = "  the absolute byte offset to seek to, 0 meaning the beginning of the stream."]
6385#[doc = ""]
6386#[doc = " Here is an example of a seek callback for stdio streams:"]
6387#[doc = " \\code"]
6388#[doc = " FLAC__StreamEncoderSeekStatus seek_cb(const FLAC__StreamEncoder *encoder, FLAC__uint64 absolute_byte_offset, void *client_data)"]
6389#[doc = " {"]
6390#[doc = "   FILE *file = ((MyClientData*)client_data)->file;"]
6391#[doc = "   if(file == stdin)"]
6392#[doc = "     return FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED;"]
6393#[doc = "   else if(fseeko(file, (off_t)absolute_byte_offset, SEEK_SET) < 0)"]
6394#[doc = "     return FLAC__STREAM_ENCODER_SEEK_STATUS_ERROR;"]
6395#[doc = "   else"]
6396#[doc = "     return FLAC__STREAM_ENCODER_SEEK_STATUS_OK;"]
6397#[doc = " }"]
6398#[doc = " \\endcode"]
6399#[doc = ""]
6400#[doc = " \\note In general, FLAC__StreamEncoder functions which change the"]
6401#[doc = " state should not be called on the \\a encoder while in the callback."]
6402#[doc = ""]
6403#[doc = " \\param  encoder  The encoder instance calling the callback."]
6404#[doc = " \\param  absolute_byte_offset  The offset from the beginning of the stream"]
6405#[doc = "                               to seek to."]
6406#[doc = " \\param  client_data  The callee\'s client data set through"]
6407#[doc = "                      FLAC__stream_encoder_init_*()."]
6408#[doc = " \\retval FLAC__StreamEncoderSeekStatus"]
6409#[doc = "    The callee\'s return status."]
6410pub type FLAC__StreamEncoderSeekCallback = ::std::option::Option<
6411    unsafe extern "C" fn(
6412        encoder: *const FLAC__StreamEncoder,
6413        absolute_byte_offset: FLAC__uint64,
6414        client_data: *mut ::std::os::raw::c_void,
6415    ) -> FLAC__StreamEncoderSeekStatus,
6416>;
6417#[doc = " Signature for the tell callback."]
6418#[doc = ""]
6419#[doc = "  A function pointer matching this signature may be passed to"]
6420#[doc = "  FLAC__stream_encoder_init*_stream().  The supplied function will be called"]
6421#[doc = "  when the encoder needs to know the current position of the output stream."]
6422#[doc = ""]
6423#[doc = " \\warning"]
6424#[doc = " The callback must return the true current byte offset of the output to"]
6425#[doc = " which the encoder is writing.  If you are buffering the output, make"]
6426#[doc = " sure and take this into account.  If you are writing directly to a"]
6427#[doc = " FILE* from your write callback, ftell() is sufficient.  If you are"]
6428#[doc = " writing directly to a file descriptor from your write callback, you"]
6429#[doc = " can use lseek(fd, SEEK_CUR, 0).  The encoder may later seek back to"]
6430#[doc = " these points to rewrite metadata after encoding."]
6431#[doc = ""]
6432#[doc = " Here is an example of a tell callback for stdio streams:"]
6433#[doc = " \\code"]
6434#[doc = " FLAC__StreamEncoderTellStatus tell_cb(const FLAC__StreamEncoder *encoder, FLAC__uint64 *absolute_byte_offset, void *client_data)"]
6435#[doc = " {"]
6436#[doc = "   FILE *file = ((MyClientData*)client_data)->file;"]
6437#[doc = "   off_t pos;"]
6438#[doc = "   if(file == stdin)"]
6439#[doc = "     return FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED;"]
6440#[doc = "   else if((pos = ftello(file)) < 0)"]
6441#[doc = "     return FLAC__STREAM_ENCODER_TELL_STATUS_ERROR;"]
6442#[doc = "   else {"]
6443#[doc = "     *absolute_byte_offset = (FLAC__uint64)pos;"]
6444#[doc = "     return FLAC__STREAM_ENCODER_TELL_STATUS_OK;"]
6445#[doc = "   }"]
6446#[doc = " }"]
6447#[doc = " \\endcode"]
6448#[doc = ""]
6449#[doc = " \\note In general, FLAC__StreamEncoder functions which change the"]
6450#[doc = " state should not be called on the \\a encoder while in the callback."]
6451#[doc = ""]
6452#[doc = " \\param  encoder  The encoder instance calling the callback."]
6453#[doc = " \\param  absolute_byte_offset  The address at which to store the current"]
6454#[doc = "                               position of the output."]
6455#[doc = " \\param  client_data  The callee\'s client data set through"]
6456#[doc = "                      FLAC__stream_encoder_init_*()."]
6457#[doc = " \\retval FLAC__StreamEncoderTellStatus"]
6458#[doc = "    The callee\'s return status."]
6459pub type FLAC__StreamEncoderTellCallback = ::std::option::Option<
6460    unsafe extern "C" fn(
6461        encoder: *const FLAC__StreamEncoder,
6462        absolute_byte_offset: *mut FLAC__uint64,
6463        client_data: *mut ::std::os::raw::c_void,
6464    ) -> FLAC__StreamEncoderTellStatus,
6465>;
6466#[doc = " Signature for the metadata callback."]
6467#[doc = ""]
6468#[doc = "  A function pointer matching this signature may be passed to"]
6469#[doc = "  FLAC__stream_encoder_init*_stream().  The supplied function will be called"]
6470#[doc = "  once at the end of encoding with the populated STREAMINFO structure.  This"]
6471#[doc = "  is so the client can seek back to the beginning of the file and write the"]
6472#[doc = "  STREAMINFO block with the correct statistics after encoding (like"]
6473#[doc = "  minimum/maximum frame size and total samples)."]
6474#[doc = ""]
6475#[doc = " \\note In general, FLAC__StreamEncoder functions which change the"]
6476#[doc = " state should not be called on the \\a encoder while in the callback."]
6477#[doc = ""]
6478#[doc = " \\param  encoder      The encoder instance calling the callback."]
6479#[doc = " \\param  metadata     The final populated STREAMINFO block."]
6480#[doc = " \\param  client_data  The callee\'s client data set through"]
6481#[doc = "                      FLAC__stream_encoder_init_*()."]
6482pub type FLAC__StreamEncoderMetadataCallback = ::std::option::Option<
6483    unsafe extern "C" fn(
6484        encoder: *const FLAC__StreamEncoder,
6485        metadata: *const FLAC__StreamMetadata,
6486        client_data: *mut ::std::os::raw::c_void,
6487    ),
6488>;
6489#[doc = " Signature for the progress callback."]
6490#[doc = ""]
6491#[doc = "  A function pointer matching this signature may be passed to"]
6492#[doc = "  FLAC__stream_encoder_init*_file() or FLAC__stream_encoder_init*_FILE()."]
6493#[doc = "  The supplied function will be called when the encoder has finished"]
6494#[doc = "  writing a frame.  The \\c total_frames_estimate argument to the"]
6495#[doc = "  callback will be based on the value from"]
6496#[doc = "  FLAC__stream_encoder_set_total_samples_estimate()."]
6497#[doc = ""]
6498#[doc = " \\note In general, FLAC__StreamEncoder functions which change the"]
6499#[doc = " state should not be called on the \\a encoder while in the callback."]
6500#[doc = ""]
6501#[doc = " \\param  encoder          The encoder instance calling the callback."]
6502#[doc = " \\param  bytes_written    Bytes written so far."]
6503#[doc = " \\param  samples_written  Samples written so far."]
6504#[doc = " \\param  frames_written   Frames written so far."]
6505#[doc = " \\param  total_frames_estimate  The estimate of the total number of"]
6506#[doc = "                                frames to be written."]
6507#[doc = " \\param  client_data      The callee\'s client data set through"]
6508#[doc = "                          FLAC__stream_encoder_init_*()."]
6509pub type FLAC__StreamEncoderProgressCallback = ::std::option::Option<
6510    unsafe extern "C" fn(
6511        encoder: *const FLAC__StreamEncoder,
6512        bytes_written: FLAC__uint64,
6513        samples_written: FLAC__uint64,
6514        frames_written: ::std::os::raw::c_uint,
6515        total_frames_estimate: ::std::os::raw::c_uint,
6516        client_data: *mut ::std::os::raw::c_void,
6517    ),
6518>;
6519extern "C" {
6520    #[doc = " Create a new stream encoder instance.  The instance is created with"]
6521    #[doc = "  default settings; see the individual FLAC__stream_encoder_set_*()"]
6522    #[doc = "  functions for each setting\'s default."]
6523    #[doc = ""]
6524    #[doc = " \\retval FLAC__StreamEncoder*"]
6525    #[doc = "    \\c NULL if there was an error allocating memory, else the new instance."]
6526    pub fn FLAC__stream_encoder_new() -> *mut FLAC__StreamEncoder;
6527}
6528extern "C" {
6529    #[doc = " Free an encoder instance.  Deletes the object pointed to by \\a encoder."]
6530    #[doc = ""]
6531    #[doc = " \\param encoder  A pointer to an existing encoder."]
6532    #[doc = " \\assert"]
6533    #[doc = "    \\code encoder != NULL \\endcode"]
6534    pub fn FLAC__stream_encoder_delete(encoder: *mut FLAC__StreamEncoder);
6535}
6536extern "C" {
6537    #[doc = " Set the serial number for the FLAC stream to use in the Ogg container."]
6538    #[doc = ""]
6539    #[doc = " \\note"]
6540    #[doc = " This does not need to be set for native FLAC encoding."]
6541    #[doc = ""]
6542    #[doc = " \\note"]
6543    #[doc = " It is recommended to set a serial number explicitly as the default of \'0\'"]
6544    #[doc = " may collide with other streams."]
6545    #[doc = ""]
6546    #[doc = " \\default \\c 0"]
6547    #[doc = " \\param  encoder        An encoder instance to set."]
6548    #[doc = " \\param  serial_number  See above."]
6549    #[doc = " \\assert"]
6550    #[doc = "    \\code encoder != NULL \\endcode"]
6551    #[doc = " \\retval FLAC__bool"]
6552    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6553    pub fn FLAC__stream_encoder_set_ogg_serial_number(
6554        encoder: *mut FLAC__StreamEncoder,
6555        serial_number: ::std::os::raw::c_long,
6556    ) -> FLAC__bool;
6557}
6558extern "C" {
6559    #[doc = " Set the \"verify\" flag.  If \\c true, the encoder will verify it\'s own"]
6560    #[doc = "  encoded output by feeding it through an internal decoder and comparing"]
6561    #[doc = "  the original signal against the decoded signal.  If a mismatch occurs,"]
6562    #[doc = "  the process call will return \\c false.  Note that this will slow the"]
6563    #[doc = "  encoding process by the extra time required for decoding and comparison."]
6564    #[doc = ""]
6565    #[doc = " \\default \\c false"]
6566    #[doc = " \\param  encoder  An encoder instance to set."]
6567    #[doc = " \\param  value    Flag value (see above)."]
6568    #[doc = " \\assert"]
6569    #[doc = "    \\code encoder != NULL \\endcode"]
6570    #[doc = " \\retval FLAC__bool"]
6571    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6572    pub fn FLAC__stream_encoder_set_verify(
6573        encoder: *mut FLAC__StreamEncoder,
6574        value: FLAC__bool,
6575    ) -> FLAC__bool;
6576}
6577extern "C" {
6578    #[doc = " Set the <A HREF=\"../format.html#subset\">Subset</A> flag.  If \\c true,"]
6579    #[doc = "  the encoder will comply with the Subset and will check the"]
6580    #[doc = "  settings during FLAC__stream_encoder_init_*() to see if all settings"]
6581    #[doc = "  comply.  If \\c false, the settings may take advantage of the full"]
6582    #[doc = "  range that the format allows."]
6583    #[doc = ""]
6584    #[doc = "  Make sure you know what it entails before setting this to \\c false."]
6585    #[doc = ""]
6586    #[doc = " \\default \\c true"]
6587    #[doc = " \\param  encoder  An encoder instance to set."]
6588    #[doc = " \\param  value    Flag value (see above)."]
6589    #[doc = " \\assert"]
6590    #[doc = "    \\code encoder != NULL \\endcode"]
6591    #[doc = " \\retval FLAC__bool"]
6592    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6593    pub fn FLAC__stream_encoder_set_streamable_subset(
6594        encoder: *mut FLAC__StreamEncoder,
6595        value: FLAC__bool,
6596    ) -> FLAC__bool;
6597}
6598extern "C" {
6599    #[doc = " Set the number of channels to be encoded."]
6600    #[doc = ""]
6601    #[doc = " \\default \\c 2"]
6602    #[doc = " \\param  encoder  An encoder instance to set."]
6603    #[doc = " \\param  value    See above."]
6604    #[doc = " \\assert"]
6605    #[doc = "    \\code encoder != NULL \\endcode"]
6606    #[doc = " \\retval FLAC__bool"]
6607    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6608    pub fn FLAC__stream_encoder_set_channels(
6609        encoder: *mut FLAC__StreamEncoder,
6610        value: ::std::os::raw::c_uint,
6611    ) -> FLAC__bool;
6612}
6613extern "C" {
6614    #[doc = " Set the sample resolution of the input to be encoded."]
6615    #[doc = ""]
6616    #[doc = " \\warning"]
6617    #[doc = " Do not feed the encoder data that is wider than the value you"]
6618    #[doc = " set here or you will generate an invalid stream."]
6619    #[doc = ""]
6620    #[doc = " \\default \\c 16"]
6621    #[doc = " \\param  encoder  An encoder instance to set."]
6622    #[doc = " \\param  value    See above."]
6623    #[doc = " \\assert"]
6624    #[doc = "    \\code encoder != NULL \\endcode"]
6625    #[doc = " \\retval FLAC__bool"]
6626    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6627    pub fn FLAC__stream_encoder_set_bits_per_sample(
6628        encoder: *mut FLAC__StreamEncoder,
6629        value: ::std::os::raw::c_uint,
6630    ) -> FLAC__bool;
6631}
6632extern "C" {
6633    #[doc = " Set the sample rate (in Hz) of the input to be encoded."]
6634    #[doc = ""]
6635    #[doc = " \\default \\c 44100"]
6636    #[doc = " \\param  encoder  An encoder instance to set."]
6637    #[doc = " \\param  value    See above."]
6638    #[doc = " \\assert"]
6639    #[doc = "    \\code encoder != NULL \\endcode"]
6640    #[doc = " \\retval FLAC__bool"]
6641    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6642    pub fn FLAC__stream_encoder_set_sample_rate(
6643        encoder: *mut FLAC__StreamEncoder,
6644        value: ::std::os::raw::c_uint,
6645    ) -> FLAC__bool;
6646}
6647extern "C" {
6648    #[doc = " Set the compression level"]
6649    #[doc = ""]
6650    #[doc = " The compression level is roughly proportional to the amount of effort"]
6651    #[doc = " the encoder expends to compress the file.  A higher level usually"]
6652    #[doc = " means more computation but higher compression.  The default level is"]
6653    #[doc = " suitable for most applications."]
6654    #[doc = ""]
6655    #[doc = " Currently the levels range from \\c 0 (fastest, least compression) to"]
6656    #[doc = " \\c 8 (slowest, most compression).  A value larger than \\c 8 will be"]
6657    #[doc = " treated as \\c 8."]
6658    #[doc = ""]
6659    #[doc = " This function automatically calls the following other \\c _set_"]
6660    #[doc = " functions with appropriate values, so the client does not need to"]
6661    #[doc = " unless it specifically wants to override them:"]
6662    #[doc = " - FLAC__stream_encoder_set_do_mid_side_stereo()"]
6663    #[doc = " - FLAC__stream_encoder_set_loose_mid_side_stereo()"]
6664    #[doc = " - FLAC__stream_encoder_set_apodization()"]
6665    #[doc = " - FLAC__stream_encoder_set_max_lpc_order()"]
6666    #[doc = " - FLAC__stream_encoder_set_qlp_coeff_precision()"]
6667    #[doc = " - FLAC__stream_encoder_set_do_qlp_coeff_prec_search()"]
6668    #[doc = " - FLAC__stream_encoder_set_do_escape_coding()"]
6669    #[doc = " - FLAC__stream_encoder_set_do_exhaustive_model_search()"]
6670    #[doc = " - FLAC__stream_encoder_set_min_residual_partition_order()"]
6671    #[doc = " - FLAC__stream_encoder_set_max_residual_partition_order()"]
6672    #[doc = " - FLAC__stream_encoder_set_rice_parameter_search_dist()"]
6673    #[doc = ""]
6674    #[doc = " The actual values set for each level are:"]
6675    #[doc = " <table>"]
6676    #[doc = " <tr>"]
6677    #[doc = "  <td><b>level</b></td>"]
6678    #[doc = "  <td>do mid-side stereo</td>"]
6679    #[doc = "  <td>loose mid-side stereo</td>"]
6680    #[doc = "  <td>apodization</td>"]
6681    #[doc = "  <td>max lpc order</td>"]
6682    #[doc = "  <td>qlp coeff precision</td>"]
6683    #[doc = "  <td>qlp coeff prec search</td>"]
6684    #[doc = "  <td>escape coding</td>"]
6685    #[doc = "  <td>exhaustive model search</td>"]
6686    #[doc = "  <td>min residual partition order</td>"]
6687    #[doc = "  <td>max residual partition order</td>"]
6688    #[doc = "  <td>rice parameter search dist</td>"]
6689    #[doc = " </tr>"]
6690    #[doc = " <tr>  <td><b>0</b></td> <td>false</td> <td>false</td> <td>tukey(0.5)<td>                                     <td>0</td>  <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>3</td> <td>0</td> </tr>"]
6691    #[doc = " <tr>  <td><b>1</b></td> <td>true</td>  <td>true</td>  <td>tukey(0.5)<td>                                     <td>0</td>  <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>3</td> <td>0</td> </tr>"]
6692    #[doc = " <tr>  <td><b>2</b></td> <td>true</td>  <td>false</td> <td>tukey(0.5)<td>                                     <td>0</td>  <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>3</td> <td>0</td> </tr>"]
6693    #[doc = " <tr>  <td><b>3</b></td> <td>false</td> <td>false</td> <td>tukey(0.5)<td>                                     <td>6</td>  <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>4</td> <td>0</td> </tr>"]
6694    #[doc = " <tr>  <td><b>4</b></td> <td>true</td>  <td>true</td>  <td>tukey(0.5)<td>                                     <td>8</td>  <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>4</td> <td>0</td> </tr>"]
6695    #[doc = " <tr>  <td><b>5</b></td> <td>true</td>  <td>false</td> <td>tukey(0.5)<td>                                     <td>8</td>  <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>5</td> <td>0</td> </tr>"]
6696    #[doc = " <tr>  <td><b>6</b></td> <td>true</td>  <td>false</td> <td>tukey(0.5);partial_tukey(2)<td>                    <td>8</td>  <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>6</td> <td>0</td> </tr>"]
6697    #[doc = " <tr>  <td><b>7</b></td> <td>true</td>  <td>false</td> <td>tukey(0.5);partial_tukey(2)<td>                    <td>12</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>6</td> <td>0</td> </tr>"]
6698    #[doc = " <tr>  <td><b>8</b></td> <td>true</td>  <td>false</td> <td>tukey(0.5);partial_tukey(2);punchout_tukey(3)</td> <td>12</td> <td>0</td> <td>false</td> <td>false</td> <td>false</td> <td>0</td> <td>6</td> <td>0</td> </tr>"]
6699    #[doc = " </table>"]
6700    #[doc = ""]
6701    #[doc = " \\default \\c 5"]
6702    #[doc = " \\param  encoder  An encoder instance to set."]
6703    #[doc = " \\param  value    See above."]
6704    #[doc = " \\assert"]
6705    #[doc = "    \\code encoder != NULL \\endcode"]
6706    #[doc = " \\retval FLAC__bool"]
6707    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6708    pub fn FLAC__stream_encoder_set_compression_level(
6709        encoder: *mut FLAC__StreamEncoder,
6710        value: ::std::os::raw::c_uint,
6711    ) -> FLAC__bool;
6712}
6713extern "C" {
6714    #[doc = " Set the blocksize to use while encoding."]
6715    #[doc = ""]
6716    #[doc = " The number of samples to use per frame.  Use \\c 0 to let the encoder"]
6717    #[doc = " estimate a blocksize; this is usually best."]
6718    #[doc = ""]
6719    #[doc = " \\default \\c 0"]
6720    #[doc = " \\param  encoder  An encoder instance to set."]
6721    #[doc = " \\param  value    See above."]
6722    #[doc = " \\assert"]
6723    #[doc = "    \\code encoder != NULL \\endcode"]
6724    #[doc = " \\retval FLAC__bool"]
6725    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6726    pub fn FLAC__stream_encoder_set_blocksize(
6727        encoder: *mut FLAC__StreamEncoder,
6728        value: ::std::os::raw::c_uint,
6729    ) -> FLAC__bool;
6730}
6731extern "C" {
6732    #[doc = " Set to \\c true to enable mid-side encoding on stereo input.  The"]
6733    #[doc = "  number of channels must be 2 for this to have any effect.  Set to"]
6734    #[doc = "  \\c false to use only independent channel coding."]
6735    #[doc = ""]
6736    #[doc = " \\default \\c false"]
6737    #[doc = " \\param  encoder  An encoder instance to set."]
6738    #[doc = " \\param  value    Flag value (see above)."]
6739    #[doc = " \\assert"]
6740    #[doc = "    \\code encoder != NULL \\endcode"]
6741    #[doc = " \\retval FLAC__bool"]
6742    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6743    pub fn FLAC__stream_encoder_set_do_mid_side_stereo(
6744        encoder: *mut FLAC__StreamEncoder,
6745        value: FLAC__bool,
6746    ) -> FLAC__bool;
6747}
6748extern "C" {
6749    #[doc = " Set to \\c true to enable adaptive switching between mid-side and"]
6750    #[doc = "  left-right encoding on stereo input.  Set to \\c false to use"]
6751    #[doc = "  exhaustive searching.  Setting this to \\c true requires"]
6752    #[doc = "  FLAC__stream_encoder_set_do_mid_side_stereo() to also be set to"]
6753    #[doc = "  \\c true in order to have any effect."]
6754    #[doc = ""]
6755    #[doc = " \\default \\c false"]
6756    #[doc = " \\param  encoder  An encoder instance to set."]
6757    #[doc = " \\param  value    Flag value (see above)."]
6758    #[doc = " \\assert"]
6759    #[doc = "    \\code encoder != NULL \\endcode"]
6760    #[doc = " \\retval FLAC__bool"]
6761    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6762    pub fn FLAC__stream_encoder_set_loose_mid_side_stereo(
6763        encoder: *mut FLAC__StreamEncoder,
6764        value: FLAC__bool,
6765    ) -> FLAC__bool;
6766}
6767extern "C" {
6768    #[doc = " Sets the apodization function(s) the encoder will use when windowing"]
6769    #[doc = "  audio data for LPC analysis."]
6770    #[doc = ""]
6771    #[doc = " The \\a specification is a plain ASCII string which specifies exactly"]
6772    #[doc = " which functions to use.  There may be more than one (up to 32),"]
6773    #[doc = " separated by \\c \';\' characters.  Some functions take one or more"]
6774    #[doc = " comma-separated arguments in parentheses."]
6775    #[doc = ""]
6776    #[doc = " The available functions are \\c bartlett, \\c bartlett_hann,"]
6777    #[doc = " \\c blackman, \\c blackman_harris_4term_92db, \\c connes, \\c flattop,"]
6778    #[doc = " \\c gauss(STDDEV), \\c hamming, \\c hann, \\c kaiser_bessel, \\c nuttall,"]
6779    #[doc = " \\c rectangle, \\c triangle, \\c tukey(P), \\c partial_tukey(n[/ov[/P]]),"]
6780    #[doc = " \\c punchout_tukey(n[/ov[/P]]), \\c welch."]
6781    #[doc = ""]
6782    #[doc = " For \\c gauss(STDDEV), STDDEV specifies the standard deviation"]
6783    #[doc = " (0<STDDEV<=0.5)."]
6784    #[doc = ""]
6785    #[doc = " For \\c tukey(P), P specifies the fraction of the window that is"]
6786    #[doc = " tapered (0<=P<=1).  P=0 corresponds to \\c rectangle and P=1"]
6787    #[doc = " corresponds to \\c hann."]
6788    #[doc = ""]
6789    #[doc = " Specifying \\c partial_tukey or \\c punchout_tukey works a little"]
6790    #[doc = " different. These do not specify a single apodization function, but"]
6791    #[doc = " a series of them with some overlap. partial_tukey specifies a series"]
6792    #[doc = " of small windows (all treated separately) while punchout_tukey"]
6793    #[doc = " specifies a series of windows that have a hole in them. In this way,"]
6794    #[doc = " the predictor is constructed with only a part of the block, which"]
6795    #[doc = " helps in case a block consists of dissimilar parts."]
6796    #[doc = ""]
6797    #[doc = " The three parameters that can be specified for the functions are"]
6798    #[doc = " n, ov and P. n is the number of functions to add, ov is the overlap"]
6799    #[doc = " of the windows in case of partial_tukey and the overlap in the gaps"]
6800    #[doc = " in case of punchout_tukey. P is the fraction of the window that is"]
6801    #[doc = " tapered, like with a regular tukey window. The function can be"]
6802    #[doc = " specified with only a number, a number and an overlap, or a number"]
6803    #[doc = " an overlap and a P, for example, partial_tukey(3), partial_tukey(3/0.3)"]
6804    #[doc = " and partial_tukey(3/0.3/0.5) are all valid. ov should be smaller than 1"]
6805    #[doc = " and can be negative."]
6806    #[doc = ""]
6807    #[doc = " Example specifications are \\c \"blackman\" or"]
6808    #[doc = " \\c \"hann;triangle;tukey(0.5);tukey(0.25);tukey(0.125)\""]
6809    #[doc = ""]
6810    #[doc = " Any function that is specified erroneously is silently dropped.  Up"]
6811    #[doc = " to 32 functions are kept, the rest are dropped.  If the specification"]
6812    #[doc = " is empty the encoder defaults to \\c \"tukey(0.5)\"."]
6813    #[doc = ""]
6814    #[doc = " When more than one function is specified, then for every subframe the"]
6815    #[doc = " encoder will try each of them separately and choose the window that"]
6816    #[doc = " results in the smallest compressed subframe."]
6817    #[doc = ""]
6818    #[doc = " Note that each function specified causes the encoder to occupy a"]
6819    #[doc = " floating point array in which to store the window. Also note that the"]
6820    #[doc = " values of P, STDDEV and ov are locale-specific, so if the comma"]
6821    #[doc = " separator specified by the locale is a comma, a comma should be used."]
6822    #[doc = ""]
6823    #[doc = " \\default \\c \"tukey(0.5)\""]
6824    #[doc = " \\param  encoder        An encoder instance to set."]
6825    #[doc = " \\param  specification  See above."]
6826    #[doc = " \\assert"]
6827    #[doc = "    \\code encoder != NULL \\endcode"]
6828    #[doc = "    \\code specification != NULL \\endcode"]
6829    #[doc = " \\retval FLAC__bool"]
6830    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6831    pub fn FLAC__stream_encoder_set_apodization(
6832        encoder: *mut FLAC__StreamEncoder,
6833        specification: *const ::std::os::raw::c_char,
6834    ) -> FLAC__bool;
6835}
6836extern "C" {
6837    #[doc = " Set the maximum LPC order, or \\c 0 to use only the fixed predictors."]
6838    #[doc = ""]
6839    #[doc = " \\default \\c 0"]
6840    #[doc = " \\param  encoder  An encoder instance to set."]
6841    #[doc = " \\param  value    See above."]
6842    #[doc = " \\assert"]
6843    #[doc = "    \\code encoder != NULL \\endcode"]
6844    #[doc = " \\retval FLAC__bool"]
6845    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6846    pub fn FLAC__stream_encoder_set_max_lpc_order(
6847        encoder: *mut FLAC__StreamEncoder,
6848        value: ::std::os::raw::c_uint,
6849    ) -> FLAC__bool;
6850}
6851extern "C" {
6852    #[doc = " Set the precision, in bits, of the quantized linear predictor"]
6853    #[doc = "  coefficients, or \\c 0 to let the encoder select it based on the"]
6854    #[doc = "  blocksize."]
6855    #[doc = ""]
6856    #[doc = " \\note"]
6857    #[doc = " In the current implementation, qlp_coeff_precision + bits_per_sample must"]
6858    #[doc = " be less than 32."]
6859    #[doc = ""]
6860    #[doc = " \\default \\c 0"]
6861    #[doc = " \\param  encoder  An encoder instance to set."]
6862    #[doc = " \\param  value    See above."]
6863    #[doc = " \\assert"]
6864    #[doc = "    \\code encoder != NULL \\endcode"]
6865    #[doc = " \\retval FLAC__bool"]
6866    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6867    pub fn FLAC__stream_encoder_set_qlp_coeff_precision(
6868        encoder: *mut FLAC__StreamEncoder,
6869        value: ::std::os::raw::c_uint,
6870    ) -> FLAC__bool;
6871}
6872extern "C" {
6873    #[doc = " Set to \\c false to use only the specified quantized linear predictor"]
6874    #[doc = "  coefficient precision, or \\c true to search neighboring precision"]
6875    #[doc = "  values and use the best one."]
6876    #[doc = ""]
6877    #[doc = " \\default \\c false"]
6878    #[doc = " \\param  encoder  An encoder instance to set."]
6879    #[doc = " \\param  value    See above."]
6880    #[doc = " \\assert"]
6881    #[doc = "    \\code encoder != NULL \\endcode"]
6882    #[doc = " \\retval FLAC__bool"]
6883    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6884    pub fn FLAC__stream_encoder_set_do_qlp_coeff_prec_search(
6885        encoder: *mut FLAC__StreamEncoder,
6886        value: FLAC__bool,
6887    ) -> FLAC__bool;
6888}
6889extern "C" {
6890    #[doc = " Deprecated.  Setting this value has no effect."]
6891    #[doc = ""]
6892    #[doc = " \\default \\c false"]
6893    #[doc = " \\param  encoder  An encoder instance to set."]
6894    #[doc = " \\param  value    See above."]
6895    #[doc = " \\assert"]
6896    #[doc = "    \\code encoder != NULL \\endcode"]
6897    #[doc = " \\retval FLAC__bool"]
6898    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6899    pub fn FLAC__stream_encoder_set_do_escape_coding(
6900        encoder: *mut FLAC__StreamEncoder,
6901        value: FLAC__bool,
6902    ) -> FLAC__bool;
6903}
6904extern "C" {
6905    #[doc = " Set to \\c false to let the encoder estimate the best model order"]
6906    #[doc = "  based on the residual signal energy, or \\c true to force the"]
6907    #[doc = "  encoder to evaluate all order models and select the best."]
6908    #[doc = ""]
6909    #[doc = " \\default \\c false"]
6910    #[doc = " \\param  encoder  An encoder instance to set."]
6911    #[doc = " \\param  value    See above."]
6912    #[doc = " \\assert"]
6913    #[doc = "    \\code encoder != NULL \\endcode"]
6914    #[doc = " \\retval FLAC__bool"]
6915    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6916    pub fn FLAC__stream_encoder_set_do_exhaustive_model_search(
6917        encoder: *mut FLAC__StreamEncoder,
6918        value: FLAC__bool,
6919    ) -> FLAC__bool;
6920}
6921extern "C" {
6922    #[doc = " Set the minimum partition order to search when coding the residual."]
6923    #[doc = "  This is used in tandem with"]
6924    #[doc = "  FLAC__stream_encoder_set_max_residual_partition_order()."]
6925    #[doc = ""]
6926    #[doc = "  The partition order determines the context size in the residual."]
6927    #[doc = "  The context size will be approximately <tt>blocksize / (2 ^ order)</tt>."]
6928    #[doc = ""]
6929    #[doc = "  Set both min and max values to \\c 0 to force a single context,"]
6930    #[doc = "  whose Rice parameter is based on the residual signal variance."]
6931    #[doc = "  Otherwise, set a min and max order, and the encoder will search"]
6932    #[doc = "  all orders, using the mean of each context for its Rice parameter,"]
6933    #[doc = "  and use the best."]
6934    #[doc = ""]
6935    #[doc = " \\default \\c 0"]
6936    #[doc = " \\param  encoder  An encoder instance to set."]
6937    #[doc = " \\param  value    See above."]
6938    #[doc = " \\assert"]
6939    #[doc = "    \\code encoder != NULL \\endcode"]
6940    #[doc = " \\retval FLAC__bool"]
6941    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6942    pub fn FLAC__stream_encoder_set_min_residual_partition_order(
6943        encoder: *mut FLAC__StreamEncoder,
6944        value: ::std::os::raw::c_uint,
6945    ) -> FLAC__bool;
6946}
6947extern "C" {
6948    #[doc = " Set the maximum partition order to search when coding the residual."]
6949    #[doc = "  This is used in tandem with"]
6950    #[doc = "  FLAC__stream_encoder_set_min_residual_partition_order()."]
6951    #[doc = ""]
6952    #[doc = "  The partition order determines the context size in the residual."]
6953    #[doc = "  The context size will be approximately <tt>blocksize / (2 ^ order)</tt>."]
6954    #[doc = ""]
6955    #[doc = "  Set both min and max values to \\c 0 to force a single context,"]
6956    #[doc = "  whose Rice parameter is based on the residual signal variance."]
6957    #[doc = "  Otherwise, set a min and max order, and the encoder will search"]
6958    #[doc = "  all orders, using the mean of each context for its Rice parameter,"]
6959    #[doc = "  and use the best."]
6960    #[doc = ""]
6961    #[doc = " \\default \\c 0"]
6962    #[doc = " \\param  encoder  An encoder instance to set."]
6963    #[doc = " \\param  value    See above."]
6964    #[doc = " \\assert"]
6965    #[doc = "    \\code encoder != NULL \\endcode"]
6966    #[doc = " \\retval FLAC__bool"]
6967    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6968    pub fn FLAC__stream_encoder_set_max_residual_partition_order(
6969        encoder: *mut FLAC__StreamEncoder,
6970        value: ::std::os::raw::c_uint,
6971    ) -> FLAC__bool;
6972}
6973extern "C" {
6974    #[doc = " Deprecated.  Setting this value has no effect."]
6975    #[doc = ""]
6976    #[doc = " \\default \\c 0"]
6977    #[doc = " \\param  encoder  An encoder instance to set."]
6978    #[doc = " \\param  value    See above."]
6979    #[doc = " \\assert"]
6980    #[doc = "    \\code encoder != NULL \\endcode"]
6981    #[doc = " \\retval FLAC__bool"]
6982    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
6983    pub fn FLAC__stream_encoder_set_rice_parameter_search_dist(
6984        encoder: *mut FLAC__StreamEncoder,
6985        value: ::std::os::raw::c_uint,
6986    ) -> FLAC__bool;
6987}
6988extern "C" {
6989    #[doc = " Set an estimate of the total samples that will be encoded."]
6990    #[doc = "  This is merely an estimate and may be set to \\c 0 if unknown."]
6991    #[doc = "  This value will be written to the STREAMINFO block before encoding,"]
6992    #[doc = "  and can remove the need for the caller to rewrite the value later"]
6993    #[doc = "  if the value is known before encoding."]
6994    #[doc = ""]
6995    #[doc = " \\default \\c 0"]
6996    #[doc = " \\param  encoder  An encoder instance to set."]
6997    #[doc = " \\param  value    See above."]
6998    #[doc = " \\assert"]
6999    #[doc = "    \\code encoder != NULL \\endcode"]
7000    #[doc = " \\retval FLAC__bool"]
7001    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
7002    pub fn FLAC__stream_encoder_set_total_samples_estimate(
7003        encoder: *mut FLAC__StreamEncoder,
7004        value: FLAC__uint64,
7005    ) -> FLAC__bool;
7006}
7007extern "C" {
7008    #[doc = " Set the metadata blocks to be emitted to the stream before encoding."]
7009    #[doc = "  A value of \\c NULL, \\c 0 implies no metadata; otherwise, supply an"]
7010    #[doc = "  array of pointers to metadata blocks.  The array is non-const since"]
7011    #[doc = "  the encoder may need to change the \\a is_last flag inside them, and"]
7012    #[doc = "  in some cases update seek point offsets.  Otherwise, the encoder will"]
7013    #[doc = "  not modify or free the blocks.  It is up to the caller to free the"]
7014    #[doc = "  metadata blocks after encoding finishes."]
7015    #[doc = ""]
7016    #[doc = " \\note"]
7017    #[doc = " The encoder stores only copies of the pointers in the \\a metadata array;"]
7018    #[doc = " the metadata blocks themselves must survive at least until after"]
7019    #[doc = " FLAC__stream_encoder_finish() returns.  Do not free the blocks until then."]
7020    #[doc = ""]
7021    #[doc = " \\note"]
7022    #[doc = " The STREAMINFO block is always written and no STREAMINFO block may"]
7023    #[doc = " occur in the supplied array."]
7024    #[doc = ""]
7025    #[doc = " \\note"]
7026    #[doc = " By default the encoder does not create a SEEKTABLE.  If one is supplied"]
7027    #[doc = " in the \\a metadata array, but the client has specified that it does not"]
7028    #[doc = " support seeking, then the SEEKTABLE will be written verbatim.  However"]
7029    #[doc = " by itself this is not very useful as the client will not know the stream"]
7030    #[doc = " offsets for the seekpoints ahead of time.  In order to get a proper"]
7031    #[doc = " seektable the client must support seeking.  See next note."]
7032    #[doc = ""]
7033    #[doc = " \\note"]
7034    #[doc = " SEEKTABLE blocks are handled specially.  Since you will not know"]
7035    #[doc = " the values for the seek point stream offsets, you should pass in"]
7036    #[doc = " a SEEKTABLE \'template\', that is, a SEEKTABLE object with the"]
7037    #[doc = " required sample numbers (or placeholder points), with \\c 0 for the"]
7038    #[doc = " \\a frame_samples and \\a stream_offset fields for each point.  If the"]
7039    #[doc = " client has specified that it supports seeking by providing a seek"]
7040    #[doc = " callback to FLAC__stream_encoder_init_stream() or both seek AND read"]
7041    #[doc = " callback to FLAC__stream_encoder_init_ogg_stream() (or by using"]
7042    #[doc = " FLAC__stream_encoder_init*_file() or FLAC__stream_encoder_init*_FILE()),"]
7043    #[doc = " then while it is encoding the encoder will fill the stream offsets in"]
7044    #[doc = " for you and when encoding is finished, it will seek back and write the"]
7045    #[doc = " real values into the SEEKTABLE block in the stream.  There are helper"]
7046    #[doc = " routines for manipulating seektable template blocks; see metadata.h:"]
7047    #[doc = " FLAC__metadata_object_seektable_template_*().  If the client does"]
7048    #[doc = " not support seeking, the SEEKTABLE will have inaccurate offsets which"]
7049    #[doc = " will slow down or remove the ability to seek in the FLAC stream."]
7050    #[doc = ""]
7051    #[doc = " \\note"]
7052    #[doc = " The encoder instance \\b will modify the first \\c SEEKTABLE block"]
7053    #[doc = " as it transforms the template to a valid seektable while encoding,"]
7054    #[doc = " but it is still up to the caller to free all metadata blocks after"]
7055    #[doc = " encoding."]
7056    #[doc = ""]
7057    #[doc = " \\note"]
7058    #[doc = " A VORBIS_COMMENT block may be supplied.  The vendor string in it"]
7059    #[doc = " will be ignored.  libFLAC will use it\'s own vendor string. libFLAC"]
7060    #[doc = " will not modify the passed-in VORBIS_COMMENT\'s vendor string, it"]
7061    #[doc = " will simply write it\'s own into the stream.  If no VORBIS_COMMENT"]
7062    #[doc = " block is present in the \\a metadata array, libFLAC will write an"]
7063    #[doc = " empty one, containing only the vendor string."]
7064    #[doc = ""]
7065    #[doc = " \\note The Ogg FLAC mapping requires that the VORBIS_COMMENT block be"]
7066    #[doc = " the second metadata block of the stream.  The encoder already supplies"]
7067    #[doc = " the STREAMINFO block automatically.  If \\a metadata does not contain a"]
7068    #[doc = " VORBIS_COMMENT block, the encoder will supply that too.  Otherwise, if"]
7069    #[doc = " \\a metadata does contain a VORBIS_COMMENT block and it is not the"]
7070    #[doc = " first, the init function will reorder \\a metadata by moving the"]
7071    #[doc = " VORBIS_COMMENT block to the front; the relative ordering of the other"]
7072    #[doc = " blocks will remain as they were."]
7073    #[doc = ""]
7074    #[doc = " \\note The Ogg FLAC mapping limits the number of metadata blocks per"]
7075    #[doc = " stream to \\c 65535.  If \\a num_blocks exceeds this the function will"]
7076    #[doc = " return \\c false."]
7077    #[doc = ""]
7078    #[doc = " \\default \\c NULL, 0"]
7079    #[doc = " \\param  encoder     An encoder instance to set."]
7080    #[doc = " \\param  metadata    See above."]
7081    #[doc = " \\param  num_blocks  See above."]
7082    #[doc = " \\assert"]
7083    #[doc = "    \\code encoder != NULL \\endcode"]
7084    #[doc = " \\retval FLAC__bool"]
7085    #[doc = "    \\c false if the encoder is already initialized, else \\c true."]
7086    #[doc = "    \\c false if the encoder is already initialized, or if"]
7087    #[doc = "    \\a num_blocks > 65535 if encoding to Ogg FLAC, else \\c true."]
7088    pub fn FLAC__stream_encoder_set_metadata(
7089        encoder: *mut FLAC__StreamEncoder,
7090        metadata: *mut *mut FLAC__StreamMetadata,
7091        num_blocks: ::std::os::raw::c_uint,
7092    ) -> FLAC__bool;
7093}
7094extern "C" {
7095    #[doc = " Get the current encoder state."]
7096    #[doc = ""]
7097    #[doc = " \\param  encoder  An encoder instance to query."]
7098    #[doc = " \\assert"]
7099    #[doc = "    \\code encoder != NULL \\endcode"]
7100    #[doc = " \\retval FLAC__StreamEncoderState"]
7101    #[doc = "    The current encoder state."]
7102    pub fn FLAC__stream_encoder_get_state(
7103        encoder: *const FLAC__StreamEncoder,
7104    ) -> FLAC__StreamEncoderState;
7105}
7106extern "C" {
7107    #[doc = " Get the state of the verify stream decoder."]
7108    #[doc = "  Useful when the stream encoder state is"]
7109    #[doc = "  \\c FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR."]
7110    #[doc = ""]
7111    #[doc = " \\param  encoder  An encoder instance to query."]
7112    #[doc = " \\assert"]
7113    #[doc = "    \\code encoder != NULL \\endcode"]
7114    #[doc = " \\retval FLAC__StreamDecoderState"]
7115    #[doc = "    The verify stream decoder state."]
7116    pub fn FLAC__stream_encoder_get_verify_decoder_state(
7117        encoder: *const FLAC__StreamEncoder,
7118    ) -> FLAC__StreamDecoderState;
7119}
7120extern "C" {
7121    #[doc = " Get the current encoder state as a C string."]
7122    #[doc = "  This version automatically resolves"]
7123    #[doc = "  \\c FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR by getting the"]
7124    #[doc = "  verify decoder\'s state."]
7125    #[doc = ""]
7126    #[doc = " \\param  encoder  A encoder instance to query."]
7127    #[doc = " \\assert"]
7128    #[doc = "    \\code encoder != NULL \\endcode"]
7129    #[doc = " \\retval const char *"]
7130    #[doc = "    The encoder state as a C string.  Do not modify the contents."]
7131    pub fn FLAC__stream_encoder_get_resolved_state_string(
7132        encoder: *const FLAC__StreamEncoder,
7133    ) -> *const ::std::os::raw::c_char;
7134}
7135extern "C" {
7136    #[doc = " Get relevant values about the nature of a verify decoder error."]
7137    #[doc = "  Useful when the stream encoder state is"]
7138    #[doc = "  \\c FLAC__STREAM_ENCODER_VERIFY_DECODER_ERROR.  The arguments should"]
7139    #[doc = "  be addresses in which the stats will be returned, or NULL if value"]
7140    #[doc = "  is not desired."]
7141    #[doc = ""]
7142    #[doc = " \\param  encoder  An encoder instance to query."]
7143    #[doc = " \\param  absolute_sample  The absolute sample number of the mismatch."]
7144    #[doc = " \\param  frame_number  The number of the frame in which the mismatch occurred."]
7145    #[doc = " \\param  channel       The channel in which the mismatch occurred."]
7146    #[doc = " \\param  sample        The number of the sample (relative to the frame) in"]
7147    #[doc = "                       which the mismatch occurred."]
7148    #[doc = " \\param  expected      The expected value for the sample in question."]
7149    #[doc = " \\param  got           The actual value returned by the decoder."]
7150    #[doc = " \\assert"]
7151    #[doc = "    \\code encoder != NULL \\endcode"]
7152    pub fn FLAC__stream_encoder_get_verify_decoder_error_stats(
7153        encoder: *const FLAC__StreamEncoder,
7154        absolute_sample: *mut FLAC__uint64,
7155        frame_number: *mut ::std::os::raw::c_uint,
7156        channel: *mut ::std::os::raw::c_uint,
7157        sample: *mut ::std::os::raw::c_uint,
7158        expected: *mut FLAC__int32,
7159        got: *mut FLAC__int32,
7160    );
7161}
7162extern "C" {
7163    #[doc = " Get the \"verify\" flag."]
7164    #[doc = ""]
7165    #[doc = " \\param  encoder  An encoder instance to query."]
7166    #[doc = " \\assert"]
7167    #[doc = "    \\code encoder != NULL \\endcode"]
7168    #[doc = " \\retval FLAC__bool"]
7169    #[doc = "    See FLAC__stream_encoder_set_verify()."]
7170    pub fn FLAC__stream_encoder_get_verify(encoder: *const FLAC__StreamEncoder) -> FLAC__bool;
7171}
7172extern "C" {
7173    #[doc = " Get the <A HREF=\"../format.html#subset>Subset</A> flag."]
7174    #[doc = ""]
7175    #[doc = " \\param  encoder  An encoder instance to query."]
7176    #[doc = " \\assert"]
7177    #[doc = "    \\code encoder != NULL \\endcode"]
7178    #[doc = " \\retval FLAC__bool"]
7179    #[doc = "    See FLAC__stream_encoder_set_streamable_subset()."]
7180    pub fn FLAC__stream_encoder_get_streamable_subset(
7181        encoder: *const FLAC__StreamEncoder,
7182    ) -> FLAC__bool;
7183}
7184extern "C" {
7185    #[doc = " Get the number of input channels being processed."]
7186    #[doc = ""]
7187    #[doc = " \\param  encoder  An encoder instance to query."]
7188    #[doc = " \\assert"]
7189    #[doc = "    \\code encoder != NULL \\endcode"]
7190    #[doc = " \\retval unsigned"]
7191    #[doc = "    See FLAC__stream_encoder_set_channels()."]
7192    pub fn FLAC__stream_encoder_get_channels(
7193        encoder: *const FLAC__StreamEncoder,
7194    ) -> ::std::os::raw::c_uint;
7195}
7196extern "C" {
7197    #[doc = " Get the input sample resolution setting."]
7198    #[doc = ""]
7199    #[doc = " \\param  encoder  An encoder instance to query."]
7200    #[doc = " \\assert"]
7201    #[doc = "    \\code encoder != NULL \\endcode"]
7202    #[doc = " \\retval unsigned"]
7203    #[doc = "    See FLAC__stream_encoder_set_bits_per_sample()."]
7204    pub fn FLAC__stream_encoder_get_bits_per_sample(
7205        encoder: *const FLAC__StreamEncoder,
7206    ) -> ::std::os::raw::c_uint;
7207}
7208extern "C" {
7209    #[doc = " Get the input sample rate setting."]
7210    #[doc = ""]
7211    #[doc = " \\param  encoder  An encoder instance to query."]
7212    #[doc = " \\assert"]
7213    #[doc = "    \\code encoder != NULL \\endcode"]
7214    #[doc = " \\retval unsigned"]
7215    #[doc = "    See FLAC__stream_encoder_set_sample_rate()."]
7216    pub fn FLAC__stream_encoder_get_sample_rate(
7217        encoder: *const FLAC__StreamEncoder,
7218    ) -> ::std::os::raw::c_uint;
7219}
7220extern "C" {
7221    #[doc = " Get the blocksize setting."]
7222    #[doc = ""]
7223    #[doc = " \\param  encoder  An encoder instance to query."]
7224    #[doc = " \\assert"]
7225    #[doc = "    \\code encoder != NULL \\endcode"]
7226    #[doc = " \\retval unsigned"]
7227    #[doc = "    See FLAC__stream_encoder_set_blocksize()."]
7228    pub fn FLAC__stream_encoder_get_blocksize(
7229        encoder: *const FLAC__StreamEncoder,
7230    ) -> ::std::os::raw::c_uint;
7231}
7232extern "C" {
7233    #[doc = " Get the \"mid/side stereo coding\" flag."]
7234    #[doc = ""]
7235    #[doc = " \\param  encoder  An encoder instance to query."]
7236    #[doc = " \\assert"]
7237    #[doc = "    \\code encoder != NULL \\endcode"]
7238    #[doc = " \\retval FLAC__bool"]
7239    #[doc = "    See FLAC__stream_encoder_get_do_mid_side_stereo()."]
7240    pub fn FLAC__stream_encoder_get_do_mid_side_stereo(
7241        encoder: *const FLAC__StreamEncoder,
7242    ) -> FLAC__bool;
7243}
7244extern "C" {
7245    #[doc = " Get the \"adaptive mid/side switching\" flag."]
7246    #[doc = ""]
7247    #[doc = " \\param  encoder  An encoder instance to query."]
7248    #[doc = " \\assert"]
7249    #[doc = "    \\code encoder != NULL \\endcode"]
7250    #[doc = " \\retval FLAC__bool"]
7251    #[doc = "    See FLAC__stream_encoder_set_loose_mid_side_stereo()."]
7252    pub fn FLAC__stream_encoder_get_loose_mid_side_stereo(
7253        encoder: *const FLAC__StreamEncoder,
7254    ) -> FLAC__bool;
7255}
7256extern "C" {
7257    #[doc = " Get the maximum LPC order setting."]
7258    #[doc = ""]
7259    #[doc = " \\param  encoder  An encoder instance to query."]
7260    #[doc = " \\assert"]
7261    #[doc = "    \\code encoder != NULL \\endcode"]
7262    #[doc = " \\retval unsigned"]
7263    #[doc = "    See FLAC__stream_encoder_set_max_lpc_order()."]
7264    pub fn FLAC__stream_encoder_get_max_lpc_order(
7265        encoder: *const FLAC__StreamEncoder,
7266    ) -> ::std::os::raw::c_uint;
7267}
7268extern "C" {
7269    #[doc = " Get the quantized linear predictor coefficient precision setting."]
7270    #[doc = ""]
7271    #[doc = " \\param  encoder  An encoder instance to query."]
7272    #[doc = " \\assert"]
7273    #[doc = "    \\code encoder != NULL \\endcode"]
7274    #[doc = " \\retval unsigned"]
7275    #[doc = "    See FLAC__stream_encoder_set_qlp_coeff_precision()."]
7276    pub fn FLAC__stream_encoder_get_qlp_coeff_precision(
7277        encoder: *const FLAC__StreamEncoder,
7278    ) -> ::std::os::raw::c_uint;
7279}
7280extern "C" {
7281    #[doc = " Get the qlp coefficient precision search flag."]
7282    #[doc = ""]
7283    #[doc = " \\param  encoder  An encoder instance to query."]
7284    #[doc = " \\assert"]
7285    #[doc = "    \\code encoder != NULL \\endcode"]
7286    #[doc = " \\retval FLAC__bool"]
7287    #[doc = "    See FLAC__stream_encoder_set_do_qlp_coeff_prec_search()."]
7288    pub fn FLAC__stream_encoder_get_do_qlp_coeff_prec_search(
7289        encoder: *const FLAC__StreamEncoder,
7290    ) -> FLAC__bool;
7291}
7292extern "C" {
7293    #[doc = " Get the \"escape coding\" flag."]
7294    #[doc = ""]
7295    #[doc = " \\param  encoder  An encoder instance to query."]
7296    #[doc = " \\assert"]
7297    #[doc = "    \\code encoder != NULL \\endcode"]
7298    #[doc = " \\retval FLAC__bool"]
7299    #[doc = "    See FLAC__stream_encoder_set_do_escape_coding()."]
7300    pub fn FLAC__stream_encoder_get_do_escape_coding(
7301        encoder: *const FLAC__StreamEncoder,
7302    ) -> FLAC__bool;
7303}
7304extern "C" {
7305    #[doc = " Get the exhaustive model search flag."]
7306    #[doc = ""]
7307    #[doc = " \\param  encoder  An encoder instance to query."]
7308    #[doc = " \\assert"]
7309    #[doc = "    \\code encoder != NULL \\endcode"]
7310    #[doc = " \\retval FLAC__bool"]
7311    #[doc = "    See FLAC__stream_encoder_set_do_exhaustive_model_search()."]
7312    pub fn FLAC__stream_encoder_get_do_exhaustive_model_search(
7313        encoder: *const FLAC__StreamEncoder,
7314    ) -> FLAC__bool;
7315}
7316extern "C" {
7317    #[doc = " Get the minimum residual partition order setting."]
7318    #[doc = ""]
7319    #[doc = " \\param  encoder  An encoder instance to query."]
7320    #[doc = " \\assert"]
7321    #[doc = "    \\code encoder != NULL \\endcode"]
7322    #[doc = " \\retval unsigned"]
7323    #[doc = "    See FLAC__stream_encoder_set_min_residual_partition_order()."]
7324    pub fn FLAC__stream_encoder_get_min_residual_partition_order(
7325        encoder: *const FLAC__StreamEncoder,
7326    ) -> ::std::os::raw::c_uint;
7327}
7328extern "C" {
7329    #[doc = " Get maximum residual partition order setting."]
7330    #[doc = ""]
7331    #[doc = " \\param  encoder  An encoder instance to query."]
7332    #[doc = " \\assert"]
7333    #[doc = "    \\code encoder != NULL \\endcode"]
7334    #[doc = " \\retval unsigned"]
7335    #[doc = "    See FLAC__stream_encoder_set_max_residual_partition_order()."]
7336    pub fn FLAC__stream_encoder_get_max_residual_partition_order(
7337        encoder: *const FLAC__StreamEncoder,
7338    ) -> ::std::os::raw::c_uint;
7339}
7340extern "C" {
7341    #[doc = " Get the Rice parameter search distance setting."]
7342    #[doc = ""]
7343    #[doc = " \\param  encoder  An encoder instance to query."]
7344    #[doc = " \\assert"]
7345    #[doc = "    \\code encoder != NULL \\endcode"]
7346    #[doc = " \\retval unsigned"]
7347    #[doc = "    See FLAC__stream_encoder_set_rice_parameter_search_dist()."]
7348    pub fn FLAC__stream_encoder_get_rice_parameter_search_dist(
7349        encoder: *const FLAC__StreamEncoder,
7350    ) -> ::std::os::raw::c_uint;
7351}
7352extern "C" {
7353    #[doc = " Get the previously set estimate of the total samples to be encoded."]
7354    #[doc = "  The encoder merely mimics back the value given to"]
7355    #[doc = "  FLAC__stream_encoder_set_total_samples_estimate() since it has no"]
7356    #[doc = "  other way of knowing how many samples the client will encode."]
7357    #[doc = ""]
7358    #[doc = " \\param  encoder  An encoder instance to set."]
7359    #[doc = " \\assert"]
7360    #[doc = "    \\code encoder != NULL \\endcode"]
7361    #[doc = " \\retval FLAC__uint64"]
7362    #[doc = "    See FLAC__stream_encoder_get_total_samples_estimate()."]
7363    pub fn FLAC__stream_encoder_get_total_samples_estimate(
7364        encoder: *const FLAC__StreamEncoder,
7365    ) -> FLAC__uint64;
7366}
7367extern "C" {
7368    #[doc = " Initialize the encoder instance to encode native FLAC streams."]
7369    #[doc = ""]
7370    #[doc = "  This flavor of initialization sets up the encoder to encode to a"]
7371    #[doc = "  native FLAC stream. I/O is performed via callbacks to the client."]
7372    #[doc = "  For encoding to a plain file via filename or open \\c FILE*,"]
7373    #[doc = "  FLAC__stream_encoder_init_file() and FLAC__stream_encoder_init_FILE()"]
7374    #[doc = "  provide a simpler interface."]
7375    #[doc = ""]
7376    #[doc = "  This function should be called after FLAC__stream_encoder_new() and"]
7377    #[doc = "  FLAC__stream_encoder_set_*() but before FLAC__stream_encoder_process()"]
7378    #[doc = "  or FLAC__stream_encoder_process_interleaved()."]
7379    #[doc = "  initialization succeeded."]
7380    #[doc = ""]
7381    #[doc = "  The call to FLAC__stream_encoder_init_stream() currently will also"]
7382    #[doc = "  immediately call the write callback several times, once with the \\c fLaC"]
7383    #[doc = "  signature, and once for each encoded metadata block."]
7384    #[doc = ""]
7385    #[doc = " \\param  encoder            An uninitialized encoder instance."]
7386    #[doc = " \\param  write_callback     See FLAC__StreamEncoderWriteCallback.  This"]
7387    #[doc = "                            pointer must not be \\c NULL."]
7388    #[doc = " \\param  seek_callback      See FLAC__StreamEncoderSeekCallback.  This"]
7389    #[doc = "                            pointer may be \\c NULL if seeking is not"]
7390    #[doc = "                            supported.  The encoder uses seeking to go back"]
7391    #[doc = "                            and write some some stream statistics to the"]
7392    #[doc = "                            STREAMINFO block; this is recommended but not"]
7393    #[doc = "                            necessary to create a valid FLAC stream.  If"]
7394    #[doc = "                            \\a seek_callback is not \\c NULL then a"]
7395    #[doc = "                            \\a tell_callback must also be supplied."]
7396    #[doc = "                            Alternatively, a dummy seek callback that just"]
7397    #[doc = "                            returns \\c FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED"]
7398    #[doc = "                            may also be supplied, all though this is slightly"]
7399    #[doc = "                            less efficient for the encoder."]
7400    #[doc = " \\param  tell_callback      See FLAC__StreamEncoderTellCallback.  This"]
7401    #[doc = "                            pointer may be \\c NULL if seeking is not"]
7402    #[doc = "                            supported.  If \\a seek_callback is \\c NULL then"]
7403    #[doc = "                            this argument will be ignored.  If"]
7404    #[doc = "                            \\a seek_callback is not \\c NULL then a"]
7405    #[doc = "                            \\a tell_callback must also be supplied."]
7406    #[doc = "                            Alternatively, a dummy tell callback that just"]
7407    #[doc = "                            returns \\c FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED"]
7408    #[doc = "                            may also be supplied, all though this is slightly"]
7409    #[doc = "                            less efficient for the encoder."]
7410    #[doc = " \\param  metadata_callback  See FLAC__StreamEncoderMetadataCallback.  This"]
7411    #[doc = "                            pointer may be \\c NULL if the callback is not"]
7412    #[doc = "                            desired.  If the client provides a seek callback,"]
7413    #[doc = "                            this function is not necessary as the encoder"]
7414    #[doc = "                            will automatically seek back and update the"]
7415    #[doc = "                            STREAMINFO block.  It may also be \\c NULL if the"]
7416    #[doc = "                            client does not support seeking, since it will"]
7417    #[doc = "                            have no way of going back to update the"]
7418    #[doc = "                            STREAMINFO.  However the client can still supply"]
7419    #[doc = "                            a callback if it would like to know the details"]
7420    #[doc = "                            from the STREAMINFO."]
7421    #[doc = " \\param  client_data        This value will be supplied to callbacks in their"]
7422    #[doc = "                            \\a client_data argument."]
7423    #[doc = " \\assert"]
7424    #[doc = "    \\code encoder != NULL \\endcode"]
7425    #[doc = " \\retval FLAC__StreamEncoderInitStatus"]
7426    #[doc = "    \\c FLAC__STREAM_ENCODER_INIT_STATUS_OK if initialization was successful;"]
7427    #[doc = "    see FLAC__StreamEncoderInitStatus for the meanings of other return values."]
7428    pub fn FLAC__stream_encoder_init_stream(
7429        encoder: *mut FLAC__StreamEncoder,
7430        write_callback: FLAC__StreamEncoderWriteCallback,
7431        seek_callback: FLAC__StreamEncoderSeekCallback,
7432        tell_callback: FLAC__StreamEncoderTellCallback,
7433        metadata_callback: FLAC__StreamEncoderMetadataCallback,
7434        client_data: *mut ::std::os::raw::c_void,
7435    ) -> FLAC__StreamEncoderInitStatus;
7436}
7437extern "C" {
7438    #[doc = " Initialize the encoder instance to encode Ogg FLAC streams."]
7439    #[doc = ""]
7440    #[doc = "  This flavor of initialization sets up the encoder to encode to a FLAC"]
7441    #[doc = "  stream in an Ogg container.  I/O is performed via callbacks to the"]
7442    #[doc = "  client.  For encoding to a plain file via filename or open \\c FILE*,"]
7443    #[doc = "  FLAC__stream_encoder_init_ogg_file() and FLAC__stream_encoder_init_ogg_FILE()"]
7444    #[doc = "  provide a simpler interface."]
7445    #[doc = ""]
7446    #[doc = "  This function should be called after FLAC__stream_encoder_new() and"]
7447    #[doc = "  FLAC__stream_encoder_set_*() but before FLAC__stream_encoder_process()"]
7448    #[doc = "  or FLAC__stream_encoder_process_interleaved()."]
7449    #[doc = "  initialization succeeded."]
7450    #[doc = ""]
7451    #[doc = "  The call to FLAC__stream_encoder_init_ogg_stream() currently will also"]
7452    #[doc = "  immediately call the write callback several times to write the metadata"]
7453    #[doc = "  packets."]
7454    #[doc = ""]
7455    #[doc = " \\param  encoder            An uninitialized encoder instance."]
7456    #[doc = " \\param  read_callback      See FLAC__StreamEncoderReadCallback.  This"]
7457    #[doc = "                            pointer must not be \\c NULL if \\a seek_callback"]
7458    #[doc = "                            is non-NULL since they are both needed to be"]
7459    #[doc = "                            able to write data back to the Ogg FLAC stream"]
7460    #[doc = "                            in the post-encode phase."]
7461    #[doc = " \\param  write_callback     See FLAC__StreamEncoderWriteCallback.  This"]
7462    #[doc = "                            pointer must not be \\c NULL."]
7463    #[doc = " \\param  seek_callback      See FLAC__StreamEncoderSeekCallback.  This"]
7464    #[doc = "                            pointer may be \\c NULL if seeking is not"]
7465    #[doc = "                            supported.  The encoder uses seeking to go back"]
7466    #[doc = "                            and write some some stream statistics to the"]
7467    #[doc = "                            STREAMINFO block; this is recommended but not"]
7468    #[doc = "                            necessary to create a valid FLAC stream.  If"]
7469    #[doc = "                            \\a seek_callback is not \\c NULL then a"]
7470    #[doc = "                            \\a tell_callback must also be supplied."]
7471    #[doc = "                            Alternatively, a dummy seek callback that just"]
7472    #[doc = "                            returns \\c FLAC__STREAM_ENCODER_SEEK_STATUS_UNSUPPORTED"]
7473    #[doc = "                            may also be supplied, all though this is slightly"]
7474    #[doc = "                            less efficient for the encoder."]
7475    #[doc = " \\param  tell_callback      See FLAC__StreamEncoderTellCallback.  This"]
7476    #[doc = "                            pointer may be \\c NULL if seeking is not"]
7477    #[doc = "                            supported.  If \\a seek_callback is \\c NULL then"]
7478    #[doc = "                            this argument will be ignored.  If"]
7479    #[doc = "                            \\a seek_callback is not \\c NULL then a"]
7480    #[doc = "                            \\a tell_callback must also be supplied."]
7481    #[doc = "                            Alternatively, a dummy tell callback that just"]
7482    #[doc = "                            returns \\c FLAC__STREAM_ENCODER_TELL_STATUS_UNSUPPORTED"]
7483    #[doc = "                            may also be supplied, all though this is slightly"]
7484    #[doc = "                            less efficient for the encoder."]
7485    #[doc = " \\param  metadata_callback  See FLAC__StreamEncoderMetadataCallback.  This"]
7486    #[doc = "                            pointer may be \\c NULL if the callback is not"]
7487    #[doc = "                            desired.  If the client provides a seek callback,"]
7488    #[doc = "                            this function is not necessary as the encoder"]
7489    #[doc = "                            will automatically seek back and update the"]
7490    #[doc = "                            STREAMINFO block.  It may also be \\c NULL if the"]
7491    #[doc = "                            client does not support seeking, since it will"]
7492    #[doc = "                            have no way of going back to update the"]
7493    #[doc = "                            STREAMINFO.  However the client can still supply"]
7494    #[doc = "                            a callback if it would like to know the details"]
7495    #[doc = "                            from the STREAMINFO."]
7496    #[doc = " \\param  client_data        This value will be supplied to callbacks in their"]
7497    #[doc = "                            \\a client_data argument."]
7498    #[doc = " \\assert"]
7499    #[doc = "    \\code encoder != NULL \\endcode"]
7500    #[doc = " \\retval FLAC__StreamEncoderInitStatus"]
7501    #[doc = "    \\c FLAC__STREAM_ENCODER_INIT_STATUS_OK if initialization was successful;"]
7502    #[doc = "    see FLAC__StreamEncoderInitStatus for the meanings of other return values."]
7503    pub fn FLAC__stream_encoder_init_ogg_stream(
7504        encoder: *mut FLAC__StreamEncoder,
7505        read_callback: FLAC__StreamEncoderReadCallback,
7506        write_callback: FLAC__StreamEncoderWriteCallback,
7507        seek_callback: FLAC__StreamEncoderSeekCallback,
7508        tell_callback: FLAC__StreamEncoderTellCallback,
7509        metadata_callback: FLAC__StreamEncoderMetadataCallback,
7510        client_data: *mut ::std::os::raw::c_void,
7511    ) -> FLAC__StreamEncoderInitStatus;
7512}
7513extern "C" {
7514    #[doc = " Initialize the encoder instance to encode native FLAC files."]
7515    #[doc = ""]
7516    #[doc = "  This flavor of initialization sets up the encoder to encode to a"]
7517    #[doc = "  plain native FLAC file.  For non-stdio streams, you must use"]
7518    #[doc = "  FLAC__stream_encoder_init_stream() and provide callbacks for the I/O."]
7519    #[doc = ""]
7520    #[doc = "  This function should be called after FLAC__stream_encoder_new() and"]
7521    #[doc = "  FLAC__stream_encoder_set_*() but before FLAC__stream_encoder_process()"]
7522    #[doc = "  or FLAC__stream_encoder_process_interleaved()."]
7523    #[doc = "  initialization succeeded."]
7524    #[doc = ""]
7525    #[doc = " \\param  encoder            An uninitialized encoder instance."]
7526    #[doc = " \\param  file               An open file.  The file should have been opened"]
7527    #[doc = "                            with mode \\c \"w+b\" and rewound.  The file"]
7528    #[doc = "                            becomes owned by the encoder and should not be"]
7529    #[doc = "                            manipulated by the client while encoding."]
7530    #[doc = "                            Unless \\a file is \\c stdout, it will be closed"]
7531    #[doc = "                            when FLAC__stream_encoder_finish() is called."]
7532    #[doc = "                            Note however that a proper SEEKTABLE cannot be"]
7533    #[doc = "                            created when encoding to \\c stdout since it is"]
7534    #[doc = "                            not seekable."]
7535    #[doc = " \\param  progress_callback  See FLAC__StreamEncoderProgressCallback.  This"]
7536    #[doc = "                            pointer may be \\c NULL if the callback is not"]
7537    #[doc = "                            desired."]
7538    #[doc = " \\param  client_data        This value will be supplied to callbacks in their"]
7539    #[doc = "                            \\a client_data argument."]
7540    #[doc = " \\assert"]
7541    #[doc = "    \\code encoder != NULL \\endcode"]
7542    #[doc = "    \\code file != NULL \\endcode"]
7543    #[doc = " \\retval FLAC__StreamEncoderInitStatus"]
7544    #[doc = "    \\c FLAC__STREAM_ENCODER_INIT_STATUS_OK if initialization was successful;"]
7545    #[doc = "    see FLAC__StreamEncoderInitStatus for the meanings of other return values."]
7546    pub fn FLAC__stream_encoder_init_FILE(
7547        encoder: *mut FLAC__StreamEncoder,
7548        file: *mut FILE,
7549        progress_callback: FLAC__StreamEncoderProgressCallback,
7550        client_data: *mut ::std::os::raw::c_void,
7551    ) -> FLAC__StreamEncoderInitStatus;
7552}
7553extern "C" {
7554    #[doc = " Initialize the encoder instance to encode Ogg FLAC files."]
7555    #[doc = ""]
7556    #[doc = "  This flavor of initialization sets up the encoder to encode to a"]
7557    #[doc = "  plain Ogg FLAC file.  For non-stdio streams, you must use"]
7558    #[doc = "  FLAC__stream_encoder_init_ogg_stream() and provide callbacks for the I/O."]
7559    #[doc = ""]
7560    #[doc = "  This function should be called after FLAC__stream_encoder_new() and"]
7561    #[doc = "  FLAC__stream_encoder_set_*() but before FLAC__stream_encoder_process()"]
7562    #[doc = "  or FLAC__stream_encoder_process_interleaved()."]
7563    #[doc = "  initialization succeeded."]
7564    #[doc = ""]
7565    #[doc = " \\param  encoder            An uninitialized encoder instance."]
7566    #[doc = " \\param  file               An open file.  The file should have been opened"]
7567    #[doc = "                            with mode \\c \"w+b\" and rewound.  The file"]
7568    #[doc = "                            becomes owned by the encoder and should not be"]
7569    #[doc = "                            manipulated by the client while encoding."]
7570    #[doc = "                            Unless \\a file is \\c stdout, it will be closed"]
7571    #[doc = "                            when FLAC__stream_encoder_finish() is called."]
7572    #[doc = "                            Note however that a proper SEEKTABLE cannot be"]
7573    #[doc = "                            created when encoding to \\c stdout since it is"]
7574    #[doc = "                            not seekable."]
7575    #[doc = " \\param  progress_callback  See FLAC__StreamEncoderProgressCallback.  This"]
7576    #[doc = "                            pointer may be \\c NULL if the callback is not"]
7577    #[doc = "                            desired."]
7578    #[doc = " \\param  client_data        This value will be supplied to callbacks in their"]
7579    #[doc = "                            \\a client_data argument."]
7580    #[doc = " \\assert"]
7581    #[doc = "    \\code encoder != NULL \\endcode"]
7582    #[doc = "    \\code file != NULL \\endcode"]
7583    #[doc = " \\retval FLAC__StreamEncoderInitStatus"]
7584    #[doc = "    \\c FLAC__STREAM_ENCODER_INIT_STATUS_OK if initialization was successful;"]
7585    #[doc = "    see FLAC__StreamEncoderInitStatus for the meanings of other return values."]
7586    pub fn FLAC__stream_encoder_init_ogg_FILE(
7587        encoder: *mut FLAC__StreamEncoder,
7588        file: *mut FILE,
7589        progress_callback: FLAC__StreamEncoderProgressCallback,
7590        client_data: *mut ::std::os::raw::c_void,
7591    ) -> FLAC__StreamEncoderInitStatus;
7592}
7593extern "C" {
7594    #[doc = " Initialize the encoder instance to encode native FLAC files."]
7595    #[doc = ""]
7596    #[doc = "  This flavor of initialization sets up the encoder to encode to a plain"]
7597    #[doc = "  FLAC file.  If POSIX fopen() semantics are not sufficient (for example,"]
7598    #[doc = "  with Unicode filenames on Windows), you must use"]
7599    #[doc = "  FLAC__stream_encoder_init_FILE(), or FLAC__stream_encoder_init_stream()"]
7600    #[doc = "  and provide callbacks for the I/O."]
7601    #[doc = ""]
7602    #[doc = "  This function should be called after FLAC__stream_encoder_new() and"]
7603    #[doc = "  FLAC__stream_encoder_set_*() but before FLAC__stream_encoder_process()"]
7604    #[doc = "  or FLAC__stream_encoder_process_interleaved()."]
7605    #[doc = "  initialization succeeded."]
7606    #[doc = ""]
7607    #[doc = " \\param  encoder            An uninitialized encoder instance."]
7608    #[doc = " \\param  filename           The name of the file to encode to.  The file will"]
7609    #[doc = "                            be opened with fopen().  Use \\c NULL to encode to"]
7610    #[doc = "                            \\c stdout.  Note however that a proper SEEKTABLE"]
7611    #[doc = "                            cannot be created when encoding to \\c stdout since"]
7612    #[doc = "                            it is not seekable."]
7613    #[doc = " \\param  progress_callback  See FLAC__StreamEncoderProgressCallback.  This"]
7614    #[doc = "                            pointer may be \\c NULL if the callback is not"]
7615    #[doc = "                            desired."]
7616    #[doc = " \\param  client_data        This value will be supplied to callbacks in their"]
7617    #[doc = "                            \\a client_data argument."]
7618    #[doc = " \\assert"]
7619    #[doc = "    \\code encoder != NULL \\endcode"]
7620    #[doc = " \\retval FLAC__StreamEncoderInitStatus"]
7621    #[doc = "    \\c FLAC__STREAM_ENCODER_INIT_STATUS_OK if initialization was successful;"]
7622    #[doc = "    see FLAC__StreamEncoderInitStatus for the meanings of other return values."]
7623    pub fn FLAC__stream_encoder_init_file(
7624        encoder: *mut FLAC__StreamEncoder,
7625        filename: *const ::std::os::raw::c_char,
7626        progress_callback: FLAC__StreamEncoderProgressCallback,
7627        client_data: *mut ::std::os::raw::c_void,
7628    ) -> FLAC__StreamEncoderInitStatus;
7629}
7630extern "C" {
7631    #[doc = " Initialize the encoder instance to encode Ogg FLAC files."]
7632    #[doc = ""]
7633    #[doc = "  This flavor of initialization sets up the encoder to encode to a plain"]
7634    #[doc = "  Ogg FLAC file.  If POSIX fopen() semantics are not sufficient (for example,"]
7635    #[doc = "  with Unicode filenames on Windows), you must use"]
7636    #[doc = "  FLAC__stream_encoder_init_ogg_FILE(), or FLAC__stream_encoder_init_ogg_stream()"]
7637    #[doc = "  and provide callbacks for the I/O."]
7638    #[doc = ""]
7639    #[doc = "  This function should be called after FLAC__stream_encoder_new() and"]
7640    #[doc = "  FLAC__stream_encoder_set_*() but before FLAC__stream_encoder_process()"]
7641    #[doc = "  or FLAC__stream_encoder_process_interleaved()."]
7642    #[doc = "  initialization succeeded."]
7643    #[doc = ""]
7644    #[doc = " \\param  encoder            An uninitialized encoder instance."]
7645    #[doc = " \\param  filename           The name of the file to encode to.  The file will"]
7646    #[doc = "                            be opened with fopen().  Use \\c NULL to encode to"]
7647    #[doc = "                            \\c stdout.  Note however that a proper SEEKTABLE"]
7648    #[doc = "                            cannot be created when encoding to \\c stdout since"]
7649    #[doc = "                            it is not seekable."]
7650    #[doc = " \\param  progress_callback  See FLAC__StreamEncoderProgressCallback.  This"]
7651    #[doc = "                            pointer may be \\c NULL if the callback is not"]
7652    #[doc = "                            desired."]
7653    #[doc = " \\param  client_data        This value will be supplied to callbacks in their"]
7654    #[doc = "                            \\a client_data argument."]
7655    #[doc = " \\assert"]
7656    #[doc = "    \\code encoder != NULL \\endcode"]
7657    #[doc = " \\retval FLAC__StreamEncoderInitStatus"]
7658    #[doc = "    \\c FLAC__STREAM_ENCODER_INIT_STATUS_OK if initialization was successful;"]
7659    #[doc = "    see FLAC__StreamEncoderInitStatus for the meanings of other return values."]
7660    pub fn FLAC__stream_encoder_init_ogg_file(
7661        encoder: *mut FLAC__StreamEncoder,
7662        filename: *const ::std::os::raw::c_char,
7663        progress_callback: FLAC__StreamEncoderProgressCallback,
7664        client_data: *mut ::std::os::raw::c_void,
7665    ) -> FLAC__StreamEncoderInitStatus;
7666}
7667extern "C" {
7668    #[doc = " Finish the encoding process."]
7669    #[doc = "  Flushes the encoding buffer, releases resources, resets the encoder"]
7670    #[doc = "  settings to their defaults, and returns the encoder state to"]
7671    #[doc = "  FLAC__STREAM_ENCODER_UNINITIALIZED.  Note that this can generate"]
7672    #[doc = "  one or more write callbacks before returning, and will generate"]
7673    #[doc = "  a metadata callback."]
7674    #[doc = ""]
7675    #[doc = "  Note that in the course of processing the last frame, errors can"]
7676    #[doc = "  occur, so the caller should be sure to check the return value to"]
7677    #[doc = "  ensure the file was encoded properly."]
7678    #[doc = ""]
7679    #[doc = "  In the event of a prematurely-terminated encode, it is not strictly"]
7680    #[doc = "  necessary to call this immediately before FLAC__stream_encoder_delete()"]
7681    #[doc = "  but it is good practice to match every FLAC__stream_encoder_init_*()"]
7682    #[doc = "  with a FLAC__stream_encoder_finish()."]
7683    #[doc = ""]
7684    #[doc = " \\param  encoder  An uninitialized encoder instance."]
7685    #[doc = " \\assert"]
7686    #[doc = "    \\code encoder != NULL \\endcode"]
7687    #[doc = " \\retval FLAC__bool"]
7688    #[doc = "    \\c false if an error occurred processing the last frame; or if verify"]
7689    #[doc = "    mode is set (see FLAC__stream_encoder_set_verify()), there was a"]
7690    #[doc = "    verify mismatch; else \\c true.  If \\c false, caller should check the"]
7691    #[doc = "    state with FLAC__stream_encoder_get_state() for more information"]
7692    #[doc = "    about the error."]
7693    pub fn FLAC__stream_encoder_finish(encoder: *mut FLAC__StreamEncoder) -> FLAC__bool;
7694}
7695extern "C" {
7696    #[doc = " Submit data for encoding."]
7697    #[doc = "  This version allows you to supply the input data via an array of"]
7698    #[doc = "  pointers, each pointer pointing to an array of \\a samples samples"]
7699    #[doc = "  representing one channel.  The samples need not be block-aligned,"]
7700    #[doc = "  but each channel should have the same number of samples.  Each sample"]
7701    #[doc = "  should be a signed integer, right-justified to the resolution set by"]
7702    #[doc = "  FLAC__stream_encoder_set_bits_per_sample().  For example, if the"]
7703    #[doc = "  resolution is 16 bits per sample, the samples should all be in the"]
7704    #[doc = "  range [-32768,32767]."]
7705    #[doc = ""]
7706    #[doc = "  For applications where channel order is important, channels must"]
7707    #[doc = "  follow the order as described in the"]
7708    #[doc = "  <A HREF=\"../format.html#frame_header\">frame header</A>."]
7709    #[doc = ""]
7710    #[doc = " \\param  encoder  An initialized encoder instance in the OK state."]
7711    #[doc = " \\param  buffer   An array of pointers to each channel\'s signal."]
7712    #[doc = " \\param  samples  The number of samples in one channel."]
7713    #[doc = " \\assert"]
7714    #[doc = "    \\code encoder != NULL \\endcode"]
7715    #[doc = "    \\code FLAC__stream_encoder_get_state(encoder) == FLAC__STREAM_ENCODER_OK \\endcode"]
7716    #[doc = " \\retval FLAC__bool"]
7717    #[doc = "    \\c true if successful, else \\c false; in this case, check the"]
7718    #[doc = "    encoder state with FLAC__stream_encoder_get_state() to see what"]
7719    #[doc = "    went wrong."]
7720    pub fn FLAC__stream_encoder_process(
7721        encoder: *mut FLAC__StreamEncoder,
7722        buffer: *const *const FLAC__int32,
7723        samples: ::std::os::raw::c_uint,
7724    ) -> FLAC__bool;
7725}
7726extern "C" {
7727    #[doc = " Submit data for encoding."]
7728    #[doc = "  This version allows you to supply the input data where the channels"]
7729    #[doc = "  are interleaved into a single array (i.e. channel0_sample0,"]
7730    #[doc = "  channel1_sample0, ... , channelN_sample0, channel0_sample1, ...)."]
7731    #[doc = "  The samples need not be block-aligned but they must be"]
7732    #[doc = "  sample-aligned, i.e. the first value should be channel0_sample0"]
7733    #[doc = "  and the last value channelN_sampleM.  Each sample should be a signed"]
7734    #[doc = "  integer, right-justified to the resolution set by"]
7735    #[doc = "  FLAC__stream_encoder_set_bits_per_sample().  For example, if the"]
7736    #[doc = "  resolution is 16 bits per sample, the samples should all be in the"]
7737    #[doc = "  range [-32768,32767]."]
7738    #[doc = ""]
7739    #[doc = "  For applications where channel order is important, channels must"]
7740    #[doc = "  follow the order as described in the"]
7741    #[doc = "  <A HREF=\"../format.html#frame_header\">frame header</A>."]
7742    #[doc = ""]
7743    #[doc = " \\param  encoder  An initialized encoder instance in the OK state."]
7744    #[doc = " \\param  buffer   An array of channel-interleaved data (see above)."]
7745    #[doc = " \\param  samples  The number of samples in one channel, the same as for"]
7746    #[doc = "                  FLAC__stream_encoder_process().  For example, if"]
7747    #[doc = "                  encoding two channels, \\c 1000 \\a samples corresponds"]
7748    #[doc = "                  to a \\a buffer of 2000 values."]
7749    #[doc = " \\assert"]
7750    #[doc = "    \\code encoder != NULL \\endcode"]
7751    #[doc = "    \\code FLAC__stream_encoder_get_state(encoder) == FLAC__STREAM_ENCODER_OK \\endcode"]
7752    #[doc = " \\retval FLAC__bool"]
7753    #[doc = "    \\c true if successful, else \\c false; in this case, check the"]
7754    #[doc = "    encoder state with FLAC__stream_encoder_get_state() to see what"]
7755    #[doc = "    went wrong."]
7756    pub fn FLAC__stream_encoder_process_interleaved(
7757        encoder: *mut FLAC__StreamEncoder,
7758        buffer: *const FLAC__int32,
7759        samples: ::std::os::raw::c_uint,
7760    ) -> FLAC__bool;
7761}
7762pub type __builtin_va_list = [__va_list_tag; 1usize];
7763#[repr(C)]
7764#[derive(Debug, Copy, Clone)]
7765pub struct __va_list_tag {
7766    pub gp_offset: ::std::os::raw::c_uint,
7767    pub fp_offset: ::std::os::raw::c_uint,
7768    pub overflow_arg_area: *mut ::std::os::raw::c_void,
7769    pub reg_save_area: *mut ::std::os::raw::c_void,
7770}