mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-14 13:31:09 +00:00
gstreamer: Simplify Element::element_class()
implementation a bit
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1337>
This commit is contained in:
parent
3b30546461
commit
43096963de
1 changed files with 1 additions and 5 deletions
|
@ -110,11 +110,7 @@ pub trait ElementExtManual: sealed::Sealed + IsA<Element> + 'static {
|
|||
#[doc(alias = "get_element_class")]
|
||||
#[inline]
|
||||
fn element_class(&self) -> &glib::Class<Element> {
|
||||
unsafe {
|
||||
let klass = (*(self.as_ptr() as *mut glib::gobject_ffi::GTypeInstance)).g_class
|
||||
as *const glib::Class<Element>;
|
||||
&*klass
|
||||
}
|
||||
unsafe { self.unsafe_cast_ref::<Element>().class() }
|
||||
}
|
||||
|
||||
#[doc(alias = "get_current_state")]
|
||||
|
|
Loading…
Reference in a new issue