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/closedcaption/src/ccdetect/imp.rs | |
parent | 5dd0a23986352fa363b002c8495951e6a3593673 (diff) |
Update for new #[glib::object_subclass] attribute macro
Diffstat (limited to 'video/closedcaption/src/ccdetect/imp.rs')
-rw-r--r-- | video/closedcaption/src/ccdetect/imp.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/video/closedcaption/src/ccdetect/imp.rs b/video/closedcaption/src/ccdetect/imp.rs index 597dbf35f..da7cd8063 100644 --- a/video/closedcaption/src/ccdetect/imp.rs +++ b/video/closedcaption/src/ccdetect/imp.rs @@ -15,7 +15,6 @@ // Free Software Foundation, Inc., 51 Franklin Street, Suite 500, // Boston, MA 02110-1335, USA. -use glib::subclass; use glib::subclass::prelude::*; use gst::prelude::*; use gst::subclass::prelude::*; @@ -70,6 +69,7 @@ struct State { last_cc708_change: gst::ClockTime, } +#[derive(Default)] pub struct CCDetect { settings: Mutex<Settings>, state: Mutex<Option<State>>, @@ -214,22 +214,12 @@ impl CCDetect { } } +#[glib::object_subclass] impl ObjectSubclass for CCDetect { const NAME: &'static str = "CCDetect"; type Type = super::CCDetect; 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 CCDetect { |