diff --git a/src/format/context.rs b/src/format/context.rs index e0289d5..9c7cc08 100644 --- a/src/format/context.rs +++ b/src/format/context.rs @@ -2,7 +2,7 @@ use std::marker::PhantomData; use libc::c_uint; use ffi::*; -use ::{Error, Codec, Stream, Packet}; +use ::{Error, Codec, Stream, Packet, Dictionary}; pub struct Context { ptr: *mut AVFormatContext, @@ -55,6 +55,12 @@ impl Context { } } + pub fn metadata(&self) -> Dictionary { + unsafe { + Dictionary::wrap((*self.as_ptr()).metadata) + } + } + pub fn probe_score(&self) -> i32 { unsafe { av_format_get_probe_score(self.as_ptr())