Compatibility changes
Renamed symbols and added wrappers to keep API compatible with 2.0 branch.
This commit is contained in:
parent
5e89baddd9
commit
048aca5cce
@ -593,12 +593,17 @@ UINT rdpei_server_handle_messages(RdpeiServerContext* context)
|
|||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UINT rdpei_server_send_sc_ready(RdpeiServerContext* context, UINT32 version)
|
||||||
|
{
|
||||||
|
return rdpei_server_send_sc_ready_ex(context, version, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function description
|
* Function description
|
||||||
*
|
*
|
||||||
* @return 0 on success, otherwise a Win32 error code
|
* @return 0 on success, otherwise a Win32 error code
|
||||||
*/
|
*/
|
||||||
UINT rdpei_server_send_sc_ready(RdpeiServerContext* context, UINT32 version, UINT32 features)
|
UINT rdpei_server_send_sc_ready_ex(RdpeiServerContext* context, UINT32 version, UINT32 features)
|
||||||
{
|
{
|
||||||
ULONG written;
|
ULONG written;
|
||||||
RdpeiServerPrivate* priv = context->priv;
|
RdpeiServerPrivate* priv = context->priv;
|
||||||
|
@ -37,17 +37,26 @@ extern "C"
|
|||||||
{
|
{
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FREERDP_API int progressive_compress(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData,
|
FREERDP_API WINPR_DEPRECATED(int progressive_compress(PROGRESSIVE_CONTEXT* progressive,
|
||||||
|
const BYTE* pSrcData, UINT32 SrcSize,
|
||||||
|
BYTE** ppDstData, UINT32* pDstSize));
|
||||||
|
|
||||||
|
FREERDP_API int progressive_compress_ex(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData,
|
||||||
UINT32 SrcSize, UINT32 SrcFormat, UINT32 Width,
|
UINT32 SrcSize, UINT32 SrcFormat, UINT32 Width,
|
||||||
UINT32 Height, UINT32 ScanLine,
|
UINT32 Height, UINT32 ScanLine,
|
||||||
const REGION16* invalidRegion, BYTE** ppDstData,
|
const REGION16* invalidRegion, BYTE** ppDstData,
|
||||||
UINT32* pDstSize);
|
UINT32* pDstSize);
|
||||||
|
|
||||||
FREERDP_API INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData,
|
FREERDP_API WINPR_DEPRECATED(INT32 progressive_decompress(
|
||||||
UINT32 SrcSize, BYTE* pDstData, UINT32 DstFormat,
|
PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData, UINT32 SrcSize, BYTE* pDstData,
|
||||||
UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst,
|
UINT32 DstFormat, UINT32 nDstStep, UINT32 nXDst, UINT32 nYDst, REGION16* invalidRegion,
|
||||||
REGION16* invalidRegion, UINT16 surfaceId,
|
UINT16 surfaceId));
|
||||||
UINT32 frameId);
|
|
||||||
|
FREERDP_API INT32 progressive_decompress_ex(PROGRESSIVE_CONTEXT* progressive,
|
||||||
|
const BYTE* pSrcData, UINT32 SrcSize,
|
||||||
|
BYTE* pDstData, UINT32 DstFormat, UINT32 nDstStep,
|
||||||
|
UINT32 nXDst, UINT32 nYDst, REGION16* invalidRegion,
|
||||||
|
UINT16 surfaceId, UINT32 frameId);
|
||||||
|
|
||||||
FREERDP_API INT32 progressive_create_surface_context(PROGRESSIVE_CONTEXT* progressive,
|
FREERDP_API INT32 progressive_create_surface_context(PROGRESSIVE_CONTEXT* progressive,
|
||||||
UINT16 surfaceId, UINT32 width,
|
UINT16 surfaceId, UINT32 width,
|
||||||
|
@ -190,7 +190,11 @@ extern "C"
|
|||||||
size_t numRects, const BYTE* data, UINT32 width,
|
size_t numRects, const BYTE* data, UINT32 width,
|
||||||
UINT32 height, size_t scanline);
|
UINT32 height, size_t scanline);
|
||||||
|
|
||||||
FREERDP_API RFX_MESSAGE* rfx_encode_messages(RFX_CONTEXT* context, const RFX_RECT* rects,
|
FREERDP_API WINPR_DEPRECATED(RFX_MESSAGE* rfx_encode_messages(
|
||||||
|
RFX_CONTEXT* context, const RFX_RECT* rects, int numRects, const BYTE* data, int width,
|
||||||
|
int height, int scanline, int* numMessages, int maxDataSize));
|
||||||
|
|
||||||
|
FREERDP_API RFX_MESSAGE* rfx_encode_messages_ex(RFX_CONTEXT* context, const RFX_RECT* rects,
|
||||||
size_t numRects, const BYTE* data, UINT32 width,
|
size_t numRects, const BYTE* data, UINT32 width,
|
||||||
UINT32 height, UINT32 scanline,
|
UINT32 height, UINT32 scanline,
|
||||||
size_t* numMessages, size_t maxDataSize);
|
size_t* numMessages, size_t maxDataSize);
|
||||||
|
@ -60,7 +60,10 @@ extern "C"
|
|||||||
FREERDP_API UINT rdpei_server_init(RdpeiServerContext* context);
|
FREERDP_API UINT rdpei_server_init(RdpeiServerContext* context);
|
||||||
FREERDP_API UINT rdpei_server_handle_messages(RdpeiServerContext* context);
|
FREERDP_API UINT rdpei_server_handle_messages(RdpeiServerContext* context);
|
||||||
|
|
||||||
FREERDP_API UINT rdpei_server_send_sc_ready(RdpeiServerContext* context, UINT32 version,
|
FREERDP_API WINPR_DEPRECATED(UINT rdpei_server_send_sc_ready(RdpeiServerContext* context,
|
||||||
|
UINT32 version));
|
||||||
|
|
||||||
|
FREERDP_API UINT rdpei_server_send_sc_ready_ex(RdpeiServerContext* context, UINT32 version,
|
||||||
UINT32 features);
|
UINT32 features);
|
||||||
FREERDP_API UINT rdpei_server_suspend(RdpeiServerContext* context);
|
FREERDP_API UINT rdpei_server_suspend(RdpeiServerContext* context);
|
||||||
FREERDP_API UINT rdpei_server_resume(RdpeiServerContext* context);
|
FREERDP_API UINT rdpei_server_resume(RdpeiServerContext* context);
|
||||||
|
@ -2154,8 +2154,16 @@ static INLINE INT32 progressive_wb_region(PROGRESSIVE_CONTEXT* progressive, wStr
|
|||||||
|
|
||||||
INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData, UINT32 SrcSize,
|
INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData, UINT32 SrcSize,
|
||||||
BYTE* pDstData, UINT32 DstFormat, UINT32 nDstStep, UINT32 nXDst,
|
BYTE* pDstData, UINT32 DstFormat, UINT32 nDstStep, UINT32 nXDst,
|
||||||
UINT32 nYDst, REGION16* invalidRegion, UINT16 surfaceId,
|
UINT32 nYDst, REGION16* invalidRegion, UINT16 surfaceId)
|
||||||
UINT32 frameId)
|
{
|
||||||
|
return progressive_decompress_ex(progressive, pSrcData, SrcSize, pDstData, DstFormat, nDstStep,
|
||||||
|
nXDst, nYDst, invalidRegion, surfaceId, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
INT32 progressive_decompress_ex(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData,
|
||||||
|
UINT32 SrcSize, BYTE* pDstData, UINT32 DstFormat, UINT32 nDstStep,
|
||||||
|
UINT32 nXDst, UINT32 nYDst, REGION16* invalidRegion,
|
||||||
|
UINT16 surfaceId, UINT32 frameId)
|
||||||
{
|
{
|
||||||
INT32 rc = 1;
|
INT32 rc = 1;
|
||||||
UINT32 i, j;
|
UINT32 i, j;
|
||||||
@ -2470,6 +2478,12 @@ static BOOL progressive_rfx_write_message_progressive_simple(RFX_CONTEXT* contex
|
|||||||
}
|
}
|
||||||
|
|
||||||
int progressive_compress(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData, UINT32 SrcSize,
|
int progressive_compress(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData, UINT32 SrcSize,
|
||||||
|
BYTE** ppDstData, UINT32* pDstSize)
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int progressive_compress_ex(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData, UINT32 SrcSize,
|
||||||
UINT32 SrcFormat, UINT32 Width, UINT32 Height, UINT32 ScanLine,
|
UINT32 SrcFormat, UINT32 Width, UINT32 Height, UINT32 ScanLine,
|
||||||
const REGION16* invalidRegion, BYTE** ppDstData, UINT32* pDstSize)
|
const REGION16* invalidRegion, BYTE** ppDstData, UINT32* pDstSize)
|
||||||
{
|
{
|
||||||
|
@ -1722,7 +1722,7 @@ free_messages:
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
RFX_MESSAGE* rfx_encode_messages(RFX_CONTEXT* context, const RFX_RECT* rects, size_t numRects,
|
RFX_MESSAGE* rfx_encode_messages_ex(RFX_CONTEXT* context, const RFX_RECT* rects, size_t numRects,
|
||||||
const BYTE* data, UINT32 width, UINT32 height, UINT32 scanline,
|
const BYTE* data, UINT32 width, UINT32 height, UINT32 scanline,
|
||||||
size_t* numMessages, size_t maxDataSize)
|
size_t* numMessages, size_t maxDataSize)
|
||||||
{
|
{
|
||||||
@ -1884,3 +1884,15 @@ BOOL rfx_compose_message(RFX_CONTEXT* context, wStream* s, const RFX_RECT* rects
|
|||||||
rfx_message_free(context, message);
|
rfx_message_free(context, message);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RFX_MESSAGE* rfx_encode_messages(RFX_CONTEXT* context, const RFX_RECT* rects, int numRects,
|
||||||
|
const BYTE* data, int width, int height, int scanline,
|
||||||
|
int* numMessages, int maxDataSize)
|
||||||
|
{
|
||||||
|
size_t tmp;
|
||||||
|
RFX_MESSAGE* msg = rfx_encode_messages_ex(context, rects, numRects, data, width, height,
|
||||||
|
scanline, &tmp, maxDataSize);
|
||||||
|
if (numMessages)
|
||||||
|
*numMessages = tmp;
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
@ -840,7 +840,7 @@ static int test_progressive_decode(PROGRESSIVE_CONTEXT* progressive, EGFX_SAMPLE
|
|||||||
for (pass = 0; pass < count; pass++)
|
for (pass = 0; pass < count; pass++)
|
||||||
{
|
{
|
||||||
status =
|
status =
|
||||||
progressive_decompress(progressive, files[pass].buffer, files[pass].size, g_DstData,
|
progressive_decompress_ex(progressive, files[pass].buffer, files[pass].size, g_DstData,
|
||||||
PIXEL_FORMAT_XRGB32, g_DstStep, 0, 0, NULL, 0, 0);
|
PIXEL_FORMAT_XRGB32, g_DstStep, 0, 0, NULL, 0, 0);
|
||||||
printf("ProgressiveDecompress: status: %d pass: %d\n", status, pass + 1);
|
printf("ProgressiveDecompress: status: %d pass: %d\n", status, pass + 1);
|
||||||
region = &(progressive->region);
|
region = &(progressive->region);
|
||||||
@ -1068,7 +1068,7 @@ static BOOL test_encode_decode(const char* path)
|
|||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
// Progressive encode
|
// Progressive encode
|
||||||
rc = progressive_compress(progressiveEnc, image->data, image->scanline * image->height,
|
rc = progressive_compress_ex(progressiveEnc, image->data, image->scanline * image->height,
|
||||||
ColorFormat, image->width, image->height, image->scanline, NULL,
|
ColorFormat, image->width, image->height, image->scanline, NULL,
|
||||||
&dstData, &dstSize);
|
&dstData, &dstSize);
|
||||||
|
|
||||||
@ -1077,7 +1077,7 @@ static BOOL test_encode_decode(const char* path)
|
|||||||
if (rc <= 0)
|
if (rc <= 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
rc = progressive_decompress(progressiveDec, dstData, dstSize, resultData, ColorFormat,
|
rc = progressive_decompress_ex(progressiveDec, dstData, dstSize, resultData, ColorFormat,
|
||||||
image->scanline, 0, 0, &invalidRegion, 0, 0);
|
image->scanline, 0, 0, &invalidRegion, 0, 0);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
@ -825,13 +825,13 @@ static UINT gdi_SurfaceCommand_Progressive(rdpGdi* gdi, RdpgfxClientContext* con
|
|||||||
}
|
}
|
||||||
|
|
||||||
region16_init(&invalidRegion);
|
region16_init(&invalidRegion);
|
||||||
rc = progressive_decompress(surface->codecs->progressive, cmd->data, cmd->length, surface->data,
|
rc = progressive_decompress_ex(surface->codecs->progressive, cmd->data, cmd->length,
|
||||||
surface->format, surface->scanline, cmd->left, cmd->top,
|
surface->data, surface->format, surface->scanline, cmd->left,
|
||||||
&invalidRegion, cmd->surfaceId, gdi->frameId);
|
cmd->top, &invalidRegion, cmd->surfaceId, gdi->frameId);
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
{
|
{
|
||||||
WLog_ERR(TAG, "progressive_decompress failure: %" PRId32 "", rc);
|
WLog_ERR(TAG, "progressive_decompress_ex failure: %" PRId32 "", rc);
|
||||||
region16_uninit(&invalidRegion);
|
region16_uninit(&invalidRegion);
|
||||||
return ERROR_INTERNAL_ERROR;
|
return ERROR_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -970,11 +970,11 @@ static BOOL shadow_client_send_surface_bits(rdpShadowClient* client, BYTE* pSrcD
|
|||||||
rect.width = nWidth;
|
rect.width = nWidth;
|
||||||
rect.height = nHeight;
|
rect.height = nHeight;
|
||||||
|
|
||||||
if (!(messages = rfx_encode_messages(
|
if (!(messages = rfx_encode_messages_ex(
|
||||||
encoder->rfx, &rect, 1, pSrcData, settings->DesktopWidth, settings->DesktopHeight,
|
encoder->rfx, &rect, 1, pSrcData, settings->DesktopWidth, settings->DesktopHeight,
|
||||||
nSrcStep, &numMessages, settings->MultifragMaxRequestSize)))
|
nSrcStep, &numMessages, settings->MultifragMaxRequestSize)))
|
||||||
{
|
{
|
||||||
WLog_ERR(TAG, "rfx_encode_messages failed");
|
WLog_ERR(TAG, "rfx_encode_messages_ex failed");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user