From b70820840895116c65eea20b8ad338195c7b2030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 26 Jan 2023 15:28:42 +0200 Subject: [PATCH] gstreamer: Add bindings for `Message::structure_mut()` Part-of: --- gstreamer/src/message.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gstreamer/src/message.rs b/gstreamer/src/message.rs index 01af9a2a5..7ff19314b 100644 --- a/gstreamer/src/message.rs +++ b/gstreamer/src/message.rs @@ -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))