ffplayout/src/main.rs

34 lines
685 B
Rust
Raw Normal View History

extern crate log;
extern crate simplelog;
use std::sync::{Arc, Mutex};
2022-02-20 22:08:17 +01:00
mod filter;
mod input;
mod output;
2022-02-12 22:32:51 +01:00
mod utils;
use simplelog::*;
use tokio::runtime::Builder;
use crate::output::play;
2022-03-24 17:21:38 +01:00
use crate::utils::{init_config, init_logging, validate_ffmpeg};
2022-02-12 22:32:51 +01:00
fn main() {
2022-03-13 22:18:53 +01:00
init_config();
let runtime = Builder::new_multi_thread()
.enable_all()
.build()
.unwrap();
let rt_handle = runtime.handle();
let is_terminated: Arc<Mutex<bool>> = Arc::new(Mutex::new(false));
let logging = init_logging(rt_handle.clone(), is_terminated.clone());
CombinedLogger::init(logging).unwrap();
2022-02-23 18:06:40 +01:00
2022-03-24 17:21:38 +01:00
validate_ffmpeg();
play(rt_handle, is_terminated);
2022-02-12 22:32:51 +01:00
}