mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-03 02:52:32 +00:00
backend-rdp: allow to force compression off
By default the client communicates its preference with regards to compression to the server. However, some clients always use compression, which is not ideal for certain environments (e.g. low performance embedded devices in a local network with plenty of bandwidth). Allow to disable compression server-side which will override the clients request for compression. Signed-off-by: Stefan Agner <stefan@agner.ch>
This commit is contained in:
parent
d93c0f7059
commit
b0e16d4c53
|
@ -2508,6 +2508,7 @@ weston_rdp_backend_config_init(struct weston_rdp_backend_config *config)
|
|||
config->server_key = NULL;
|
||||
config->env_socket = 0;
|
||||
config->no_clients_resize = 0;
|
||||
config->force_no_compression = 0;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -2532,7 +2533,8 @@ load_rdp_backend(struct weston_compositor *c,
|
|||
{ WESTON_OPTION_BOOLEAN, "no-clients-resize", 0, &config.no_clients_resize },
|
||||
{ WESTON_OPTION_STRING, "rdp4-key", 0, &config.rdp_key },
|
||||
{ WESTON_OPTION_STRING, "rdp-tls-cert", 0, &config.server_cert },
|
||||
{ WESTON_OPTION_STRING, "rdp-tls-key", 0, &config.server_key }
|
||||
{ WESTON_OPTION_STRING, "rdp-tls-key", 0, &config.server_key },
|
||||
{ WESTON_OPTION_BOOLEAN, "force-no-compression", 0, &config.force_no_compression },
|
||||
};
|
||||
|
||||
parse_options(rdp_options, ARRAY_LENGTH(rdp_options), argc, argv);
|
||||
|
|
|
@ -65,6 +65,7 @@ struct weston_rdp_backend_config {
|
|||
char *server_key;
|
||||
int env_socket;
|
||||
int no_clients_resize;
|
||||
int force_no_compression;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -131,6 +131,7 @@ struct rdp_backend {
|
|||
char *rdp_key;
|
||||
int tls_enabled;
|
||||
int no_clients_resize;
|
||||
int force_no_compression;
|
||||
};
|
||||
|
||||
enum peer_item_flags {
|
||||
|
@ -971,6 +972,11 @@ xf_peer_activate(freerdp_peer* client)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if (b->force_no_compression && settings->CompressionEnabled) {
|
||||
weston_log("Forcing compression off\n");
|
||||
settings->CompressionEnabled = FALSE;
|
||||
}
|
||||
|
||||
if (output->base.width != (int)settings->DesktopWidth ||
|
||||
output->base.height != (int)settings->DesktopHeight)
|
||||
{
|
||||
|
@ -1364,6 +1370,7 @@ rdp_backend_create(struct weston_compositor *compositor,
|
|||
b->base.create_output = rdp_output_create;
|
||||
b->rdp_key = config->rdp_key ? strdup(config->rdp_key) : NULL;
|
||||
b->no_clients_resize = config->no_clients_resize;
|
||||
b->force_no_compression = config->force_no_compression;
|
||||
|
||||
compositor->backend = &b->base;
|
||||
|
||||
|
@ -1447,6 +1454,7 @@ config_init_to_defaults(struct weston_rdp_backend_config *config)
|
|||
config->server_key = NULL;
|
||||
config->env_socket = 0;
|
||||
config->no_clients_resize = 0;
|
||||
config->force_no_compression = 0;
|
||||
}
|
||||
|
||||
WL_EXPORT int
|
||||
|
|
Loading…
Reference in a new issue