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 /video | |
parent | 64151790d0a8b1d0594b6740ff43bf85504c32aa (diff) |
Adapt to glib::Continue rename
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1268>
Diffstat (limited to 'video')
-rw-r--r-- | video/gtk4/examples/gtksink.rs | 8 | ||||
-rw-r--r-- | video/gtk4/src/sink/imp.rs | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/video/gtk4/examples/gtksink.rs b/video/gtk4/examples/gtksink.rs index 2346a8cd3..aadc9205c 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::<gst::ClockTime>(); 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 4d66d4a47..b74b8d7e5 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) ), ); |