gstreamer/event: Use autogenerated EventType::get_name

This commit is contained in:
Marijn Suijten 2020-12-02 22:27:19 +01:00
parent c95bd4f47a
commit f260fa4f8d

View file

@ -249,10 +249,7 @@ impl fmt::Debug for EventRef {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("Event") f.debug_struct("Event")
.field("ptr", unsafe { &self.as_ptr() }) .field("ptr", unsafe { &self.as_ptr() })
.field("type", &unsafe { .field("type", &self.get_type().get_name())
let type_ = ffi::gst_event_type_get_name((*self.as_ptr()).type_);
CStr::from_ptr(type_).to_str().unwrap()
})
.field("seqnum", &self.get_seqnum()) .field("seqnum", &self.get_seqnum())
.field("structure", &self.get_structure()) .field("structure", &self.get_structure())
.finish() .finish()