*: use latest ffmpeg-sys using bindgen
* Update bindings to newest ffmpeg version for new ffmpeg-sys, which is mostly generated by bindgen * Bring back removed feature flags * Fix whitespace formating * Remove prepended enum names to enum variants * Remove unneeded allows
This commit is contained in:
@ -84,7 +84,7 @@ impl Context {
|
||||
/// Get the remaining delay.
|
||||
pub fn delay(&self) -> Option<Delay> {
|
||||
unsafe {
|
||||
match swr_get_delay(self.as_ptr(), 1) {
|
||||
match swr_get_delay(self.as_ptr() as *mut _, 1) {
|
||||
0 => None,
|
||||
_ => Some(Delay::from(self))
|
||||
}
|
||||
|
@ -14,10 +14,10 @@ impl Delay {
|
||||
pub fn from(context: &Context) -> Self {
|
||||
unsafe {
|
||||
Delay {
|
||||
seconds: swr_get_delay(context.as_ptr(), 1),
|
||||
milliseconds: swr_get_delay(context.as_ptr(), 1000),
|
||||
input: swr_get_delay(context.as_ptr(), context.input().rate as int64_t),
|
||||
output: swr_get_delay(context.as_ptr(), context.output().rate as int64_t),
|
||||
seconds: swr_get_delay(context.as_ptr() as *mut _, 1),
|
||||
milliseconds: swr_get_delay(context.as_ptr() as *mut _, 1000),
|
||||
input: swr_get_delay(context.as_ptr() as *mut _, context.input().rate as int64_t),
|
||||
output: swr_get_delay(context.as_ptr() as *mut _, context.output().rate as int64_t),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
use ffi::*;
|
||||
use ffi::SwrDitherType::*;
|
||||
|
||||
#[derive(Eq, PartialEq, Copy, Clone, Debug)]
|
||||
pub enum Dither {
|
||||
@ -23,7 +24,7 @@ impl From<SwrDitherType> for Dither {
|
||||
SWR_DITHER_RECTANGULAR => Dither::Rectangular,
|
||||
SWR_DITHER_TRIANGULAR => Dither::Triangular,
|
||||
SWR_DITHER_TRIANGULAR_HIGHPASS => Dither::TriangularHighPass,
|
||||
|
||||
|
||||
SWR_DITHER_NS => Dither::None,
|
||||
SWR_DITHER_NS_LIPSHITZ => Dither::NoiseShapingLipshitz,
|
||||
SWR_DITHER_NS_F_WEIGHTED => Dither::NoiseShapingFWeighted,
|
||||
@ -44,7 +45,7 @@ impl Into<SwrDitherType> for Dither {
|
||||
Dither::Rectangular => SWR_DITHER_RECTANGULAR,
|
||||
Dither::Triangular => SWR_DITHER_TRIANGULAR,
|
||||
Dither::TriangularHighPass => SWR_DITHER_TRIANGULAR_HIGHPASS,
|
||||
|
||||
|
||||
Dither::NoiseShapingLipshitz => SWR_DITHER_NS_LIPSHITZ,
|
||||
Dither::NoiseShapingFWeighted => SWR_DITHER_NS_F_WEIGHTED,
|
||||
Dither::NoiseShapingModifiedEWeighted => SWR_DITHER_NS_MODIFIED_E_WEIGHTED,
|
||||
|
@ -1,4 +1,5 @@
|
||||
use ffi::*;
|
||||
use sys::SwrEngine::*;
|
||||
|
||||
#[derive(Eq, PartialEq, Copy, Clone, Debug)]
|
||||
pub enum Engine {
|
||||
|
@ -1,4 +1,5 @@
|
||||
use ffi::*;
|
||||
use ffi::SwrFilterType::*;
|
||||
|
||||
#[derive(Eq, PartialEq, Copy, Clone, Debug)]
|
||||
pub enum Filter {
|
||||
|
Reference in New Issue
Block a user