mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-01 01:29:02 +08:00
change codec cpu usage to 0
This commit is contained in:
parent
885d8a4586
commit
8d90c5a93b
@ -582,7 +582,7 @@ pub struct VideoHandler {
|
||||
impl VideoHandler {
|
||||
pub fn new() -> Self {
|
||||
VideoHandler {
|
||||
decoder: Decoder::new(VideoCodecId::VP9, 1).unwrap(),
|
||||
decoder: Decoder::new(VideoCodecId::VP9, 0).unwrap(),
|
||||
rgb: Default::default(),
|
||||
}
|
||||
}
|
||||
|
@ -188,11 +188,7 @@ fn run(sp: GenericService) -> ResultType<()> {
|
||||
speed,
|
||||
};
|
||||
let mut vpx;
|
||||
let mut n = ((width * height) as f64 / (1920 * 1080) as f64).round() as u32;
|
||||
if n < 1 {
|
||||
n = 1;
|
||||
}
|
||||
match Encoder::new(&cfg, n) {
|
||||
match Encoder::new(&cfg, 0) {
|
||||
Ok(x) => vpx = x,
|
||||
Err(err) => bail!("Failed to create encoder: {}", err),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user