forked from mirrors/gstreamer-rs
gstreamer: Add bindings for Plugin::get_plugin_name()
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/issues/248
This commit is contained in:
parent
26beed7277
commit
96c83bc0e6
1 changed files with 6 additions and 0 deletions
|
@ -36,6 +36,8 @@ impl Plugin {
|
|||
|
||||
pub trait GstPluginExtManual: 'static {
|
||||
fn get_plugin_flags(&self) -> PluginFlags;
|
||||
|
||||
fn get_plugin_name(&self) -> glib::GString;
|
||||
}
|
||||
|
||||
impl<O: IsA<::Plugin>> GstPluginExtManual for O {
|
||||
|
@ -46,4 +48,8 @@ impl<O: IsA<::Plugin>> 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)) }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue