rdp: Allow disabling RemoteFX codec
There are currently compatibility issues between FreeRDP's implementation of the RemoteFX codec and Microsoft's implementation. Perhaps this will be fixed in the future and this option can go away, but for now it's necessary to have a way to disable the codec if the windows client is going to be connecting to a weston server. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
4887f1a7aa
commit
04e0558327
@ -2774,6 +2774,7 @@ weston_rdp_backend_config_init(struct weston_rdp_backend_config *config)
|
||||
config->env_socket = 0;
|
||||
config->no_clients_resize = 0;
|
||||
config->force_no_compression = 0;
|
||||
config->remotefx_codec = true;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -2782,6 +2783,7 @@ load_rdp_backend(struct weston_compositor *c,
|
||||
{
|
||||
struct weston_rdp_backend_config config = {{ 0, }};
|
||||
int ret = 0;
|
||||
bool no_remotefx_codec = false;
|
||||
|
||||
struct wet_output_config *parsed_options = wet_init_parsed_options(c);
|
||||
if (!parsed_options)
|
||||
@ -2800,9 +2802,11 @@ load_rdp_backend(struct weston_compositor *c,
|
||||
{ WESTON_OPTION_STRING, "rdp-tls-cert", 0, &config.server_cert },
|
||||
{ WESTON_OPTION_STRING, "rdp-tls-key", 0, &config.server_key },
|
||||
{ WESTON_OPTION_BOOLEAN, "force-no-compression", 0, &config.force_no_compression },
|
||||
{ WESTON_OPTION_BOOLEAN, "no-remotefx-codec", 0, &no_remotefx_codec },
|
||||
};
|
||||
|
||||
parse_options(rdp_options, ARRAY_LENGTH(rdp_options), argc, argv);
|
||||
config.remotefx_codec = !no_remotefx_codec;
|
||||
|
||||
wet_set_simple_head_configurator(c, rdp_backend_output_configure);
|
||||
|
||||
|
@ -66,6 +66,7 @@ struct weston_rdp_backend_config {
|
||||
int env_socket;
|
||||
int no_clients_resize;
|
||||
int force_no_compression;
|
||||
bool remotefx_codec;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -1141,7 +1141,7 @@ rdp_peer_init(freerdp_peer *client, struct rdp_backend *b)
|
||||
settings->OsMinorType = OSMINORTYPE_PSEUDO_XSERVER;
|
||||
settings->ColorDepth = 32;
|
||||
settings->RefreshRect = TRUE;
|
||||
settings->RemoteFxCodec = TRUE;
|
||||
settings->RemoteFxCodec = b->remotefx_codec;
|
||||
settings->NSCodec = TRUE;
|
||||
settings->FrameMarkerCommandEnabled = TRUE;
|
||||
settings->SurfaceFrameMarkerEnabled = TRUE;
|
||||
@ -1220,6 +1220,7 @@ rdp_backend_create(struct weston_compositor *compositor,
|
||||
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;
|
||||
b->remotefx_codec = config->remotefx_codec;
|
||||
|
||||
compositor->backend = &b->base;
|
||||
|
||||
@ -1308,6 +1309,7 @@ config_init_to_defaults(struct weston_rdp_backend_config *config)
|
||||
config->env_socket = 0;
|
||||
config->no_clients_resize = 0;
|
||||
config->force_no_compression = 0;
|
||||
config->remotefx_codec = true;
|
||||
}
|
||||
|
||||
WL_EXPORT int
|
||||
|
@ -67,6 +67,7 @@ struct rdp_backend {
|
||||
int tls_enabled;
|
||||
int no_clients_resize;
|
||||
int force_no_compression;
|
||||
bool remotefx_codec;
|
||||
};
|
||||
|
||||
enum peer_item_flags {
|
||||
|
@ -43,6 +43,11 @@ By default when a client connects on the RDP backend, it will instruct weston to
|
||||
resize to the dimensions of the client's announced resolution. When this option is
|
||||
set, weston will force the client to resize to its own resolution.
|
||||
.TP
|
||||
\fB\-\-no-remotefx-codec
|
||||
The RemoteFX compression codec is enabled by default, but it may be necessary
|
||||
to disable it to work around incompatabilities between implementations. This
|
||||
option may be removed in the future when all known issues are resolved.
|
||||
.TP
|
||||
\fB\-\-rdp4\-key\fR=\fIfile\fR
|
||||
The file containing the RSA key for doing RDP security. As RDP security is known
|
||||
to be insecure, this option should be avoided in production.
|
||||
|
Loading…
x
Reference in New Issue
Block a user