format/context: add duration()
method
This commit is contained in:
parent
5f76845334
commit
110c5a533c
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user