[feat] allocate DeskHub video bandwidth automatically

This commit is contained in:
dijunkun
2026-10-13 15:39:50 +08:00
parent de16eb3b92
commit 4dfd8c3005
13 changed files with 270 additions and 43 deletions
+5 -1
View File
@@ -29,6 +29,7 @@ void ResetHostInfo(HostInfo& info) {
info.supports_deskhub_preview = false;
info.supports_deskhub_resolution = false;
info.supports_deskhub_fps15 = false;
info.supports_deskhub_bandwidth = false;
}
bool AllocateHostDisplays(HostInfo& info, std::size_t count) {
@@ -225,7 +226,8 @@ std::string RemoteAction::ToJson(const RemoteAction& action) {
{"supports_video_settings", action.i.supports_video_settings},
{"supports_deskhub_preview", action.i.supports_deskhub_preview},
{"supports_deskhub_resolution", action.i.supports_deskhub_resolution},
{"supports_deskhub_fps15", action.i.supports_deskhub_fps15}};
{"supports_deskhub_fps15", action.i.supports_deskhub_fps15},
{"supports_deskhub_bandwidth", action.i.supports_deskhub_bandwidth}};
break;
}
case ControlType::invalid:
@@ -424,6 +426,8 @@ bool RemoteAction::FromJson(const std::string& json_string,
host_info_object.value("supports_deskhub_resolution", false);
output.i.supports_deskhub_fps15 =
host_info_object.value("supports_deskhub_fps15", false);
output.i.supports_deskhub_bandwidth =
host_info_object.value("supports_deskhub_bandwidth", false);
const std::string host_name =
host_info_object.at("host_name").get<std::string>();
std::strncpy(output.i.host_name, host_name.c_str(),