From 72594c7e0e3baa8238d6568c455f3437eebe997c Mon Sep 17 00:00:00 2001 From: 21pages Date: Tue, 13 Dec 2022 21:30:08 +0800 Subject: [PATCH] remove hwcodec log Signed-off-by: 21pages --- libs/scrap/src/common/hwcodec.rs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/libs/scrap/src/common/hwcodec.rs b/libs/scrap/src/common/hwcodec.rs index 55c2309b5..c77da3f8f 100644 --- a/libs/scrap/src/common/hwcodec.rs +++ b/libs/scrap/src/common/hwcodec.rs @@ -190,28 +190,22 @@ impl HwDecoder { } pub fn new_decoders() -> HwDecoders { - flog("enter new_decoders"); let best = HwDecoder::best(); - flog(&format!("best:${:?}", best)); let mut h264: Option = None; let mut h265: Option = None; let mut fail = false; if let Some(info) = best.h264 { - flog(&format!("before new h264 codec")); h264 = HwDecoder::new(info).ok(); if h264.is_none() { fail = true; } - flog(&format!("new h264 codec result:{:}", h264.is_some())); } if let Some(info) = best.h265 { - flog(&format!("before new h265 codec")); h265 = HwDecoder::new(info).ok(); if h265.is_none() { fail = true; } - flog(&format!("new h265 codec result:{:}", h265.is_some())); } if fail { check_config_process(true); @@ -328,21 +322,11 @@ pub fn check_config_process(force_reset: bool) { } if let Ok(exe) = std::env::current_exe() { std::thread::spawn(move || { - let result = std::process::Command::new(exe) + std::process::Command::new(exe) .arg("--check-hwcodec-config") .status() .ok(); - flog(&format!("check codec process run result:{:?}", result)); HwCodecConfig::refresh(); }); }; } - -pub fn flog(s: &str) { - use hbb_common::chrono::prelude::*; - use std::io::Write; - let mut option = std::fs::OpenOptions::new(); - if let Ok(mut f) = option.append(true).create(true).open("/tmp/log.txt") { - write!(&mut f, "{:?} {}\n", Local::now(), s).ok(); - } -}