From f81d7b61b5923eea4247548c1778d1c71d94ed92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 22 Nov 2020 19:21:45 +0200 Subject: video: Update to 2018 edition --- video/closedcaption/src/tttocea608/imp.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'video/closedcaption/src/tttocea608/imp.rs') diff --git a/video/closedcaption/src/tttocea608/imp.rs b/video/closedcaption/src/tttocea608/imp.rs index 8b2bbc148..e99e2c0e7 100644 --- a/video/closedcaption/src/tttocea608/imp.rs +++ b/video/closedcaption/src/tttocea608/imp.rs @@ -20,6 +20,9 @@ use glib::subclass; use glib::subclass::prelude::*; use gst::prelude::*; use gst::subclass::prelude::*; +use gst::{gst_debug, gst_element_error, gst_error, gst_log, gst_trace, gst_warning}; + +use once_cell::sync::Lazy; use crate::ffi; use std::sync::Mutex; @@ -263,14 +266,15 @@ pub struct TtToCea608 { settings: Mutex, } -lazy_static! { - static ref CAT: gst::DebugCategory = gst::DebugCategory::new( +static CAT: Lazy = Lazy::new(|| { + gst::DebugCategory::new( "tttocea608", gst::DebugColorFlags::empty(), Some("TT CEA 608 Element"), - ); - static ref SPACE: u16 = eia608_from_utf8_1(&[0x20, 0, 0, 0, 0]); -} + ) +}); + +static SPACE: Lazy = Lazy::new(|| eia608_from_utf8_1(&[0x20, 0, 0, 0, 0])); impl TtToCea608 { fn push_gap(&self, last_frame_no: u64, new_frame_no: u64) { @@ -786,7 +790,7 @@ impl ObjectSubclass for TtToCea608 { type Instance = gst::subclass::ElementInstanceStruct; type Class = subclass::simple::ClassStruct; - glib_object_subclass!(); + glib::glib_object_subclass!(); fn with_class(klass: &Self::Class) -> Self { let templ = klass.get_pad_template("sink").unwrap(); -- cgit v1.2.3