mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Merge pull request #982 from twmsh/master
update bytes(protobuf types) mapping, from Vec<u8> to bytes:Byte
This commit is contained in:
@@ -367,7 +367,7 @@ fn send_f32(data: &[f32], encoder: &mut Encoder, sp: &GenericService) {
|
||||
Ok(data) => {
|
||||
let mut msg_out = Message::new();
|
||||
msg_out.set_audio_frame(AudioFrame {
|
||||
data,
|
||||
data: data.into(),
|
||||
timestamp: crate::common::get_time(),
|
||||
..Default::default()
|
||||
});
|
||||
|
||||
@@ -1459,7 +1459,7 @@ async fn start_ipc(
|
||||
file_num,
|
||||
data,
|
||||
compressed}) = data {
|
||||
stream.send(&Data::FS(ipc::FS::WriteBlock{id, file_num, data: Vec::new(), compressed})).await?;
|
||||
stream.send(&Data::FS(ipc::FS::WriteBlock{id, file_num, data: Bytes::new(), compressed})).await?;
|
||||
stream.send_raw(data).await?;
|
||||
} else {
|
||||
stream.send(&data).await?;
|
||||
|
||||
@@ -145,7 +145,7 @@ fn run_cursor(sp: MouseCursorService, state: &mut StateCursor) -> ResultType<()>
|
||||
msg = cached.clone();
|
||||
} else {
|
||||
let mut data = crate::get_cursor_data(hcursor)?;
|
||||
data.colors = hbb_common::compress::compress(&data.colors[..], COMPRESS_LEVEL);
|
||||
data.colors = hbb_common::compress::compress(&data.colors[..], COMPRESS_LEVEL).into();
|
||||
let mut tmp = Message::new();
|
||||
tmp.set_cursor_data(data);
|
||||
msg = Arc::new(tmp);
|
||||
|
||||
Reference in New Issue
Block a user