22 #ifndef FREERDP_CODEC_REMOTEFX_H
23 #define FREERDP_CODEC_REMOTEFX_H
25 #include <freerdp/api.h>
26 #include <freerdp/types.h>
27 #include <freerdp/constants.h>
28 #include <freerdp/codec/region.h>
30 #include <winpr/stream.h>
78 FREERDP_API BOOL rfx_process_message(RFX_CONTEXT* context,
const BYTE* data, UINT32 length,
79 UINT32 left, UINT32 top, BYTE* dst, UINT32 dstFormat,
80 UINT32 dstStride, UINT32 dstHeight,
83 FREERDP_API UINT32 rfx_message_get_frame_idx(
const RFX_MESSAGE* message);
84 FREERDP_API
const UINT32* rfx_message_get_quants(
const RFX_MESSAGE* message,
85 UINT16* numQuantVals);
87 FREERDP_API
const RFX_TILE** rfx_message_get_tiles(
const RFX_MESSAGE* message,
89 FREERDP_API UINT16 rfx_message_get_tile_count(
const RFX_MESSAGE* message);
91 FREERDP_API
const RFX_RECT* rfx_message_get_rects(
const RFX_MESSAGE* message, UINT16* numRects);
92 FREERDP_API UINT16 rfx_message_get_rect_count(
const RFX_MESSAGE* message);
94 FREERDP_API
void rfx_message_free(RFX_CONTEXT* context, RFX_MESSAGE* message);
96 FREERDP_API BOOL rfx_compose_message(RFX_CONTEXT* context,
wStream* s,
const RFX_RECT* rects,
97 size_t num_rects,
const BYTE* image_data, UINT32 width,
98 UINT32 height, UINT32 rowstride);
100 FREERDP_API RFX_MESSAGE* rfx_encode_message(RFX_CONTEXT* context,
const RFX_RECT* rects,
101 size_t numRects,
const BYTE* data, UINT32 width,
102 UINT32 height,
size_t scanline);
104 FREERDP_API RFX_MESSAGE_LIST* rfx_encode_messages(RFX_CONTEXT* context,
const RFX_RECT* rects,
105 size_t numRects,
const BYTE* data,
106 UINT32 width, UINT32 height, UINT32 scanline,
107 size_t* numMessages,
size_t maxDataSize);
108 FREERDP_API
void rfx_message_list_free(RFX_MESSAGE_LIST* messages);
110 FREERDP_API
const RFX_MESSAGE* rfx_message_list_get(
const RFX_MESSAGE_LIST* messages,
113 FREERDP_API BOOL rfx_write_message(RFX_CONTEXT* context,
wStream* s,
114 const RFX_MESSAGE* message);
116 FREERDP_API
void rfx_context_free(RFX_CONTEXT* context);
118 WINPR_ATTR_MALLOC(rfx_context_free, 1)
119 FREERDP_API RFX_CONTEXT* rfx_context_new_ex(BOOL encoder, UINT32 ThreadingFlags);
121 WINPR_ATTR_MALLOC(rfx_context_free, 1)
122 FREERDP_API RFX_CONTEXT* rfx_context_new(BOOL encoder);
124 FREERDP_API BOOL rfx_context_reset(RFX_CONTEXT* WINPR_RESTRICT context, UINT32 width,
127 FREERDP_API BOOL rfx_context_set_mode(RFX_CONTEXT* context, RLGR_MODE mode);
136 FREERDP_API RLGR_MODE rfx_context_get_mode(RFX_CONTEXT* WINPR_RESTRICT context);
138 FREERDP_API
void rfx_context_set_pixel_format(RFX_CONTEXT* WINPR_RESTRICT context,
139 UINT32 pixel_format);
148 FREERDP_API UINT32 rfx_context_get_pixel_format(RFX_CONTEXT* WINPR_RESTRICT context);
150 FREERDP_API
void rfx_context_set_palette(RFX_CONTEXT* WINPR_RESTRICT context,
151 const BYTE* WINPR_RESTRICT palette);
160 FREERDP_API const BYTE* rfx_context_get_palette(RFX_CONTEXT* WINPR_RESTRICT context);
162 FREERDP_API UINT32 rfx_context_get_frame_idx(const RFX_CONTEXT* WINPR_RESTRICT context);
173 FREERDP_API BOOL rfx_write_message_progressive_simple(RFX_CONTEXT* rfx,
wStream* s,
174 const RFX_MESSAGE* msg);