From eda353933064e24b60888ad5e7c780a80f36bcad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 25 Sep 2019 16:11:54 +0300 Subject: [PATCH] gstreamer: Add support for implementing gst::Preset interface --- gstreamer/src/subclass/mod.rs | 2 ++ gstreamer/src/subclass/preset.rs | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 gstreamer/src/subclass/preset.rs diff --git a/gstreamer/src/subclass/mod.rs b/gstreamer/src/subclass/mod.rs index 4858f8cb1..15ad2b5fa 100644 --- a/gstreamer/src/subclass/mod.rs +++ b/gstreamer/src/subclass/mod.rs @@ -31,6 +31,7 @@ pub mod pipeline; pub mod device; pub mod device_provider; +pub mod preset; pub mod uri_handler; pub mod prelude { @@ -44,6 +45,7 @@ pub mod prelude { pub use super::ghost_pad::GhostPadImpl; pub use super::pad::{PadImpl, PadImplExt}; pub use super::pipeline::PipelineImpl; + pub use super::preset::PresetImpl; pub use super::uri_handler::URIHandlerImpl; pub use super::PanicPoison; pub use glib::subclass::prelude::*; diff --git a/gstreamer/src/subclass/preset.rs b/gstreamer/src/subclass/preset.rs new file mode 100644 index 000000000..ba54aea3f --- /dev/null +++ b/gstreamer/src/subclass/preset.rs @@ -0,0 +1,23 @@ +// 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 glib_sys; + +use glib::subclass::prelude::*; + +use Preset; + +pub trait PresetImpl: super::element::ElementImpl + Send + Sync + 'static {} + +unsafe impl IsImplementable for Preset { + unsafe extern "C" fn interface_init( + _iface: glib_sys::gpointer, + _iface_data: glib_sys::gpointer, + ) { + } +}