server: define surfcmd header length constants.
This commit is contained in:
parent
72961a256f
commit
98c11f0ae4
@ -498,7 +498,10 @@ boolean fastpath_send_surface_bits(rdpFastPath* fastpath, SURFACE_BITS_COMMAND*
|
|||||||
size = 0;
|
size = 0;
|
||||||
|
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
size += update_write_surfcmd_surface_bits_header(s, cmd);
|
{
|
||||||
|
update_write_surfcmd_surface_bits_header(s, cmd);
|
||||||
|
size += SURFCMD_SURFACE_BITS_HEADER_LENGTH;
|
||||||
|
}
|
||||||
|
|
||||||
fragment_size = MIN(stream_get_left(s), bitmapDataLength);
|
fragment_size = MIN(stream_get_left(s), bitmapDataLength);
|
||||||
if (fragment_size == bitmapDataLength)
|
if (fragment_size == bitmapDataLength)
|
||||||
|
@ -84,9 +84,9 @@ boolean update_recv_surfcmds(rdpUpdate* update, uint16 size, STREAM* s)
|
|||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
int update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* cmd)
|
void update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* cmd)
|
||||||
{
|
{
|
||||||
stream_check_size(s, 22);
|
stream_check_size(s, SURFCMD_SURFACE_BITS_HEADER_LENGTH);
|
||||||
|
|
||||||
stream_write_uint16(s, CMDTYPE_STREAM_SURFACE_BITS);
|
stream_write_uint16(s, CMDTYPE_STREAM_SURFACE_BITS);
|
||||||
|
|
||||||
@ -100,19 +100,15 @@ int update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* cm
|
|||||||
stream_write_uint16(s, cmd->width);
|
stream_write_uint16(s, cmd->width);
|
||||||
stream_write_uint16(s, cmd->height);
|
stream_write_uint16(s, cmd->height);
|
||||||
stream_write_uint32(s, cmd->bitmapDataLength);
|
stream_write_uint32(s, cmd->bitmapDataLength);
|
||||||
|
|
||||||
return 22;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int update_write_surfcmd_frame_marker(STREAM* s, uint16 frameAction, uint32 frameId)
|
void update_write_surfcmd_frame_marker(STREAM* s, uint16 frameAction, uint32 frameId)
|
||||||
{
|
{
|
||||||
stream_check_size(s, 8);
|
stream_check_size(s, SURFCMD_FRAME_MARKER_LENGTH);
|
||||||
|
|
||||||
stream_write_uint16(s, CMDTYPE_FRAME_MARKER);
|
stream_write_uint16(s, CMDTYPE_FRAME_MARKER);
|
||||||
|
|
||||||
stream_write_uint16(s, frameAction);
|
stream_write_uint16(s, frameAction);
|
||||||
stream_write_uint32(s, frameId);
|
stream_write_uint32(s, frameId);
|
||||||
|
|
||||||
return 8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,10 +23,13 @@
|
|||||||
#include "rdp.h"
|
#include "rdp.h"
|
||||||
#include <freerdp/utils/stream.h>
|
#include <freerdp/utils/stream.h>
|
||||||
|
|
||||||
|
#define SURFCMD_SURFACE_BITS_HEADER_LENGTH 22
|
||||||
|
#define SURFCMD_FRAME_MARKER_LENGTH 8
|
||||||
|
|
||||||
boolean update_recv_surfcmds(rdpUpdate* update, uint16 size, STREAM* s);
|
boolean update_recv_surfcmds(rdpUpdate* update, uint16 size, STREAM* s);
|
||||||
|
|
||||||
int update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* cmd);
|
void update_write_surfcmd_surface_bits_header(STREAM* s, SURFACE_BITS_COMMAND* cmd);
|
||||||
int update_write_surfcmd_frame_marker(STREAM* s, uint16 frameAction, uint32 frameId);
|
void update_write_surfcmd_frame_marker(STREAM* s, uint16 frameAction, uint32 frameId);
|
||||||
|
|
||||||
#endif /* __SURFACE */
|
#endif /* __SURFACE */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user