mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-27 02:20:30 +00:00
gstreamer: Update for removal of ElementClass/DeviceProviderClass type aliases
This commit is contained in:
parent
f6ace04caf
commit
9379c730b9
3 changed files with 5 additions and 8 deletions
|
@ -7,7 +7,6 @@
|
|||
// except according to those terms.
|
||||
|
||||
use Element;
|
||||
use ElementClass;
|
||||
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
|
@ -133,7 +132,7 @@ impl FromGlib<libc::c_ulong> for NotifyWatchId {
|
|||
}
|
||||
|
||||
pub trait ElementExtManual: 'static {
|
||||
fn get_element_class(&self) -> &ElementClass;
|
||||
fn get_element_class(&self) -> &glib::Class<Element>;
|
||||
|
||||
fn change_state(&self, transition: StateChange)
|
||||
-> Result<StateChangeSuccess, StateChangeError>;
|
||||
|
@ -271,10 +270,10 @@ pub trait ElementExtManual: 'static {
|
|||
}
|
||||
|
||||
impl<O: IsA<Element>> ElementExtManual for O {
|
||||
fn get_element_class(&self) -> &ElementClass {
|
||||
fn get_element_class(&self) -> &glib::Class<Element> {
|
||||
unsafe {
|
||||
let klass = (*(self.as_ptr() as *mut gobject_sys::GTypeInstance)).g_class
|
||||
as *const ElementClass;
|
||||
as *const glib::Class<Element>;
|
||||
&*klass
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ use glib::subclass::prelude::*;
|
|||
|
||||
use Device;
|
||||
use DeviceProvider;
|
||||
use DeviceProviderClass;
|
||||
use LoggableError;
|
||||
|
||||
pub trait DeviceProviderImpl: DeviceProviderImplExt + ObjectImpl + Send + Sync {
|
||||
|
@ -112,7 +111,7 @@ pub unsafe trait DeviceProviderClassSubclassExt: Sized + 'static {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl DeviceProviderClassSubclassExt for DeviceProviderClass {}
|
||||
unsafe impl DeviceProviderClassSubclassExt for glib::Class<DeviceProvider> {}
|
||||
|
||||
unsafe impl<T: DeviceProviderImpl> IsSubclassable<T> for DeviceProvider {
|
||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||
|
|
|
@ -19,7 +19,6 @@ use glib::translate::*;
|
|||
use prelude::*;
|
||||
|
||||
use Element;
|
||||
use ElementClass;
|
||||
use Event;
|
||||
use PadTemplate;
|
||||
use QueryRef;
|
||||
|
@ -336,7 +335,7 @@ pub unsafe trait ElementClassSubclassExt: Sized + 'static {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl ElementClassSubclassExt for ElementClass {}
|
||||
unsafe impl ElementClassSubclassExt for glib::Class<Element> {}
|
||||
|
||||
unsafe impl<T: ElementImpl> IsSubclassable<T> for Element
|
||||
where
|
||||
|
|
Loading…
Reference in a new issue