Commit 2cefd9ae authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Re-run everything through rustfmt

parent 062403bd
......@@ -6,15 +6,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use AppSink;
use ffi;
use glib::source::CallbackGuard;
use glib::translate::*;
use glib_ffi::gpointer;
use gst;
use gst_ffi;
use std::ptr;
use std::cell::RefCell;
use std::ptr;
use AppSink;
pub struct AppSinkCallbacks {
eos: Option<RefCell<Box<FnMut(&AppSink) + Send + 'static>>>,
......
......@@ -6,15 +6,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use AppSrc;
use ffi;
use glib::source::CallbackGuard;
use glib::translate::*;
use glib_ffi::{gboolean, gpointer};
use gst;
use std::cell::RefCell;
use std::mem;
use std::ptr;
use std::cell::RefCell;
use AppSrc;
pub struct AppSrcCallbacks {
need_data: Option<RefCell<Box<FnMut(&AppSrc, u32) + Send + 'static>>>,
......
......@@ -6,8 +6,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use AudioChannelPosition;
use ffi;
use AudioChannelPosition;
use std::mem;
......
......@@ -389,7 +389,7 @@ mod tests {
&info.positions().unwrap(),
&[
::AudioChannelPosition::FrontLeft,
::AudioChannelPosition::FrontRight
::AudioChannelPosition::FrontRight,
]
);
......@@ -408,7 +408,7 @@ mod tests {
&info.positions().unwrap(),
&[
::AudioChannelPosition::RearLeft,
::AudioChannelPosition::RearRight
::AudioChannelPosition::RearRight,
]
);
}
......@@ -435,7 +435,7 @@ mod tests {
&info.positions().unwrap(),
&[
::AudioChannelPosition::FrontLeft,
::AudioChannelPosition::FrontRight
::AudioChannelPosition::FrontRight,
]
);
......
......@@ -6,8 +6,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use AudioStreamAlign;
use ffi;
use AudioStreamAlign;
use glib::translate::*;
use gst;
......
......@@ -6,11 +6,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use Adapter;
use ffi;
use glib::translate::*;
use gst;
use std::io;
use Adapter;
impl Adapter {
pub fn copy(&self, offset: usize, dest: &mut [u8]) {
......
......@@ -6,11 +6,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use BaseSink;
use ffi;
use glib::IsA;
use glib::translate::*;
use glib::IsA;
use gst;
use BaseSink;
pub trait BaseSinkExtManual {
fn get_segment(&self) -> gst::Segment;
......
......@@ -6,11 +6,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use BaseSrc;
use ffi;
use glib::IsA;
use glib::translate::*;
use glib::IsA;
use gst;
use BaseSrc;
pub trait BaseSrcExtManual {
fn get_segment(&self) -> gst::Segment;
......
......@@ -6,11 +6,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use BaseTransform;
use ffi;
use glib::IsA;
use glib::translate::*;
use glib::IsA;
use gst;
use BaseTransform;
pub trait BaseTransformExtManual {
fn get_segment(&self) -> gst::Segment;
......
......@@ -29,10 +29,7 @@ pub fn type_find_helper_for_data<
let data = data.as_ref();
let (ptr, len) = (data.as_ptr(), data.len());
let ret = from_glib_full(ffi::gst_type_find_helper_for_data(
obj.0,
ptr,
len,
&mut prob,
obj.0, ptr, len, &mut prob,
));
(ret, from_glib(prob))
}
......
......@@ -6,8 +6,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use NetClientClock;
use ffi;
use NetClientClock;
use glib::object::Downcast;
use glib::translate::*;
......
......@@ -6,8 +6,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use NtpClock;
use ffi;
use NtpClock;
use glib::object::Downcast;
use glib::translate::*;
......
......@@ -6,8 +6,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use PtpClock;
use ffi;
use PtpClock;
use glib::object::Downcast;
use glib::translate::*;
......
......@@ -11,12 +11,12 @@ use gst;
use auto::Discoverer;
use glib::IsA;
use glib::Value;
use glib::object::Downcast;
use glib::signal::SignalHandlerId;
use glib::signal::connect;
use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::IsA;
use glib::Value;
use ffi;
use glib_ffi;
......
......@@ -6,18 +6,18 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use Player;
use PlayerSignalDispatcher;
use PlayerVideoRenderer;
use ffi;
use glib;
use glib::signal::SignalHandlerId;
use glib::signal::connect;
use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib_ffi;
use gst;
use std::boxed::Box as Box_;
use std::mem::transmute;
use Player;
use PlayerSignalDispatcher;
use PlayerVideoRenderer;
impl Player {
pub fn new(
......
......@@ -6,10 +6,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use PlayerGMainContextSignalDispatcher;
use ffi;
use glib;
use glib::translate::*;
use PlayerGMainContextSignalDispatcher;
impl PlayerGMainContextSignalDispatcher {
pub fn new<'a, P: Into<Option<&'a glib::MainContext>>>(
......
......@@ -6,11 +6,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use PlayerVideoInfo;
use ffi;
use glib::translate::*;
use gst;
use std::mem;
use PlayerVideoInfo;
impl PlayerVideoInfo {
pub fn get_framerate(&self) -> gst::Fraction {
......
......@@ -6,11 +6,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use PlayerVideoOverlayVideoRenderer;
use ffi;
use glib::IsA;
use glib::translate::*;
use glib::IsA;
use gst;
use PlayerVideoOverlayVideoRenderer;
use std::ptr;
......
use RTSPAddress;
use RTSPAddressPool;
use RTSPAddressPoolResult;
use ffi;
use glib::object::IsA;
use glib::translate::*;
use std::ptr;
use RTSPAddress;
use RTSPAddressPool;
use RTSPAddressPoolResult;
pub trait RTSPAddressPoolExtManual {
fn reserve_address(
......
use RTSPAuth;
use RTSPToken;
use ffi;
use glib::object::IsA;
use glib::translate::*;
use RTSPAuth;
use RTSPToken;
pub trait RTSPAuthExtManual {
fn set_default_token<'a, P: Into<Option<&'a mut RTSPToken>>>(&self, token: P);
......
use RTSPClient;
use ffi;
use glib;
use glib::object::IsA;
use glib::source::SourceId;
use glib::translate::*;
use RTSPClient;
pub trait RTSPClientExtManual {
fn attach<'a, P: Into<Option<&'a glib::MainContext>>>(&self, context: P) -> SourceId;
......
use RTSPServer;
use ffi;
use glib;
use glib::object::IsA;
use glib::source::SourceId;
use glib::translate::*;
use RTSPServer;
pub trait RTSPServerExtManual {
fn attach<'a, P: Into<Option<&'a glib::MainContext>>>(&self, context: P) -> SourceId;
......
use RTSPSessionPool;
use ffi;
use glib;
use glib::object::IsA;
......@@ -8,6 +7,7 @@ use glib_ffi;
use glib_ffi::{gboolean, gpointer};
use std::cell::RefCell;
use std::mem::transmute;
use RTSPSessionPool;
unsafe extern "C" fn trampoline_watch(
pool: *mut ffi::GstRTSPSessionPool,
......
use ffi;
use glib;
use glib::StaticType;
use glib::translate::*;
use glib::value::ToSendValue;
use glib::StaticType;
use gst;
use gst_ffi;
......
......@@ -9,8 +9,8 @@
use ffi;
use gst_ffi;
use glib::ToSendValue;
use glib::translate::{from_glib, from_glib_full, ToGlib};
use glib::ToSendValue;
use gst;
use gst::MiniObject;
use std::mem;
......
......@@ -6,9 +6,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use VideoOverlay;
use ffi;
use libc::uintptr_t;
use VideoOverlay;
use glib::IsA;
......
......@@ -6,12 +6,12 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use WebRTCSDPType;
use WebRTCSessionDescription;
use ffi;
use glib::translate::*;
use gst_sdp;
use std::mem;
use WebRTCSDPType;
use WebRTCSessionDescription;
impl WebRTCSessionDescription {
pub fn new(type_: WebRTCSDPType, mut sdp: gst_sdp::SDPMessage) -> WebRTCSessionDescription {
......
......@@ -10,8 +10,8 @@ use Bin;
use Element;
use glib;
use glib::IsA;
use glib::translate::{from_glib, from_glib_full, FromGlibPtrContainer, ToGlib, ToGlibPtr};
use glib::IsA;
use ffi;
......
......@@ -15,9 +15,9 @@ use std::slice;
use std::u64;
use std::usize;
use miniobject::*;
use BufferFlags;
use ClockTime;
use miniobject::*;
use ffi;
use glib;
......
......@@ -10,8 +10,8 @@ use BufferPool;
use Structure;
use glib;
use glib::IsA;
use glib::translate::{from_glib, from_glib_full, from_glib_none, ToGlib, ToGlibPtr, ToGlibPtrMut};
use glib::IsA;
use ffi;
......
......@@ -8,13 +8,13 @@
use ffi;
use glib;
use glib::StaticType;
use glib::translate::{from_glib, from_glib_full};
use glib::StaticType;
use std::fmt;
use miniobject::*;
use Buffer;
use BufferRef;
use miniobject::*;
pub type BufferList = GstRc<BufferListRef>;
pub struct BufferListRef(ffi::GstBufferList);
......
......@@ -424,7 +424,7 @@ mod tests {
("bool", &true),
("string", &"bla"),
("fraction", &Fraction::new(1, 2)),
("array", &Array::new(&[&1, &2]))
("array", &Array::new(&[&1, &2])),
],
).as_ref()
);
......
......@@ -6,12 +6,12 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use ChildProxy;
use ffi;
use glib;
use glib::object::IsA;
use glib::translate::*;
use std::ptr;
use ChildProxy;
pub trait ChildProxyExtManual {
fn get_child_property(&self, name: &str) -> Option<glib::Value>;
......
......@@ -6,15 +6,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use Clock;
use ClockReturn;
use ClockTime;
use ClockTimeDiff;
use ffi;
use glib;
use glib::IsA;
use glib::source::CallbackGuard;
use glib::translate::*;
use glib::IsA;
use glib_ffi;
use glib_ffi::{gboolean, gpointer};
use libc::c_void;
......@@ -22,6 +18,10 @@ use std::cmp;
use std::mem;
use std::mem::transmute;
use std::ptr;
use Clock;
use ClockReturn;
use ClockTime;
use ClockTimeDiff;
glib_wrapper! {
pub struct ClockId(Shared<c_void>);
......
......@@ -12,11 +12,11 @@ use std::fmt;
use ffi;
use glib;
use glib::StaticType;
use glib::translate::{from_glib, from_glib_full, ToGlib, ToGlibPtr};
use glib::StaticType;
use StructureRef;
use miniobject::*;
use StructureRef;
pub type Context = GstRc<ContextRef>;
pub struct ContextRef(ffi::GstContext);
......
......@@ -6,8 +6,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use DateTime;
use std::fmt;
use DateTime;
impl fmt::Display for DateTime {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
......
......@@ -8,8 +8,8 @@
use DeviceProvider;
use glib::IsA;
use glib::translate::ToGlibPtr;
use glib::IsA;
use std::ffi::CStr;
......
......@@ -8,23 +8,23 @@
use Element;
use Event;
use Format;
use FormattedValue;
use GenericFormattedValue;
use Pad;
use PadTemplate;
use QueryRef;
use SpecificFormattedValue;
use glib;
use glib::IsA;
#[cfg(any(feature = "v1_10", feature = "dox"))]
use glib::object::Downcast;
#[cfg(any(feature = "v1_10", feature = "dox"))]
use glib::translate::FromGlibPtrBorrow;
use glib::translate::{from_glib, from_glib_full, from_glib_none, FromGlib, FromGlibPtrContainer,
ToGlib, ToGlibPtr};
use glib::IsA;
use miniobject::MiniObject;
use Event;
use Format;
use FormattedValue;
use GenericFormattedValue;
use Pad;
use PadTemplate;
use QueryRef;
use SpecificFormattedValue;
use std::ffi::CStr;
use std::mem;
......
......@@ -6,13 +6,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::cmp;
use std::error::Error;
use std::fmt;
use ClockReturn;
use FlowReturn;
use PadLinkReturn;
use StateChangeReturn;
use std::cmp;
use std::error::Error;
use std::fmt;
use glib::translate::ToGlib;
......
......@@ -6,10 +6,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use GenericFormattedValue;
use ffi;
use miniobject::*;
use structure::*;
use GenericFormattedValue;
use std::cmp;
use std::ffi::CStr;
......
......@@ -6,10 +6,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use ClockTime;
use Format;
use muldiv::MulDiv;
use std::ops;
use ClockTime;
use Format;
#[derive(PartialEq, Eq, Hash, Clone, Copy, Debug)]
pub enum GenericFormattedValue {
......
......@@ -6,15 +6,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use ffi;
use glib::object::Downcast;
use glib::object::IsA;
use glib::translate::*;
use GhostPad;
use Object;
use Pad;
use PadMode;
use PadTemplate;
use ffi;
use glib::object::Downcast;
use glib::object::IsA;
use glib::translate::*;
impl GhostPad {
pub fn new<'a, P: Into<Option<&'a str>>, Q: IsA<Pad>>(name: P, target: &Q) -> Option<GhostPad> {
......
use glib;
use glib::IsA;
use glib::translate::ToGlibPtr;
use glib::IsA;
use ffi;
......
......@@ -8,10 +8,10 @@
use ffi;
use glib;
use glib::StaticType;
use glib::Value;
use glib::translate::*;
use glib::value::{FromValueOptional, ToValue};
use glib::StaticType;
use glib::Value;
use glib_ffi;
use glib_ffi::{gconstpointer, gpointer};
use gobject_ffi;
......
......@@ -133,9 +133,9 @@ mod parse_context;
mod proxy_pad;
mod tag_setter;
pub use bin::BinExtManual;
pub use element::{ElementExtManual, ElementMessageType, NotifyWatchId};
pub use element::{ELEMENT_METADATA_AUTHOR, ELEMENT_METADATA_DESCRIPTION, ELEMENT_METADATA_DOC_URI,
ELEMENT_METADATA_ICON_NAME, ELEMENT_METADATA_KLASS, ELEMENT_METADATA_LONGNAME};
pub use element::{ElementExtManual, ElementMessageType, NotifyWatchId};
pub use object::GstObjectExtManual;
// OS dependent Bus extensions (also import the other plateform trait for doc)
......
......@@ -15,8 +15,8 @@ use std::ptr;
use ffi;
use gobject_ffi;
use glib::IsA;
use glib::translate::{from_glib, ToGlib, ToGlibPtr};
use glib::IsA;
#[derive(PartialEq, Eq, Clone, Copy)]
pub struct DebugCategory(ptr::NonNull<ffi::GstDebugCategory>);
......
......@@ -6,15 +6,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use ffi;
use miniobject::*;
use structure::*;
use GenericFormattedValue;
use GroupId;
use GstObjectExt;
use Object;
use Seqnum;
use TagList;
use ffi;
use miniobject::*;
use structure::*;
use std::ffi::CStr;
use std::fmt;
......@@ -23,10 +23,10 @@ use std::ops::Deref;
use std::ptr;
use glib;
use glib::Cast;
use glib::IsA;
use glib::translate::{from_glib, from_glib_full, from_glib_none, mut_override, ToGlib, ToGlibPtr};
use glib::value::ToSendValue;
use glib::Cast;
use glib::IsA;
#[repr(C)]
pub struct MessageRef(ffi::GstMessage);
......
......@@ -7,10 +7,10 @@
// except according to those terms.
use glib;
use glib::IsA;
use glib::object::{Downcast, ObjectExt};
use glib::signal::SignalHandlerId;
use glib::translate::ToGlibPtr;
use glib::IsA;
use gobject_ffi;
......
......@@ -6,6 +6,7 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use miniobject::MiniObject;
use Buffer;
use BufferList;
use Event;
......@@ -20,7 +21,6 @@ use Query;
use QueryRef;
use SpecificFormattedValue;
use StaticPadTemplate;
use miniobject::MiniObject;