diff options
Diffstat (limited to 'generic/file/src/filesrc')
-rw-r--r-- | generic/file/src/filesrc/imp.rs | 15 | ||||
-rw-r--r-- | generic/file/src/filesrc/mod.rs | 2 |
2 files changed, 8 insertions, 9 deletions
diff --git a/generic/file/src/filesrc/imp.rs b/generic/file/src/filesrc/imp.rs index cc7969aa1..0eb0aa2e6 100644 --- a/generic/file/src/filesrc/imp.rs +++ b/generic/file/src/filesrc/imp.rs @@ -7,13 +7,11 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -use glib; use glib::subclass; use glib::subclass::prelude::*; -use gst; use gst::prelude::*; use gst::subclass::prelude::*; -use gst_base; +use gst::{gst_debug, gst_element_error, gst_error, gst_error_msg, gst_info}; use gst_base::prelude::*; use gst_base::subclass::prelude::*; @@ -66,13 +64,14 @@ pub struct FileSrc { state: Mutex<State>, } -lazy_static! { - static ref CAT: gst::DebugCategory = gst::DebugCategory::new( +use once_cell::sync::Lazy; +static CAT: Lazy<gst::DebugCategory> = Lazy::new(|| { + gst::DebugCategory::new( "rsfilesrc", gst::DebugColorFlags::empty(), Some("File Source"), - ); -} + ) +}); impl FileSrc { fn set_location( @@ -138,7 +137,7 @@ impl ObjectSubclass for FileSrc { type Instance = gst::subclass::ElementInstanceStruct<Self>; type Class = subclass::simple::ClassStruct<Self>; - glib_object_subclass!(); + glib::glib_object_subclass!(); fn new() -> Self { Self { diff --git a/generic/file/src/filesrc/mod.rs b/generic/file/src/filesrc/mod.rs index 70ed45de7..5fc15a28f 100644 --- a/generic/file/src/filesrc/mod.rs +++ b/generic/file/src/filesrc/mod.rs @@ -11,7 +11,7 @@ use glib::prelude::*; mod imp; -glib_wrapper! { +glib::glib_wrapper! { pub struct FileSrc(ObjectSubclass<imp::FileSrc>) @extends gst_base::BaseSrc, gst::Element, gst::Object, @implements gst::URIHandler; } |