diff --git a/examples/src/bin/events.rs b/examples/src/bin/events.rs index 9d901e097..0f8b0c979 100644 --- a/examples/src/bin/events.rs +++ b/examples/src/bin/events.rs @@ -81,7 +81,7 @@ fn example_main() { }); //bus.add_signal_watch(); - //bus.connect_message(move |_, msg| { + //bus.connect_message(None, move |_, msg| { let main_loop_clone = main_loop.clone(); // This sets the bus's signal handler (don't be mislead by the "add", there can only be one). // Every message from the bus is passed through this function. Its returnvalue determines diff --git a/examples/src/bin/launch_glib_main.rs b/examples/src/bin/launch_glib_main.rs index 149333b4f..133a1edaf 100644 --- a/examples/src/bin/launch_glib_main.rs +++ b/examples/src/bin/launch_glib_main.rs @@ -34,7 +34,7 @@ fn example_main() { let main_loop_clone = main_loop.clone(); //bus.add_signal_watch(); - //bus.connect_message(move |_, msg| { + //bus.connect_message(None, move |_, msg| { bus.add_watch(move |_, msg| { use gst::MessageView; diff --git a/examples/src/bin/queries.rs b/examples/src/bin/queries.rs index 24308167c..e83a93ab3 100644 --- a/examples/src/bin/queries.rs +++ b/examples/src/bin/queries.rs @@ -94,7 +94,7 @@ fn example_main() { // Need to move a new reference into the closure. let main_loop_clone = main_loop.clone(); //bus.add_signal_watch(); - //bus.connect_message(move |_, msg| { + //bus.connect_message(None, move |_, msg| { bus.add_watch(move |_, msg| { use gst::MessageView; diff --git a/tutorials/src/bin/basic-tutorial-5.rs b/tutorials/src/bin/basic-tutorial-5.rs index 1decd3343..1970f4d94 100644 --- a/tutorials/src/bin/basic-tutorial-5.rs +++ b/tutorials/src/bin/basic-tutorial-5.rs @@ -247,7 +247,7 @@ mod tutorial5 { let bus = playbin.get_bus().unwrap(); #[allow(clippy::single_match)] - bus.connect_message(move |_, msg| match msg.view() { + bus.connect_message(Some("application"), move |_, msg| match msg.view() { gst::MessageView::Application(application) => { let pipeline = match pipeline_weak.upgrade() { Some(pipeline) => pipeline, @@ -266,7 +266,7 @@ mod tutorial5 { analyze_streams(&pipeline, &textbuf); } } - _ => (), + _ => unreachable!(), }); let vbox = gtk::Box::new(gtk::Orientation::Horizontal, 0); @@ -364,7 +364,7 @@ mod tutorial5 { bus.add_signal_watch(); let pipeline_weak = playbin.downgrade(); - bus.connect_message(move |_, msg| { + bus.connect_message(None, move |_, msg| { let pipeline = match pipeline_weak.upgrade() { Some(pipeline) => pipeline, None => return, diff --git a/tutorials/src/bin/basic-tutorial-8.rs b/tutorials/src/bin/basic-tutorial-8.rs index 771090e80..fdd73d508 100644 --- a/tutorials/src/bin/basic-tutorial-8.rs +++ b/tutorials/src/bin/basic-tutorial-8.rs @@ -240,7 +240,7 @@ fn main() { let main_loop_clone = main_loop.clone(); let bus = pipeline.get_bus().unwrap(); #[allow(clippy::single_match)] - bus.connect_message(move |_, msg| match msg.view() { + bus.connect_message(Some("error"), move |_, msg| match msg.view() { gst::MessageView::Error(err) => { let main_loop = &main_loop_clone; eprintln!( @@ -251,7 +251,7 @@ fn main() { eprintln!("Debugging information: {:?}", err.get_debug()); main_loop.quit(); } - _ => (), + _ => unreachable!(), }); bus.add_signal_watch();