Add Debug impl for Sample

This commit is contained in:
Sebastian Dröge 2017-12-30 12:02:33 +02:00
parent d44869711a
commit f47b30b8d1

View file

@ -7,6 +7,7 @@
// except according to those terms.
use std::ptr;
use std::fmt;
use ffi;
@ -97,5 +98,16 @@ impl ToOwned for SampleRef {
}
}
impl fmt::Debug for SampleRef {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("Sample")
.field("buffer", &self.get_buffer())
.field("caps", &self.get_caps())
.field("segment", &self.get_segment())
.field("info", &self.get_info())
.finish()
}
}
unsafe impl Sync for SampleRef {}
unsafe impl Send for SampleRef {}