mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2025-01-07 16:03:51 +08:00
codec: support for specifying the RemoteFX mode (image or video)
This commit is contained in:
parent
42735c4690
commit
c918cfb7af
@ -289,6 +289,7 @@ struct rdp_settings
|
||||
boolean ns_codec;
|
||||
uint32 rfx_codec_id;
|
||||
uint32 ns_codec_id;
|
||||
uint8 rfx_codec_mode;
|
||||
boolean frame_acknowledge;
|
||||
|
||||
/* Recording */
|
||||
|
@ -1420,8 +1420,10 @@ void rdp_read_bitmap_codecs_capability_set(STREAM* s, uint16 length, rdpSettings
|
||||
void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings)
|
||||
{
|
||||
uint16 captureFlags;
|
||||
uint8 codecMode;
|
||||
|
||||
captureFlags = settings->dump_rfx ? 0 : CARDP_CAPS_CAPTURE_NON_CAC;
|
||||
codecMode = settings->rfx_codec_mode;
|
||||
|
||||
stream_write_uint16(s, 49); /* codecPropertiesLength */
|
||||
|
||||
@ -1446,7 +1448,7 @@ void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings)
|
||||
/* TS_RFX_ICAP (RLGR1) */
|
||||
stream_write_uint16(s, CLW_VERSION_1_0); /* version */
|
||||
stream_write_uint16(s, CT_TILE_64x64); /* tileSize */
|
||||
stream_write_uint8(s, 0); /* flags */
|
||||
stream_write_uint8(s, codecMode); /* flags */
|
||||
stream_write_uint8(s, CLW_COL_CONV_ICT); /* colConvBits */
|
||||
stream_write_uint8(s, CLW_XFORM_DWT_53_A); /* transformBits */
|
||||
stream_write_uint8(s, CLW_ENTROPY_RLGR1); /* entropyBits */
|
||||
@ -1454,7 +1456,7 @@ void rdp_write_rfx_client_capability_container(STREAM* s, rdpSettings* settings)
|
||||
/* TS_RFX_ICAP (RLGR3) */
|
||||
stream_write_uint16(s, CLW_VERSION_1_0); /* version */
|
||||
stream_write_uint16(s, CT_TILE_64x64); /* tileSize */
|
||||
stream_write_uint8(s, 0); /* flags */
|
||||
stream_write_uint8(s, codecMode); /* flags */
|
||||
stream_write_uint8(s, CLW_COL_CONV_ICT); /* colConvBits */
|
||||
stream_write_uint8(s, CLW_XFORM_DWT_53_A); /* transformBits */
|
||||
stream_write_uint8(s, CLW_ENTROPY_RLGR3); /* entropyBits */
|
||||
|
@ -85,6 +85,7 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
" --no-bmp-cache: disable bitmap cache\n"
|
||||
" --plugin: load a virtual channel plugin\n"
|
||||
" --rfx: enable RemoteFX\n"
|
||||
" --rfx-mode: RemoteFX operational flags (v[ideo], i[mage]), default is video\n"
|
||||
" --nsc: enable NSCodec\n"
|
||||
" --no-rdp: disable Standard RDP encryption\n"
|
||||
" --no-tls: disable TLS encryption\n"
|
||||
@ -311,6 +312,28 @@ int freerdp_parse_args(rdpSettings* settings, int argc, char** argv,
|
||||
settings->performance_flags = PERF_FLAG_NONE;
|
||||
settings->large_pointer = true;
|
||||
}
|
||||
else if (strcmp("--rfx-mode", argv[index]) == 0)
|
||||
{
|
||||
index++;
|
||||
if (index == argc)
|
||||
{
|
||||
printf("missing RemoteFX mode flag\n");
|
||||
return -1;
|
||||
}
|
||||
if (argv[index][0] == 'v') /* video */
|
||||
{
|
||||
settings->rfx_codec_mode = 0x00;
|
||||
}
|
||||
else if (argv[index][0] == 'i') /* image */
|
||||
{
|
||||
settings->rfx_codec_mode = 0x02;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("unknown RemoteFX mode flag\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (strcmp("--nsc", argv[index]) == 0)
|
||||
{
|
||||
settings->ns_codec = true;
|
||||
|
Loading…
Reference in New Issue
Block a user