From f5103aa482f1b4f41a856adb1694929ed5b4936f Mon Sep 17 00:00:00 2001 From: Nexarian Date: Wed, 30 Aug 2023 00:42:34 -0400 Subject: [PATCH] Minor refactoring --- common/xrdp_client_info.h | 5 +++-- xrdp/xrdp_encoder.c | 12 +++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/common/xrdp_client_info.h b/common/xrdp_client_info.h index 52fc28566a..58300f82b0 100644 --- a/common/xrdp_client_info.h +++ b/common/xrdp_client_info.h @@ -224,10 +224,11 @@ enum xrdp_encoder_flags CONTAINS_DUAL_FRAME_AVC444 = 1 << 1, CONTAINS_SINGLE_FRAME_AVC444_YUV420 = 1 << 2, CONTAINS_SINGLE_FRAME_AVC444_CHROMA420 = 1 << 3, - CONTAINS_KEY_FRAME = 1 << 4 + CONTAINS_KEY_FRAME = 1 << 4, + KEY_FRAME_REQUESTED = 1 << 5 }; /* yyyymmdd of last incompatible change to xrdp_client_info */ -#define CLIENT_INFO_CURRENT_VERSION 20230520 +#define CLIENT_INFO_CURRENT_VERSION 20230830 #endif diff --git a/xrdp/xrdp_encoder.c b/xrdp/xrdp_encoder.c index ea36e097fb..2da5de89aa 100644 --- a/xrdp/xrdp_encoder.c +++ b/xrdp/xrdp_encoder.c @@ -618,10 +618,8 @@ build_rfx_avc420_metablock(struct stream *s, short *rrects, int rcount, return comp_bytes_pre; } -/*****************************************************************************/ -/* called from encoder thread */ static int -process_enc_h264(struct xrdp_encoder *self, XRDP_ENC_DATA *enc) +build_enc_h264(struct xrdp_encoder *self, XRDP_ENC_DATA *enc) { int index; int x; @@ -845,6 +843,14 @@ process_enc_h264(struct xrdp_encoder *self, XRDP_ENC_DATA *enc) return 0; } +/*****************************************************************************/ +/* called from encoder thread */ +static int +process_enc_h264(struct xrdp_encoder *self, XRDP_ENC_DATA *enc) +{ + return build_enc_h264(self, enc); +} + #else /*****************************************************************************/