mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-29 21:11:14 +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.
|
// except according to those terms.
|
||||||
|
|
||||||
use Element;
|
use Element;
|
||||||
use ElementClass;
|
|
||||||
|
|
||||||
use once_cell::sync::Lazy;
|
use once_cell::sync::Lazy;
|
||||||
|
|
||||||
|
@ -133,7 +132,7 @@ impl FromGlib<libc::c_ulong> for NotifyWatchId {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait ElementExtManual: 'static {
|
pub trait ElementExtManual: 'static {
|
||||||
fn get_element_class(&self) -> &ElementClass;
|
fn get_element_class(&self) -> &glib::Class<Element>;
|
||||||
|
|
||||||
fn change_state(&self, transition: StateChange)
|
fn change_state(&self, transition: StateChange)
|
||||||
-> Result<StateChangeSuccess, StateChangeError>;
|
-> Result<StateChangeSuccess, StateChangeError>;
|
||||||
|
@ -271,10 +270,10 @@ pub trait ElementExtManual: 'static {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<O: IsA<Element>> ElementExtManual for O {
|
impl<O: IsA<Element>> ElementExtManual for O {
|
||||||
fn get_element_class(&self) -> &ElementClass {
|
fn get_element_class(&self) -> &glib::Class<Element> {
|
||||||
unsafe {
|
unsafe {
|
||||||
let klass = (*(self.as_ptr() as *mut gobject_sys::GTypeInstance)).g_class
|
let klass = (*(self.as_ptr() as *mut gobject_sys::GTypeInstance)).g_class
|
||||||
as *const ElementClass;
|
as *const glib::Class<Element>;
|
||||||
&*klass
|
&*klass
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@ use glib::subclass::prelude::*;
|
||||||
|
|
||||||
use Device;
|
use Device;
|
||||||
use DeviceProvider;
|
use DeviceProvider;
|
||||||
use DeviceProviderClass;
|
|
||||||
use LoggableError;
|
use LoggableError;
|
||||||
|
|
||||||
pub trait DeviceProviderImpl: DeviceProviderImplExt + ObjectImpl + Send + Sync {
|
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 {
|
unsafe impl<T: DeviceProviderImpl> IsSubclassable<T> for DeviceProvider {
|
||||||
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
fn override_vfuncs(klass: &mut glib::Class<Self>) {
|
||||||
|
|
|
@ -19,7 +19,6 @@ use glib::translate::*;
|
||||||
use prelude::*;
|
use prelude::*;
|
||||||
|
|
||||||
use Element;
|
use Element;
|
||||||
use ElementClass;
|
|
||||||
use Event;
|
use Event;
|
||||||
use PadTemplate;
|
use PadTemplate;
|
||||||
use QueryRef;
|
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
|
unsafe impl<T: ElementImpl> IsSubclassable<T> for Element
|
||||||
where
|
where
|
||||||
|
|
Loading…
Reference in a new issue