mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-25 22:21:01 +03:00
view camera (#11040)
* view camera Signed-off-by: 21pages <sunboeasy@gmail.com> * `No cameras` prompt if no cameras available, `peerGetSessionsCount` use connType as parameter Signed-off-by: 21pages <sunboeasy@gmail.com> * fix, use video_service_name rather than display_idx as key in qos,etc Signed-off-by: 21pages <sunboeasy@gmail.com> --------- Signed-off-by: 21pages <sunboeasy@gmail.com> Co-authored-by: Adwin White <adwinw01@gmail.com> Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
This commit is contained in:
@@ -47,6 +47,7 @@ pub struct Client {
|
||||
pub authorized: bool,
|
||||
pub disconnected: bool,
|
||||
pub is_file_transfer: bool,
|
||||
pub is_view_camera: bool,
|
||||
pub port_forward: String,
|
||||
pub name: String,
|
||||
pub peer_id: String,
|
||||
@@ -128,6 +129,7 @@ impl<T: InvokeUiCM> ConnectionManager<T> {
|
||||
&self,
|
||||
id: i32,
|
||||
is_file_transfer: bool,
|
||||
is_view_camera: bool,
|
||||
port_forward: String,
|
||||
peer_id: String,
|
||||
name: String,
|
||||
@@ -147,6 +149,7 @@ impl<T: InvokeUiCM> ConnectionManager<T> {
|
||||
authorized,
|
||||
disconnected: false,
|
||||
is_file_transfer,
|
||||
is_view_camera,
|
||||
port_forward,
|
||||
name: name.clone(),
|
||||
peer_id: peer_id.clone(),
|
||||
@@ -402,9 +405,9 @@ impl<T: InvokeUiCM> IpcTaskRunner<T> {
|
||||
}
|
||||
Ok(Some(data)) => {
|
||||
match data {
|
||||
Data::Login{id, is_file_transfer, port_forward, peer_id, name, authorized, keyboard, clipboard, audio, file, file_transfer_enabled: _file_transfer_enabled, restart, recording, block_input, from_switch} => {
|
||||
Data::Login{id, is_file_transfer, is_view_camera, port_forward, peer_id, name, authorized, keyboard, clipboard, audio, file, file_transfer_enabled: _file_transfer_enabled, restart, recording, block_input, from_switch} => {
|
||||
log::debug!("conn_id: {}", id);
|
||||
self.cm.add_connection(id, is_file_transfer, port_forward, peer_id, name, authorized, keyboard, clipboard, audio, file, restart, recording, block_input, from_switch, self.tx.clone());
|
||||
self.cm.add_connection(id, is_file_transfer, is_view_camera, port_forward, peer_id, name, authorized, keyboard, clipboard, audio, file, restart, recording, block_input, from_switch, self.tx.clone());
|
||||
self.conn_id = id;
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
@@ -672,6 +675,7 @@ pub async fn start_listen<T: InvokeUiCM>(
|
||||
Some(Data::Login {
|
||||
id,
|
||||
is_file_transfer,
|
||||
is_view_camera,
|
||||
port_forward,
|
||||
peer_id,
|
||||
name,
|
||||
@@ -690,6 +694,7 @@ pub async fn start_listen<T: InvokeUiCM>(
|
||||
cm.add_connection(
|
||||
id,
|
||||
is_file_transfer,
|
||||
is_view_camera,
|
||||
port_forward,
|
||||
peer_id,
|
||||
name,
|
||||
|
||||
Reference in New Issue
Block a user