rdpgfx/server: Minor fix: allow configurable codec parameter
This commit is contained in:
parent
26c98e4429
commit
a15b8fff66
@ -127,6 +127,14 @@ struct rdp_shadow_server
|
||||
BOOL authentication;
|
||||
int selectedMonitor;
|
||||
RECTANGLE_16 subRect;
|
||||
|
||||
/* Codec settings */
|
||||
RLGR_MODE rfxMode;
|
||||
H264_RATECONTROL_MODE h264RateControlMode;
|
||||
UINT32 h264BitRate;
|
||||
FLOAT h264FrameRate;
|
||||
UINT32 h264QP;
|
||||
|
||||
char* ipcSocket;
|
||||
char* ConfigPath;
|
||||
char* CertificateFile;
|
||||
|
@ -139,9 +139,7 @@ int shadow_encoder_init_rfx(rdpShadowEncoder* encoder)
|
||||
if (!rfx_context_reset(encoder->rfx, encoder->width, encoder->height))
|
||||
goto fail;
|
||||
|
||||
encoder->rfx->mode = RLGR3;
|
||||
encoder->rfx->width = encoder->width;
|
||||
encoder->rfx->height = encoder->height;
|
||||
encoder->rfx->mode = encoder->server->rfxMode;
|
||||
|
||||
rfx_context_set_pixel_format(encoder->rfx, RDP_PIXEL_FORMAT_B8G8R8A8);
|
||||
|
||||
@ -246,6 +244,11 @@ int shadow_encoder_init_h264(rdpShadowEncoder* encoder)
|
||||
if (!h264_context_reset(encoder->h264, encoder->width, encoder->height))
|
||||
goto fail;
|
||||
|
||||
encoder->h264->RateControlMode = encoder->server->h264RateControlMode;
|
||||
encoder->h264->BitRate = encoder->server->h264BitRate;
|
||||
encoder->h264->FrameRate = encoder->server->h264FrameRate;
|
||||
encoder->h264->QP = encoder->server->h264QP;
|
||||
|
||||
encoder->codecs |= FREERDP_CODEC_AVC420;
|
||||
|
||||
return 1;
|
||||
|
@ -769,6 +769,12 @@ rdpShadowServer* shadow_server_new()
|
||||
server->mayView = TRUE;
|
||||
server->mayInteract = TRUE;
|
||||
|
||||
server->rfxMode = RLGR3;
|
||||
server->h264RateControlMode = H264_RATECONTROL_VBR;
|
||||
server->h264BitRate = 1000000;
|
||||
server->h264FrameRate = 30;
|
||||
server->h264QP = 0;
|
||||
|
||||
server->authentication = FALSE;
|
||||
|
||||
server->settings = freerdp_settings_new(FREERDP_SETTINGS_SERVER_MODE);
|
||||
|
Loading…
Reference in New Issue
Block a user