diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2020-11-22 20:21:45 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2020-11-23 11:28:35 +0300 |
commit | f81d7b61b5923eea4247548c1778d1c71d94ed92 (patch) | |
tree | 16ba3459d302dff6435db34f5effbafe94568d20 /video/closedcaption/src/ccdetect/imp.rs | |
parent | 767ed3afaeab3a88255e6718c4ed008539438c41 (diff) |
video: Update to 2018 edition
Diffstat (limited to 'video/closedcaption/src/ccdetect/imp.rs')
-rw-r--r-- | video/closedcaption/src/ccdetect/imp.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/video/closedcaption/src/ccdetect/imp.rs b/video/closedcaption/src/ccdetect/imp.rs index 3f38998cf..5ac43309d 100644 --- a/video/closedcaption/src/ccdetect/imp.rs +++ b/video/closedcaption/src/ccdetect/imp.rs @@ -19,21 +19,24 @@ use glib::subclass; use glib::subclass::prelude::*; use gst::prelude::*; use gst::subclass::prelude::*; +use gst::{gst_element_error, gst_element_warning, gst_loggable_error, gst_trace, gst_warning}; use gst_base::subclass::prelude::*; use byteorder::{BigEndian, ByteOrder}; +use once_cell::sync::Lazy; + use std::fmt; use std::sync::Mutex; use std::u64; -lazy_static! { - static ref CAT: gst::DebugCategory = gst::DebugCategory::new( +static CAT: Lazy<gst::DebugCategory> = Lazy::new(|| { + gst::DebugCategory::new( "ccdetect", gst::DebugColorFlags::empty(), Some("Closed Caption Detection"), - ); -} + ) +}); const DEFAULT_WINDOW: u64 = 10 * gst::SECOND_VAL; const DEFAULT_CC608: bool = false; @@ -387,7 +390,7 @@ impl ObjectSubclass for CCDetect { type Instance = gst::subclass::ElementInstanceStruct<Self>; type Class = subclass::simple::ClassStruct<Self>; - glib_object_subclass!(); + glib::glib_object_subclass!(); fn new() -> Self { Self { |