Set different frame capture interval for H.264 and RFX

and pass them to xorgxrdp.

(cherry picked from commit c55694c51b570d84ad63bfb5dc7bdec75fee57da)
This commit is contained in:
Koichiro Iwao
2024-11-16 00:00:00 +09:00
parent b40ace381c
commit 5fb59a7c38
4 changed files with 40 additions and 1 deletions
+6 -1
View File
@@ -255,6 +255,11 @@ struct xrdp_client_info
enum unicode_input_state unicode_input_support;
enum xrdp_capture_code capture_code;
/* xorgxrdp: frame capture interval (milliseconds) */
int rfx_frame_interval;
int h264_frame_interval;
int normal_frame_interval;
};
enum xrdp_encoder_flags
@@ -274,6 +279,6 @@ enum xrdp_encoder_flags
/* yyyymmdd of last incompatible change to xrdp_client_info */
/* also used for changes to all the xrdp installed headers */
#define CLIENT_INFO_CURRENT_VERSION 20240805
#define CLIENT_INFO_CURRENT_VERSION 20241118
#endif
+5
View File
@@ -83,6 +83,11 @@
#define MCS_SDRQ 25 /* Send Data Request */
#define MCS_SDIN 26 /* Send Data Indication */
/* xorgxrdp: frame capture interval (milliseconds) */
#define RFX_FRAME_INTERVAL 32
#define H264_FRAME_INTERVAL 16
#define NORMAL_FRAME_INTERVAL 40
/******************************************************************************
*
* Constants come from other Microsoft products
+4
View File
@@ -249,6 +249,10 @@ password=ask
port=-1
code=20
#keycode_set=evdev
; Frame capture interval (milliseconds)
h264_frame_interval=16
rfx_frame_interval=32
normal_frame_interval=40
[Xvnc]
name=Xvnc
+25
View File
@@ -191,6 +191,19 @@ lib_mod_connect(struct mod *mod)
LOG(LOG_LEVEL_INFO, "XKB rules '%s' will be used by the module",
mod->client_info.xkb_rules);
if (mod->client_info.h264_frame_interval <= 0)
{
mod->client_info.h264_frame_interval = H264_FRAME_INTERVAL;
}
if (mod->client_info.rfx_frame_interval <= 0)
{
mod->client_info.rfx_frame_interval = RFX_FRAME_INTERVAL;
}
if (mod->client_info.normal_frame_interval <= 0)
{
mod->client_info.normal_frame_interval = NORMAL_FRAME_INTERVAL;
}
make_stream(s);
g_sprintf(con_port, "%s", mod->port);
@@ -1887,6 +1900,18 @@ lib_mod_set_param(struct mod *mod, const char *name, const char *value)
{
g_snprintf(mod->keycode_set, sizeof(mod->keycode_set), "%s", value);
}
else if (g_strcasecmp(name, "h264_frame_interval") == 0)
{
mod->client_info.h264_frame_interval = g_atoi(value);
}
else if (g_strcasecmp(name, "rfx_frame_interval") == 0)
{
mod->client_info.rfx_frame_interval = g_atoi(value);
}
else if (g_strcasecmp(name, "normal_frame_interval") == 0)
{
mod->client_info.normal_frame_interval = g_atoi(value);
}
else if (g_strcasecmp(name, "client_info") == 0)
{
g_memcpy(&(mod->client_info), value, sizeof(mod->client_info));