set codec mode according to client

ulab-next
Jay Sorg 11 years ago
parent 575fc9fb6f
commit 0748f41101

@ -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;

@ -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)
{

@ -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;

Loading…
Cancel
Save