examples: Update for gio::Application::run() API simplification

This commit is contained in:
Sebastian Dröge 2021-04-08 10:36:58 +03:00 committed by Sebastian Dröge
parent 3dda2aebe9
commit 2bd4fc4728
2 changed files with 2 additions and 6 deletions

View file

@ -22,7 +22,6 @@ use gst::prelude::*;
use gtk::prelude::*;
use std::cell::RefCell;
use std::env;
const MAIN_PIPELINE: &str = "videotestsrc is-live=true pattern=ball";
const FALLBACK_PIPELINE: &str = "videotestsrc is-live=true pattern=snow";
@ -224,6 +223,5 @@ fn main() {
let app = gtk::Application::new(None, gio::ApplicationFlags::FLAGS_NONE).unwrap();
app.connect_activate(create_ui);
let args = env::args().collect::<Vec<_>>();
app.run(&args);
app.run();
}

View file

@ -20,7 +20,6 @@ use gst::prelude::*;
use gio::prelude::*;
use gtk::prelude::*;
use std::cell::RefCell;
use std::env;
fn create_pipeline() -> (
gst::Pipeline,
@ -345,6 +344,5 @@ fn main() {
let app = gtk::Application::new(None, gio::ApplicationFlags::FLAGS_NONE).unwrap();
app.connect_activate(create_ui);
let args = env::args().collect::<Vec<_>>();
app.run(&args);
app.run();
}