Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2018-02-22 13:23:34 +0300
committerSebastian Dröge <sebastian@centricular.com>2018-02-22 13:23:34 +0300
commitda433f92afb57cee8b741e19971554b4a494fe7b (patch)
tree484ef21e7cd5ae87bd73dddf245f3b0726d10c46
parente7b12d87f99884af3824e0e1a55bd67071e7ed32 (diff)
Run everything through latest rustfmt-nightly
-rw-r--r--gst-plugin-togglerecord/src/togglerecord.rs3
-rw-r--r--gst-plugin/src/base_sink.rs16
-rw-r--r--gst-plugin/src/base_src.rs24
-rw-r--r--gst-plugin/src/base_transform.rs11
-rw-r--r--gst-plugin/src/element.rs4
-rw-r--r--gst-plugin/src/lib.rs8
-rw-r--r--gst-plugin/src/pipeline.rs3
7 files changed, 23 insertions, 46 deletions
diff --git a/gst-plugin-togglerecord/src/togglerecord.rs b/gst-plugin-togglerecord/src/togglerecord.rs
index e16ff6c7d..a34efc719 100644
--- a/gst-plugin-togglerecord/src/togglerecord.rs
+++ b/gst-plugin-togglerecord/src/togglerecord.rs
@@ -1127,7 +1127,8 @@ impl ToggleRecord {
let (flags, min, max, align) = new_query.get_result();
q.set(flags, min, max, align);
- q.add_scheduling_modes(&new_query.get_scheduling_modes()
+ q.add_scheduling_modes(&new_query
+ .get_scheduling_modes()
.iter()
.cloned()
.filter(|m| m != &gst::PadMode::Pull)
diff --git a/gst-plugin/src/base_sink.rs b/gst-plugin/src/base_sink.rs
index eb98ffc30..40f420d45 100644
--- a/gst-plugin/src/base_sink.rs
+++ b/gst-plugin/src/base_sink.rs
@@ -304,9 +304,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
- panic_to_error!(&wrap, &element.panicked, false, {
- imp.start(&wrap)
- }).to_glib()
+ panic_to_error!(&wrap, &element.panicked, false, { imp.start(&wrap) }).to_glib()
}
unsafe extern "C" fn base_sink_stop<T: BaseSinkBase>(
@@ -320,9 +318,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
- panic_to_error!(&wrap, &element.panicked, false, {
- imp.stop(&wrap)
- }).to_glib()
+ panic_to_error!(&wrap, &element.panicked, false, { imp.stop(&wrap) }).to_glib()
}
unsafe extern "C" fn base_sink_render<T: BaseSinkBase>(
@@ -502,9 +498,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
- panic_to_error!(&wrap, &element.panicked, false, {
- imp.unlock(&wrap)
- }).to_glib()
+ panic_to_error!(&wrap, &element.panicked, false, { imp.unlock(&wrap) }).to_glib()
}
unsafe extern "C" fn base_sink_unlock_stop<T: BaseSinkBase>(
@@ -518,7 +512,5 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
- panic_to_error!(&wrap, &element.panicked, false, {
- imp.unlock_stop(&wrap)
- }).to_glib()
+ panic_to_error!(&wrap, &element.panicked, false, { imp.unlock_stop(&wrap) }).to_glib()
}
diff --git a/gst-plugin/src/base_src.rs b/gst-plugin/src/base_src.rs
index d06a94bf7..f746cbb75 100644
--- a/gst-plugin/src/base_src.rs
+++ b/gst-plugin/src/base_src.rs
@@ -375,9 +375,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
- panic_to_error!(&wrap, &element.panicked, false, {
- imp.start(&wrap)
- }).to_glib()
+ panic_to_error!(&wrap, &element.panicked, false, { imp.start(&wrap) }).to_glib()
}
unsafe extern "C" fn base_src_stop<T: BaseSrcBase>(
@@ -391,9 +389,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
- panic_to_error!(&wrap, &element.panicked, false, {
- imp.stop(&wrap)
- }).to_glib()
+ panic_to_error!(&wrap, &element.panicked, false, { imp.stop(&wrap) }).to_glib()
}
unsafe extern "C" fn base_src_is_seekable<T: BaseSrcBase>(
@@ -407,9 +403,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
- panic_to_error!(&wrap, &element.panicked, false, {
- imp.is_seekable(&wrap)
- }).to_glib()
+ panic_to_error!(&wrap, &element.panicked, false, { imp.is_seekable(&wrap) }).to_glib()
}
unsafe extern "C" fn base_src_get_size<T: BaseSrcBase>(
@@ -569,9 +563,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
- panic_to_error!(&wrap, &element.panicked, false, {
- imp.negotiate(&wrap)
- }).to_glib()
+ panic_to_error!(&wrap, &element.panicked, false, { imp.negotiate(&wrap) }).to_glib()
}
unsafe extern "C" fn base_src_set_caps<T: BaseSrcBase>(
@@ -621,9 +613,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
- panic_to_error!(&wrap, &element.panicked, false, {
- imp.unlock(&wrap)
- }).to_glib()
+ panic_to_error!(&wrap, &element.panicked, false, { imp.unlock(&wrap) }).to_glib()
}
unsafe extern "C" fn base_src_unlock_stop<T: BaseSrcBase>(
@@ -637,7 +627,5 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
- panic_to_error!(&wrap, &element.panicked, false, {
- imp.unlock_stop(&wrap)
- }).to_glib()
+ panic_to_error!(&wrap, &element.panicked, false, { imp.unlock_stop(&wrap) }).to_glib()
}
diff --git a/gst-plugin/src/base_transform.rs b/gst-plugin/src/base_transform.rs
index ace891d8e..975498fa9 100644
--- a/gst-plugin/src/base_transform.rs
+++ b/gst-plugin/src/base_transform.rs
@@ -315,7 +315,8 @@ glib_wrapper! {
}
unsafe impl<T: IsA<gst::Element> + IsA<gst_base::BaseTransform> + ObjectType> BaseTransformBase
- for T {
+ for T
+{
}
pub type BaseTransformClass = ClassStruct<BaseTransform>;
@@ -432,9 +433,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
- panic_to_error!(&wrap, &element.panicked, false, {
- imp.start(&wrap)
- }).to_glib()
+ panic_to_error!(&wrap, &element.panicked, false, { imp.start(&wrap) }).to_glib()
}
unsafe extern "C" fn base_transform_stop<T: BaseTransformBase>(
@@ -448,9 +447,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
- panic_to_error!(&wrap, &element.panicked, false, {
- imp.stop(&wrap)
- }).to_glib()
+ panic_to_error!(&wrap, &element.panicked, false, { imp.stop(&wrap) }).to_glib()
}
unsafe extern "C" fn base_transform_transform_caps<T: BaseTransformBase>(
diff --git a/gst-plugin/src/element.rs b/gst-plugin/src/element.rs
index ec67ba667..005bd765c 100644
--- a/gst-plugin/src/element.rs
+++ b/gst-plugin/src/element.rs
@@ -339,9 +339,7 @@ where
let imp = &*element.imp;
let query = gst::QueryRef::from_mut_ptr(query);
- panic_to_error!(&wrap, &element.panicked, false, {
- imp.query(&wrap, query)
- }).to_glib()
+ panic_to_error!(&wrap, &element.panicked, false, { imp.query(&wrap, query) }).to_glib()
}
unsafe extern "C" fn element_set_context<T: ElementBase>(
diff --git a/gst-plugin/src/lib.rs b/gst-plugin/src/lib.rs
index 332418ef5..a6405d558 100644
--- a/gst-plugin/src/lib.rs
+++ b/gst-plugin/src/lib.rs
@@ -8,19 +8,19 @@
// except according to those terms.
extern crate byteorder;
+pub extern crate glib_sys as glib_ffi;
+pub extern crate gobject_sys as gobject_ffi;
extern crate gstreamer_base_sys as gst_base_ffi;
+pub extern crate gstreamer_sys as gst_ffi;
#[macro_use]
extern crate lazy_static;
extern crate libc;
-pub extern crate glib_sys as glib_ffi;
-pub extern crate gobject_sys as gobject_ffi;
-pub extern crate gstreamer_sys as gst_ffi;
-extern crate gstreamer_base as gst_base;
#[macro_use]
pub extern crate glib;
#[macro_use]
pub extern crate gstreamer as gst;
+extern crate gstreamer_base as gst_base;
macro_rules! floating_reference_guard {
($obj:ident) => (
diff --git a/gst-plugin/src/pipeline.rs b/gst-plugin/src/pipeline.rs
index 1140429ed..b1c91d38c 100644
--- a/gst-plugin/src/pipeline.rs
+++ b/gst-plugin/src/pipeline.rs
@@ -54,7 +54,8 @@ glib_wrapper! {
}
unsafe impl<T: IsA<gst::Element> + IsA<gst::Bin> + IsA<gst::Pipeline> + ObjectType> PipelineBase
- for T {
+ for T
+{
}
pub type PipelineClass = ClassStruct<Pipeline>;