codec/decoder: add time_base()
method
This commit is contained in:
parent
f15f26f706
commit
34ff7bafbf
@ -24,7 +24,7 @@ use std::ops::{Deref, DerefMut};
|
|||||||
|
|
||||||
use ffi::*;
|
use ffi::*;
|
||||||
use super::{Id, Context};
|
use super::{Id, Context};
|
||||||
use ::{Codec, Error, Discard, Dictionary};
|
use ::{Codec, Error, Discard, Rational, Dictionary};
|
||||||
|
|
||||||
pub struct Decoder(pub Context);
|
pub struct Decoder(pub Context);
|
||||||
|
|
||||||
@ -127,6 +127,12 @@ impl Decoder {
|
|||||||
(*self.as_mut_ptr()).skip_frame = value.into();
|
(*self.as_mut_ptr()).skip_frame = value.into();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn time_base(&self) -> Rational {
|
||||||
|
unsafe {
|
||||||
|
Rational::from((*self.as_ptr()).time_base)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Deref for Decoder {
|
impl Deref for Decoder {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user