mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-27 23:19:02 +08:00
abr update Windows
This commit is contained in:
parent
83e5028cc9
commit
21a90c5de8
@ -471,7 +471,7 @@ message OptionMessage {
|
||||
BoolOption show_remote_cursor = 3;
|
||||
BoolOption privacy_mode = 4;
|
||||
BoolOption block_input = 5;
|
||||
uint32 custom_image_quality = 6;
|
||||
int32 custom_image_quality = 6;
|
||||
BoolOption disable_audio = 7;
|
||||
BoolOption disable_clipboard = 8;
|
||||
BoolOption enable_file_transfer = 9;
|
||||
|
@ -1,5 +1,6 @@
|
||||
use crate::dxgi;
|
||||
use std::io::ErrorKind::{NotFound, TimedOut, WouldBlock};
|
||||
use std::time::Duration;
|
||||
use std::{io, ops};
|
||||
|
||||
pub struct Capturer {
|
||||
@ -40,8 +41,8 @@ impl Capturer {
|
||||
self.height
|
||||
}
|
||||
|
||||
pub fn frame<'a>(&'a mut self, timeout_ms: u32) -> io::Result<Frame<'a>> {
|
||||
match self.inner.frame(timeout_ms) {
|
||||
pub fn frame<'a>(&'a mut self, timeout_ms: Duration) -> io::Result<Frame<'a>> {
|
||||
match self.inner.frame(timeout_ms.as_millis() as _) {
|
||||
Ok(frame) => Ok(Frame(frame)),
|
||||
Err(ref error) if error.kind() == TimedOut => Err(WouldBlock.into()),
|
||||
Err(error) => Err(error),
|
||||
@ -135,7 +136,7 @@ impl CapturerMag {
|
||||
pub fn get_rect(&self) -> ((i32, i32), usize, usize) {
|
||||
self.inner.get_rect()
|
||||
}
|
||||
pub fn frame<'a>(&'a mut self, _timeout_ms: u32) -> io::Result<Frame<'a>> {
|
||||
pub fn frame<'a>(&'a mut self, _timeout_ms: Duration) -> io::Result<Frame<'a>> {
|
||||
self.inner.frame(&mut self.data)?;
|
||||
Ok(Frame(&self.data))
|
||||
}
|
||||
|
@ -140,6 +140,10 @@ impl EncoderApi for HwEncoder {
|
||||
fn use_yuv(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
fn set_bitrate(&mut self, bitrate: u32) -> ResultType<()> {
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
impl HwEncoder {
|
||||
|
@ -1005,7 +1005,7 @@ impl LoginConfigHandler {
|
||||
msg_out
|
||||
}
|
||||
|
||||
pub fn save_custom_image_quality(&mut self, custom_image_quality: u32) -> Message {
|
||||
pub fn save_custom_image_quality(&mut self, custom_image_quality: i32) -> Message {
|
||||
let mut misc = Misc::new();
|
||||
misc.set_option(OptionMessage {
|
||||
custom_image_quality,
|
||||
|
@ -1117,7 +1117,7 @@ impl Connection {
|
||||
let mut image_quality = None;
|
||||
if let ImageQuality::NotSet = q {
|
||||
if o.custom_image_quality > 0 {
|
||||
image_quality = Some(o.custom_image_quality);
|
||||
image_quality = Some(o.custom_image_quality as _);
|
||||
}
|
||||
} else {
|
||||
image_quality = Some(q.value() as _)
|
||||
|
@ -385,7 +385,7 @@ impl TraitCapturer for Capturer {
|
||||
|
||||
#[cfg(windows)]
|
||||
impl TraitCapturer for scrap::CapturerMag {
|
||||
fn frame<'a>(&'a mut self, _timeout_ms: u32) -> Result<Frame<'a>> {
|
||||
fn frame<'a>(&'a mut self, _timeout_ms: Duration) -> Result<Frame<'a>> {
|
||||
self.frame(_timeout_ms)
|
||||
}
|
||||
|
||||
|
@ -569,7 +569,7 @@ impl Handler {
|
||||
.lc
|
||||
.write()
|
||||
.unwrap()
|
||||
.save_custom_image_quality(custom_image_quality as u32);
|
||||
.save_custom_image_quality(custom_image_quality);
|
||||
self.send(Data::Message(msg));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user