mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-01-18 15:15:37 +00:00
Don't use ONCE_INIT anymore now that Once::new() is const
This commit is contained in:
parent
fbbd70950a
commit
f149f8f1b5
15 changed files with 30 additions and 30 deletions
|
@ -14,8 +14,8 @@ use std::path::PathBuf;
|
||||||
use gstcdg;
|
use gstcdg;
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
|
@ -21,8 +21,8 @@ extern crate pretty_assertions;
|
||||||
use glib::prelude::*;
|
use glib::prelude::*;
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
|
@ -24,8 +24,8 @@ use rand::{Rng, SeedableRng};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
extern crate pretty_assertions;
|
extern crate pretty_assertions;
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
|
@ -25,8 +25,8 @@ use rand::{Rng, SeedableRng};
|
||||||
use std::collections::VecDeque;
|
use std::collections::VecDeque;
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
|
@ -15,8 +15,8 @@ extern crate gstreamer_video as gst_video;
|
||||||
extern crate gstrav1e;
|
extern crate gstrav1e;
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
|
@ -12,8 +12,8 @@ use gstreamer as gst;
|
||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
|
@ -54,8 +54,8 @@ lazy_static! {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
|
@ -55,8 +55,8 @@ lazy_static! {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
|
@ -24,8 +24,8 @@ extern crate gstreamer_check as gst_check;
|
||||||
extern crate gstthreadshare;
|
extern crate gstthreadshare;
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
|
@ -28,8 +28,8 @@ use std::sync::{Arc, Mutex};
|
||||||
extern crate gstthreadshare;
|
extern crate gstthreadshare;
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
|
@ -28,8 +28,8 @@ use std::sync::{Arc, Mutex};
|
||||||
extern crate gstthreadshare;
|
extern crate gstthreadshare;
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
|
@ -31,8 +31,8 @@ use std::{thread, time};
|
||||||
extern crate gstthreadshare;
|
extern crate gstthreadshare;
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
|
@ -28,8 +28,8 @@ use std::thread;
|
||||||
extern crate gstthreadshare;
|
extern crate gstthreadshare;
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
|
@ -30,8 +30,8 @@ use std::thread;
|
||||||
extern crate gsttogglerecord;
|
extern crate gsttogglerecord;
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
use std::sync::{Once, ONCE_INIT};
|
use std::sync::Once;
|
||||||
static INIT: Once = ONCE_INIT;
|
static INIT: Once = Once::new();
|
||||||
|
|
||||||
INIT.call_once(|| {
|
INIT.call_once(|| {
|
||||||
gst::init().unwrap();
|
gst::init().unwrap();
|
||||||
|
|
Loading…
Reference in a new issue