diff --git a/src/util/timebase.rs b/src/util/timebase.rs deleted file mode 100644 index a55fb8e..0000000 --- a/src/util/timebase.rs +++ /dev/null @@ -1,34 +0,0 @@ -use ffi::*; -use ::{Rational, Rounding}; - -pub const DEFAULT: Rational = Rational(AV_TIME_BASE_Q.num, AV_TIME_BASE_Q.den); - -pub trait Rescaling { - fn rescale(&self, source: S, destination: D) -> i64 - where S: Into, - D: Into; - - fn rescale_with(&self, source: S, destination: D, rounding: Rounding) -> i64 - where S: Into, - D: Into; -} - -impl + From> Rescaling for T { - fn rescale(&self, source: S, destination: D) -> i64 - where S: Into, - D: Into - { - unsafe { - av_rescale_q(self.into(), source.into().into(), destination.into().into()).into() - } - } - - fn rescale_with(&self, source: S, destination: D, rounding: Rounding) -> i64 - where S: Into, - D: Into - { - unsafe { - av_rescale_q(self.into(), source.into().into(), destination.into().into()).into() - } - } -}