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:
21pages
2025-03-10 21:06:53 +08:00
committed by GitHub
parent df4a101316
commit f0f999dc27
96 changed files with 3999 additions and 458 deletions

View File

@@ -1149,8 +1149,14 @@ pub fn session_add_existed(
peer_id: String,
session_id: SessionID,
displays: Vec<i32>,
is_view_camera: bool,
) -> ResultType<()> {
sessions::insert_peer_session_id(peer_id, ConnType::DEFAULT_CONN, session_id, displays);
let conn_type = if is_view_camera {
ConnType::VIEW_CAMERA
} else {
ConnType::DEFAULT_CONN
};
sessions::insert_peer_session_id(peer_id, conn_type, session_id, displays);
Ok(())
}
@@ -1160,11 +1166,13 @@ pub fn session_add_existed(
///
/// * `id` - The identifier of the remote session with prefix. Regex: [\w]*[\_]*[\d]+
/// * `is_file_transfer` - If the session is used for file transfer.
/// * `is_view_camera` - If the session is used for view camera.
/// * `is_port_forward` - If the session is used for port forward.
pub fn session_add(
session_id: &SessionID,
id: &str,
is_file_transfer: bool,
is_view_camera: bool,
is_port_forward: bool,
is_rdp: bool,
switch_uuid: &str,
@@ -1175,6 +1183,8 @@ pub fn session_add(
) -> ResultType<FlutterSession> {
let conn_type = if is_file_transfer {
ConnType::FILE_TRANSFER
} else if is_view_camera {
ConnType::VIEW_CAMERA
} else if is_port_forward {
if is_rdp {
ConnType::RDP