rfx: work on rfx
This commit is contained in:
parent
c935eb19af
commit
fd52c5aa6a
@ -24,7 +24,7 @@
|
||||
struct xrdp_surface* APP_CC
|
||||
xrdp_surface_create(struct xrdp_session* session, struct xrdp_fastpath* fastpath)
|
||||
{
|
||||
struct xrdp_surface *self;
|
||||
struct xrdp_surface* self;
|
||||
|
||||
self = (struct xrdp_surface*)g_malloc(sizeof(struct xrdp_surface), 1);
|
||||
self->session = session;
|
||||
@ -38,13 +38,15 @@ xrdp_surface_create(struct xrdp_session* session, struct xrdp_fastpath* fastpath
|
||||
void APP_CC
|
||||
xrdp_surface_delete(struct xrdp_surface* self)
|
||||
{
|
||||
STREAM* s = (STREAM*)self->s;
|
||||
RFX_CONTEXT* rfx_context = (RFX_CONTEXT*)self->rfx_context;
|
||||
STREAM* s;
|
||||
RFX_CONTEXT* rfx_context;
|
||||
|
||||
if (self == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
s = (STREAM*)(self->s);
|
||||
rfx_context = (RFX_CONTEXT*)(self->rfx_context);
|
||||
free_stream(self->out_s);
|
||||
stream_free(s);
|
||||
rfx_context_free(rfx_context);
|
||||
@ -59,13 +61,15 @@ xrdp_surface_reset(struct xrdp_surface* self)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
int APP_CC
|
||||
xrdp_surface_init(struct xrdp_surface* self)
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
RFX_CONTEXT* rfx_context = (RFX_CONTEXT*)self->rfx_context;
|
||||
RFX_CONTEXT* rfx_context;
|
||||
|
||||
rfx_context = (RFX_CONTEXT*)(self->rfx_context);
|
||||
width = self->session->client_info->width;
|
||||
height= self->session->client_info->height;
|
||||
|
||||
@ -91,15 +95,17 @@ xrdp_surface_send_surface_bits(struct xrdp_surface* self,int bpp, char* data,
|
||||
int j;
|
||||
int codecId;
|
||||
uint32 bitmapDataLength;
|
||||
STREAM* s = (STREAM*)self->s;
|
||||
RFX_CONTEXT* rfx_context = (RFX_CONTEXT*)self->rfx_context;
|
||||
STREAM* s;
|
||||
RFX_CONTEXT* rfx_context;
|
||||
|
||||
s = (STREAM*)(self->s);
|
||||
rfx_context = (RFX_CONTEXT*)(self->rfx_context);
|
||||
if ((bpp == 24) || (bpp == 32))
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
g_writeln("bpp = %d is not supported\n",bpp);
|
||||
g_writeln("bpp = %d is not supported\n", bpp);
|
||||
return 1;
|
||||
}
|
||||
Bpp = 4;
|
||||
@ -109,7 +115,7 @@ xrdp_surface_send_surface_bits(struct xrdp_surface* self,int bpp, char* data,
|
||||
rect.width = cx;
|
||||
rect.height = cy;
|
||||
|
||||
init_stream(self->out_s,0);
|
||||
init_stream(self->out_s, 0);
|
||||
|
||||
stream_set_pos(s, 0);
|
||||
rfx_compose_message(rfx_context, s, &rect, 1, data, cx, cy, Bpp * cx);
|
||||
@ -142,7 +148,7 @@ xrdp_surface_send_surface_bits(struct xrdp_surface* self,int bpp, char* data,
|
||||
/*****************************************************************************/
|
||||
int APP_CC
|
||||
xrdp_surface_send_frame_marker(struct xrdp_surface* self,
|
||||
uint16 frameAction,uint32 frameId)
|
||||
uint16 frameAction, uint32 frameId)
|
||||
{
|
||||
init_stream(self->out_s, 0);
|
||||
out_uint16_le(self->out_s, CMDTYPE_FRAME_MARKER);
|
||||
|
@ -14,7 +14,7 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
xrdp: A Remote Desktop Protocol server.
|
||||
Copyright (C) Jay Sorg 2005-2010
|
||||
Copyright (C) Jay Sorg 2005-2012
|
||||
|
||||
libxup main file
|
||||
|
||||
@ -248,7 +248,7 @@ lib_mod_connect(struct mod* mod)
|
||||
out_uint32_le(s, mod->width);
|
||||
out_uint32_le(s, mod->height);
|
||||
out_uint32_le(s, mod->bpp);
|
||||
out_uint32_le(s, 0);
|
||||
out_uint32_le(s, mod->rfx); /* send rfx flag */
|
||||
s_mark_end(s);
|
||||
len = (int)(s->end - s->data);
|
||||
s_pop_layer(s, iso_hdr);
|
||||
@ -557,6 +557,11 @@ lib_mod_set_param(struct mod* mod, char* name, char* value)
|
||||
{
|
||||
g_strncpy(mod->port, value, 255);
|
||||
}
|
||||
else if (g_strcasecmp(name, "rfx") == 0)
|
||||
{
|
||||
mod->rfx = g_atoi(value);
|
||||
g_writeln("mod->rfx = %d", mod->rfx);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
xrdp: A Remote Desktop Protocol server.
|
||||
Copyright (C) Jay Sorg 2005-2010
|
||||
Copyright (C) Jay Sorg 2005-2012
|
||||
|
||||
libxup main header file
|
||||
|
||||
@ -105,4 +105,5 @@ struct mod
|
||||
char port[256];
|
||||
tbus sck_obj;
|
||||
int shift_state;
|
||||
int rfx;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user