|
| 1 | +//! Function wrappers around global C macros. |
| 2 | +use std::ffi::{CString, c_void}; |
| 3 | +use std::os::raw::{c_char, c_int}; |
| 4 | +use libc::{size_t, c_float}; |
| 5 | + |
| 6 | +#[link(name = "cbits")] |
| 7 | +extern "C" { |
| 8 | + #[link_name = "SYS_EAGAIN"] |
| 9 | + fn sys_eagain() -> i32; |
| 10 | + #[link_name = "SYS_AVERROR"] |
| 11 | + fn sys_sys_averror(code: i32) -> i32; |
| 12 | + #[link_name = "SYS_AV_NOPTS_VALUE"] |
| 13 | + fn sys_av_nopts_value() -> i64; |
| 14 | + #[link_name = "SYS_AV_ERROR_MAX_STRING_SIZE"] |
| 15 | + fn av_error_max_string_size() -> c_int; |
| 16 | + #[link_name = "SYS_AVERROR_BSF_NOT_FOUND"] |
| 17 | + fn averror_bsf_not_found() -> c_int; |
| 18 | + #[link_name = "SYS_AVERROR_BUG"] |
| 19 | + fn averror_bug() -> c_int; |
| 20 | + #[link_name = "SYS_AVERROR_BUFFER_TOO_SMALL"] |
| 21 | + fn averror_buffer_too_small() -> c_int; |
| 22 | + #[link_name = "SYS_AVERROR_DECODER_NOT_FOUND"] |
| 23 | + fn averror_decoder_not_found() -> c_int; |
| 24 | + #[link_name = "SYS_AVERROR_DEMUXER_NOT_FOUND"] |
| 25 | + fn averror_demuxer_not_found() -> c_int; |
| 26 | + #[link_name = "SYS_AVERROR_ENCODER_NOT_FOUND"] |
| 27 | + fn averror_encoder_not_found() -> c_int; |
| 28 | + #[link_name = "SYS_AVERROR_EOF"] |
| 29 | + fn averror_eof() -> c_int; |
| 30 | + #[link_name = "SYS_AVERROR_EXIT"] |
| 31 | + fn averror_exit() -> c_int; |
| 32 | + #[link_name = "SYS_AVERROR_EXTERNAL"] |
| 33 | + fn averror_external() -> c_int; |
| 34 | + #[link_name = "SYS_AVERROR_FILTER_NOT_FOUND"] |
| 35 | + fn averror_filter_not_found() -> c_int; |
| 36 | + #[link_name = "SYS_AVERROR_INVALIDDATA"] |
| 37 | + fn averror_invaliddata() -> c_int; |
| 38 | + #[link_name = "SYS_AVERROR_MUXER_NOT_FOUND"] |
| 39 | + fn averror_muxer_not_found() -> c_int; |
| 40 | + #[link_name = "SYS_AVERROR_OPTION_NOT_FOUND"] |
| 41 | + fn averror_option_not_found() -> c_int; |
| 42 | + #[link_name = "SYS_AVERROR_PATCHWELCOME"] |
| 43 | + fn averror_patchwelcome() -> c_int; |
| 44 | + #[link_name = "SYS_AVERROR_PROTOCOL_NOT_FOUND"] |
| 45 | + fn averror_protocol_not_found() -> c_int; |
| 46 | + #[link_name = "SYS_AVERROR_STREAM_NOT_FOUND"] |
| 47 | + fn averror_stream_not_found() -> c_int; |
| 48 | +} |
0 commit comments