format/context: expose the metadata dictionary
This commit is contained in:
parent
e063da22a4
commit
f486b7c051
@ -2,7 +2,7 @@ use std::marker::PhantomData;
|
|||||||
|
|
||||||
use libc::c_uint;
|
use libc::c_uint;
|
||||||
use ffi::*;
|
use ffi::*;
|
||||||
use ::{Error, Codec, Stream, Packet};
|
use ::{Error, Codec, Stream, Packet, Dictionary};
|
||||||
|
|
||||||
pub struct Context {
|
pub struct Context {
|
||||||
ptr: *mut AVFormatContext,
|
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 {
|
pub fn probe_score(&self) -> i32 {
|
||||||
unsafe {
|
unsafe {
|
||||||
av_format_get_probe_score(self.as_ptr())
|
av_format_get_probe_score(self.as_ptr())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user