Commit 6f59ceb5 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Implement fmt::Debug for AudioInfo

parent 86717310
......@@ -16,6 +16,7 @@ use glib;
use glib::translate::{from_glib, from_glib_full, from_glib_none, FromGlibPtrNone, ToGlib,
ToGlibPtr, ToGlibPtrMut};
use std::fmt;
use std::mem;
use std::ptr;
......@@ -23,6 +24,18 @@ use array_init;
pub struct AudioInfo(ffi::GstAudioInfo, [::AudioChannelPosition; 64]);
impl fmt::Debug for AudioInfo {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
f.debug_struct("AudioInfo")
.field("rate", &self.rate())
.field("channels", &self.channels())
.field("positions", &self.positions())
.field("flags", &self.flags())
.field("layout", &self.layout())
.finish()
}
}
pub struct AudioInfoBuilder<'a> {
format: ::AudioFormat,
rate: u32,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment