Fix use statements

This commit is contained in:
Kornel
2023-05-24 21:49:22 +02:00
committed by Till Höppner
parent 2da2612b27
commit 1cf6267991
7 changed files with 12 additions and 16 deletions
+1
View File
@@ -6,6 +6,7 @@ links = "ffmpeg"
readme = "README.md"
authors = ["meh. <meh@schizofreni.co>"]
license = "WTFPL"
edition = "2018"
description = "FFI bindings to FFmpeg"
repository = "https://github.com/meh/rust-ffmpeg-sys"
-4
View File
@@ -1,7 +1,3 @@
extern crate bindgen;
extern crate cc;
extern crate num_cpus;
extern crate pkg_config;
use std::env;
use std::fs::{self, File};
+3 -3
View File
@@ -1,4 +1,4 @@
use libc::{c_char, c_int, size_t};
use std::os::raw::{c_char, c_int};
// Note: FFmpeg's AVERROR and AVUNERROR are conditionally defined based on
// whether EDOM is positive, claiming that "Some platforms have E* and errno
@@ -55,7 +55,7 @@ pub const AVERROR_HTTP_SERVER_ERROR: c_int = FFERRTAG!(0xF8, b'5', b'X', b'X');
#[inline(always)]
pub unsafe fn av_make_error_string(
errbuf: *mut c_char,
errbuf_size: size_t,
errbuf_size: usize,
errnum: c_int,
) -> *mut c_char {
av_strerror(errnum, errbuf, errbuf_size);
@@ -64,5 +64,5 @@ pub unsafe fn av_make_error_string(
}
extern "C" {
pub fn av_strerror(errnum: c_int, errbuf: *mut c_char, errbuf_size: size_t) -> c_int;
pub fn av_strerror(errnum: c_int, errbuf: *mut c_char, errbuf_size: usize) -> c_int;
}
+2 -2
View File
@@ -1,5 +1,5 @@
use AVPixelFormat;
use AVPixelFormat::*;
use crate::AVPixelFormat;
use crate::AVPixelFormat::*;
#[cfg(target_endian = "little")]
pub const AV_PIX_FMT_RGB32: AVPixelFormat = AV_PIX_FMT_BGRA;
+3 -3
View File
@@ -1,5 +1,5 @@
use libc::{c_double, c_int};
use AVRational;
use crate::AVRational;
use std::os::raw::c_int;
#[inline(always)]
pub unsafe fn av_make_q(num: c_int, den: c_int) -> AVRational {
@@ -22,7 +22,7 @@ pub unsafe fn av_cmp_q(a: AVRational, b: AVRational) -> c_int {
}
#[inline(always)]
pub unsafe fn av_q2d(a: AVRational) -> c_double {
pub unsafe fn av_q2d(a: AVRational) -> f64 {
f64::from(a.num) / f64::from(a.den)
}
+2 -3
View File
@@ -1,8 +1,7 @@
use libc::c_int;
use {AVRational, AV_TIME_BASE};
use crate::{AVRational, AV_TIME_BASE};
pub const AV_NOPTS_VALUE: i64 = 0x8000000000000000u64 as i64;
pub const AV_TIME_BASE_Q: AVRational = AVRational {
num: 1,
den: AV_TIME_BASE as c_int,
den: AV_TIME_BASE as _,
};
+1 -1
View File
@@ -12,4 +12,4 @@ include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
#[macro_use]
mod avutil;
pub use avutil::*;
pub use crate::avutil::*;