hwcodec: check when server or each client starts

and refactor hwcodec::best()

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-07-08 18:18:58 +08:00
parent 1fecd7168a
commit 1b1f28b872
4 changed files with 69 additions and 83 deletions

View File

@@ -978,6 +978,10 @@ impl HwCodecConfig {
pub fn store(&self) {
Config::store_(self, "_hwcodec");
}
pub fn remove() {
std::fs::remove_file(Config::file_("_hwcodec")).ok();
}
}
#[cfg(test)]