diff --git a/channels/rdpgfx/client/rdpgfx_main.c b/channels/rdpgfx/client/rdpgfx_main.c index 1ae288242..01e766f96 100644 --- a/channels/rdpgfx/client/rdpgfx_main.c +++ b/channels/rdpgfx/client/rdpgfx_main.c @@ -92,19 +92,22 @@ static UINT rdpgfx_send_caps_advertise_pdu(RDPGFX_CHANNEL_CALLBACK* callback) if (gfx->H264) capsSet->flags |= RDPGFX_CAPS_FLAG_AVC420_ENABLED; - capsSet = &capsSets[pdu.capsSetCount++]; - capsSet->version = RDPGFX_CAPVERSION_10; - capsSet->flags = 0; + if (gfx->AVC444) + { + capsSet = &capsSets[pdu.capsSetCount++]; + capsSet->version = RDPGFX_CAPVERSION_10; + capsSet->flags = 0; - if (gfx->SmallCache) - capsSet->flags |= RDPGFX_CAPS_FLAG_SMALL_CACHE; + if (gfx->SmallCache) + capsSet->flags |= RDPGFX_CAPS_FLAG_SMALL_CACHE; - if (!gfx->H264) - capsSet->flags |= RDPGFX_CAPS_FLAG_AVC_DISABLED; + if (!gfx->H264) + capsSet->flags |= RDPGFX_CAPS_FLAG_AVC_DISABLED; + } header.pduLength = RDPGFX_HEADER_SIZE + 2 + (pdu.capsSetCount * RDPGFX_CAPSET_SIZE); - WLog_DBG(TAG, "SendCapsAdvertisePdu"); + WLog_DBG(TAG, "SendCapsAdvertisePdu %d", pdu.capsSetCount); s = Stream_New(NULL, header.pduLength); if (!s) @@ -1573,6 +1576,7 @@ UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints) gfx->Progressive = gfx->settings->GfxProgressive; gfx->ProgressiveV2 = gfx->settings->GfxProgressiveV2; gfx->H264 = gfx->settings->GfxH264; + gfx->AVC444 = gfx->settings->GfxAVC444; if (gfx->H264) gfx->SmallCache = TRUE; @@ -1582,7 +1586,6 @@ UINT DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints) gfx->MaxCacheSlot = (gfx->ThinClient) ? 4096 : 25600; - context = (RdpgfxClientContext*) calloc(1, sizeof(RdpgfxClientContext)); if (!context) diff --git a/channels/rdpgfx/client/rdpgfx_main.h b/channels/rdpgfx/client/rdpgfx_main.h index 62709f647..6291c44dd 100644 --- a/channels/rdpgfx/client/rdpgfx_main.h +++ b/channels/rdpgfx/client/rdpgfx_main.h @@ -66,6 +66,7 @@ struct _RDPGFX_PLUGIN BOOL Progressive; BOOL ProgressiveV2; BOOL H264; + BOOL AVC444; ZGFX_CONTEXT* zgfx; UINT32 UnacknowledgedFrames; diff --git a/client/common/cmdline.c b/client/common/cmdline.c index 93c3c1c87..a2ba59bc6 100644 --- a/client/common/cmdline.c +++ b/client/common/cmdline.c @@ -119,11 +119,11 @@ static COMMAND_LINE_ARGUMENT_A args[] = { "themes", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "Themes" }, { "wallpaper", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueTrue, NULL, -1, NULL, "Wallpaper" }, { "gdi", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "GDI rendering" }, - { "gfx", COMMAND_LINE_VALUE_OPTIONAL, NULL, NULL, NULL, -1, NULL, "RDP8 graphics pipeline (experimental)" }, + { "gfx", COMMAND_LINE_VALUE_OPTIONAL, "", NULL, NULL, -1, NULL, "RDP8 graphics pipeline (experimental)" }, { "gfx-thin-client", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "RDP8 graphics pipeline thin client mode" }, { "gfx-small-cache", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "RDP8 graphics pipeline small cache mode" }, { "gfx-progressive", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "RDP8 graphics pipeline progressive codec" }, - { "gfx-h264", COMMAND_LINE_VALUE_BOOL, NULL, BoolValueFalse, NULL, -1, NULL, "RDP8.1 graphics pipeline H264 codec" }, + { "gfx-h264", COMMAND_LINE_VALUE_OPTIONAL, "", NULL, NULL, -1, NULL, "RDP8.1 graphics pipeline H264 codec" }, { "rfx", COMMAND_LINE_VALUE_FLAG, NULL, NULL, NULL, -1, NULL, "RemoteFX" }, { "rfx-mode", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "RemoteFX mode" }, { "frame-ack", COMMAND_LINE_VALUE_REQUIRED, "", NULL, NULL, -1, NULL, "Frame acknowledgement" }, @@ -2000,6 +2000,24 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings, CommandLineSwitchCase(arg, "gfx") { settings->SupportGraphicsPipeline = TRUE; + if (arg->Value) + { + if (_strnicmp("AVC444", arg->Value, 6) == 0) + { + settings->GfxH264 = TRUE; + settings->GfxAVC444 = TRUE; + } + else if (_strnicmp("AVC420", arg->Value, 6) == 0) + { + settings->GfxH264 = TRUE; + } + else if (_strnicmp("RFX", arg->Value, 3) == 0) + { + + } + else if (arg->Value != NULL) + return COMMAND_LINE_ERROR; + } } CommandLineSwitchCase(arg, "gfx-thin-client") { @@ -2019,8 +2037,20 @@ int freerdp_client_settings_parse_command_line_arguments(rdpSettings* settings, } CommandLineSwitchCase(arg, "gfx-h264") { - settings->GfxH264 = arg->Value ? TRUE : FALSE; settings->SupportGraphicsPipeline = TRUE; + settings->GfxH264 = TRUE; + if (arg->Value) + { + if (_strnicmp("AVC444", arg->Value, 6) == 0) + { + settings->GfxAVC444 = TRUE; + } + else if (_strnicmp("AVC420", arg->Value, 6) == 0) + { + } + else if (arg->Value != NULL) + return COMMAND_LINE_ERROR; + } } CommandLineSwitchCase(arg, "rfx") { diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h index 210e7112c..d73d5ec53 100644 --- a/include/freerdp/settings.h +++ b/include/freerdp/settings.h @@ -768,6 +768,7 @@ typedef struct _RDPDR_PARALLEL RDPDR_PARALLEL; #define FreeRDP_GfxProgressive 3842 #define FreeRDP_GfxProgressiveV2 3843 #define FreeRDP_GfxH264 3844 +#define FreeRDP_GfxAVC444 3845 #define FreeRDP_BitmapCacheV3CodecId 3904 #define FreeRDP_DrawNineGridEnabled 3968 #define FreeRDP_DrawNineGridCacheSize 3969 @@ -1314,7 +1315,8 @@ struct rdp_settings ALIGN64 BOOL GfxProgressive; /* 3842 */ ALIGN64 BOOL GfxProgressiveV2; /* 3843 */ ALIGN64 BOOL GfxH264; /* 3844 */ - UINT64 padding3904[3904 - 3845]; /* 3845 */ + ALIGN64 BOOL GfxAVC444; /* 3845 */ + UINT64 padding3904[3904 - 3846]; /* 3846 */ /** * Caches diff --git a/libfreerdp/common/settings.c b/libfreerdp/common/settings.c index bded9d0ec..271569c53 100644 --- a/libfreerdp/common/settings.c +++ b/libfreerdp/common/settings.c @@ -1101,6 +1101,9 @@ BOOL freerdp_get_param_bool(rdpSettings* settings, int id) case FreeRDP_GfxH264: return settings->GfxH264; + case FreeRDP_GfxAVC444: + return settings->GfxAVC444; + case FreeRDP_DrawNineGridEnabled: return settings->DrawNineGridEnabled; @@ -1612,6 +1615,10 @@ int freerdp_set_param_bool(rdpSettings* settings, int id, BOOL param) settings->GfxH264 = param; break; + case FreeRDP_GfxAVC444: + settings->GfxAVC444 = param; + break; + case FreeRDP_DrawNineGridEnabled: settings->DrawNineGridEnabled = param; break; diff --git a/libfreerdp/core/settings.c b/libfreerdp/core/settings.c index 28ed13458..2494777ca 100644 --- a/libfreerdp/core/settings.c +++ b/libfreerdp/core/settings.c @@ -464,6 +464,7 @@ rdpSettings* freerdp_settings_new(DWORD flags) settings->GfxProgressive = FALSE; settings->GfxProgressiveV2 = FALSE; settings->GfxH264 = FALSE; + settings->GfxAVC444 = FALSE; settings->ClientAutoReconnectCookie = (ARC_CS_PRIVATE_PACKET*) calloc(1, sizeof(ARC_CS_PRIVATE_PACKET)); if (!settings->ClientAutoReconnectCookie)