diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2021-03-07 19:22:24 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2021-03-07 19:27:00 +0300 |
commit | dc0c5f7611d5896f9fcfa9e141fabe02dea16ea6 (patch) | |
tree | 74d3f6c20a64a3e5fa9c1f4fcff6efb8a1d694d4 /video/rav1e | |
parent | 5dd0a23986352fa363b002c8495951e6a3593673 (diff) |
Update for new #[glib::object_subclass] attribute macro
Diffstat (limited to 'video/rav1e')
-rw-r--r-- | video/rav1e/src/rav1enc/imp.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/video/rav1e/src/rav1enc/imp.rs b/video/rav1e/src/rav1enc/imp.rs index 6516f6ceb..591812b16 100644 --- a/video/rav1e/src/rav1enc/imp.rs +++ b/video/rav1e/src/rav1enc/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::gst_debug; use gst::subclass::prelude::*; @@ -191,6 +190,7 @@ struct State { video_info: gst_video::VideoInfo, } +#[derive(Default)] pub struct Rav1Enc { state: Mutex<Option<State>>, settings: Mutex<Settings>, @@ -204,22 +204,12 @@ static CAT: Lazy<gst::DebugCategory> = Lazy::new(|| { ) }); +#[glib::object_subclass] impl ObjectSubclass for Rav1Enc { const NAME: &'static str = "Rav1Enc"; type Type = super::Rav1Enc; type ParentType = gst_video::VideoEncoder; - 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), - settings: Mutex::new(Default::default()), - } - } } impl ObjectImpl for Rav1Enc { |