diff --git a/audio/audiofx/Cargo.toml b/audio/audiofx/Cargo.toml index 44795263..ef3320dc 100644 --- a/audio/audiofx/Cargo.toml +++ b/audio/audiofx/Cargo.toml @@ -15,7 +15,6 @@ gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org anyhow = "1" byte-slice-cast = "1.0" num-traits = "0.2" -once_cell = "1.0" ebur128 = "0.1" hrtf = "0.8" nnnoiseless = { version = "0.5", default-features = false } diff --git a/audio/audiofx/src/audioecho/imp.rs b/audio/audiofx/src/audioecho/imp.rs index a3f9423c..8983f425 100644 --- a/audio/audiofx/src/audioecho/imp.rs +++ b/audio/audiofx/src/audioecho/imp.rs @@ -19,7 +19,7 @@ use byte_slice_cast::*; use num_traits::cast::{FromPrimitive, ToPrimitive}; use num_traits::float::Float; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static _CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( "rsaudioecho", diff --git a/audio/audiofx/src/audioloudnorm/imp.rs b/audio/audiofx/src/audioloudnorm/imp.rs index 5ba17ad5..e73df077 100644 --- a/audio/audiofx/src/audioloudnorm/imp.rs +++ b/audio/audiofx/src/audioloudnorm/imp.rs @@ -22,7 +22,7 @@ use std::u64; use byte_slice_cast::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use atomic_refcell::AtomicRefCell; diff --git a/audio/audiofx/src/audiornnoise/imp.rs b/audio/audiofx/src/audiornnoise/imp.rs index 8ebb9046..25e1b1aa 100644 --- a/audio/audiofx/src/audiornnoise/imp.rs +++ b/audio/audiofx/src/audiornnoise/imp.rs @@ -21,7 +21,7 @@ use nnnoiseless::DenoiseState; use byte_slice_cast::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use atomic_refcell::AtomicRefCell; diff --git a/audio/audiofx/src/ebur128level/imp.rs b/audio/audiofx/src/ebur128level/imp.rs index bb39445b..7207be79 100644 --- a/audio/audiofx/src/ebur128level/imp.rs +++ b/audio/audiofx/src/ebur128level/imp.rs @@ -16,7 +16,7 @@ use std::i32; use std::sync::atomic; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use byte_slice_cast::*; diff --git a/audio/audiofx/src/hrtfrender/imp.rs b/audio/audiofx/src/hrtfrender/imp.rs index 06d49689..c38bbecb 100644 --- a/audio/audiofx/src/hrtfrender/imp.rs +++ b/audio/audiofx/src/hrtfrender/imp.rs @@ -23,7 +23,7 @@ use byte_slice_cast::*; use rayon::prelude::*; use rayon::{ThreadPool, ThreadPoolBuilder}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( "hrtfrender", diff --git a/audio/audiofx/tests/hrtfrender.rs b/audio/audiofx/tests/hrtfrender.rs index 1c4ff997..9b61d2e8 100644 --- a/audio/audiofx/tests/hrtfrender.rs +++ b/audio/audiofx/tests/hrtfrender.rs @@ -9,7 +9,7 @@ use gst::glib; use gst::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CONFIG: Lazy = Lazy::new(|| { let buff = include_bytes!("test.hrir"); diff --git a/audio/claxon/src/claxondec/imp.rs b/audio/claxon/src/claxondec/imp.rs index 001559e3..a5a33502 100644 --- a/audio/claxon/src/claxondec/imp.rs +++ b/audio/claxon/src/claxondec/imp.rs @@ -19,7 +19,7 @@ use atomic_refcell::AtomicRefCell; use byte_slice_cast::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( diff --git a/audio/csound/Cargo.toml b/audio/csound/Cargo.toml index 316787a5..7acf3817 100644 --- a/audio/csound/Cargo.toml +++ b/audio/csound/Cargo.toml @@ -13,7 +13,6 @@ gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/g gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } csound = "0.1.8" -once_cell = "1.0" byte-slice-cast = "1.0" [dev-dependencies] diff --git a/audio/csound/src/filter/imp.rs b/audio/csound/src/filter/imp.rs index ed2a3426..a8052c5b 100644 --- a/audio/csound/src/filter/imp.rs +++ b/audio/csound/src/filter/imp.rs @@ -23,7 +23,7 @@ use byte_slice_cast::*; use csound::{Csound, MessageType}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( diff --git a/audio/lewton/Cargo.toml b/audio/lewton/Cargo.toml index cd8946e1..7bc5997b 100644 --- a/audio/lewton/Cargo.toml +++ b/audio/lewton/Cargo.toml @@ -14,7 +14,6 @@ gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org lewton = { version = "0.10", default-features = false } byte-slice-cast = "1.0" atomic_refcell = "0.1" -once_cell = "1.0" [dev-dependencies] gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } diff --git a/audio/lewton/src/lewtondec/imp.rs b/audio/lewton/src/lewtondec/imp.rs index 977c0605..ae8d81ff 100644 --- a/audio/lewton/src/lewtondec/imp.rs +++ b/audio/lewton/src/lewtondec/imp.rs @@ -18,7 +18,7 @@ use atomic_refcell::AtomicRefCell; use byte_slice_cast::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; struct State { header_bufs: ( diff --git a/audio/spotify/Cargo.toml b/audio/spotify/Cargo.toml index 3bfe057f..ab1d6e8b 100644 --- a/audio/spotify/Cargo.toml +++ b/audio/spotify/Cargo.toml @@ -11,7 +11,6 @@ rust-version = "1.66" [dependencies] gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } -once_cell = "1.0" librespot = { version = "0.4", default-features = false } tokio = "1.0" futures = "0.3" diff --git a/audio/spotify/src/spotifyaudiosrc/imp.rs b/audio/spotify/src/spotifyaudiosrc/imp.rs index fcaab88f..a04483f3 100644 --- a/audio/spotify/src/spotifyaudiosrc/imp.rs +++ b/audio/spotify/src/spotifyaudiosrc/imp.rs @@ -9,7 +9,7 @@ use std::sync::{mpsc, Arc, Mutex, MutexGuard}; use futures::future::{AbortHandle, Abortable, Aborted}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use tokio::{runtime, task::JoinHandle}; use gst::glib; diff --git a/generic/file/Cargo.toml b/generic/file/Cargo.toml index 47c0263f..fdb86ad2 100644 --- a/generic/file/Cargo.toml +++ b/generic/file/Cargo.toml @@ -12,7 +12,6 @@ rust-version = "1.66" url = "2" gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } -once_cell = "1.0" [lib] name = "gstrsfile" diff --git a/generic/file/src/filesink/imp.rs b/generic/file/src/filesink/imp.rs index 64ebc5c4..2628c3be 100644 --- a/generic/file/src/filesink/imp.rs +++ b/generic/file/src/filesink/imp.rs @@ -54,7 +54,7 @@ pub struct FileSink { state: Mutex, } -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( "rsfilesink", diff --git a/generic/file/src/filesrc/imp.rs b/generic/file/src/filesrc/imp.rs index 137a2de5..572de21b 100644 --- a/generic/file/src/filesrc/imp.rs +++ b/generic/file/src/filesrc/imp.rs @@ -54,7 +54,7 @@ pub struct FileSrc { state: Mutex, } -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( "rsfilesrc", diff --git a/generic/sodium/src/decrypter/imp.rs b/generic/sodium/src/decrypter/imp.rs index 794e0d5a..84feb0d4 100644 --- a/generic/sodium/src/decrypter/imp.rs +++ b/generic/sodium/src/decrypter/imp.rs @@ -29,7 +29,7 @@ use sodiumoxide::crypto::box_; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( "sodiumdecrypter", diff --git a/generic/sodium/src/encrypter/imp.rs b/generic/sodium/src/encrypter/imp.rs index b6560e0f..d0960a26 100644 --- a/generic/sodium/src/encrypter/imp.rs +++ b/generic/sodium/src/encrypter/imp.rs @@ -32,7 +32,7 @@ type BufferVec = SmallVec<[gst::Buffer; 16]>; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( "sodiumencrypter", diff --git a/generic/sodium/tests/decrypter.rs b/generic/sodium/tests/decrypter.rs index a8a154ca..51666f59 100644 --- a/generic/sodium/tests/decrypter.rs +++ b/generic/sodium/tests/decrypter.rs @@ -31,7 +31,7 @@ use std::path::PathBuf; use pretty_assertions::assert_eq; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static SENDER_PUBLIC: Lazy = Lazy::new(|| { let public = [ 66, 248, 199, 74, 216, 55, 228, 116, 52, 17, 147, 56, 65, 130, 134, 148, 157, 153, 235, diff --git a/generic/sodium/tests/encrypter.rs b/generic/sodium/tests/encrypter.rs index e0c18faf..5607fd89 100644 --- a/generic/sodium/tests/encrypter.rs +++ b/generic/sodium/tests/encrypter.rs @@ -25,7 +25,7 @@ use gst::glib; use gst::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use pretty_assertions::assert_eq; diff --git a/generic/threadshare/examples/benchmark.rs b/generic/threadshare/examples/benchmark.rs index 7f75c6e9..0f77ec89 100644 --- a/generic/threadshare/examples/benchmark.rs +++ b/generic/threadshare/examples/benchmark.rs @@ -18,8 +18,8 @@ // SPDX-License-Identifier: LGPL-2.1-or-later use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::prelude::*; -use once_cell::sync::Lazy; use std::env; use std::sync::atomic::{AtomicU64, Ordering}; diff --git a/generic/threadshare/examples/standalone/main.rs b/generic/threadshare/examples/standalone/main.rs index 1cc43e29..723994e7 100644 --- a/generic/threadshare/examples/standalone/main.rs +++ b/generic/threadshare/examples/standalone/main.rs @@ -1,5 +1,5 @@ use gst::glib; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; mod args; use args::*; diff --git a/generic/threadshare/examples/standalone/sink/async_mutex/imp.rs b/generic/threadshare/examples/standalone/sink/async_mutex/imp.rs index 75613181..faba1613 100644 --- a/generic/threadshare/examples/standalone/sink/async_mutex/imp.rs +++ b/generic/threadshare/examples/standalone/sink/async_mutex/imp.rs @@ -14,7 +14,7 @@ use gst::prelude::*; use gst::subclass::prelude::*; use gst::EventView; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use gstthreadshare::runtime::executor::block_on_or_add_sub_task; use gstthreadshare::runtime::{prelude::*, PadSink}; diff --git a/generic/threadshare/examples/standalone/sink/mod.rs b/generic/threadshare/examples/standalone/sink/mod.rs index bf9b7aae..4b3d78de 100644 --- a/generic/threadshare/examples/standalone/sink/mod.rs +++ b/generic/threadshare/examples/standalone/sink/mod.rs @@ -12,7 +12,7 @@ pub const ASYNC_MUTEX_ELEMENT_NAME: &str = "ts-standalone-async-mutex-sink"; pub const SYNC_MUTEX_ELEMENT_NAME: &str = "ts-standalone-sync-mutex-sink"; pub const TASK_ELEMENT_NAME: &str = "ts-standalone-task-sink"; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( "ts-standalone-sink", diff --git a/generic/threadshare/examples/standalone/sink/sync_mutex/imp.rs b/generic/threadshare/examples/standalone/sink/sync_mutex/imp.rs index 18957e40..eab0243a 100644 --- a/generic/threadshare/examples/standalone/sink/sync_mutex/imp.rs +++ b/generic/threadshare/examples/standalone/sink/sync_mutex/imp.rs @@ -14,7 +14,7 @@ use gst::prelude::*; use gst::subclass::prelude::*; use gst::EventView; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use gstthreadshare::runtime::{prelude::*, PadSink}; diff --git a/generic/threadshare/examples/standalone/sink/task/imp.rs b/generic/threadshare/examples/standalone/sink/task/imp.rs index 1ac86965..aca3de0a 100644 --- a/generic/threadshare/examples/standalone/sink/task/imp.rs +++ b/generic/threadshare/examples/standalone/sink/task/imp.rs @@ -15,7 +15,7 @@ use gst::prelude::*; use gst::subclass::prelude::*; use gst::EventView; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use gstthreadshare::runtime::prelude::*; use gstthreadshare::runtime::{Context, PadSink, Task}; diff --git a/generic/threadshare/examples/standalone/src/imp.rs b/generic/threadshare/examples/standalone/src/imp.rs index 821025f9..dfddcad2 100644 --- a/generic/threadshare/examples/standalone/src/imp.rs +++ b/generic/threadshare/examples/standalone/src/imp.rs @@ -13,7 +13,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::sync::Mutex; use std::time::Duration; diff --git a/generic/threadshare/examples/udpsrc_benchmark_sender.rs b/generic/threadshare/examples/udpsrc_benchmark_sender.rs index 42130ba4..2fe7504b 100644 --- a/generic/threadshare/examples/udpsrc_benchmark_sender.rs +++ b/generic/threadshare/examples/udpsrc_benchmark_sender.rs @@ -20,7 +20,7 @@ use gst::glib; use gst::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::net; use std::net::{IpAddr, Ipv4Addr, SocketAddr}; diff --git a/generic/threadshare/src/appsrc/imp.rs b/generic/threadshare/src/appsrc/imp.rs index 10e5c963..deeffbfa 100644 --- a/generic/threadshare/src/appsrc/imp.rs +++ b/generic/threadshare/src/appsrc/imp.rs @@ -26,7 +26,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::sync::Mutex; use std::time::Duration; diff --git a/generic/threadshare/src/audiotestsrc/imp.rs b/generic/threadshare/src/audiotestsrc/imp.rs index a628c193..fddcea61 100644 --- a/generic/threadshare/src/audiotestsrc/imp.rs +++ b/generic/threadshare/src/audiotestsrc/imp.rs @@ -13,7 +13,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::mem::size_of; use std::sync::Mutex; diff --git a/generic/threadshare/src/dataqueue.rs b/generic/threadshare/src/dataqueue.rs index 092cb381..17bdefe5 100644 --- a/generic/threadshare/src/dataqueue.rs +++ b/generic/threadshare/src/dataqueue.rs @@ -21,7 +21,7 @@ use futures::future::{self, abortable, AbortHandle}; use gst::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::collections::VecDeque; use std::sync::Arc; diff --git a/generic/threadshare/src/inputselector/imp.rs b/generic/threadshare/src/inputselector/imp.rs index 81cf5cd3..57e6ea33 100644 --- a/generic/threadshare/src/inputselector/imp.rs +++ b/generic/threadshare/src/inputselector/imp.rs @@ -25,7 +25,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::collections::HashMap; use std::sync::{Arc, Mutex}; diff --git a/generic/threadshare/src/jitterbuffer/imp.rs b/generic/threadshare/src/jitterbuffer/imp.rs index b5b51513..7bdfeaa6 100644 --- a/generic/threadshare/src/jitterbuffer/imp.rs +++ b/generic/threadshare/src/jitterbuffer/imp.rs @@ -26,7 +26,7 @@ use gst::prelude::*; use gst::subclass::prelude::*; use gst_rtp::RTPBuffer; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::cmp::Ordering; use std::collections::{BTreeSet, VecDeque}; diff --git a/generic/threadshare/src/proxy/imp.rs b/generic/threadshare/src/proxy/imp.rs index 50537414..18fa4239 100644 --- a/generic/threadshare/src/proxy/imp.rs +++ b/generic/threadshare/src/proxy/imp.rs @@ -25,7 +25,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::collections::{HashMap, VecDeque}; use std::sync::{Arc, Weak}; diff --git a/generic/threadshare/src/queue/imp.rs b/generic/threadshare/src/queue/imp.rs index cc528763..a8802f70 100644 --- a/generic/threadshare/src/queue/imp.rs +++ b/generic/threadshare/src/queue/imp.rs @@ -25,7 +25,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::collections::VecDeque; use std::sync::Mutex; diff --git a/generic/threadshare/src/runtime/executor/context.rs b/generic/threadshare/src/runtime/executor/context.rs index c2fbb79d..29bca705 100644 --- a/generic/threadshare/src/runtime/executor/context.rs +++ b/generic/threadshare/src/runtime/executor/context.rs @@ -5,7 +5,7 @@ use futures::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::collections::HashMap; use std::io; diff --git a/generic/threadshare/src/runtime/mod.rs b/generic/threadshare/src/runtime/mod.rs index 4d77f78f..a48c372a 100644 --- a/generic/threadshare/src/runtime/mod.rs +++ b/generic/threadshare/src/runtime/mod.rs @@ -44,7 +44,7 @@ pub mod prelude { pub use super::task::TaskImpl; } -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static RUNTIME_CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( diff --git a/generic/threadshare/src/socket.rs b/generic/threadshare/src/socket.rs index a815c213..088dd5c1 100644 --- a/generic/threadshare/src/socket.rs +++ b/generic/threadshare/src/socket.rs @@ -23,7 +23,7 @@ use futures::future::BoxFuture; use gst::glib; use gst::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use gio::prelude::*; diff --git a/generic/threadshare/src/tcpclientsrc/imp.rs b/generic/threadshare/src/tcpclientsrc/imp.rs index ee6c18d6..66a55660 100644 --- a/generic/threadshare/src/tcpclientsrc/imp.rs +++ b/generic/threadshare/src/tcpclientsrc/imp.rs @@ -25,7 +25,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::io; use std::net::{IpAddr, SocketAddr, TcpStream}; diff --git a/generic/threadshare/src/udpsink/imp.rs b/generic/threadshare/src/udpsink/imp.rs index 25203086..0f19a761 100644 --- a/generic/threadshare/src/udpsink/imp.rs +++ b/generic/threadshare/src/udpsink/imp.rs @@ -26,7 +26,7 @@ use gst::subclass::prelude::*; use gst::EventView; use gst::{element_error, error_msg}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use crate::runtime::executor::block_on_or_add_sub_task; use crate::runtime::prelude::*; diff --git a/generic/threadshare/src/udpsrc/imp.rs b/generic/threadshare/src/udpsrc/imp.rs index 18f9d0a8..997ca1f3 100644 --- a/generic/threadshare/src/udpsrc/imp.rs +++ b/generic/threadshare/src/udpsrc/imp.rs @@ -25,7 +25,7 @@ use gst::prelude::*; use gst::subclass::prelude::*; use gst_net::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::i32; use std::io; diff --git a/generic/threadshare/tests/jitterbuffer.rs b/generic/threadshare/tests/jitterbuffer.rs index 851d66a3..e9422664 100644 --- a/generic/threadshare/tests/jitterbuffer.rs +++ b/generic/threadshare/tests/jitterbuffer.rs @@ -21,7 +21,7 @@ use gst::prelude::*; use std::sync::mpsc; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( diff --git a/generic/threadshare/tests/pad.rs b/generic/threadshare/tests/pad.rs index 406b1503..c1d7c41c 100644 --- a/generic/threadshare/tests/pad.rs +++ b/generic/threadshare/tests/pad.rs @@ -29,7 +29,7 @@ use gst::prelude::*; use gst::subclass::prelude::*; use gst::EventView; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Mutex; diff --git a/generic/threadshare/tests/pipeline.rs b/generic/threadshare/tests/pipeline.rs index 5e12d6b3..b01485f7 100644 --- a/generic/threadshare/tests/pipeline.rs +++ b/generic/threadshare/tests/pipeline.rs @@ -20,7 +20,7 @@ use gst::glib; use gst::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::sync::mpsc; diff --git a/mux/flavors/Cargo.toml b/mux/flavors/Cargo.toml index 277e2df5..575790d2 100644 --- a/mux/flavors/Cargo.toml +++ b/mux/flavors/Cargo.toml @@ -17,7 +17,6 @@ nom = "7" flavors = { git = "https://github.com/rust-av/flavors" } muldiv = "1.0" byteorder = "1.0" -once_cell = "1.0" smallvec = "1.0" [lib] diff --git a/mux/flavors/src/flvdemux/imp.rs b/mux/flavors/src/flvdemux/imp.rs index 528d3dae..586be920 100644 --- a/mux/flavors/src/flvdemux/imp.rs +++ b/mux/flavors/src/flvdemux/imp.rs @@ -21,7 +21,7 @@ use gst::subclass::prelude::*; use num_rational::Rational32; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use smallvec::SmallVec; diff --git a/mux/fmp4/Cargo.toml b/mux/fmp4/Cargo.toml index 7d9473dd..6c8667c6 100644 --- a/mux/fmp4/Cargo.toml +++ b/mux/fmp4/Cargo.toml @@ -15,7 +15,6 @@ gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/g gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] } gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] } gst-pbutils = { package = "gstreamer-pbutils", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] } -once_cell = "1.0" [lib] name = "gstfmp4" diff --git a/mux/fmp4/src/fmp4mux/imp.rs b/mux/fmp4/src/fmp4mux/imp.rs index eed23301..24e97bcc 100644 --- a/mux/fmp4/src/fmp4mux/imp.rs +++ b/mux/fmp4/src/fmp4mux/imp.rs @@ -16,7 +16,7 @@ use std::collections::VecDeque; use std::mem; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use super::boxes; use super::Buffer; diff --git a/mux/mp4/Cargo.toml b/mux/mp4/Cargo.toml index 4f89fd01..71bcc493 100644 --- a/mux/mp4/Cargo.toml +++ b/mux/mp4/Cargo.toml @@ -15,7 +15,6 @@ gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/g gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] } gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] } gst-pbutils = { package = "gstreamer-pbutils", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] } -once_cell = "1.0" [lib] name = "gstmp4" diff --git a/mux/mp4/src/mp4mux/imp.rs b/mux/mp4/src/mp4mux/imp.rs index 4ae19dc8..eb35b643 100644 --- a/mux/mp4/src/mp4mux/imp.rs +++ b/mux/mp4/src/mp4mux/imp.rs @@ -15,7 +15,7 @@ use gst_base::subclass::prelude::*; use std::collections::VecDeque; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use super::boxes; diff --git a/net/aws/Cargo.toml b/net/aws/Cargo.toml index 82b6631d..fefb03ea 100644 --- a/net/aws/Cargo.toml +++ b/net/aws/Cargo.toml @@ -29,7 +29,6 @@ gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/g gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_16"] } http = "0.2.7" -once_cell = "1.0" percent-encoding = "2" tokio = { version = "1.0", features = [ "full" ] } serde = "1" diff --git a/net/aws/src/s3hlssink/imp.rs b/net/aws/src/s3hlssink/imp.rs index ac4b4601..92a27111 100644 --- a/net/aws/src/s3hlssink/imp.rs +++ b/net/aws/src/s3hlssink/imp.rs @@ -9,7 +9,7 @@ // SPDX-License-Identifier: MPL-2.0 use futures::future; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::io::Write; use std::str::FromStr; use std::sync::mpsc::{self, Receiver, SyncSender}; diff --git a/net/aws/src/s3sink/imp.rs b/net/aws/src/s3sink/imp.rs index 284a7815..a86cc418 100644 --- a/net/aws/src/s3sink/imp.rs +++ b/net/aws/src/s3sink/imp.rs @@ -25,7 +25,7 @@ use aws_sdk_s3::{ }; use futures::future; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::collections::HashMap; use std::convert::From; use std::sync::Mutex; diff --git a/net/aws/src/s3src/imp.rs b/net/aws/src/s3src/imp.rs index 6687649f..361219c0 100644 --- a/net/aws/src/s3src/imp.rs +++ b/net/aws/src/s3src/imp.rs @@ -8,7 +8,7 @@ use bytes::Bytes; use futures::future; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::sync::Mutex; use std::time::Duration; diff --git a/net/aws/src/s3utils.rs b/net/aws/src/s3utils.rs index d4df0b5d..0fc705a5 100644 --- a/net/aws/src/s3utils.rs +++ b/net/aws/src/s3utils.rs @@ -15,7 +15,7 @@ use aws_smithy_http::byte_stream::{error::Error, ByteStream}; use bytes::{buf::BufMut, Bytes, BytesMut}; use futures::stream::TryStreamExt; use futures::{future, Future}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::sync::Mutex; use std::time::Duration; use tokio::runtime; diff --git a/net/aws/src/transcribe_parse/imp.rs b/net/aws/src/transcribe_parse/imp.rs index 4a3a4865..aaa0a902 100644 --- a/net/aws/src/transcribe_parse/imp.rs +++ b/net/aws/src/transcribe_parse/imp.rs @@ -11,7 +11,7 @@ use gst::subclass::prelude::*; use gst::{element_imp_error, error_msg}; use serde_derive::Deserialize; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::sync::Mutex; diff --git a/net/aws/src/transcriber/imp.rs b/net/aws/src/transcriber/imp.rs index 1d77b14a..929fbf41 100644 --- a/net/aws/src/transcriber/imp.rs +++ b/net/aws/src/transcriber/imp.rs @@ -31,7 +31,7 @@ use tokio::{runtime, sync::broadcast, task}; use std::collections::{BTreeSet, VecDeque}; use std::sync::{Arc, Mutex}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use super::transcribe::{TranscriberSettings, TranscriberStream, TranscriptEvent, TranscriptItem}; use super::translate::{TranslateLoop, TranslatedItem}; diff --git a/net/aws/src/transcriber/mod.rs b/net/aws/src/transcriber/mod.rs index fe13019c..165c1f5c 100644 --- a/net/aws/src/transcriber/mod.rs +++ b/net/aws/src/transcriber/mod.rs @@ -13,7 +13,7 @@ mod imp; mod transcribe; mod translate; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( diff --git a/net/hlssink3/src/imp.rs b/net/hlssink3/src/imp.rs index c629ce40..0644360b 100644 --- a/net/hlssink3/src/imp.rs +++ b/net/hlssink3/src/imp.rs @@ -10,10 +10,10 @@ use crate::playlist::{Playlist, SegmentFormatter}; use crate::HlsSink3PlaylistType; use gio::prelude::*; use glib::subclass::prelude::*; +use gst::glib::once_cell::sync::Lazy; use gst::prelude::*; use gst::subclass::prelude::*; use m3u8_rs::MediaPlaylistType; -use once_cell::sync::Lazy; use std::fs; use std::io::Write; use std::path; diff --git a/net/hlssink3/src/playlist.rs b/net/hlssink3/src/playlist.rs index ee3297eb..52938f74 100644 --- a/net/hlssink3/src/playlist.rs +++ b/net/hlssink3/src/playlist.rs @@ -6,8 +6,8 @@ // // SPDX-License-Identifier: MPL-2.0 +use gst::glib::once_cell::sync::Lazy; use m3u8_rs::{MediaPlaylist, MediaPlaylistType, MediaSegment}; -use once_cell::sync::Lazy; use regex::Regex; use std::io::Write; diff --git a/net/hlssink3/tests/hlssink3.rs b/net/hlssink3/tests/hlssink3.rs index f9009d62..d070ba07 100644 --- a/net/hlssink3/tests/hlssink3.rs +++ b/net/hlssink3/tests/hlssink3.rs @@ -7,9 +7,9 @@ // SPDX-License-Identifier: MPL-2.0 use gio::prelude::*; +use gst::glib::once_cell::sync::Lazy; use gst::prelude::*; use gsthlssink3::HlsSink3PlaylistType; -use once_cell::sync::Lazy; use std::io::Write; use std::sync::{mpsc, Arc, Mutex}; use std::time::Duration; diff --git a/net/ndi/Cargo.toml b/net/ndi/Cargo.toml index 49eac9e9..bd2c39ce 100644 --- a/net/ndi/Cargo.toml +++ b/net/ndi/Cargo.toml @@ -15,7 +15,6 @@ gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/g gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } byte-slice-cast = "1" -once_cell = "1.0" byteorder = "1.0" atomic_refcell = "0.1" libloading = "0.8" diff --git a/net/ndi/src/device_provider/imp.rs b/net/ndi/src/device_provider/imp.rs index 94b975c5..069271e9 100644 --- a/net/ndi/src/device_provider/imp.rs +++ b/net/ndi/src/device_provider/imp.rs @@ -3,13 +3,13 @@ use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::OnceCell; +use gst::glib::once_cell::sync::OnceCell; use std::sync::atomic; use std::sync::Mutex; use std::thread; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use crate::ndi; diff --git a/net/ndi/src/lib.rs b/net/ndi/src/lib.rs index 1edf3712..1d6791f3 100644 --- a/net/ndi/src/lib.rs +++ b/net/ndi/src/lib.rs @@ -28,7 +28,7 @@ mod ndisrcmeta; #[cfg(feature = "doc")] use gst::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy, glib::Enum)] #[repr(u32)] diff --git a/net/ndi/src/ndisink/imp.rs b/net/ndi/src/ndisink/imp.rs index 585f09b3..1f3e576d 100644 --- a/net/ndi/src/ndisink/imp.rs +++ b/net/ndi/src/ndisink/imp.rs @@ -8,7 +8,7 @@ use gst_base::subclass::prelude::*; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use crate::ndi::SendInstance; diff --git a/net/ndi/src/ndisinkcombiner/imp.rs b/net/ndi/src/ndisinkcombiner/imp.rs index eb83af97..91df7905 100644 --- a/net/ndi/src/ndisinkcombiner/imp.rs +++ b/net/ndi/src/ndisinkcombiner/imp.rs @@ -7,12 +7,12 @@ use gst::subclass::prelude::*; use gst_base::prelude::*; use gst_base::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::mem; use std::sync::Mutex; -static CAT: once_cell::sync::Lazy = once_cell::sync::Lazy::new(|| { +static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( "ndisinkcombiner", gst::DebugColorFlags::empty(), diff --git a/net/ndi/src/ndisinkmeta.rs b/net/ndi/src/ndisinkmeta.rs index cbacdb06..4924ef0f 100644 --- a/net/ndi/src/ndisinkmeta.rs +++ b/net/ndi/src/ndisinkmeta.rs @@ -53,7 +53,7 @@ impl fmt::Debug for NdiSinkAudioMeta { mod imp { use glib::translate::*; - use once_cell::sync::Lazy; + use gst::glib::once_cell::sync::Lazy; use std::mem; use std::ptr; diff --git a/net/ndi/src/ndisrc/imp.rs b/net/ndi/src/ndisrc/imp.rs index 69764b8d..04c06e3e 100644 --- a/net/ndi/src/ndisrc/imp.rs +++ b/net/ndi/src/ndisrc/imp.rs @@ -9,7 +9,7 @@ use gst_base::subclass::prelude::*; use std::sync::Mutex; use std::u32; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use crate::ndisys; use crate::RecvColorFormat; diff --git a/net/ndi/src/ndisrc/receiver.rs b/net/ndi/src/ndisrc/receiver.rs index 1a85a3ef..62223060 100644 --- a/net/ndi/src/ndisrc/receiver.rs +++ b/net/ndi/src/ndisrc/receiver.rs @@ -14,7 +14,7 @@ use std::time; use atomic_refcell::AtomicRefCell; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use crate::ndi::*; use crate::ndisys; diff --git a/net/ndi/src/ndisrcdemux/imp.rs b/net/ndi/src/ndisrcdemux/imp.rs index 75901664..225431a6 100644 --- a/net/ndi/src/ndisrcdemux/imp.rs +++ b/net/ndi/src/ndisrcdemux/imp.rs @@ -5,7 +5,7 @@ use gst::subclass::prelude::*; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use crate::ndisrcmeta; diff --git a/net/ndi/src/ndisrcmeta.rs b/net/ndi/src/ndisrcmeta.rs index e0984a69..6f4e053d 100644 --- a/net/ndi/src/ndisrcmeta.rs +++ b/net/ndi/src/ndisrcmeta.rs @@ -69,7 +69,7 @@ impl fmt::Debug for NdiSrcMeta { mod imp { use super::StreamType; use glib::translate::*; - use once_cell::sync::Lazy; + use gst::glib::once_cell::sync::Lazy; use std::mem; use std::ptr; diff --git a/net/ndi/src/ndisys.rs b/net/ndi/src/ndisys.rs index d8643d75..fa8da0aa 100644 --- a/net/ndi/src/ndisys.rs +++ b/net/ndi/src/ndisys.rs @@ -8,6 +8,8 @@ clippy::missing_safety_doc )] +use glib::once_cell::sync::OnceCell; + #[cfg(unix)] use libloading::os::unix::{Library, Symbol}; #[cfg(windows)] @@ -322,11 +324,10 @@ pub const NDIlib_compressed_packet_flags_keyframe: u32 = 1; #[cfg(feature = "advanced-sdk")] pub const NDIlib_compressed_packet_version_0: u32 = 44; -static FFI: once_cell::sync::OnceCell = once_cell::sync::OnceCell::new(); +static FFI: OnceCell = OnceCell::new(); pub fn load() -> Result<(), glib::BoolError> { - static ERR: once_cell::sync::OnceCell> = - once_cell::sync::OnceCell::new(); + static ERR: OnceCell> = OnceCell::new(); ERR.get_or_init(|| unsafe { use std::env; diff --git a/net/onvif/Cargo.toml b/net/onvif/Cargo.toml index 6c3301cb..15530e22 100644 --- a/net/onvif/Cargo.toml +++ b/net/onvif/Cargo.toml @@ -13,7 +13,6 @@ gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/g gst-rtp = { package = "gstreamer-rtp", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_20"] } gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_20"] } gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_20"] } -once_cell = "1.0" xmlparser = "0.13" chrono = { version = "0.4", default-features = false } cairo-rs = { git = "https://github.com/gtk-rs/gtk-rs-core", features=["use_glib"] } diff --git a/net/onvif/src/lib.rs b/net/onvif/src/lib.rs index 1b5b7887..da06a289 100644 --- a/net/onvif/src/lib.rs +++ b/net/onvif/src/lib.rs @@ -13,7 +13,7 @@ * Since: plugins-rs-0.9.0 */ use gst::glib; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; mod onvifmetadatacombiner; mod onvifmetadatadepay; diff --git a/net/onvif/src/onvifmetadatacombiner/imp.rs b/net/onvif/src/onvifmetadatacombiner/imp.rs index 9cd56f53..3932b161 100644 --- a/net/onvif/src/onvifmetadatacombiner/imp.rs +++ b/net/onvif/src/onvifmetadatacombiner/imp.rs @@ -1,10 +1,10 @@ use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::prelude::*; use gst::subclass::prelude::*; use gst_base::prelude::*; use gst_base::subclass::prelude::*; use gst_base::AGGREGATOR_FLOW_NEED_DATA; -use once_cell::sync::Lazy; use std::sync::Mutex; #[derive(Default)] diff --git a/net/onvif/src/onvifmetadatadepay/imp.rs b/net/onvif/src/onvifmetadatadepay/imp.rs index 05fcc2c3..0a623513 100644 --- a/net/onvif/src/onvifmetadatadepay/imp.rs +++ b/net/onvif/src/onvifmetadatadepay/imp.rs @@ -1,8 +1,8 @@ use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::subclass::prelude::*; use gst_rtp::prelude::*; use gst_rtp::subclass::prelude::*; -use once_cell::sync::Lazy; use std::sync::Mutex; #[derive(Default)] diff --git a/net/onvif/src/onvifmetadataoverlay/imp.rs b/net/onvif/src/onvifmetadataoverlay/imp.rs index 6003ff3a..fab8576c 100644 --- a/net/onvif/src/onvifmetadataoverlay/imp.rs +++ b/net/onvif/src/onvifmetadataoverlay/imp.rs @@ -4,7 +4,7 @@ use gst::subclass::prelude::*; use gst_video::prelude::*; use pango::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::collections::HashSet; use std::sync::Mutex; diff --git a/net/onvif/src/onvifmetadataparse/imp.rs b/net/onvif/src/onvifmetadataparse/imp.rs index 057878cc..5a1b88b5 100644 --- a/net/onvif/src/onvifmetadataparse/imp.rs +++ b/net/onvif/src/onvifmetadataparse/imp.rs @@ -10,7 +10,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::collections::BTreeMap; use std::sync::{Condvar, Mutex}; diff --git a/net/onvif/src/onvifmetadatapay/imp.rs b/net/onvif/src/onvifmetadatapay/imp.rs index 93aba5ac..81326a0c 100644 --- a/net/onvif/src/onvifmetadatapay/imp.rs +++ b/net/onvif/src/onvifmetadatapay/imp.rs @@ -1,8 +1,8 @@ use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::subclass::prelude::*; use gst_rtp::prelude::*; use gst_rtp::subclass::prelude::*; -use once_cell::sync::Lazy; #[derive(Default)] pub struct OnvifMetadataPay {} diff --git a/net/raptorq/Cargo.toml b/net/raptorq/Cargo.toml index a4018191..1704719c 100644 --- a/net/raptorq/Cargo.toml +++ b/net/raptorq/Cargo.toml @@ -12,7 +12,6 @@ rust-version = "1.66" gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gst-rtp = { package = "gstreamer-rtp", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } -once_cell = "1.0" raptorq = "1.7" [dev-dependencies] diff --git a/net/raptorq/src/raptorqdec/imp.rs b/net/raptorq/src/raptorqdec/imp.rs index 6c305b95..4d3496e3 100644 --- a/net/raptorq/src/raptorqdec/imp.rs +++ b/net/raptorq/src/raptorqdec/imp.rs @@ -11,7 +11,7 @@ use gst::subclass::prelude::*; use gst_rtp::RTPBuffer; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::collections::BTreeMap; use std::iter; diff --git a/net/raptorq/src/raptorqenc/imp.rs b/net/raptorq/src/raptorqenc/imp.rs index cb37a0a2..75784759 100644 --- a/net/raptorq/src/raptorqenc/imp.rs +++ b/net/raptorq/src/raptorqenc/imp.rs @@ -12,7 +12,7 @@ use gst::subclass::prelude::*; use gst_rtp::rtp_buffer::*; use gst_rtp::RTPBuffer; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::collections::HashSet; use std::sync::{mpsc, Mutex}; diff --git a/net/reqwest/Cargo.toml b/net/reqwest/Cargo.toml index 9b14918f..320a6914 100644 --- a/net/reqwest/Cargo.toml +++ b/net/reqwest/Cargo.toml @@ -17,7 +17,6 @@ mime = "0.3" gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } tokio = { version = "1.0", default-features = false, features = ["time", "rt-multi-thread"] } -once_cell = "1.0" [dev-dependencies] hyper = { version = "0.14", features = ["server"] } diff --git a/net/reqwest/src/reqwesthttpsrc/imp.rs b/net/reqwest/src/reqwesthttpsrc/imp.rs index be9c9605..ab77de01 100644 --- a/net/reqwest/src/reqwesthttpsrc/imp.rs +++ b/net/reqwest/src/reqwesthttpsrc/imp.rs @@ -17,7 +17,7 @@ use reqwest::{Client, Response, StatusCode}; use tokio::runtime; use url::Url; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use gst::glib; use gst::prelude::*; diff --git a/net/rtp/Cargo.toml b/net/rtp/Cargo.toml index 108651f4..4c41f8db 100644 --- a/net/rtp/Cargo.toml +++ b/net/rtp/Cargo.toml @@ -12,7 +12,6 @@ rust-version = "1.66" bitstream-io = "1.3" gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_20"] } gst-rtp = { package = "gstreamer-rtp", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_20"]} -once_cell = "1.0" chrono = { version = "0.4", default-features = false } [dev-dependencies] diff --git a/net/rtp/src/av1/common/obu.rs b/net/rtp/src/av1/common/obu.rs index 54e31414..60187c1d 100644 --- a/net/rtp/src/av1/common/obu.rs +++ b/net/rtp/src/av1/common/obu.rs @@ -232,7 +232,7 @@ impl From for u8 { mod tests { use super::*; use bitstream_io::{BigEndian, BitRead, BitReader}; - use once_cell::sync::Lazy; + use gst::glib::once_cell::sync::Lazy; use std::io::Cursor; #[allow(clippy::type_complexity)] diff --git a/net/rtp/src/av1/depay/imp.rs b/net/rtp/src/av1/depay/imp.rs index 44d1c8be..f9fe838f 100644 --- a/net/rtp/src/av1/depay/imp.rs +++ b/net/rtp/src/av1/depay/imp.rs @@ -17,7 +17,7 @@ use std::{ }; use bitstream_io::{BitReader, BitWriter}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use crate::av1::common::{ err_flow, leb128_size, parse_leb128, write_leb128, AggregationHeader, ObuType, SizedObu, diff --git a/net/rtp/src/av1/pay/imp.rs b/net/rtp/src/av1/pay/imp.rs index 4182c14b..92e707c6 100644 --- a/net/rtp/src/av1/pay/imp.rs +++ b/net/rtp/src/av1/pay/imp.rs @@ -17,7 +17,7 @@ use std::{ }; use bitstream_io::{BitReader, BitWriter}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use crate::av1::common::{ err_flow, leb128_size, write_leb128, ObuType, SizedObu, CLOCK_RATE, ENDIANNESS, diff --git a/net/rtp/src/gcc/imp.rs b/net/rtp/src/gcc/imp.rs index 84269ce0..f01eb1bb 100644 --- a/net/rtp/src/gcc/imp.rs +++ b/net/rtp/src/gcc/imp.rs @@ -18,8 +18,8 @@ * */ use chrono::Duration; +use gst::glib::once_cell::sync::Lazy; use gst::{glib, prelude::*, subclass::prelude::*}; -use once_cell::sync::Lazy; use std::{ collections::{BTreeMap, VecDeque}, fmt, diff --git a/net/webrtc/Cargo.toml b/net/webrtc/Cargo.toml index 9697f60a..5d7b51ea 100644 --- a/net/webrtc/Cargo.toml +++ b/net/webrtc/Cargo.toml @@ -19,7 +19,6 @@ gst-utils = { git="https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", packa gst-base = { git="https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", package = "gstreamer-base" } uuid = { version = "1", features = ["v4"] } -once_cell = "1.0" anyhow = "1" thiserror = "1" futures = "0.3" diff --git a/net/webrtc/signalling/Cargo.toml b/net/webrtc/signalling/Cargo.toml index a77259d8..0e96cebf 100644 --- a/net/webrtc/signalling/Cargo.toml +++ b/net/webrtc/signalling/Cargo.toml @@ -9,7 +9,6 @@ repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs" rust-version = "1.66" [dependencies] -once_cell = "1.0" anyhow = "1" tokio = { version = "1", features = ["fs", "io-util", "macros", "rt-multi-thread", "time"] } tokio-native-tls = "0.3.0" diff --git a/net/webrtc/src/aws_kvs_signaller/imp.rs b/net/webrtc/src/aws_kvs_signaller/imp.rs index 13d9a79f..7f55bd03 100644 --- a/net/webrtc/src/aws_kvs_signaller/imp.rs +++ b/net/webrtc/src/aws_kvs_signaller/imp.rs @@ -8,9 +8,9 @@ use async_tungstenite::tungstenite::Message as WsMessage; use futures::channel::mpsc; use futures::prelude::*; use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::glib::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; use std::path::PathBuf; use std::sync::Mutex; use tokio::task; diff --git a/net/webrtc/src/lib.rs b/net/webrtc/src/lib.rs index ada044e2..f09950f1 100644 --- a/net/webrtc/src/lib.rs +++ b/net/webrtc/src/lib.rs @@ -11,7 +11,7 @@ * Since: plugins-rs-0.9 */ use gst::glib; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use tokio::runtime; mod aws_kvs_signaller; diff --git a/net/webrtc/src/livekit_signaller/imp.rs b/net/webrtc/src/livekit_signaller/imp.rs index 9b1d1f76..7c282ee7 100644 --- a/net/webrtc/src/livekit_signaller/imp.rs +++ b/net/webrtc/src/livekit_signaller/imp.rs @@ -8,9 +8,9 @@ use crate::RUNTIME; use anyhow::anyhow; use futures::executor::block_on; use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; use serde::{Deserialize, Serialize}; use std::collections::HashMap; use std::sync::{Arc, Mutex}; diff --git a/net/webrtc/src/signaller/iface.rs b/net/webrtc/src/signaller/iface.rs index 8ed49b17..d0401875 100644 --- a/net/webrtc/src/signaller/iface.rs +++ b/net/webrtc/src/signaller/iface.rs @@ -1,8 +1,8 @@ use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::glib::subclass::*; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; #[derive(Copy, Clone)] pub struct Signallable { diff --git a/net/webrtc/src/signaller/imp.rs b/net/webrtc/src/signaller/imp.rs index f637fda4..83a2780c 100644 --- a/net/webrtc/src/signaller/imp.rs +++ b/net/webrtc/src/signaller/imp.rs @@ -8,10 +8,10 @@ use async_tungstenite::tungstenite::Message as WsMessage; use futures::channel::mpsc; use futures::prelude::*; use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::glib::prelude::*; use gst::subclass::prelude::*; use gst_plugin_webrtc_protocol as p; -use once_cell::sync::Lazy; use std::collections::HashSet; use std::ops::ControlFlow; use std::str::FromStr; diff --git a/net/webrtc/src/signaller/mod.rs b/net/webrtc/src/signaller/mod.rs index c4992a14..1af26a68 100644 --- a/net/webrtc/src/signaller/mod.rs +++ b/net/webrtc/src/signaller/mod.rs @@ -8,7 +8,7 @@ use gst::glib; * * Interface that WebRTC elements can implement their own protocol with. */ -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; // Expose traits and objects from the module itself so it exactly looks like // generated bindings pub use imp::WebRTCSignallerRole; diff --git a/net/webrtc/src/utils.rs b/net/webrtc/src/utils.rs index 33cfa3c1..d80ad606 100644 --- a/net/webrtc/src/utils.rs +++ b/net/webrtc/src/utils.rs @@ -5,8 +5,8 @@ use std::{ }; use anyhow::{Context, Error}; +use gst::glib::once_cell::sync::Lazy; use gst::{glib, prelude::*}; -use once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( diff --git a/net/webrtc/src/webrtcsink/homegrown_cc.rs b/net/webrtc/src/webrtcsink/homegrown_cc.rs index acea1dd8..bea08d85 100644 --- a/net/webrtc/src/webrtcsink/homegrown_cc.rs +++ b/net/webrtc/src/webrtcsink/homegrown_cc.rs @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MPL-2.0 +use gst::glib::once_cell::sync::Lazy; use gst::{ glib::{self, value::FromValue}, prelude::*, }; -use once_cell::sync::Lazy; use super::imp::VideoEncoder; diff --git a/net/webrtc/src/webrtcsink/imp.rs b/net/webrtc/src/webrtcsink/imp.rs index 187aab0e..17bc0a04 100644 --- a/net/webrtc/src/webrtcsink/imp.rs +++ b/net/webrtc/src/webrtcsink/imp.rs @@ -13,7 +13,7 @@ use gst_webrtc::{WebRTCDataChannel, WebRTCICETransportPolicy}; use futures::prelude::*; use anyhow::{anyhow, Error}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::collections::HashMap; use std::ops::Mul; diff --git a/net/webrtc/src/webrtcsrc/imp.rs b/net/webrtc/src/webrtcsrc/imp.rs index 9fa50f3d..31ba0b01 100644 --- a/net/webrtc/src/webrtcsrc/imp.rs +++ b/net/webrtc/src/webrtcsrc/imp.rs @@ -7,8 +7,8 @@ use crate::utils::{Codec, Codecs, AUDIO_CAPS, RTP_CAPS, VIDEO_CAPS}; use crate::webrtcsrc::WebRTCSrcPad; use anyhow::{Context, Error}; use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; use std::collections::HashSet; use std::str::FromStr; use std::sync::atomic::AtomicU16; diff --git a/net/webrtc/src/whip_signaller/imp.rs b/net/webrtc/src/whip_signaller/imp.rs index 9169b183..765de4e8 100644 --- a/net/webrtc/src/whip_signaller/imp.rs +++ b/net/webrtc/src/whip_signaller/imp.rs @@ -7,10 +7,10 @@ use crate::utils::{ use crate::RUNTIME; use async_recursion::async_recursion; use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::prelude::*; use gst::subclass::prelude::*; use gst_webrtc::{WebRTCICEGatheringState, WebRTCSessionDescription}; -use once_cell::sync::Lazy; use reqwest::header::HeaderMap; use reqwest::header::HeaderValue; use reqwest::StatusCode; diff --git a/net/webrtchttp/Cargo.toml b/net/webrtchttp/Cargo.toml index fe1332d6..4cbc52b1 100644 --- a/net/webrtchttp/Cargo.toml +++ b/net/webrtchttp/Cargo.toml @@ -15,7 +15,6 @@ gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/g gst-webrtc = { package = "gstreamer-webrtc", git="https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] } gst-sdp = { package = "gstreamer-sdp", git="https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } reqwest = { version = "0.11", features = ["default-tls"] } -once_cell = "1.0" parse_link_header = {version = "0.3", features = ["url"]} tokio = { version = "1.20.1", default-features = false, features = ["time", "rt-multi-thread"] } futures = "0.3.23" diff --git a/net/webrtchttp/src/utils.rs b/net/webrtchttp/src/utils.rs index 0f5ffebc..34cb203c 100644 --- a/net/webrtchttp/src/utils.rs +++ b/net/webrtchttp/src/utils.rs @@ -1,7 +1,7 @@ use futures::future; use futures::prelude::*; +use gst::glib::once_cell::sync::Lazy; use gst::{prelude::*, ErrorMessage}; -use once_cell::sync::Lazy; use reqwest::header::HeaderMap; use reqwest::redirect::Policy; use std::sync::Mutex; diff --git a/net/webrtchttp/src/whepsrc/imp.rs b/net/webrtchttp/src/whepsrc/imp.rs index d8be2284..9cdf4f39 100644 --- a/net/webrtchttp/src/whepsrc/imp.rs +++ b/net/webrtchttp/src/whepsrc/imp.rs @@ -15,10 +15,10 @@ use crate::IceTransportPolicy; use async_recursion::async_recursion; use bytes::Bytes; use futures::future; +use gst::glib::once_cell::sync::Lazy; use gst::{glib, prelude::*, subclass::prelude::*}; use gst_sdp::*; use gst_webrtc::*; -use once_cell::sync::Lazy; use reqwest::header::{HeaderMap, HeaderValue}; use reqwest::StatusCode; use std::sync::Mutex; diff --git a/net/webrtchttp/src/whipsink/imp.rs b/net/webrtchttp/src/whipsink/imp.rs index 6115fb96..be2e2894 100644 --- a/net/webrtchttp/src/whipsink/imp.rs +++ b/net/webrtchttp/src/whipsink/imp.rs @@ -15,11 +15,11 @@ use crate::IceTransportPolicy; use async_recursion::async_recursion; use futures::future; use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::prelude::*; use gst::subclass::prelude::*; use gst_sdp::*; use gst_webrtc::*; -use once_cell::sync::Lazy; use reqwest::header::HeaderMap; use reqwest::header::HeaderValue; use reqwest::StatusCode; diff --git a/text/ahead/Cargo.toml b/text/ahead/Cargo.toml index c3075d5d..c6d4e47d 100644 --- a/text/ahead/Cargo.toml +++ b/text/ahead/Cargo.toml @@ -10,7 +10,6 @@ rust-version = "1.66" [dependencies] gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } -once_cell = "1.0" [lib] name = "gsttextahead" diff --git a/text/ahead/src/textahead/imp.rs b/text/ahead/src/textahead/imp.rs index 90c937ea..2d60721f 100644 --- a/text/ahead/src/textahead/imp.rs +++ b/text/ahead/src/textahead/imp.rs @@ -9,7 +9,7 @@ use std::collections::VecDeque; use std::sync::{Mutex, MutexGuard}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use gst::glib; use gst::prelude::*; diff --git a/text/json/Cargo.toml b/text/json/Cargo.toml index 27b273fa..00f4af3f 100644 --- a/text/json/Cargo.toml +++ b/text/json/Cargo.toml @@ -9,7 +9,6 @@ description = "GStreamer JSON Plugin" repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs" [dependencies] -once_cell = "1.0" serde = { version = "1.0", features = ["derive"] } serde_json = { version = "1.0", features = ["raw_value"] } diff --git a/text/json/src/jsongstenc/imp.rs b/text/json/src/jsongstenc/imp.rs index 42e87021..a0c25255 100644 --- a/text/json/src/jsongstenc/imp.rs +++ b/text/json/src/jsongstenc/imp.rs @@ -10,7 +10,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::sync::Mutex; diff --git a/text/json/src/jsongstparse/imp.rs b/text/json/src/jsongstparse/imp.rs index b15bb739..0d48277b 100644 --- a/text/json/src/jsongstparse/imp.rs +++ b/text/json/src/jsongstparse/imp.rs @@ -10,7 +10,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::cmp; use std::sync::{Mutex, MutexGuard}; diff --git a/text/regex/Cargo.toml b/text/regex/Cargo.toml index ffd4834e..5b8a56f8 100644 --- a/text/regex/Cargo.toml +++ b/text/regex/Cargo.toml @@ -9,7 +9,6 @@ description = "GStreamer Regular Expression Plugin" repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs" [dependencies] -once_cell = "1.0" regex = "1.5" [dependencies.gst] diff --git a/text/regex/src/gstregex/imp.rs b/text/regex/src/gstregex/imp.rs index bfe7987d..98e26a57 100644 --- a/text/regex/src/gstregex/imp.rs +++ b/text/regex/src/gstregex/imp.rs @@ -14,7 +14,7 @@ use regex::Regex; use std::default::Default; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( diff --git a/text/wrap/Cargo.toml b/text/wrap/Cargo.toml index cb762271..e40d5a01 100644 --- a/text/wrap/Cargo.toml +++ b/text/wrap/Cargo.toml @@ -9,7 +9,6 @@ description = "GStreamer Text Wrap Plugin" repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs" [dependencies] -once_cell = "1.0" textwrap = { version = "0.16", features = ["hyphenation"] } hyphenation = "0.8" diff --git a/text/wrap/src/gsttextwrap/imp.rs b/text/wrap/src/gsttextwrap/imp.rs index de98e2b8..685ca424 100644 --- a/text/wrap/src/gsttextwrap/imp.rs +++ b/text/wrap/src/gsttextwrap/imp.rs @@ -16,7 +16,7 @@ use std::io; use std::mem; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use hyphenation::{Load, Standard}; diff --git a/tutorial/Cargo.toml b/tutorial/Cargo.toml index 4c74cb9c..b24ced20 100644 --- a/tutorial/Cargo.toml +++ b/tutorial/Cargo.toml @@ -15,7 +15,6 @@ gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } byte-slice-cast = "1.0" num-traits = "0.2" -once_cell = "1.0" [lib] name = "gstrstutorial" diff --git a/tutorial/src/identity/imp.rs b/tutorial/src/identity/imp.rs index 7b26806c..e5599bb3 100644 --- a/tutorial/src/identity/imp.rs +++ b/tutorial/src/identity/imp.rs @@ -12,7 +12,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; // This module contains the private implementation details of our element diff --git a/tutorial/src/progressbin/imp.rs b/tutorial/src/progressbin/imp.rs index eee52691..72bdd528 100644 --- a/tutorial/src/progressbin/imp.rs +++ b/tutorial/src/progressbin/imp.rs @@ -13,7 +13,7 @@ use gst::prelude::*; use gst::subclass::prelude::*; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use super::ProgressBinOutput; diff --git a/tutorial/src/rgb2gray/imp.rs b/tutorial/src/rgb2gray/imp.rs index 63201fc8..e11fe37b 100644 --- a/tutorial/src/rgb2gray/imp.rs +++ b/tutorial/src/rgb2gray/imp.rs @@ -16,7 +16,7 @@ use gst_video::subclass::prelude::*; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; // This module contains the private implementation details of our element // diff --git a/tutorial/src/sinesrc/imp.rs b/tutorial/src/sinesrc/imp.rs index 8e70e9ef..d2e98c3d 100644 --- a/tutorial/src/sinesrc/imp.rs +++ b/tutorial/src/sinesrc/imp.rs @@ -24,7 +24,7 @@ use std::u32; use num_traits::cast::NumCast; use num_traits::float::Float; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; // This module contains the private implementation details of our element diff --git a/tutorial/tutorial-1.md b/tutorial/tutorial-1.md index e2ad3543..faa45621 100644 --- a/tutorial/tutorial-1.md +++ b/tutorial/tutorial-1.md @@ -43,7 +43,6 @@ description = "Rust Tutorial Plugin" gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } -once_cell = "1.0" [lib] name = "gstrstutorial" @@ -151,7 +150,7 @@ use gst_base::subclass::prelude::*; use std::i32; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; ``` GStreamer is based on the GLib object system ([GObject](https://developer.gnome.org/gobject/stable/)). C (just like Rust) does not have built-in support for object orientated programming, inheritance, virtual methods and related concepts, and GObject makes these features available in C as a library. Without language support this is a quite verbose endeavour in C, and the `glib` crate tries to expose all this in a (as much as possible) Rust-style API while hiding all the details that do not really matter. diff --git a/tutorial/tutorial-2.md b/tutorial/tutorial-2.md index 9b341e14..73bae762 100644 --- a/tutorial/tutorial-2.md +++ b/tutorial/tutorial-2.md @@ -37,7 +37,7 @@ use std::{i32, u32}; use num_traits::cast::NumCast; use num_traits::float::Float; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( diff --git a/utils/fallbackswitch/Cargo.toml b/utils/fallbackswitch/Cargo.toml index 976f266c..360072cd 100644 --- a/utils/fallbackswitch/Cargo.toml +++ b/utils/fallbackswitch/Cargo.toml @@ -16,7 +16,6 @@ gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org gst-plugin-gtk4 = { path = "../../video/gtk4", optional = true } gtk = { package = "gtk4", git = "https://github.com/gtk-rs/gtk4-rs", optional = true } gio = { git = "https://github.com/gtk-rs/gtk-rs-core", optional = true } -once_cell = "1.0" parking_lot = "0.12" [dev-dependencies] diff --git a/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs b/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs index b158fa1b..a462bd68 100644 --- a/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs +++ b/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs @@ -13,8 +13,8 @@ use gst::subclass::prelude::*; use std::{mem, sync::Mutex}; -use once_cell::sync::Lazy; -use once_cell::sync::OnceCell; +use gst::glib::once_cell::sync::Lazy; +use gst::glib::once_cell::sync::OnceCell; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( diff --git a/utils/fallbackswitch/src/fallbacksrc/imp.rs b/utils/fallbackswitch/src/fallbacksrc/imp.rs index 129bbc44..acb4e47e 100644 --- a/utils/fallbackswitch/src/fallbacksrc/imp.rs +++ b/utils/fallbackswitch/src/fallbacksrc/imp.rs @@ -14,7 +14,7 @@ use parking_lot::Mutex; use std::time::Instant; use std::{cmp, mem}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use super::custom_source::CustomSource; use super::{RetryReason, Status}; diff --git a/utils/fallbackswitch/src/fallbackswitch/imp.rs b/utils/fallbackswitch/src/fallbackswitch/imp.rs index a5b95635..f7ec1a73 100644 --- a/utils/fallbackswitch/src/fallbackswitch/imp.rs +++ b/utils/fallbackswitch/src/fallbackswitch/imp.rs @@ -12,7 +12,7 @@ use gst::prelude::*; use gst::subclass::prelude::*; use gst::{debug, log, trace}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use parking_lot::{Mutex, MutexGuard}; use std::sync::atomic::{AtomicU32, Ordering}; diff --git a/utils/fallbackswitch/tests/fallbackswitch.rs b/utils/fallbackswitch/tests/fallbackswitch.rs index cf1a2033..bdfa41ca 100644 --- a/utils/fallbackswitch/tests/fallbackswitch.rs +++ b/utils/fallbackswitch/tests/fallbackswitch.rs @@ -10,7 +10,7 @@ use gst::debug; use gst::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; const LATENCY: gst::ClockTime = gst::ClockTime::from_mseconds(10); diff --git a/utils/livesync/Cargo.toml b/utils/livesync/Cargo.toml index 810e91e0..c38a9f96 100644 --- a/utils/livesync/Cargo.toml +++ b/utils/livesync/Cargo.toml @@ -16,7 +16,6 @@ gst-plugin-gtk4 = { path = "../../video/gtk4", optional = true } gtk = { package = "gtk4", git = "https://github.com/gtk-rs/gtk4-rs", optional = true } muldiv = "1.0" num-rational = { version = "0.4", default-features = false, features = [] } -once_cell = "1.0" parking_lot = "0.12" [dev-dependencies] diff --git a/utils/livesync/src/livesync/imp.rs b/utils/livesync/src/livesync/imp.rs index 929e86b8..a06bf4ac 100644 --- a/utils/livesync/src/livesync/imp.rs +++ b/utils/livesync/src/livesync/imp.rs @@ -7,12 +7,12 @@ // // SPDX-License-Identifier: MPL-2.0 +use gst::glib::once_cell::sync::Lazy; use gst::{ glib::{self, translate::IntoGlib}, prelude::*, subclass::prelude::*, }; -use once_cell::sync::Lazy; use parking_lot::{Condvar, Mutex, MutexGuard}; use std::{collections::VecDeque, sync::mpsc}; diff --git a/utils/togglerecord/Cargo.toml b/utils/togglerecord/Cargo.toml index 36edeb2c..585113e4 100644 --- a/utils/togglerecord/Cargo.toml +++ b/utils/togglerecord/Cargo.toml @@ -16,7 +16,6 @@ gst-plugin-gtk4 = { path = "../../video/gtk4", optional = true } gtk = { package = "gtk4", git = "https://github.com/gtk-rs/gtk4-rs", optional = true } gio = { git = "https://github.com/gtk-rs/gtk-rs-core", optional = true } parking_lot = "0.12" -once_cell = "1.0" [dev-dependencies] either = "1.0" diff --git a/utils/togglerecord/src/togglerecord/imp.rs b/utils/togglerecord/src/togglerecord/imp.rs index adbed4b2..2340220e 100644 --- a/utils/togglerecord/src/togglerecord/imp.rs +++ b/utils/togglerecord/src/togglerecord/imp.rs @@ -16,7 +16,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use parking_lot::{Condvar, Mutex, MutexGuard}; use std::cmp; use std::collections::HashMap; diff --git a/utils/tracers/Cargo.toml b/utils/tracers/Cargo.toml index a0e79f1f..1544a427 100644 --- a/utils/tracers/Cargo.toml +++ b/utils/tracers/Cargo.toml @@ -10,7 +10,6 @@ rust-version = "1.66" [dependencies] gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } -once_cell = "1.0" anyhow = "1" regex = "1" diff --git a/utils/tracers/src/buffer_lateness/imp.rs b/utils/tracers/src/buffer_lateness/imp.rs index 48228750..56750635 100644 --- a/utils/tracers/src/buffer_lateness/imp.rs +++ b/utils/tracers/src/buffer_lateness/imp.rs @@ -50,9 +50,9 @@ use std::str::FromStr; use std::sync::{Arc, Mutex}; use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; use regex::Regex; static CAT: Lazy = Lazy::new(|| { diff --git a/utils/tracers/src/pipeline_snapshot/imp.rs b/utils/tracers/src/pipeline_snapshot/imp.rs index d4ab6b8e..29366d6d 100644 --- a/utils/tracers/src/pipeline_snapshot/imp.rs +++ b/utils/tracers/src/pipeline_snapshot/imp.rs @@ -42,10 +42,10 @@ use std::str::FromStr; use std::sync::{Arc, Mutex}; use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::glib::translate::ToGlibPtr; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( diff --git a/utils/tracers/src/queue_levels/imp.rs b/utils/tracers/src/queue_levels/imp.rs index 3a9ac7c7..6a5b24b0 100644 --- a/utils/tracers/src/queue_levels/imp.rs +++ b/utils/tracers/src/queue_levels/imp.rs @@ -50,9 +50,9 @@ use std::str::FromStr; use std::sync::{Arc, Mutex}; use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; use regex::Regex; static CAT: Lazy = Lazy::new(|| { diff --git a/utils/uriplaylistbin/Cargo.toml b/utils/uriplaylistbin/Cargo.toml index b55989e4..d4e359ee 100644 --- a/utils/uriplaylistbin/Cargo.toml +++ b/utils/uriplaylistbin/Cargo.toml @@ -10,7 +10,6 @@ rust-version = "1.66" [dependencies] gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } -once_cell = "1.0" anyhow = "1" clap = { version = "4", optional = true, features = ["derive"] } thiserror = "1" diff --git a/utils/uriplaylistbin/src/uriplaylistbin/imp.rs b/utils/uriplaylistbin/src/uriplaylistbin/imp.rs index 8488fe5f..d213b05c 100644 --- a/utils/uriplaylistbin/src/uriplaylistbin/imp.rs +++ b/utils/uriplaylistbin/src/uriplaylistbin/imp.rs @@ -13,7 +13,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( diff --git a/video/cdg/Cargo.toml b/video/cdg/Cargo.toml index 5243a543..dd597b04 100644 --- a/video/cdg/Cargo.toml +++ b/video/cdg/Cargo.toml @@ -16,7 +16,6 @@ cdg = "0.1" cdg_renderer = "0.7" image = { version = "0.24", default-features = false } muldiv = "1.0" -once_cell = "1.0" [dev-dependencies] gst-app = { package = "gstreamer-app", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } diff --git a/video/cdg/src/cdgdec/imp.rs b/video/cdg/src/cdgdec/imp.rs index ae6874c8..c0cc9ece 100644 --- a/video/cdg/src/cdgdec/imp.rs +++ b/video/cdg/src/cdgdec/imp.rs @@ -9,11 +9,11 @@ // SPDX-License-Identifier: MIT OR Apache-2.0 use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::subclass::prelude::*; use gst_video::prelude::*; use gst_video::subclass::prelude::*; use image::GenericImageView; -use once_cell::sync::Lazy; use std::sync::Mutex; use crate::constants::{CDG_HEIGHT, CDG_WIDTH}; diff --git a/video/cdg/src/cdgparse/imp.rs b/video/cdg/src/cdgparse/imp.rs index d80a9bb6..6f6f075b 100644 --- a/video/cdg/src/cdgparse/imp.rs +++ b/video/cdg/src/cdgparse/imp.rs @@ -10,10 +10,10 @@ use gst::format::Bytes; use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::subclass::prelude::*; use gst_base::prelude::*; use gst_base::subclass::prelude::*; -use once_cell::sync::Lazy; use crate::constants::{ CDG_COMMAND, CDG_HEIGHT, CDG_MASK, CDG_PACKET_PERIOD, CDG_PACKET_SIZE, CDG_WIDTH, diff --git a/video/closedcaption/Cargo.toml b/video/closedcaption/Cargo.toml index fff960d8..4c7a278e 100644 --- a/video/closedcaption/Cargo.toml +++ b/video/closedcaption/Cargo.toml @@ -14,7 +14,6 @@ nom = "7.0" either = "1" uuid = { version = "1.0", features = ["v4"] } chrono = "0.4.23" -once_cell = "1.0" atomic_refcell = "0.1" cairo-rs = { git = "https://github.com/gtk-rs/gtk-rs-core", features=["use_glib"] } pango = { git = "https://github.com/gtk-rs/gtk-rs-core" } diff --git a/video/closedcaption/src/ccdetect/imp.rs b/video/closedcaption/src/ccdetect/imp.rs index 39ea519f..96ac7d0a 100644 --- a/video/closedcaption/src/ccdetect/imp.rs +++ b/video/closedcaption/src/ccdetect/imp.rs @@ -12,7 +12,7 @@ use gst::subclass::prelude::*; use gst_base::subclass::prelude::*; use crate::ccutils::{extract_cdp, ParseError, ParseErrorCode}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::sync::Mutex; use std::u64; diff --git a/video/closedcaption/src/cea608overlay/imp.rs b/video/closedcaption/src/cea608overlay/imp.rs index c3cba027..f912393f 100644 --- a/video/closedcaption/src/cea608overlay/imp.rs +++ b/video/closedcaption/src/cea608overlay/imp.rs @@ -11,7 +11,7 @@ use gst::prelude::*; use gst::subclass::prelude::*; use gst_video::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::sync::Mutex; diff --git a/video/closedcaption/src/cea608tocea708/imp.rs b/video/closedcaption/src/cea608tocea708/imp.rs index bed38463..f512dba5 100644 --- a/video/closedcaption/src/cea608tocea708/imp.rs +++ b/video/closedcaption/src/cea608tocea708/imp.rs @@ -16,7 +16,7 @@ use atomic_refcell::AtomicRefCell; use crate::cea608tocea708::fmt::Cea708ServiceWriter; use crate::cea608utils::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; #[derive(Debug, Copy, Clone)] enum Cea608Format { diff --git a/video/closedcaption/src/cea608tojson/imp.rs b/video/closedcaption/src/cea608tojson/imp.rs index 4eda8472..a074f68b 100644 --- a/video/closedcaption/src/cea608tojson/imp.rs +++ b/video/closedcaption/src/cea608tojson/imp.rs @@ -34,7 +34,7 @@ use crate::ttutils::{Chunk, Line, Lines}; use atomic_refcell::AtomicRefCell; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::collections::BTreeMap; use std::sync::Mutex; diff --git a/video/closedcaption/src/cea608tott/imp.rs b/video/closedcaption/src/cea608tott/imp.rs index c781585b..0715f9e2 100644 --- a/video/closedcaption/src/cea608tott/imp.rs +++ b/video/closedcaption/src/cea608tott/imp.rs @@ -13,7 +13,7 @@ use gst::subclass::prelude::*; use crate::caption_frame::{CaptionFrame, Status}; use atomic_refcell::AtomicRefCell; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; #[derive(Copy, Clone, Debug)] enum Format { diff --git a/video/closedcaption/src/cea608utils.rs b/video/closedcaption/src/cea608utils.rs index 41afbc9b..c422f4a9 100644 --- a/video/closedcaption/src/cea608utils.rs +++ b/video/closedcaption/src/cea608utils.rs @@ -7,7 +7,7 @@ // SPDX-License-Identifier: MPL-2.0 use gst::glib; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use serde::{Deserialize, Serialize}; use crate::ffi; diff --git a/video/closedcaption/src/jsontovtt/imp.rs b/video/closedcaption/src/jsontovtt/imp.rs index d2c1549e..b74510ad 100644 --- a/video/closedcaption/src/jsontovtt/imp.rs +++ b/video/closedcaption/src/jsontovtt/imp.rs @@ -14,7 +14,7 @@ use gst::subclass::prelude::*; use crate::jsontovtt::fku::ForceKeyUnitRequest; use crate::ttutils::Lines; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::collections::{BinaryHeap, VecDeque}; use std::sync::Mutex; diff --git a/video/closedcaption/src/mcc_enc/imp.rs b/video/closedcaption/src/mcc_enc/imp.rs index bec2b999..202d4fb1 100644 --- a/video/closedcaption/src/mcc_enc/imp.rs +++ b/video/closedcaption/src/mcc_enc/imp.rs @@ -14,7 +14,7 @@ use gst::subclass::prelude::*; use chrono::prelude::*; use uuid::Uuid; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::io::Write; use std::sync::Mutex; diff --git a/video/closedcaption/src/mcc_parse/imp.rs b/video/closedcaption/src/mcc_parse/imp.rs index 99fcbcaf..130d3938 100644 --- a/video/closedcaption/src/mcc_parse/imp.rs +++ b/video/closedcaption/src/mcc_parse/imp.rs @@ -14,7 +14,7 @@ use gst_video::ValidVideoTimeCode; use std::cmp; use std::sync::{Mutex, MutexGuard}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use super::parser::{MccLine, MccParser}; use crate::line_reader::LineReader; diff --git a/video/closedcaption/src/scc_enc/imp.rs b/video/closedcaption/src/scc_enc/imp.rs index 60dab946..bb394049 100644 --- a/video/closedcaption/src/scc_enc/imp.rs +++ b/video/closedcaption/src/scc_enc/imp.rs @@ -13,7 +13,7 @@ use gst::structure; use gst::subclass::prelude::*; use gst_video::{self, ValidVideoTimeCode}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::io::Write; use std::sync::Mutex; diff --git a/video/closedcaption/src/scc_parse/imp.rs b/video/closedcaption/src/scc_parse/imp.rs index 4cdc96d0..841fb8d6 100644 --- a/video/closedcaption/src/scc_parse/imp.rs +++ b/video/closedcaption/src/scc_parse/imp.rs @@ -14,7 +14,7 @@ use gst::subclass::prelude::*; use std::cmp; use std::sync::{Mutex, MutexGuard}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use super::parser::{SccLine, SccParser}; use crate::line_reader::LineReader; diff --git a/video/closedcaption/src/transcriberbin/imp.rs b/video/closedcaption/src/transcriberbin/imp.rs index 5673e512..6e37075a 100644 --- a/video/closedcaption/src/transcriberbin/imp.rs +++ b/video/closedcaption/src/transcriberbin/imp.rs @@ -14,7 +14,7 @@ use gst::subclass::prelude::*; use std::collections::HashMap; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use super::CaptionSource; diff --git a/video/closedcaption/src/tttocea608/imp.rs b/video/closedcaption/src/tttocea608/imp.rs index f4f916c1..75d1000c 100644 --- a/video/closedcaption/src/tttocea608/imp.rs +++ b/video/closedcaption/src/tttocea608/imp.rs @@ -10,7 +10,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use crate::ffi; use std::sync::Mutex; diff --git a/video/closedcaption/src/tttojson/imp.rs b/video/closedcaption/src/tttojson/imp.rs index e4f98fe3..fe0e69b2 100644 --- a/video/closedcaption/src/tttojson/imp.rs +++ b/video/closedcaption/src/tttojson/imp.rs @@ -10,7 +10,7 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::cmp::min; use std::sync::Mutex; diff --git a/video/dav1d/Cargo.toml b/video/dav1d/Cargo.toml index ddea888c..efdac911 100644 --- a/video/dav1d/Cargo.toml +++ b/video/dav1d/Cargo.toml @@ -14,7 +14,6 @@ gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/g gst-base = { package = "gstreamer-base", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } num_cpus = "1.0" -once_cell = "1.0" [lib] name = "gstdav1d" diff --git a/video/dav1d/src/dav1ddec/imp.rs b/video/dav1d/src/dav1ddec/imp.rs index b65e5a5b..2e0dba41 100644 --- a/video/dav1d/src/dav1ddec/imp.rs +++ b/video/dav1d/src/dav1ddec/imp.rs @@ -14,7 +14,7 @@ use gst::subclass::prelude::*; use gst_video::prelude::*; use gst_video::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::i32; use std::sync::{Mutex, MutexGuard}; diff --git a/video/ffv1/Cargo.toml b/video/ffv1/Cargo.toml index f4ce096f..8d8030e0 100644 --- a/video/ffv1/Cargo.toml +++ b/video/ffv1/Cargo.toml @@ -13,7 +13,6 @@ byte-slice-cast = "1" ffv1 = { git = "https://github.com/rust-av/ffv1.git", rev = "2afb025a327173ce891954c052e804d0f880368a" } gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] } gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] } -once_cell = "1.0" [dev-dependencies] gst-check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_18"] } diff --git a/video/ffv1/src/ffv1dec/imp.rs b/video/ffv1/src/ffv1dec/imp.rs index 8911f6e1..4d1b517f 100644 --- a/video/ffv1/src/ffv1dec/imp.rs +++ b/video/ffv1/src/ffv1dec/imp.rs @@ -18,7 +18,7 @@ use gst_video::prelude::*; use gst_video::subclass::prelude::*; use gst_video::VideoFormat; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::sync::Mutex; #[derive(Default)] diff --git a/video/gif/src/gifenc/imp.rs b/video/gif/src/gifenc/imp.rs index c813a809..5f5efc58 100644 --- a/video/gif/src/gifenc/imp.rs +++ b/video/gif/src/gifenc/imp.rs @@ -10,11 +10,11 @@ use atomic_refcell::AtomicRefCell; use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::subclass::prelude::*; use gst_video::prelude::*; use gst_video::subclass::prelude::*; use gst_video::VideoFormat; -use once_cell::sync::Lazy; use std::{ io, io::Write, diff --git a/video/gtk4/Cargo.toml b/video/gtk4/Cargo.toml index 6b5d5627..e9cb88aa 100644 --- a/video/gtk4/Cargo.toml +++ b/video/gtk4/Cargo.toml @@ -22,7 +22,6 @@ gst_gl_wayland = { package = "gstreamer-gl-wayland", git = "https://gitlab.freed gst_gl_x11 = { package = "gstreamer-gl-x11", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_16"], optional = true } gst_gl_egl = { package = "gstreamer-gl-egl", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs", features = ["v1_16"], optional = true } -once_cell = "1.0" [target.'cfg(target_os = "macos")'.dependencies] gtk = { package = "gtk4", git = "https://github.com/gtk-rs/gtk4-rs", features = ["v4_6"] } diff --git a/video/gtk4/src/sink/imp.rs b/video/gtk4/src/sink/imp.rs index b74b8d7e..185ac4b1 100644 --- a/video/gtk4/src/sink/imp.rs +++ b/video/gtk4/src/sink/imp.rs @@ -22,7 +22,7 @@ use gst::subclass::prelude::*; use gst_base::subclass::prelude::*; use gst_video::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::sync::{Mutex, MutexGuard}; use crate::utils; diff --git a/video/gtk4/src/sink/paintable/imp.rs b/video/gtk4/src/sink/paintable/imp.rs index eddfb88e..6763ce5a 100644 --- a/video/gtk4/src/sink/paintable/imp.rs +++ b/video/gtk4/src/sink/paintable/imp.rs @@ -18,7 +18,7 @@ use crate::sink::frame::{Frame, Texture}; use std::cell::RefCell; use std::collections::HashMap; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; static CAT: Lazy = Lazy::new(|| { gst::DebugCategory::new( diff --git a/video/hsv/Cargo.toml b/video/hsv/Cargo.toml index 19a90fbf..0e900be5 100644 --- a/video/hsv/Cargo.toml +++ b/video/hsv/Cargo.toml @@ -15,7 +15,6 @@ gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org gst-audio = { package = "gstreamer-audio", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } byte-slice-cast = "1.0" num-traits = "0.2" -once_cell = "1.0" [dev-dependencies] gst_check = { package = "gstreamer-check", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } diff --git a/video/hsv/src/hsvdetector/imp.rs b/video/hsv/src/hsvdetector/imp.rs index 19a18033..d4568023 100644 --- a/video/hsv/src/hsvdetector/imp.rs +++ b/video/hsv/src/hsvdetector/imp.rs @@ -17,7 +17,7 @@ use gst_video::subclass::prelude::*; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use super::super::hsvutils; diff --git a/video/hsv/src/hsvfilter/imp.rs b/video/hsv/src/hsvfilter/imp.rs index 874c3295..faf6e36a 100644 --- a/video/hsv/src/hsvfilter/imp.rs +++ b/video/hsv/src/hsvfilter/imp.rs @@ -16,7 +16,7 @@ use gst_video::subclass::prelude::*; use std::sync::Mutex; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use super::super::hsvutils; diff --git a/video/png/src/pngenc/imp.rs b/video/png/src/pngenc/imp.rs index 5adacbde..03f5940e 100644 --- a/video/png/src/pngenc/imp.rs +++ b/video/png/src/pngenc/imp.rs @@ -14,7 +14,7 @@ use gst::subclass::prelude::*; use gst_video::prelude::*; use gst_video::subclass::prelude::*; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use parking_lot::Mutex; use super::CompressionLevel; diff --git a/video/rav1e/Cargo.toml b/video/rav1e/Cargo.toml index 5056837c..b7c5499a 100644 --- a/video/rav1e/Cargo.toml +++ b/video/rav1e/Cargo.toml @@ -12,7 +12,6 @@ rust-version = "1.66" gst = { package = "gstreamer", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } gst-video = { package = "gstreamer-video", git = "https://gitlab.freedesktop.org/gstreamer/gstreamer-rs" } rav1e = { version = "0.6", default-features = false, features = ["threading"] } -once_cell = "1.0" atomic_refcell = "0.1" [dev-dependencies] diff --git a/video/rav1e/src/rav1enc/imp.rs b/video/rav1e/src/rav1enc/imp.rs index 14f7148b..a0e28d8d 100644 --- a/video/rav1e/src/rav1enc/imp.rs +++ b/video/rav1e/src/rav1enc/imp.rs @@ -10,10 +10,10 @@ use atomic_refcell::AtomicRefCell; use gst::glib; +use gst::glib::once_cell::sync::Lazy; use gst::subclass::prelude::*; use gst_video::prelude::*; use gst_video::subclass::prelude::*; -use once_cell::sync::Lazy; use rav1e::color; use rav1e::config; use rav1e::data; diff --git a/video/videofx/Cargo.toml b/video/videofx/Cargo.toml index 0f2ef92a..5db3e2f9 100644 --- a/video/videofx/Cargo.toml +++ b/video/videofx/Cargo.toml @@ -11,7 +11,6 @@ rust-version = "1.66" [dependencies] cairo-rs = { git = "https://github.com/gtk-rs/gtk-rs-core", features=["use_glib"] } atomic_refcell = "0.1" -once_cell = "1.0" color-thief = "0.2.2" color-name = "1.0.0" image = { version = "0.24.2", default-features = false } diff --git a/video/videofx/src/border/imp.rs b/video/videofx/src/border/imp.rs index 654c6e4e..581efede 100644 --- a/video/videofx/src/border/imp.rs +++ b/video/videofx/src/border/imp.rs @@ -14,7 +14,7 @@ use gst_base::{ }; use gst_video::{subclass::prelude::*, VideoFormat}; -use once_cell::sync::Lazy; +use gst::glib::once_cell::sync::Lazy; use std::sync::Mutex; const DEFAULT_BORDER_RADIUS: u32 = 0; diff --git a/video/videofx/src/colordetect/imp.rs b/video/videofx/src/colordetect/imp.rs index f3112c86..2dd2536a 100644 --- a/video/videofx/src/colordetect/imp.rs +++ b/video/videofx/src/colordetect/imp.rs @@ -10,10 +10,10 @@ use atomic_refcell::AtomicRefCell; use color_name; use color_thief::{get_palette, Color, ColorFormat}; +use gst::glib::once_cell::sync::Lazy; use gst::{glib, subclass::prelude::*}; use gst_base::prelude::*; use gst_video::{subclass::prelude::*, VideoFormat}; -use once_cell::sync::Lazy; use std::sync::Mutex; const DEFAULT_QUALITY: u32 = 10; diff --git a/video/videofx/src/videocompare/imp.rs b/video/videofx/src/videocompare/imp.rs index 4480ee31..afd88890 100644 --- a/video/videofx/src/videocompare/imp.rs +++ b/video/videofx/src/videocompare/imp.rs @@ -9,6 +9,7 @@ use crate::videocompare::hashed_image::HasherEngine; use crate::videocompare::HashAlgorithm; use crate::{PadDistance, VideoCompareMessage}; +use gst::glib::once_cell::sync::Lazy; use gst::subclass::prelude::*; use gst::{glib, glib::prelude::*, prelude::*}; use gst_base::prelude::*; @@ -17,7 +18,6 @@ use gst_video::prelude::VideoAggregatorPadExtManual; use gst_video::subclass::prelude::*; use gst_video::subclass::AggregateFramesToken; use gst_video::VideoFormat; -use once_cell::sync::Lazy; use std::sync::{Arc, Mutex}; static CAT: Lazy = Lazy::new(|| { diff --git a/video/webp/Cargo.toml b/video/webp/Cargo.toml index d189f4c4..be479224 100644 --- a/video/webp/Cargo.toml +++ b/video/webp/Cargo.toml @@ -9,7 +9,6 @@ description = "GStreamer WebP Plugin" repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs" [dependencies] -once_cell = "1.0" libwebp-sys2 = { version = "0.1.2", features = ["demux", "0_5"] } [dependencies.gst] diff --git a/video/webp/src/dec/imp.rs b/video/webp/src/dec/imp.rs index 8e70c950..dec1c4a9 100644 --- a/video/webp/src/dec/imp.rs +++ b/video/webp/src/dec/imp.rs @@ -10,8 +10,8 @@ use gst::glib; use gst::prelude::*; use gst::subclass::prelude::*; +use gst::glib::once_cell::sync::Lazy; use libwebp_sys as ffi; -use once_cell::sync::Lazy; use std::sync::Mutex;