From a10532c379a57fbdc58bd7fdb2df712982de407a Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Mon, 6 Nov 2017 09:20:50 -0300 Subject: [PATCH] video_info: Implement fmt::Debug --- gstreamer-video/src/video_info.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gstreamer-video/src/video_info.rs b/gstreamer-video/src/video_info.rs index 9561b5fe2..0d0900e33 100644 --- a/gstreamer-video/src/video_info.rs +++ b/gstreamer-video/src/video_info.rs @@ -190,6 +190,18 @@ impl ::VideoMultiviewFramePacking { pub struct VideoInfo(pub(crate) ffi::GstVideoInfo); +impl fmt::Debug for VideoInfo { + fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> { + f.debug_struct("VideoInfo") + .field("format", &self.format()) + .field("width", &self.width()) + .field("height", &self.height()) + .field("size", &self.size()) + .finish() + } +} + + pub struct VideoInfoBuilder<'a> { format: ::VideoFormat, width: u32,