Run everything through rustfmt again

This commit is contained in:
Sebastian Dröge 2017-12-16 17:42:42 +02:00
parent 841252c5f7
commit 2ec85ac0b0
3 changed files with 13 additions and 11 deletions

View file

@ -162,9 +162,9 @@ impl AudioFormat {
"audio/x-adpcm",
&[("layout", &"swf")],
)),
flavors::SoundFormat::NELLYMOSER_16KHZ_MONO |
flavors::SoundFormat::NELLYMOSER_8KHZ_MONO |
flavors::SoundFormat::NELLYMOSER => {
flavors::SoundFormat::NELLYMOSER_16KHZ_MONO
| flavors::SoundFormat::NELLYMOSER_8KHZ_MONO
| flavors::SoundFormat::NELLYMOSER => {
Some(gst::Caps::new_simple("audio/x-nellymoser", &[]))
}
flavors::SoundFormat::PCM_ALAW => Some(gst::Caps::new_simple("audio/x-alaw", &[])),
@ -420,8 +420,8 @@ impl Metadata {
};
let args = match script_data.arguments {
flavors::ScriptDataValue::Object(ref objects) |
flavors::ScriptDataValue::ECMAArray(ref objects) => objects,
flavors::ScriptDataValue::Object(ref objects)
| flavors::ScriptDataValue::ECMAArray(ref objects) => objects,
_ => return metadata,
};

View file

@ -19,8 +19,7 @@ pub mod source;
pub mod sink;
pub mod demuxer;
pub type UriValidator = Fn(&url::Url)
-> Result<(), gst_plugin::error::UriError>
pub type UriValidator = Fn(&url::Url) -> Result<(), gst_plugin::error::UriError>
+ Send
+ Sync
+ 'static;

View file

@ -225,13 +225,16 @@ fn create_ui(app: &gtk::Application) {
let video_sink = &video_sink_clone;
let togglerecord = &togglerecord_clone;
let position = video_sink.query_position::<gst::ClockTime>().unwrap_or(0.into());
let position = video_sink
.query_position::<gst::ClockTime>()
.unwrap_or(0.into());
position_label.set_text(&format!("Position: {:.1}", position));
let recording_duration = togglerecord
.get_static_pad("src")
.unwrap()
.query_position::<gst::ClockTime>().unwrap_or(0.into());
.query_position::<gst::ClockTime>()
.unwrap_or(0.into());
recorded_duration_label.set_text(&format!("Recorded: {:.1}", recording_duration));
glib::Continue(true)