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
4866739342
commit
d05f8cace8
1 changed files with 6 additions and 0 deletions
|
@ -36,6 +36,8 @@ impl Plugin {
|
||||||
|
|
||||||
pub trait GstPluginExtManual: 'static {
|
pub trait GstPluginExtManual: 'static {
|
||||||
fn get_plugin_flags(&self) -> PluginFlags;
|
fn get_plugin_flags(&self) -> PluginFlags;
|
||||||
|
|
||||||
|
fn get_plugin_name(&self) -> glib::GString;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<::Plugin>> GstPluginExtManual for O {
|
impl<O: IsA<::Plugin>> GstPluginExtManual for O {
|
||||||
|
@ -46,4 +48,8 @@ impl<O: IsA<::Plugin>> GstPluginExtManual for O {
|
||||||
from_glib((*ptr).flags)
|
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