Debug for Context
This commit is contained in:
parent
aa8df7d0d2
commit
f73dca70b4
@ -382,3 +382,14 @@ impl<'a> Iterator for ChapterIterMut<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> ExactSizeIterator for ChapterIterMut<'a> {}
|
impl<'a> ExactSizeIterator for ChapterIterMut<'a> {}
|
||||||
|
|
||||||
|
impl fmt::Debug for Context {
|
||||||
|
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
let mut s = fmt.debug_struct("AVFormatContext");
|
||||||
|
s.field("bit_rate", &self.bit_rate());
|
||||||
|
s.field("duration", &self.duration());
|
||||||
|
s.field("nb_chapters", &self.nb_chapters());
|
||||||
|
s.field("nb_streams", &self.nb_streams());
|
||||||
|
s.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -5,6 +5,7 @@ use format::context::common::Context;
|
|||||||
use libc::c_int;
|
use libc::c_int;
|
||||||
use {DictionaryRef, Discard, Rational};
|
use {DictionaryRef, Discard, Rational};
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct Stream<'a> {
|
pub struct Stream<'a> {
|
||||||
context: &'a Context,
|
context: &'a Context,
|
||||||
index: usize,
|
index: usize,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user