diff --git a/gstreamer/src/subclass/mod.rs b/gstreamer/src/subclass/mod.rs index 0b8b7305c..58376727c 100644 --- a/gstreamer/src/subclass/mod.rs +++ b/gstreamer/src/subclass/mod.rs @@ -32,6 +32,7 @@ pub mod device; pub mod device_provider; pub mod clock; +pub mod system_clock; pub mod preset; pub mod tag_setter; @@ -50,6 +51,7 @@ pub mod prelude { pub use super::pad::{PadImpl, PadImplExt}; pub use super::pipeline::PipelineImpl; pub use super::preset::PresetImpl; + pub use super::system_clock::SystemClockImpl; pub use super::tag_setter::TagSetterImpl; pub use super::uri_handler::URIHandlerImpl; pub use super::PanicPoison; diff --git a/gstreamer/src/subclass/system_clock.rs b/gstreamer/src/subclass/system_clock.rs new file mode 100644 index 000000000..557d68892 --- /dev/null +++ b/gstreamer/src/subclass/system_clock.rs @@ -0,0 +1,26 @@ +// Copyright (C) 2019 Sebastian Dröge +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use gst_sys; + +use super::prelude::*; +use glib::subclass::prelude::*; + +use SystemClockClass; + +pub trait SystemClockImpl: ClockImpl + Send + Sync + 'static {} + +unsafe impl IsSubclassable for SystemClockClass { + fn override_vfuncs(&mut self) { + <::ClockClass as IsSubclassable>::override_vfuncs(self); + unsafe { + let _klass = &mut *(self as *mut Self as *mut gst_sys::GstSystemClockClass); + // Nothing to do here + } + } +}