video: implement proper Debug on VideoFormatInfo

This commit is contained in:
Guillaume Desmottes 2019-07-03 14:23:09 +02:00 committed by Sebastian Dröge
parent 369d195e9f
commit a9e401084d

View file

@ -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()
} }
} }