mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2025-04-26 04:37:50 +00:00
examples: Update for glib API changes
Timeouts now use std::time::Duration instead of plain integers.
This commit is contained in:
parent
a540274c72
commit
da4efdfa90
2 changed files with 2 additions and 2 deletions
|
@ -84,7 +84,7 @@ fn create_ui(app: >k::Application) {
|
||||||
// the underlying pipeline, and display it in our gui.
|
// the underlying pipeline, and display it in our gui.
|
||||||
// Since this closure is called by the mainloop thread, we are allowed
|
// Since this closure is called by the mainloop thread, we are allowed
|
||||||
// to modify the gui widgets here.
|
// to modify the gui widgets here.
|
||||||
let timeout_id = glib::timeout_add_local(500, move || {
|
let timeout_id = glib::timeout_add_local(std::time::Duration::from_millis(500), move || {
|
||||||
// Here we temporarily retrieve a strong reference on the pipeline from the weak one
|
// Here we temporarily retrieve a strong reference on the pipeline from the weak one
|
||||||
// we moved into this callback.
|
// we moved into this callback.
|
||||||
let pipeline = match pipeline_weak.upgrade() {
|
let pipeline = match pipeline_weak.upgrade() {
|
||||||
|
|
|
@ -195,7 +195,7 @@ fn create_ui(app: >k::Application) {
|
||||||
// the underlying pipeline, and display it in our gui.
|
// the underlying pipeline, and display it in our gui.
|
||||||
// Since this closure is called by the mainloop thread, we are allowed
|
// Since this closure is called by the mainloop thread, we are allowed
|
||||||
// to modify the gui widgets here.
|
// to modify the gui widgets here.
|
||||||
let timeout_id = glib::timeout_add_local(500, move || {
|
let timeout_id = glib::timeout_add_local(std::time::Duration::from_millis(500), move || {
|
||||||
// Here we temporarily retrieve a strong reference on the pipeline from the weak one
|
// Here we temporarily retrieve a strong reference on the pipeline from the weak one
|
||||||
// we moved into this callback.
|
// we moved into this callback.
|
||||||
let pipeline = match pipeline_weak.upgrade() {
|
let pipeline = match pipeline_weak.upgrade() {
|
||||||
|
|
Loading…
Reference in a new issue