forked from mirrors/gstreamer-rs
video: implement proper Debug on VideoFormatInfo
This commit is contained in:
parent
38f3d3eff2
commit
71414fe052
1 changed files with 21 additions and 1 deletions
|
@ -311,7 +311,27 @@ impl Eq for VideoFormatInfo {}
|
||||||
|
|
||||||
impl fmt::Debug for VideoFormatInfo {
|
impl fmt::Debug for VideoFormatInfo {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||||
f.write_str(self.name())
|
f.debug_struct("VideoFormatInfo")
|
||||||
|
.field("format", &self.format())
|
||||||
|
.field("name", &self.name())
|
||||||
|
.field("description", &self.description())
|
||||||
|
.field("flags", &self.flags())
|
||||||
|
.field("bits", &self.bits())
|
||||||
|
.field("n-components", &self.n_components())
|
||||||
|
.field("shift", &self.shift())
|
||||||
|
.field("depth", &self.depth())
|
||||||
|
.field("pixel-stride", &self.pixel_stride())
|
||||||
|
.field("n-planes", &self.n_planes())
|
||||||
|
.field("plane", &self.plane())
|
||||||
|
.field("poffset", &self.poffset())
|
||||||
|
.field("w-sub", &self.w_sub())
|
||||||
|
.field("h-sub", &self.h_sub())
|
||||||
|
.field("unpack-format", &self.unpack_format())
|
||||||
|
.field("pack-lines", &self.pack_lines())
|
||||||
|
.field("tile-mode", &self.tile_mode())
|
||||||
|
.field("tile-ws", &self.tile_ws())
|
||||||
|
.field("tile-hs", &self.tile_hs())
|
||||||
|
.finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue