scrap: check hwconfig in another process

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-06-09 19:46:41 +08:00
parent feaadcfc96
commit 42c7c5982c
7 changed files with 141 additions and 36 deletions

View File

@@ -70,6 +70,15 @@ fn main() {
}
if args.is_empty() {
std::thread::spawn(move || start_server(false));
#[cfg(feature = "hwcodec")]
if let Ok(exe) = std::env::current_exe() {
std::thread::spawn(move || {
std::process::Command::new(exe)
.arg("--check-hwcodec-config")
.status()
.ok()
});
}
} else {
#[cfg(windows)]
{
@@ -104,6 +113,10 @@ fn main() {
"".to_owned()
));
return;
} else if args[0] == "--check-hwcodec-config" {
#[cfg(feature = "hwcodec")]
ipc::check_hwcodec_config();
return;
}
}
if args[0] == "--remove" {