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