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/lewton
parent5dd0a23986352fa363b002c8495951e6a3593673 (diff)
Update for new #[glib::object_subclass] attribute macro
Diffstat (limited to 'audio/lewton')
-rw-r--r--audio/lewton/src/lewtondec/imp.rs16
1 files changed, 4 insertions, 12 deletions
diff --git a/audio/lewton/src/lewtondec/imp.rs b/audio/lewton/src/lewtondec/imp.rs
index c0816775..d5a09584 100644
--- a/audio/lewton/src/lewtondec/imp.rs
+++ b/audio/lewton/src/lewtondec/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::subclass::prelude::*;
use gst::{gst_debug, gst_error, gst_warning};
@@ -18,6 +17,8 @@ use atomic_refcell::AtomicRefCell;
use byte_slice_cast::*;
+use once_cell::sync::Lazy;
+
struct State {
header_bufs: (
Option<gst::Buffer>,
@@ -30,11 +31,11 @@ struct State {
reorder_map: Option<[usize; 8]>,
}
+#[derive(Default)]
pub struct LewtonDec {
state: AtomicRefCell<Option<State>>,
}
-use once_cell::sync::Lazy;
static CAT: Lazy<gst::DebugCategory> = Lazy::new(|| {
gst::DebugCategory::new(
"lewtondec",
@@ -43,21 +44,12 @@ static CAT: Lazy<gst::DebugCategory> = Lazy::new(|| {
)
});
+#[glib::object_subclass]
impl ObjectSubclass for LewtonDec {
const NAME: &'static str = "LewtonDec";
type Type = super::LewtonDec;
type ParentType = gst_audio::AudioDecoder;
- type Interfaces = ();
type Instance = gst::subclass::ElementInstanceStruct<Self>;
- type Class = subclass::simple::ClassStruct<Self>;
-
- glib::object_subclass!();
-
- fn new() -> Self {
- Self {
- state: AtomicRefCell::new(None),
- }
- }
}
impl ObjectImpl for LewtonDec {}