diff --git a/audio/audiofx/src/audioloudnorm/imp.rs b/audio/audiofx/src/audioloudnorm/imp.rs index afffeb30..5ba17ad5 100644 --- a/audio/audiofx/src/audioloudnorm/imp.rs +++ b/audio/audiofx/src/audioloudnorm/imp.rs @@ -855,15 +855,15 @@ impl State { smp_cnt += LIMITER_LOOKAHEAD + peak_delta - LIMITER_ATTACK_WINDOW; gst::debug!( - CAT, - imp: imp, - "Found peak {} at sample {}, going to attack state at sample {} (gain reduction {}-{})", - peak_value, - smp_cnt + LIMITER_ATTACK_WINDOW, - smp_cnt, - self.gain_reduction[0], - self.gain_reduction[1] - ); + CAT, + imp: imp, + "Found peak {} at sample {}, going to attack state at sample {} (gain reduction {}-{})", + peak_value, + smp_cnt + LIMITER_ATTACK_WINDOW, + smp_cnt, + self.gain_reduction[0], + self.gain_reduction[1] + ); } else { // Process all samples, no peak found smp_cnt = nb_samples; @@ -992,15 +992,15 @@ impl State { self.sustain_cnt = None; gst::debug!( - CAT, - imp: imp, - "Found new peak {} at sample {}, restarting attack state at sample {} (gain reduction {}-{})", - peak_value, - smp_cnt + LIMITER_ATTACK_WINDOW, - smp_cnt, - self.gain_reduction[0], - self.gain_reduction[1], - ); + CAT, + imp: imp, + "Found new peak {} at sample {}, restarting attack state at sample {} (gain reduction {}-{})", + peak_value, + smp_cnt + LIMITER_ATTACK_WINDOW, + smp_cnt, + self.gain_reduction[0], + self.gain_reduction[1], + ); } else { // If the slope is lower we can't simply reduce the slope as we would // then have a lower gain reduction than needed at the previous peak. @@ -1041,15 +1041,15 @@ impl State { self.sustain_cnt = Some(self.env_cnt); gst::debug!( - CAT, - imp: imp, - "Found new peak {} at sample {}, adjusting attack state at sample {} (gain reduction {}-{})", - peak_value, - smp_cnt + LIMITER_ATTACK_WINDOW, - smp_cnt, - self.gain_reduction[0], - self.gain_reduction[1], - ); + CAT, + imp: imp, + "Found new peak {} at sample {}, adjusting attack state at sample {} (gain reduction {}-{})", + peak_value, + smp_cnt + LIMITER_ATTACK_WINDOW, + smp_cnt, + self.gain_reduction[0], + self.gain_reduction[1], + ); } return smp_cnt; } else { @@ -1151,25 +1151,25 @@ impl State { self.gain_reduction[1] = gain_reduction; gst::debug!( - CAT, - imp: imp, - "Found new peak {} at sample {}, going back to attack state at sample {} (gain reduction {}-{})", - peak_value, - smp_cnt + LIMITER_ATTACK_WINDOW, - smp_cnt, - self.gain_reduction[0], - self.gain_reduction[1], - ); + CAT, + imp: imp, + "Found new peak {} at sample {}, going back to attack state at sample {} (gain reduction {}-{})", + peak_value, + smp_cnt + LIMITER_ATTACK_WINDOW, + smp_cnt, + self.gain_reduction[0], + self.gain_reduction[1], + ); } else { gst::debug!( - CAT, - imp: imp, - "Found new peak {} at sample {}, going sustain further at sample {} (gain reduction {})", - peak_value, - smp_cnt + LIMITER_ATTACK_WINDOW, - smp_cnt, - self.gain_reduction[1], - ); + CAT, + imp: imp, + "Found new peak {} at sample {}, going sustain further at sample {} (gain reduction {})", + peak_value, + smp_cnt + LIMITER_ATTACK_WINDOW, + smp_cnt, + self.gain_reduction[1], + ); // We need to sustain until the peak at least self.sustain_cnt = Some(LIMITER_LOOKAHEAD); } @@ -1259,26 +1259,26 @@ impl State { self.gain_reduction[1] = gain_reduction; gst::debug!( - CAT, - imp: imp, - "Found new peak {} at sample {}, going back to attack state at sample {} (gain reduction {}-{})", - peak_value, - smp_cnt + LIMITER_ATTACK_WINDOW, - smp_cnt, - self.gain_reduction[0], - self.gain_reduction[1], - ); + CAT, + imp: imp, + "Found new peak {} at sample {}, going back to attack state at sample {} (gain reduction {}-{})", + peak_value, + smp_cnt + LIMITER_ATTACK_WINDOW, + smp_cnt, + self.gain_reduction[0], + self.gain_reduction[1], + ); } else { self.gain_reduction[1] = current_gain_reduction; gst::debug!( - CAT, - imp: imp, - "Going from release to sustain state at sample {} because of low peak {} at sample {} (gain reduction {})", - smp_cnt, - peak_value, - smp_cnt + LIMITER_ATTACK_WINDOW, - self.gain_reduction[1] - ); + CAT, + imp: imp, + "Going from release to sustain state at sample {} because of low peak {} at sample {} (gain reduction {})", + smp_cnt, + peak_value, + smp_cnt + LIMITER_ATTACK_WINDOW, + self.gain_reduction[1] + ); self.limiter_state = LimiterState::Sustain; } diff --git a/generic/threadshare/examples/benchmark.rs b/generic/threadshare/examples/benchmark.rs index 3d8a893c..7f75c6e9 100644 --- a/generic/threadshare/examples/benchmark.rs +++ b/generic/threadshare/examples/benchmark.rs @@ -211,7 +211,7 @@ fn main() { _ => (), }; - glib::Continue(true) + glib::ControlFlow::Continue }) .expect("Failed to add bus watch"); diff --git a/generic/threadshare/examples/standalone/main.rs b/generic/threadshare/examples/standalone/main.rs index 7498b653..1cc43e29 100644 --- a/generic/threadshare/examples/standalone/main.rs +++ b/generic/threadshare/examples/standalone/main.rs @@ -116,7 +116,7 @@ fn main() { gst::info!(CAT, "Received eos"); l_clone.quit(); - glib::Continue(false) + glib::ControlFlow::Break } MessageView::Error(msg) => { if let gst::MessageView::Error(msg) = msg.message().view() { @@ -125,9 +125,9 @@ fn main() { gst::info!(CAT, "Received all shutdown requests"); l_clone.quit(); - return glib::Continue(false); + return glib::ControlFlow::Break; } else { - return glib::Continue(true); + return glib::ControlFlow::Continue; } } } @@ -141,9 +141,9 @@ fn main() { ); l_clone.quit(); - glib::Continue(false) + glib::ControlFlow::Break } - _ => glib::Continue(true), + _ => glib::ControlFlow::Continue, } }) .expect("Failed to add bus watch"); diff --git a/generic/threadshare/examples/udpsrc_benchmark_sender.rs b/generic/threadshare/examples/udpsrc_benchmark_sender.rs index bb7ce23f..42130ba4 100644 --- a/generic/threadshare/examples/udpsrc_benchmark_sender.rs +++ b/generic/threadshare/examples/udpsrc_benchmark_sender.rs @@ -178,7 +178,7 @@ fn run(pipeline: gst::Pipeline) { gst::info!(CAT, "Received eos"); l_clone.quit(); - glib::Continue(false) + glib::ControlFlow::Break } MessageView::Error(msg) => { gst::error!( @@ -190,9 +190,9 @@ fn run(pipeline: gst::Pipeline) { ); l_clone.quit(); - glib::Continue(false) + glib::ControlFlow::Break } - _ => glib::Continue(true), + _ => glib::ControlFlow::Continue, } }) .expect("Failed to add bus watch"); diff --git a/generic/threadshare/tests/pipeline.rs b/generic/threadshare/tests/pipeline.rs index d27eef6e..5e12d6b3 100644 --- a/generic/threadshare/tests/pipeline.rs +++ b/generic/threadshare/tests/pipeline.rs @@ -165,7 +165,7 @@ fn multiple_contexts_queue() { _ => (), }; - glib::Continue(true) + glib::ControlFlow::Continue }) .unwrap(); @@ -312,7 +312,7 @@ fn multiple_contexts_proxy() { _ => (), }; - glib::Continue(true) + glib::ControlFlow::Continue }) .unwrap(); @@ -417,7 +417,7 @@ fn eos() { MessageView::StateChanged(state_changed) => { if let Some(source) = state_changed.src() { if source.type_() != gst::Pipeline::static_type() { - return glib::Continue(true); + return glib::ControlFlow::Continue; } if state_changed.old() == gst::State::Paused && state_changed.current() == gst::State::Playing @@ -441,7 +441,7 @@ fn eos() { _ => (), }; - glib::Continue(true) + glib::ControlFlow::Continue }) .unwrap(); @@ -573,7 +573,7 @@ fn premature_shutdown() { MessageView::StateChanged(state_changed) => { if let Some(source) = state_changed.src() { if source.type_() != gst::Pipeline::static_type() { - return glib::Continue(true); + return glib::ControlFlow::Continue; } if state_changed.old() == gst::State::Paused && state_changed.current() == gst::State::Playing @@ -597,7 +597,7 @@ fn premature_shutdown() { _ => (), }; - glib::Continue(true) + glib::ControlFlow::Continue }) .unwrap(); @@ -669,7 +669,7 @@ fn socket_play_null_play() { MessageView::StateChanged(state_changed) => { if let Some(source) = state_changed.src() { if source.type_() != gst::Pipeline::static_type() { - return glib::Continue(true); + return glib::ControlFlow::Continue; } if state_changed.old() == gst::State::Paused && state_changed.current() == gst::State::Playing @@ -694,7 +694,7 @@ fn socket_play_null_play() { _ => (), }; - glib::Continue(true) + glib::ControlFlow::Continue }) .unwrap(); diff --git a/net/aws/src/s3hlssink/imp.rs b/net/aws/src/s3hlssink/imp.rs index 1c53189a..ac4b4601 100644 --- a/net/aws/src/s3hlssink/imp.rs +++ b/net/aws/src/s3hlssink/imp.rs @@ -274,13 +274,13 @@ impl S3HlsSink { match result { Err(err) => { gst::error!( - CAT, - imp: self, - "Put object request for S3 key {} of data length {} failed with error {:?}", - s3_key, - s3_data_len, - err, - ); + CAT, + imp: self, + "Put object request for S3 key {} of data length {} failed with error {:?}", + s3_key, + s3_data_len, + err, + ); element_imp_error!( self, gst::ResourceError::Write, diff --git a/net/onvif/src/onvifmetadataparse/imp.rs b/net/onvif/src/onvifmetadataparse/imp.rs index f1464e41..057878cc 100644 --- a/net/onvif/src/onvifmetadataparse/imp.rs +++ b/net/onvif/src/onvifmetadataparse/imp.rs @@ -219,12 +219,12 @@ impl OnvifMetadataParse { Some(diff) => diff, None => { gst::error!( - CAT, - obj: pad, - "Too big running time difference between initial running time {:?} and current running time {:?}", - initial_running_time, - running_time, - ); + CAT, + obj: pad, + "Too big running time difference between initial running time {:?} and current running time {:?}", + initial_running_time, + running_time, + ); return Err(gst::FlowError::Error); } }; diff --git a/utils/fallbackswitch/examples/gtk_fallbackswitch.rs b/utils/fallbackswitch/examples/gtk_fallbackswitch.rs index 4aaf78dd..f3bd64b6 100644 --- a/utils/fallbackswitch/examples/gtk_fallbackswitch.rs +++ b/utils/fallbackswitch/examples/gtk_fallbackswitch.rs @@ -110,7 +110,7 @@ fn create_ui(app: >k::Application) { let timeout_id = glib::timeout_add_local(std::time::Duration::from_millis(100), move || { let video_sink = match video_sink_weak.upgrade() { Some(video_sink) => video_sink, - None => return glib::Continue(true), + None => return glib::ControlFlow::Continue, }; let position = video_sink @@ -118,7 +118,7 @@ fn create_ui(app: >k::Application) { .unwrap_or(gst::ClockTime::ZERO); position_label.set_text(&format!("Position: {position:.1}")); - glib::Continue(true) + glib::ControlFlow::Continue }); let video_src_pad_weak = video_src_pad.downgrade(); @@ -160,7 +160,7 @@ fn create_ui(app: >k::Application) { let app = match app_weak.upgrade() { Some(app) => app, - None => return glib::Continue(false), + None => return glib::ControlFlow::Break, }; match msg.view() { @@ -177,7 +177,7 @@ fn create_ui(app: >k::Application) { _ => (), }; - glib::Continue(true) + glib::ControlFlow::Continue }) .expect("Failed to add bus watch"); diff --git a/utils/livesync/examples/gtk_livesync.rs b/utils/livesync/examples/gtk_livesync.rs index 19836cd3..40e09cf6 100644 --- a/utils/livesync/examples/gtk_livesync.rs +++ b/utils/livesync/examples/gtk_livesync.rs @@ -134,7 +134,7 @@ fn create_window(app: >k::Application) { _ => (), }; - glib::Continue(true) + glib::ControlFlow::Continue }) .unwrap() }; diff --git a/utils/togglerecord/examples/gtk_recording.rs b/utils/togglerecord/examples/gtk_recording.rs index 272a2d37..5b2a8d88 100644 --- a/utils/togglerecord/examples/gtk_recording.rs +++ b/utils/togglerecord/examples/gtk_recording.rs @@ -221,12 +221,12 @@ fn create_ui(app: >k::Application) { let timeout_id = glib::timeout_add_local(std::time::Duration::from_millis(100), move || { let video_sink = match video_sink_weak.upgrade() { Some(video_sink) => video_sink, - None => return glib::Continue(true), + None => return glib::ControlFlow::Continue, }; let togglerecord = match togglerecord_weak.upgrade() { Some(togglerecord) => togglerecord, - None => return glib::Continue(true), + None => return glib::ControlFlow::Continue, }; let position = video_sink @@ -241,7 +241,7 @@ fn create_ui(app: >k::Application) { .unwrap_or(gst::ClockTime::ZERO); recorded_duration_label.set_text(&format!("Recorded: {recording_duration:.1}")); - glib::Continue(true) + glib::ControlFlow::Continue }); let togglerecord_weak = togglerecord.downgrade(); @@ -290,7 +290,7 @@ fn create_ui(app: >k::Application) { let app = match app_weak.upgrade() { Some(app) => app, - None => return glib::Continue(false), + None => return glib::ControlFlow::Break, }; match msg.view() { @@ -307,7 +307,7 @@ fn create_ui(app: >k::Application) { _ => (), }; - glib::Continue(true) + glib::ControlFlow::Continue }) .expect("Failed to add bus watch"); diff --git a/utils/togglerecord/src/togglerecord/imp.rs b/utils/togglerecord/src/togglerecord/imp.rs index 9b66cc15..adbed4b2 100644 --- a/utils/togglerecord/src/togglerecord/imp.rs +++ b/utils/togglerecord/src/togglerecord/imp.rs @@ -856,13 +856,13 @@ impl ToggleRecord { // Otherwise if we're before the recording start but the end of the buffer is after // the start and we can clip, clip the buffer and pass it onwards. gst::debug!( - CAT, - obj: pad, - "Main stream EOS and we're not EOS yet (overlapping recording start, {} < {} < {})", - current_running_time.display(), - last_recording_start, - current_running_time_end.display(), - ); + CAT, + obj: pad, + "Main stream EOS and we're not EOS yet (overlapping recording start, {} < {} < {})", + current_running_time.display(), + last_recording_start, + current_running_time_end.display(), + ); let mut clip_start = state .in_segment @@ -914,13 +914,13 @@ impl ToggleRecord { // Similarly if the end is after the recording stop but the start is before and we // can clip, clip the buffer and pass it through. gst::debug!( - CAT, - obj: pad, - "Main stream EOS and we're not EOS yet (overlapping recording end, {} < {} < {})", - current_running_time.display(), - rec_state.last_recording_stop.display(), - current_running_time_end.display(), - ); + CAT, + obj: pad, + "Main stream EOS and we're not EOS yet (overlapping recording end, {} < {} < {})", + current_running_time.display(), + rec_state.last_recording_stop.display(), + current_running_time_end.display(), + ); let mut clip_start = state .in_segment diff --git a/video/gtk4/examples/gtksink.rs b/video/gtk4/examples/gtksink.rs index 2346a8cd..aadc9205 100644 --- a/video/gtk4/examples/gtksink.rs +++ b/video/gtk4/examples/gtksink.rs @@ -77,12 +77,12 @@ fn create_ui(app: >k::Application) { let timeout_id = glib::timeout_add_local(std::time::Duration::from_millis(500), move || { let pipeline = match pipeline_weak.upgrade() { Some(pipeline) => pipeline, - None => return glib::Continue(true), + None => return glib::ControlFlow::Continue, }; let position = pipeline.query_position::(); label.set_text(&format!("Position: {:.0}", position.display())); - glib::Continue(true) + glib::ControlFlow::Continue }); let bus = pipeline.bus().unwrap(); @@ -98,7 +98,7 @@ fn create_ui(app: >k::Application) { let app = match app_weak.upgrade() { Some(app) => app, - None => return glib::Continue(false), + None => return glib::ControlFlow::Break, }; match msg.view() { @@ -115,7 +115,7 @@ fn create_ui(app: >k::Application) { _ => (), }; - glib::Continue(true) + glib::ControlFlow::Continue }) .expect("Failed to add bus watch"); diff --git a/video/gtk4/src/sink/imp.rs b/video/gtk4/src/sink/imp.rs index 4d66d4a4..b74b8d7e 100644 --- a/video/gtk4/src/sink/imp.rs +++ b/video/gtk4/src/sink/imp.rs @@ -452,11 +452,11 @@ impl PaintableSink { self.pending_frame.lock().unwrap().take() } - fn do_action(&self, action: SinkEvent) -> glib::Continue { + fn do_action(&self, action: SinkEvent) -> glib::ControlFlow { let paintable = self.paintable.lock().unwrap(); let paintable = match &*paintable { Some(paintable) => paintable, - None => return glib::Continue(false), + None => return glib::ControlFlow::Break, }; match action { @@ -468,7 +468,7 @@ impl PaintableSink { } } - glib::Continue(true) + glib::ControlFlow::Continue } fn configure_caps(&self) { @@ -519,7 +519,7 @@ impl PaintableSink { receiver.attach( Some(&glib::MainContext::default()), glib::clone!( - @weak self_ => @default-return glib::Continue(false), + @weak self_ => @default-return glib::ControlFlow::Break, move |action| self_.do_action(action) ), );