summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Sorg <jay.sorg@gmail.com>2014-03-23 00:42:09 -0700
committerJay Sorg <jay.sorg@gmail.com>2014-03-23 00:42:09 -0700
commit0748f411013b5dfd80f6e1fd4926b8ac666d9487 (patch)
treeb4b6d143e2b173b0c22929599b98a8122cccbefc
parent575fc9fb6f3f12f43890340f0c5005ae22332b5c (diff)
downloadxrdp-proprietary-0748f411013b5dfd80f6e1fd4926b8ac666d9487.tar.gz
xrdp-proprietary-0748f411013b5dfd80f6e1fd4926b8ac666d9487.zip
set codec mode according to client
-rw-r--r--xrdp/xrdp_encoder.c2
-rw-r--r--xrdp/xrdp_mm.c16
-rw-r--r--xrdp/xrdp_types.h2
3 files changed, 18 insertions, 2 deletions
diff --git a/xrdp/xrdp_encoder.c b/xrdp/xrdp_encoder.c
index 2ae5381f..679b55fe 100644
--- a/xrdp/xrdp_encoder.c
+++ b/xrdp/xrdp_encoder.c
@@ -162,7 +162,7 @@ process_enc(struct xrdp_mm *self, XRDP_ENC_DATA *enc)
tbus event_processed;
LLOGLN(10, ("process_enc:"));
- quality = 75;
+ quality = self->codec_quality;
fifo_processed = self->fifo_processed;
mutex = self->mutex;
event_processed = self->xrdp_encoder_event_processed;
diff --git a/xrdp/xrdp_mm.c b/xrdp/xrdp_mm.c
index 58032a1e..c4e0177d 100644
--- a/xrdp/xrdp_mm.c
+++ b/xrdp/xrdp_mm.c
@@ -55,7 +55,21 @@ xrdp_mm_create(struct xrdp_wm *owner)
self->login_values = list_create();
self->login_values->auto_free = 1;
- self->in_codec_mode = 0; /* TODO: */
+ LLOGLN(10, ("xrdp_mm_create: bpp %d", self->wm->client_info->bpp));
+ /* go into jpeg codec mode if jpeg set, lan set */
+ if (self->wm->client_info->mcs_connection_type == 6) /* LAN */
+ {
+ if (self->wm->client_info->jpeg_codec_id == 2) /* JPEG */
+ {
+ if (self->wm->client_info->bpp > 16)
+ {
+ LLOGLN(0, ("xrdp_mm_create: starting jpeg codec session"));
+ self->codec_id = 2;
+ self->in_codec_mode = 1;
+ self->codec_quality = self->wm->client_info->jpeg_prop[0];
+ }
+ }
+ }
if (self->in_codec_mode)
{
diff --git a/xrdp/xrdp_types.h b/xrdp/xrdp_types.h
index 048bff0e..7e1c81f0 100644
--- a/xrdp/xrdp_types.h
+++ b/xrdp/xrdp_types.h
@@ -292,6 +292,8 @@ struct xrdp_mm
/* for codec mode operations */
int in_codec_mode;
+ int codec_id;
+ int codec_quality;
tbus xrdp_encoder_event_to_proc;
tbus xrdp_encoder_event_processed;
tbus xrdp_encoder_term;