From d05f8cace8cfa64221d79f8f9009705a4b3ee31b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 11 Apr 2020 19:33:34 +0300 Subject: [PATCH] gstreamer: Add bindings for Plugin::get_plugin_name() Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/248 --- gstreamer/src/plugin.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gstreamer/src/plugin.rs b/gstreamer/src/plugin.rs index db0ca7c54..870975695 100644 --- a/gstreamer/src/plugin.rs +++ b/gstreamer/src/plugin.rs @@ -36,6 +36,8 @@ impl Plugin { pub trait GstPluginExtManual: 'static { fn get_plugin_flags(&self) -> PluginFlags; + + fn get_plugin_name(&self) -> glib::GString; } impl> GstPluginExtManual for O { @@ -46,4 +48,8 @@ impl> GstPluginExtManual for O { from_glib((*ptr).flags) } } + + fn get_plugin_name(&self) -> glib::GString { + unsafe { from_glib_none(gst_sys::gst_plugin_get_name(self.as_ref().to_glib_none().0)) } + } }