Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sdroege/gst-plugin-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2021-03-07 19:22:24 +0300
committerSebastian Dröge <sebastian@centricular.com>2021-03-07 19:27:00 +0300
commitdc0c5f7611d5896f9fcfa9e141fabe02dea16ea6 (patch)
tree74d3f6c20a64a3e5fa9c1f4fcff6efb8a1d694d4 /audio/audiofx
parent5dd0a23986352fa363b002c8495951e6a3593673 (diff)
Update for new #[glib::object_subclass] attribute macro
Diffstat (limited to 'audio/audiofx')
-rw-r--r--audio/audiofx/src/audioecho/imp.rs14
-rw-r--r--audio/audiofx/src/audioloudnorm/imp.rs6
-rw-r--r--audio/audiofx/src/audiornnoise/imp.rs13
3 files changed, 5 insertions, 28 deletions
diff --git a/audio/audiofx/src/audioecho/imp.rs b/audio/audiofx/src/audioecho/imp.rs
index 8abf4de7..106316f0 100644
--- a/audio/audiofx/src/audioecho/imp.rs
+++ b/audio/audiofx/src/audioecho/imp.rs
@@ -6,7 +6,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
-use glib::subclass;
use glib::subclass::prelude::*;
use gst::prelude::*;
use gst::subclass::prelude::*;
@@ -60,6 +59,7 @@ struct State {
buffer: RingBuffer,
}
+#[derive(Default)]
pub struct AudioEcho {
settings: Mutex<Settings>,
state: Mutex<Option<State>>,
@@ -85,22 +85,12 @@ impl AudioEcho {
}
}
+#[glib::object_subclass]
impl ObjectSubclass for AudioEcho {
const NAME: &'static str = "RsAudioEcho";
type Type = super::AudioEcho;
type ParentType = gst_base::BaseTransform;
- type Interfaces = ();
type Instance = gst::subclass::ElementInstanceStruct<Self>;
- type Class = subclass::simple::ClassStruct<Self>;
-
- glib::object_subclass!();
-
- fn new() -> Self {
- Self {
- settings: Mutex::new(Default::default()),
- state: Mutex::new(None),
- }
- }
}
impl ObjectImpl for AudioEcho {
diff --git a/audio/audiofx/src/audioloudnorm/imp.rs b/audio/audiofx/src/audioloudnorm/imp.rs
index 55530164..543ec70a 100644
--- a/audio/audiofx/src/audioloudnorm/imp.rs
+++ b/audio/audiofx/src/audioloudnorm/imp.rs
@@ -18,7 +18,6 @@
// License along with FFmpeg; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-use glib::subclass;
use glib::subclass::prelude::*;
use gst::prelude::*;
use gst::subclass::prelude::*;
@@ -1701,15 +1700,12 @@ impl AudioLoudNorm {
}
}
+#[glib::object_subclass]
impl ObjectSubclass for AudioLoudNorm {
const NAME: &'static str = "RsAudioLoudNorm";
type Type = super::AudioLoudNorm;
type ParentType = gst::Element;
- type Interfaces = ();
type Instance = gst::subclass::ElementInstanceStruct<Self>;
- type Class = subclass::simple::ClassStruct<Self>;
-
- glib::object_subclass!();
fn with_class(klass: &Self::Class) -> Self {
let templ = klass.get_pad_template("sink").unwrap();
diff --git a/audio/audiofx/src/audiornnoise/imp.rs b/audio/audiofx/src/audiornnoise/imp.rs
index 02a23a75..8e11d303 100644
--- a/audio/audiofx/src/audiornnoise/imp.rs
+++ b/audio/audiofx/src/audiornnoise/imp.rs
@@ -8,7 +8,6 @@
// except according to those terms.
use byte_slice_cast::*;
-use glib::subclass;
use glib::subclass::prelude::*;
use gst::prelude::*;
use gst::subclass::prelude::*;
@@ -42,6 +41,7 @@ struct State {
adapter: gst_base::UniqueAdapter,
}
+#[derive(Default)]
pub struct AudioRNNoise {
state: Mutex<Option<State>>,
}
@@ -189,21 +189,12 @@ impl AudioRNNoise {
}
}
+#[glib::object_subclass]
impl ObjectSubclass for AudioRNNoise {
const NAME: &'static str = "AudioRNNoise";
type Type = super::AudioRNNoise;
type ParentType = gst_base::BaseTransform;
- type Interfaces = ();
type Instance = gst::subclass::ElementInstanceStruct<Self>;
- type Class = subclass::simple::ClassStruct<Self>;
-
- glib::object_subclass!();
-
- fn new() -> Self {
- Self {
- state: Mutex::new(None),
- }
- }
}
impl ObjectImpl for AudioRNNoise {}