gstreamer: Add bindings for Message::structure_mut()

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1215>
This commit is contained in:
Sebastian Dröge 2023-01-26 15:28:42 +02:00
parent b54746cf62
commit b708208408

View file

@ -68,6 +68,16 @@ impl MessageRef {
}
}
#[doc(alias = "gst_message_writable_structure")]
#[inline]
pub fn structure_mut(&mut self) -> &mut StructureRef {
unsafe {
StructureRef::from_glib_borrow_mut(ffi::gst_message_writable_structure(
self.as_mut_ptr(),
))
}
}
#[doc(alias = "gst_message_has_name")]
pub fn has_name(&self, name: &str) -> bool {
self.structure().map_or(false, |s| s.has_name(name))