gstreamer/element: Add support for ElementClass::add_metadata()

This commit is contained in:
Sebastian Dröge 2019-09-11 23:00:04 +03:00
parent 6dcd255815
commit 7868018abb

View file

@ -305,6 +305,16 @@ pub unsafe trait ElementClassSubclassExt: Sized + 'static {
); );
} }
} }
fn add_metadata(&mut self, key: &str, value: &str) {
unsafe {
gst_sys::gst_element_class_add_metadata(
self as *mut Self as *mut gst_sys::GstElementClass,
key.to_glib_none().0,
value.to_glib_none().0,
);
}
}
} }
unsafe impl ElementClassSubclassExt for ElementClass {} unsafe impl ElementClassSubclassExt for ElementClass {}