diff options
author | speidy <speidy@gmail.com> | 2016-12-10 02:00:16 -0500 |
---|---|---|
committer | speidy <speidy@gmail.com> | 2016-12-10 02:03:20 -0500 |
commit | 4f04801b11d6e712e97fa50941af8f8b0cdc7f59 (patch) | |
tree | 02cdd0485000c8db0394906b1a99f209d8f98d63 /xrdp/xrdp_encoder.c | |
parent | 42272c0f1891264af718e8f0a02ebc883f248ed8 (diff) | |
download | xrdp-proprietary-4f04801b11d6e712e97fa50941af8f8b0cdc7f59.tar.gz xrdp-proprietary-4f04801b11d6e712e97fa50941af8f8b0cdc7f59.zip |
o caps: advertise remotefx codec capsets only when supported (RFX mode,
proxy mode)
o xrdp_encoder: do not initialze encoder context for RFX when rfxcodec
is not supported
Diffstat (limited to 'xrdp/xrdp_encoder.c')
-rw-r--r-- | xrdp/xrdp_encoder.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/xrdp/xrdp_encoder.c b/xrdp/xrdp_encoder.c index 643fe0aa..5c9832ee 100644 --- a/xrdp/xrdp_encoder.c +++ b/xrdp/xrdp_encoder.c @@ -42,8 +42,10 @@ /*****************************************************************************/ static int process_enc_jpg(struct xrdp_encoder *self, XRDP_ENC_DATA *enc); +#ifdef XRDP_RFXCODEC static int process_enc_rfx(struct xrdp_encoder *self, XRDP_ENC_DATA *enc); +#endif static int process_enc_h264(struct xrdp_encoder *self, XRDP_ENC_DATA *enc); @@ -87,6 +89,7 @@ xrdp_encoder_create(struct xrdp_mm *mm) (32 << 24) | (3 << 16) | (8 << 12) | (8 << 8) | (8 << 4) | 8; self->process_enc = process_enc_jpg; } +#ifdef XRDP_RFXCODEC else if (client_info->rfx_codec_id != 0) { LLOGLN(0, ("xrdp_encoder_create: starting rfx codec session")); @@ -94,13 +97,11 @@ xrdp_encoder_create(struct xrdp_mm *mm) self->in_codec_mode = 1; client_info->capture_code = 2; self->process_enc = process_enc_rfx; -#ifdef XRDP_RFXCODEC - self->codec_handle = - rfxcodec_encode_create(mm->wm->screen->width, - mm->wm->screen->height, - RFX_FORMAT_YUV, 0); -#endif + self->codec_handle = rfxcodec_encode_create(mm->wm->screen->width, + mm->wm->screen->height, + RFX_FORMAT_YUV, 0); } +#endif else if (client_info->h264_codec_id != 0) { LLOGLN(0, ("xrdp_encoder_create: starting h264 codec session")); @@ -296,7 +297,6 @@ process_enc_jpg(struct xrdp_encoder *self, XRDP_ENC_DATA *enc) } #ifdef XRDP_RFXCODEC - /*****************************************************************************/ /* called from encoder thread */ static int @@ -399,17 +399,6 @@ process_enc_rfx(struct xrdp_encoder *self, XRDP_ENC_DATA *enc) return 0; } - -#else - -/*****************************************************************************/ -/* called from encoder thread */ -static int -process_enc_rfx(struct xrdp_encoder *self, XRDP_ENC_DATA *enc) -{ - return 0; -} - #endif /*****************************************************************************/ |