format/context: add duration() method

This commit is contained in:
lummax 2015-10-14 12:27:22 +02:00 committed by meh
parent 5f76845334
commit 110c5a533c

View File

@ -63,6 +63,12 @@ impl Context {
StreamIterMut::new(self) StreamIterMut::new(self)
} }
pub fn duration(&self) -> i64 {
unsafe {
(*self.as_ptr()).duration
}
}
pub fn metadata(&self) -> DictionaryRef { pub fn metadata(&self) -> DictionaryRef {
unsafe { unsafe {
DictionaryRef::wrap((*self.as_ptr()).metadata) DictionaryRef::wrap((*self.as_ptr()).metadata)