forked from mirrors/gstreamer-rs
Implement fmt::Debug for AudioInfo
This commit is contained in:
parent
85ca3b94a3
commit
f271c99498
1 changed files with 13 additions and 0 deletions
|
@ -16,6 +16,7 @@ use glib::translate::{from_glib, from_glib_full, from_glib_none, FromGlibPtrNone
|
||||||
use gst;
|
use gst;
|
||||||
use gst::prelude::*;
|
use gst::prelude::*;
|
||||||
|
|
||||||
|
use std::fmt;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
|
@ -23,6 +24,18 @@ use array_init;
|
||||||
|
|
||||||
pub struct AudioInfo(ffi::GstAudioInfo, [::AudioChannelPosition; 64]);
|
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> {
|
pub struct AudioInfoBuilder<'a> {
|
||||||
format: ::AudioFormat,
|
format: ::AudioFormat,
|
||||||
rate: u32,
|
rate: u32,
|
||||||
|
|
Loading…
Reference in a new issue