mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-05-11 18:59:00 +00:00
threadshare: Run everything through rustfmt
This commit is contained in:
parent
ab22d81f12
commit
f5b3e9481f
6 changed files with 29 additions and 23 deletions
|
@ -18,13 +18,13 @@
|
|||
use gst;
|
||||
use gst::prelude::*;
|
||||
|
||||
use std::collections::VecDeque;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::{u32, u64};
|
||||
use std::collections::VecDeque;
|
||||
|
||||
use futures::{Async, Future, IntoFuture, Poll, Stream};
|
||||
use futures::task;
|
||||
use futures::sync::oneshot;
|
||||
use futures::task;
|
||||
use futures::{Async, Future, IntoFuture, Poll, Stream};
|
||||
|
||||
use iocontext::*;
|
||||
|
||||
|
|
|
@ -27,6 +27,8 @@ extern crate futures;
|
|||
extern crate tokio;
|
||||
extern crate tokio_executor;
|
||||
extern crate tokio_reactor;
|
||||
extern crate tokio_threadpool;
|
||||
extern crate tokio_timer;
|
||||
|
||||
extern crate either;
|
||||
|
||||
|
@ -40,9 +42,10 @@ mod iocontext;
|
|||
mod udpsocket;
|
||||
mod udpsrc;
|
||||
|
||||
mod appsrc;
|
||||
mod dataqueue;
|
||||
mod queue;
|
||||
mod proxy;
|
||||
mod queue;
|
||||
|
||||
fn plugin_init(plugin: &gst::Plugin) -> bool {
|
||||
udpsrc::register(plugin);
|
||||
|
|
|
@ -20,24 +20,24 @@ use glib::prelude::*;
|
|||
use gst;
|
||||
use gst::prelude::*;
|
||||
|
||||
use gst_plugin::properties::*;
|
||||
use gst_plugin::object::*;
|
||||
use gst_plugin::element::*;
|
||||
use gst_plugin::object::*;
|
||||
use gst_plugin::properties::*;
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::collections::VecDeque;
|
||||
use std::sync::{Arc, Mutex, Weak};
|
||||
use std::{u16, u32, u64};
|
||||
use std::collections::VecDeque;
|
||||
|
||||
use futures;
|
||||
use futures::future;
|
||||
use futures::{Async, Future, IntoFuture, Stream};
|
||||
use futures::task;
|
||||
use futures::{Async, Future, IntoFuture, Stream};
|
||||
|
||||
use tokio::executor;
|
||||
|
||||
use iocontext::*;
|
||||
use dataqueue::*;
|
||||
use iocontext::*;
|
||||
|
||||
lazy_static! {
|
||||
static ref CONTEXTS: Mutex<HashMap<String, Weak<Mutex<SharedQueueInner>>>> =
|
||||
|
@ -1323,7 +1323,7 @@ impl ElementImpl<Element> for ProxySrc {
|
|||
}
|
||||
Ok(_) => (),
|
||||
},
|
||||
gst::StateChange::PausedToReady => match self.stop(element) {
|
||||
gst::StateChange::PlayingToPaused => match self.stop(element) {
|
||||
Err(_) => return gst::StateChangeReturn::Failure,
|
||||
Ok(_) => (),
|
||||
},
|
||||
|
@ -1334,13 +1334,16 @@ impl ElementImpl<Element> for ProxySrc {
|
|||
_ => (),
|
||||
}
|
||||
|
||||
let ret = element.parent_change_state(transition);
|
||||
let mut ret = element.parent_change_state(transition);
|
||||
if ret == gst::StateChangeReturn::Failure {
|
||||
return ret;
|
||||
}
|
||||
|
||||
match transition {
|
||||
gst::StateChange::ReadyToPaused => match self.start(element) {
|
||||
gst::StateChange::ReadyToPaused => {
|
||||
ret = gst::StateChangeReturn::NoPreroll;
|
||||
}
|
||||
gst::StateChange::PausedToPlaying => match self.start(element) {
|
||||
Err(_) => return gst::StateChangeReturn::Failure,
|
||||
Ok(_) => (),
|
||||
},
|
||||
|
|
|
@ -20,23 +20,23 @@ use glib::prelude::*;
|
|||
use gst;
|
||||
use gst::prelude::*;
|
||||
|
||||
use gst_plugin::properties::*;
|
||||
use gst_plugin::object::*;
|
||||
use gst_plugin::element::*;
|
||||
use gst_plugin::object::*;
|
||||
use gst_plugin::properties::*;
|
||||
|
||||
use std::collections::VecDeque;
|
||||
use std::sync::Mutex;
|
||||
use std::{u16, u32, u64};
|
||||
use std::collections::VecDeque;
|
||||
|
||||
use futures;
|
||||
use futures::future;
|
||||
use futures::{Async, Future, IntoFuture, Stream};
|
||||
use futures::task;
|
||||
use futures::{Async, Future, IntoFuture, Stream};
|
||||
|
||||
use tokio::executor;
|
||||
|
||||
use iocontext::*;
|
||||
use dataqueue::*;
|
||||
use iocontext::*;
|
||||
|
||||
const DEFAULT_MAX_SIZE_BUFFERS: u32 = 200;
|
||||
const DEFAULT_MAX_SIZE_BYTES: u32 = 1024 * 1024;
|
||||
|
|
|
@ -15,15 +15,15 @@
|
|||
// Free Software Foundation, Inc., 51 Franklin Street, Suite 500,
|
||||
// Boston, MA 02110-1335, USA.
|
||||
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::io;
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use gst;
|
||||
use gst::prelude::*;
|
||||
|
||||
use futures::{Async, Future, IntoFuture, Poll, Stream};
|
||||
use futures::task;
|
||||
use futures::sync::oneshot;
|
||||
use futures::task;
|
||||
use futures::{Async, Future, IntoFuture, Poll, Stream};
|
||||
use tokio::net;
|
||||
|
||||
use either::Either;
|
||||
|
|
|
@ -20,16 +20,16 @@ use glib::prelude::*;
|
|||
use gst;
|
||||
use gst::prelude::*;
|
||||
|
||||
use gst_plugin::properties::*;
|
||||
use gst_plugin::object::*;
|
||||
use gst_plugin::element::*;
|
||||
use gst_plugin::object::*;
|
||||
use gst_plugin::properties::*;
|
||||
|
||||
use std::sync::Mutex;
|
||||
use std::u16;
|
||||
|
||||
use futures;
|
||||
use futures::{Future, IntoFuture, Stream};
|
||||
use futures::future;
|
||||
use futures::{Future, IntoFuture, Stream};
|
||||
use tokio::net;
|
||||
|
||||
use either::Either;
|
||||
|
|
Loading…
Reference in a new issue