Debug for Context

This commit is contained in:
Kornel Lesiński
2020-06-26 22:01:09 +01:00
committed by Zhiming Wang
parent aa8df7d0d2
commit f73dca70b4
2 changed files with 12 additions and 0 deletions

View File

@ -382,3 +382,14 @@ impl<'a> Iterator 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()
}
}