GUACAMOLE-377: Control RemoteFX / GFX support with "enable-gfx" parameter.

This commit is contained in:
Michael Jumper 2021-09-02 17:31:30 -07:00
parent c469300941
commit c795bf9e4a
3 changed files with 37 additions and 10 deletions

View File

@ -197,7 +197,8 @@ BOOL rdp_freerdp_pre_connect(freerdp* instance) {
palette_cache_register_callbacks(instance->update);
/* Load "rdpgfx" plugin for Graphics Pipeline Extension */
guac_rdp_rdpgfx_load_plugin(context);
if (settings->enable_gfx)
guac_rdp_rdpgfx_load_plugin(context);
/* Load plugin providing Dynamic Virtual Channel support, if required */
if (instance->settings->SupportDynamicChannels &&

View File

@ -109,6 +109,7 @@ const char* GUAC_RDP_CLIENT_ARGS[] = {
"create-recording-path",
"resize-method",
"enable-audio-input",
"enable-gfx",
"enable-touch",
"read-only",
@ -539,6 +540,12 @@ enum RDP_ARGS_IDX {
*/
IDX_ENABLE_AUDIO_INPUT,
/**
* "true" if the RDP Graphics Pipeline Extension should be used, "false" or
* blank if traditional RDP graphics should be used instead.
*/
IDX_ENABLE_GFX,
/**
* "true" if multi-touch support should be enabled for the RDP connection,
* "false" or blank otherwise.
@ -1129,6 +1136,11 @@ guac_rdp_settings* guac_rdp_parse_args(guac_user* user,
settings->resize_method = GUAC_RESIZE_NONE;
}
/* RDP Graphics Pipeline enable/disable */
settings->enable_gfx =
guac_user_parse_args_boolean(user, GUAC_RDP_CLIENT_ARGS, argv,
IDX_ENABLE_GFX, 0);
/* Multi-touch input enable/disable */
settings->enable_touch =
guac_user_parse_args_boolean(user, GUAC_RDP_CLIENT_ARGS, argv,
@ -1397,16 +1409,25 @@ void guac_rdp_push_settings(guac_client* client,
/* Explicitly set flag value */
rdp_settings->PerformanceFlags = guac_rdp_get_performance_flags(guac_settings);
rdp_settings->SupportGraphicsPipeline = TRUE;
rdp_settings->RemoteFxCodec = TRUE;
/* Enable RemoteFX / Graphics Pipeline */
if (guac_settings->enable_gfx) {
/* Required for RemoteFX / Graphics Pipeline */
rdp_settings->FastPathOutput = TRUE;
rdp_settings->FrameMarkerCommandEnabled = TRUE;
rdp_settings->ColorDepth = 32;
rdp_settings->SoftwareGdi = TRUE;
/*rdp_settings->GfxH264 = TRUE;
rdp_settings->GfxAVC444 = TRUE;*/
rdp_settings->SupportGraphicsPipeline = TRUE;
rdp_settings->RemoteFxCodec = TRUE;
if (rdp_settings->ColorDepth != 32) {
guac_client_log(client, GUAC_LOG_WARNING, "Ignoring requested "
"color depth of %i bpp, as the RDP Graphics Pipeline "
"requires 32 bpp.", rdp_settings->ColorDepth);
}
/* Required for RemoteFX / Graphics Pipeline */
rdp_settings->FastPathOutput = TRUE;
rdp_settings->FrameMarkerCommandEnabled = TRUE;
rdp_settings->ColorDepth = 32;
rdp_settings->SoftwareGdi = TRUE;
}
/* Set individual flags - some FreeRDP versions overwrite the above */
rdp_settings->AllowFontSmoothing = guac_settings->font_smoothing_enabled;

View File

@ -552,6 +552,11 @@ typedef struct guac_rdp_settings {
*/
int enable_audio_input;
/**
* Whether the RDP Graphics Pipeline Extension is enabled.
*/
int enable_gfx;
/**
* Whether multi-touch support is enabled.
*/