diff --git a/examples/src/bin/gtksink.rs b/examples/src/bin/gtksink.rs index f2c6ffc23..36414b2df 100644 --- a/examples/src/bin/gtksink.rs +++ b/examples/src/bin/gtksink.rs @@ -84,7 +84,7 @@ fn create_ui(app: >k::Application) { // the underlying pipeline, and display it in our gui. // Since this closure is called by the mainloop thread, we are allowed // to modify the gui widgets here. - let timeout_id = gtk::timeout_add(500, move || { + let timeout_id = glib::timeout_add_local(500, move || { // Here we temporarily retrieve a strong reference on the pipeline from the weak one // we moved into this callback. let pipeline = match pipeline_weak.upgrade() { diff --git a/examples/src/bin/gtkvideooverlay.rs b/examples/src/bin/gtkvideooverlay.rs index 395f1b8e8..e42936d14 100644 --- a/examples/src/bin/gtkvideooverlay.rs +++ b/examples/src/bin/gtkvideooverlay.rs @@ -195,7 +195,7 @@ fn create_ui(app: >k::Application) { // the underlying pipeline, and display it in our gui. // Since this closure is called by the mainloop thread, we are allowed // to modify the gui widgets here. - let timeout_id = gtk::timeout_add(500, move || { + let timeout_id = glib::timeout_add_local(500, move || { // Here we temporarily retrieve a strong reference on the pipeline from the weak one // we moved into this callback. let pipeline = match pipeline_weak.upgrade() { diff --git a/tutorials/src/bin/basic-tutorial-5.rs b/tutorials/src/bin/basic-tutorial-5.rs index 5595b883b..812d79bfa 100644 --- a/tutorials/src/bin/basic-tutorial-5.rs +++ b/tutorials/src/bin/basic-tutorial-5.rs @@ -167,7 +167,7 @@ mod tutorial5 { let pipeline = playbin.clone(); let lslider = slider.clone(); // Update the UI (seekbar) every second - let timeout_id = gtk::timeout_add_seconds(1, move || { + let timeout_id = glib::timeout_add_seconds_local(1, move || { let pipeline = &pipeline; let lslider = &lslider;