mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-29 04:51:09 +00:00
Make use of Bus::add_watch_local()
This commit is contained in:
parent
e6992345cc
commit
f2d79fb352
2 changed files with 4 additions and 4 deletions
|
@ -112,8 +112,8 @@ fn create_ui(app: >k::Application) {
|
||||||
.set_state(gst::State::Playing)
|
.set_state(gst::State::Playing)
|
||||||
.expect("Unable to set the pipeline to the `Playing` state");
|
.expect("Unable to set the pipeline to the `Playing` state");
|
||||||
|
|
||||||
let app_weak = glib::SendWeakRef::from(app.downgrade());
|
let app_weak = app.downgrade();
|
||||||
bus.add_watch(move |_, msg| {
|
bus.add_watch_local(move |_, msg| {
|
||||||
use gst::MessageView;
|
use gst::MessageView;
|
||||||
|
|
||||||
let app = match app_weak.upgrade() {
|
let app = match app_weak.upgrade() {
|
||||||
|
|
|
@ -215,8 +215,8 @@ fn create_ui(app: >k::Application) {
|
||||||
.set_state(gst::State::Playing)
|
.set_state(gst::State::Playing)
|
||||||
.expect("Unable to set the pipeline to the `Playing` state");
|
.expect("Unable to set the pipeline to the `Playing` state");
|
||||||
|
|
||||||
let app_weak = glib::SendWeakRef::from(app.downgrade());
|
let app_weak = app.downgrade();
|
||||||
bus.add_watch(move |_, msg| {
|
bus.add_watch_local(move |_, msg| {
|
||||||
use gst::MessageView;
|
use gst::MessageView;
|
||||||
|
|
||||||
let app = match app_weak.upgrade() {
|
let app = match app_weak.upgrade() {
|
||||||
|
|
Loading…
Reference in a new issue