Re-run everything through rustfmt

This commit is contained in:
Sebastian Dröge 2018-04-25 11:10:06 +03:00
parent 062403bdac
commit 2cefd9aea6
62 changed files with 116 additions and 119 deletions

View file

@ -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>>>,

View file

@ -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>>>,

View file

@ -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;

View file

@ -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,
]
);

View file

@ -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;

View file

@ -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]) {

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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))
}

View file

@ -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::*;

View file

@ -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::*;

View file

@ -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::*;

View file

@ -11,12 +11,12 @@ use gst;
use auto::Discoverer;
use glib::object::Downcast;
use glib::signal::connect;
use glib::signal::SignalHandlerId;
use glib::translate::*;
use glib::IsA;
use glib::Value;
use glib::object::Downcast;
use glib::signal::SignalHandlerId;
use glib::signal::connect;
use glib::translate::*;
use ffi;
use glib_ffi;

View file

@ -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(

View file

@ -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>>>(

View file

@ -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 {

View file

@ -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;

View file

@ -1,10 +1,10 @@
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(

View file

@ -1,8 +1,8 @@
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);

View file

@ -1,9 +1,9 @@
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;

View file

@ -1,9 +1,9 @@
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;

View file

@ -1,4 +1,3 @@
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,

View file

@ -1,8 +1,8 @@
use ffi;
use glib;
use glib::StaticType;
use glib::translate::*;
use glib::value::ToSendValue;
use glib::StaticType;
use gst;
use gst_ffi;

View file

@ -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;

View file

@ -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;

View file

@ -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 {

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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()
);

View file

@ -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>;

View file

@ -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>);

View file

@ -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);

View file

@ -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 {

View file

@ -8,8 +8,8 @@
use DeviceProvider;
use glib::IsA;
use glib::translate::ToGlibPtr;
use glib::IsA;
use std::ffi::CStr;

View file

@ -8,6 +8,15 @@
use Element;
use glib;
#[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;
@ -16,15 +25,6 @@ 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 miniobject::MiniObject;
use std::ffi::CStr;
use std::mem;

View file

@ -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;

View file

@ -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;

View file

@ -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 {

View file

@ -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> {

View file

@ -1,6 +1,6 @@
use glib;
use glib::IsA;
use glib::translate::ToGlibPtr;
use glib::IsA;
use ffi;

View file

@ -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;

View file

@ -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)

View file

@ -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>);

View file

@ -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);

View file

@ -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;

View file

@ -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;
use std::cell::RefCell;
use std::mem;
@ -28,10 +28,10 @@ use std::mem::transmute;
use std::ptr;
use glib;
use glib::Object;
use glib::source::CallbackGuard;
use glib::translate::{from_glib, from_glib_borrow, from_glib_full, from_glib_none, mut_override,
FromGlib, ToGlib, ToGlibPtr};
use glib::Object;
use glib::{IsA, StaticType};
use glib_ffi;
use glib_ffi::gpointer;

View file

@ -6,11 +6,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#[cfg(any(feature = "v1_14", feature = "dox"))]
use glib::translate::*;
use PadTemplate;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use StaticPadTemplate;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use glib::translate::*;
#[cfg(any(feature = "v1_14", feature = "dox"))]
use ffi;

View file

@ -6,10 +6,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use ffi;
use Plugin;
use Structure;
use StructureRef;
use ffi;
use glib::translate::*;

View file

@ -6,15 +6,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use PromiseResult;
use Structure;
use StructureRef;
use ffi;
use glib::translate::*;
use glib_ffi;
use gobject_ffi;
use std::mem;
use std::ptr;
use PromiseResult;
use Structure;
use StructureRef;
glib_wrapper! {
pub struct Promise(Shared<ffi::GstPromise>);

View file

@ -6,16 +6,16 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::ptr;
use Buffer;
use BufferList;
use FlowReturn;
use Object;
use Pad;
use ProxyPad;
use std::ptr;
use glib::IsA;
use glib::translate::{from_glib, from_glib_full, ToGlibPtr};
use glib::IsA;
use ffi;

View file

@ -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::ffi::CStr;
use std::fmt;

View file

@ -12,9 +12,10 @@ use std::ptr;
use ffi;
use glib;
use glib::StaticType;
use glib::translate::{from_glib, from_glib_full, from_glib_none, mut_override, ToGlibPtr};
use glib::StaticType;
use miniobject::*;
use Buffer;
use BufferList;
use Caps;
@ -22,7 +23,6 @@ use FormattedSegment;
use FormattedValue;
use Segment;
use StructureRef;
use miniobject::*;
pub type Sample = GstRc<SampleRef>;
pub struct SampleRef(ffi::GstSample);

View file

@ -6,11 +6,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use Format;
use FormattedValue;
use GenericFormattedValue;
use SeekFlags;
use SeekType;
use ffi;
use glib;
use glib::translate::*;
@ -20,6 +15,11 @@ use std::fmt;
use std::marker::PhantomData;
use std::mem;
use std::ptr;
use Format;
use FormattedValue;
use GenericFormattedValue;
use SeekFlags;
use SeekType;
pub type Segment = FormattedSegment<GenericFormattedValue>;
#[repr(C)]

View file

@ -6,13 +6,13 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use TagMergeMode;
use TagSetter;
use ffi;
use glib::object::IsA;
use glib::translate::*;
use glib::value::ToSendValue;
use tags::*;
use TagMergeMode;
use TagSetter;
pub trait TagSetterExtManual {
fn add<'a, T: Tag<'a>>(&self, value: T::TagType, mode: TagMergeMode)

View file

@ -13,9 +13,9 @@ use std::mem;
use ffi;
use glib;
use glib::StaticType;
use glib::translate::{from_glib, from_glib_full, ToGlib, ToGlibPtr, ToGlibPtrMut};
use glib::value::{FromValueOptional, SetValue, ToSendValue, TypedValue, Value};
use glib::StaticType;
use miniobject::*;

View file

@ -16,12 +16,12 @@ use glib;
use glib::translate::{from_glib, from_glib_full, from_glib_none, FromGlibPtrContainer, ToGlib,
ToGlibPtr};
use miniobject::*;
use TagList;
use TagMergeMode;
use TocEntryType;
use TocLoopType;
use TocScope;
use miniobject::*;
pub type Toc = GstRc<TocRef>;
pub struct TocRef(ffi::GstToc);

View file

@ -6,11 +6,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use ffi;
use Caps;
use Plugin;
use TypeFindFactory;
use TypeFindProbability;
use ffi;
use glib::translate::*;
use glib_ffi;

View file

@ -1,6 +1,6 @@
extern crate gstreamer as gst;
use gst::MessageView;
use gst::prelude::*;
use gst::MessageView;
use std::io;
use std::io::Write;

View file

@ -1,6 +1,6 @@
extern crate gstreamer as gst;
use gst::MessageView;
use gst::prelude::*;
use gst::MessageView;
#[path = "../tutorials-common.rs"]
mod tutorials_common;