forked from mirrors/gstreamer-rs
Print more fields in the VideoInfo fmt::Debug impl
This commit is contained in:
parent
f271c99498
commit
c2ee8d226c
1 changed files with 21 additions and 4 deletions
|
@ -192,16 +192,33 @@ pub struct VideoInfo(pub(crate) ffi::GstVideoInfo);
|
||||||
|
|
||||||
impl fmt::Debug for VideoInfo {
|
impl fmt::Debug for VideoInfo {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||||
f.debug_struct("VideoInfo")
|
let mut b = f.debug_struct("VideoInfo");
|
||||||
.field("format", &self.format())
|
|
||||||
|
b.field("format", &self.format())
|
||||||
.field("width", &self.width())
|
.field("width", &self.width())
|
||||||
.field("height", &self.height())
|
.field("height", &self.height())
|
||||||
|
.field("interlace_mode", &self.interlace_mode())
|
||||||
|
.field("flags", &self.flags())
|
||||||
.field("size", &self.size())
|
.field("size", &self.size())
|
||||||
.finish()
|
.field("views", &self.views())
|
||||||
|
.field("chroma_site", &self.chroma_site())
|
||||||
|
.field("colorimetry", &self.colorimetry())
|
||||||
|
.field("par", &self.par())
|
||||||
|
.field("fps", &self.fps())
|
||||||
|
.field("offset", &self.offset())
|
||||||
|
.field("stride", &self.stride())
|
||||||
|
.field("multiview_mode", &self.multiview_mode())
|
||||||
|
.field("multiview_flags", &self.multiview_flags());
|
||||||
|
|
||||||
|
#[cfg(any(feature = "v1_12", feature = "dox"))]
|
||||||
|
{
|
||||||
|
b.field("field_order", &self.field_order());
|
||||||
|
};
|
||||||
|
|
||||||
|
b.finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub struct VideoInfoBuilder<'a> {
|
pub struct VideoInfoBuilder<'a> {
|
||||||
format: ::VideoFormat,
|
format: ::VideoFormat,
|
||||||
width: u32,
|
width: u32,
|
||||||
|
|
Loading…
Reference in a new issue