diff options
author | Bilal Elmoussaoui <belmouss@redhat.com> | 2023-07-06 16:27:28 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2023-07-06 17:50:49 +0300 |
commit | 2cc98bf410f687a1779edb86dd259f377cca1c7b (patch) | |
tree | df2485024782e1ad972415a5ae43d807132fa8fe /utils/togglerecord | |
parent | 64151790d0a8b1d0594b6740ff43bf85504c32aa (diff) |
Adapt to glib::Continue rename
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1268>
Diffstat (limited to 'utils/togglerecord')
-rw-r--r-- | utils/togglerecord/examples/gtk_recording.rs | 10 | ||||
-rw-r--r-- | utils/togglerecord/src/togglerecord/imp.rs | 28 |
2 files changed, 19 insertions, 19 deletions
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 |