Added advanced gfx command line options.

This commit is contained in:
Armin Novak 2016-03-24 16:25:22 +01:00
parent 75ae3f58df
commit 50873be062
6 changed files with 57 additions and 13 deletions

View File

@ -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)

View File

@ -66,6 +66,7 @@ struct _RDPGFX_PLUGIN
BOOL Progressive;
BOOL ProgressiveV2;
BOOL H264;
BOOL AVC444;
ZGFX_CONTEXT* zgfx;
UINT32 UnacknowledgedFrames;

View File

@ -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, "<sw|hw>", 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, "<RFX|AVC420|AVC444>", 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, "<AVC420|AVC444>", 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, "<image|video>", NULL, NULL, -1, NULL, "RemoteFX mode" },
{ "frame-ack", COMMAND_LINE_VALUE_REQUIRED, "<number>", 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")
{

View File

@ -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

View File

@ -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;

View File

@ -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)