mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 16:13:30 +00:00
made ffmpeg thread running with no window
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use arma_rs::Context;
|
||||
use lazy_static::lazy_static;
|
||||
use std::os::windows::process::CommandExt;
|
||||
use std::process::Command;
|
||||
use std::sync::mpsc::{self, Receiver, Sender};
|
||||
use std::sync::Mutex;
|
||||
@@ -9,6 +10,8 @@ lazy_static! {
|
||||
static ref STREAM_CTRL: Mutex<Option<Sender<()>>> = Mutex::new(None);
|
||||
}
|
||||
|
||||
const CREATE_NO_WINDOW: u32 = 0x08000000;
|
||||
|
||||
pub fn start_stream(
|
||||
ctx: Context,
|
||||
address: String,
|
||||
@@ -37,6 +40,7 @@ pub fn start_stream(
|
||||
"tcp",
|
||||
&rtsp_url_clone,
|
||||
])
|
||||
.creation_flags(CREATE_NO_WINDOW)
|
||||
.spawn()
|
||||
{
|
||||
Ok(child) => child,
|
||||
|
||||
Reference in New Issue
Block a user