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>
79 FREERDP_API BOOL rfx_process_message(RFX_CONTEXT* WINPR_RESTRICT context,
80 const BYTE* WINPR_RESTRICT data, UINT32 length,
81 UINT32 left, UINT32 top, BYTE* WINPR_RESTRICT dst,
82 UINT32 dstFormat, UINT32 dstStride, UINT32 dstHeight,
83 REGION16* WINPR_RESTRICT invalidRegion);
86 FREERDP_API UINT32 rfx_message_get_frame_idx(
const RFX_MESSAGE* WINPR_RESTRICT message);
89 FREERDP_API
const UINT32* rfx_message_get_quants(
const RFX_MESSAGE* WINPR_RESTRICT message,
90 UINT16* WINPR_RESTRICT numQuantVals);
93 FREERDP_API
const RFX_TILE** rfx_message_get_tiles(
const RFX_MESSAGE* WINPR_RESTRICT message,
94 UINT16* WINPR_RESTRICT numTiles);
97 FREERDP_API UINT16 rfx_message_get_tile_count(
const RFX_MESSAGE* WINPR_RESTRICT message);
100 FREERDP_API
const RFX_RECT* rfx_message_get_rects(
const RFX_MESSAGE* WINPR_RESTRICT message,
101 UINT16* WINPR_RESTRICT numRects);
104 FREERDP_API UINT16 rfx_message_get_rect_count(
const RFX_MESSAGE* WINPR_RESTRICT message);
106 FREERDP_API
void rfx_message_free(RFX_CONTEXT* WINPR_RESTRICT context,
107 RFX_MESSAGE* WINPR_RESTRICT message);
110 FREERDP_API BOOL rfx_compose_message(RFX_CONTEXT* WINPR_RESTRICT context,
112 const RFX_RECT* WINPR_RESTRICT rects,
size_t numRects,
113 const BYTE* WINPR_RESTRICT data, UINT32 width,
114 UINT32 height, UINT32 scanline);
117 FREERDP_API RFX_MESSAGE* rfx_encode_message(RFX_CONTEXT* WINPR_RESTRICT context,
118 const RFX_RECT* WINPR_RESTRICT rects,
119 size_t numRects,
const BYTE* WINPR_RESTRICT data,
120 UINT32 width, UINT32 height,
size_t scanline);
122 FREERDP_API
void rfx_message_list_free(RFX_MESSAGE_LIST* messages);
124 WINPR_ATTR_MALLOC(rfx_message_list_free, 1)
126 FREERDP_API RFX_MESSAGE_LIST*
127 rfx_encode_messages(RFX_CONTEXT* WINPR_RESTRICT context, const
RFX_RECT* WINPR_RESTRICT rects,
128 size_t numRects, const BYTE* WINPR_RESTRICT data, UINT32 width,
129 UINT32 height, UINT32 scanline,
size_t* WINPR_RESTRICT numMessages,
133 FREERDP_API const RFX_MESSAGE*
134 rfx_message_list_get(const RFX_MESSAGE_LIST* WINPR_RESTRICT messages,
size_t idx);
137 FREERDP_API BOOL rfx_write_message(RFX_CONTEXT* WINPR_RESTRICT context,
139 const RFX_MESSAGE* WINPR_RESTRICT message);
141 FREERDP_API
void rfx_context_free(RFX_CONTEXT* context);
143 WINPR_ATTR_MALLOC(rfx_context_free, 1)
145 FREERDP_API RFX_CONTEXT* rfx_context_new_ex(BOOL encoder, UINT32 ThreadingFlags);
147 WINPR_ATTR_MALLOC(rfx_context_free, 1)
149 FREERDP_API RFX_CONTEXT* rfx_context_new(BOOL encoder);
152 FREERDP_API BOOL rfx_context_reset(RFX_CONTEXT* WINPR_RESTRICT context, UINT32 width,
156 FREERDP_API BOOL rfx_context_set_mode(RFX_CONTEXT* WINPR_RESTRICT context, RLGR_MODE mode);
166 FREERDP_API RLGR_MODE rfx_context_get_mode(RFX_CONTEXT* WINPR_RESTRICT context);
168 FREERDP_API
void rfx_context_set_pixel_format(RFX_CONTEXT* WINPR_RESTRICT context,
169 UINT32 pixel_format);
179 FREERDP_API UINT32 rfx_context_get_pixel_format(RFX_CONTEXT* WINPR_RESTRICT context);
181 FREERDP_API
void rfx_context_set_palette(RFX_CONTEXT* WINPR_RESTRICT context,
182 const BYTE* WINPR_RESTRICT palette);
192 FREERDP_API const BYTE* rfx_context_get_palette(RFX_CONTEXT* WINPR_RESTRICT context);
195 FREERDP_API UINT32 rfx_context_get_frame_idx(const RFX_CONTEXT* WINPR_RESTRICT context);
207 FREERDP_API BOOL rfx_write_message_progressive_simple(RFX_CONTEXT* WINPR_RESTRICT rfx,
209 const RFX_MESSAGE* WINPR_RESTRICT msg);