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

gitlab.freedesktop.org/gstreamer/gst-plugins-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 /generic/file/src/filesrc/imp.rs
parent5dd0a23986352fa363b002c8495951e6a3593673 (diff)
Update for new #[glib::object_subclass] attribute macro
Diffstat (limited to 'generic/file/src/filesrc/imp.rs')
-rw-r--r--generic/file/src/filesrc/imp.rs13
1 files changed, 2 insertions, 11 deletions
diff --git a/generic/file/src/filesrc/imp.rs b/generic/file/src/filesrc/imp.rs
index 742e0a17c..1abdd88ec 100644
--- a/generic/file/src/filesrc/imp.rs
+++ b/generic/file/src/filesrc/imp.rs
@@ -7,7 +7,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::*;
@@ -49,6 +48,7 @@ impl Default for State {
}
}
+#[derive(Default)]
pub struct FileSrc {
settings: Mutex<Settings>,
state: Mutex<State>,
@@ -120,22 +120,13 @@ impl FileSrc {
}
}
+#[glib::object_subclass]
impl ObjectSubclass for FileSrc {
const NAME: &'static str = "RsFileSrc";
type Type = super::FileSrc;
type ParentType = gst_base::BaseSrc;
type Interfaces = (gst::URIHandler,);
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(Default::default()),
- }
- }
}
impl ObjectImpl for FileSrc {