Add Examples #1

Merged
rafaelcaricio merged 6 commits from dtmf-example into main 2023-03-26 20:38:45 +00:00
2 changed files with 3 additions and 1101 deletions
Showing only changes of commit c189d88fdb - Show all commits

1099
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -4,7 +4,7 @@ use anyhow::Result;
use gst::glib;
use gst::glib::once_cell::sync::Lazy;
use gst::prelude::*;
use std::{process, thread};
use std::thread;
use tokio::runtime::Builder;
static CAT: Lazy<gst::DebugCategory> = Lazy::new(|| {
@ -68,10 +68,11 @@ fn main() -> Result<()> {
ctrlc::set_handler({
let pipeline_weak = pipeline.downgrade();
let main_loop = main_loop.clone();
move || {
let pipeline = pipeline_weak.upgrade().unwrap();
pipeline.set_state(gst::State::Null).unwrap();
process::exit(0);
Review

This was really bad and not necessary. 🤡

This was really bad and not necessary. 🤡
main_loop.quit();
}
})?;