diff --git a/include/freerdp/codec/bitmap.h b/include/freerdp/codec/bitmap.h index 507829253..2166cdfe6 100644 --- a/include/freerdp/codec/bitmap.h +++ b/include/freerdp/codec/bitmap.h @@ -32,7 +32,7 @@ extern "C" { #endif -FREERDP_API int freerdp_bitmap_compress(char* in_data, int width, int height, +FREERDP_API int freerdp_bitmap_compress(const char* in_data, int width, int height, wStream* s, int bpp, int byte_limit, int start_line, wStream* temp_s, int e); #ifdef __cplusplus diff --git a/include/freerdp/codec/clear.h b/include/freerdp/codec/clear.h index 05be6ed21..55b841b07 100644 --- a/include/freerdp/codec/clear.h +++ b/include/freerdp/codec/clear.h @@ -32,7 +32,7 @@ typedef struct _CLEAR_CONTEXT CLEAR_CONTEXT; extern "C" { #endif -FREERDP_API int clear_compress(CLEAR_CONTEXT* clear, BYTE* pSrcData, +FREERDP_API int clear_compress(CLEAR_CONTEXT* clear, const BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstData, UINT32* pDstSize); FREERDP_API INT32 clear_decompress(CLEAR_CONTEXT* clear, const BYTE* pSrcData, diff --git a/include/freerdp/codec/h264.h b/include/freerdp/codec/h264.h index 83e3ca51d..69e02890a 100644 --- a/include/freerdp/codec/h264.h +++ b/include/freerdp/codec/h264.h @@ -29,7 +29,7 @@ typedef struct _H264_CONTEXT H264_CONTEXT; typedef BOOL (*pfnH264SubsystemInit)(H264_CONTEXT* h264); typedef void (*pfnH264SubsystemUninit)(H264_CONTEXT* h264); -typedef int (*pfnH264SubsystemDecompress)(H264_CONTEXT* h264, BYTE* pSrcData, +typedef int (*pfnH264SubsystemDecompress)(H264_CONTEXT* h264, const BYTE* pSrcData, UINT32 SrcSize, UINT32 plane); typedef int (*pfnH264SubsystemCompress)(H264_CONTEXT* h264, BYTE** ppDstData, UINT32* pDstSize, UINT32 plane); @@ -80,18 +80,18 @@ struct _H264_CONTEXT extern "C" { #endif -FREERDP_API INT32 avc420_compress(H264_CONTEXT* h264, BYTE* pSrcData, +FREERDP_API INT32 avc420_compress(H264_CONTEXT* h264, const BYTE* pSrcData, DWORD SrcFormat, UINT32 nSrcStep, UINT32 nSrcWidth, UINT32 nSrcHeight, BYTE** ppDstData, UINT32* pDstSize); -FREERDP_API INT32 avc420_decompress(H264_CONTEXT* h264, BYTE* pSrcData, +FREERDP_API INT32 avc420_decompress(H264_CONTEXT* h264, const BYTE* pSrcData, UINT32 SrcSize, BYTE* pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32 nDstWidth, UINT32 nDstHeight, RECTANGLE_16* regionRects, UINT32 numRegionRect); -FREERDP_API INT32 avc444_compress(H264_CONTEXT* h264, BYTE* pSrcData, DWORD SrcFormat, +FREERDP_API INT32 avc444_compress(H264_CONTEXT* h264, const BYTE* pSrcData, DWORD SrcFormat, UINT32 nSrcStep, UINT32 nSrcWidth, UINT32 nSrcHeight, BYTE* op, BYTE** pDstData, UINT32* pDstSize, @@ -99,9 +99,9 @@ FREERDP_API INT32 avc444_compress(H264_CONTEXT* h264, BYTE* pSrcData, DWORD SrcF FREERDP_API INT32 avc444_decompress(H264_CONTEXT* h264, BYTE op, RECTANGLE_16* regionRects, UINT32 numRegionRect, - BYTE* pSrcData, UINT32 SrcSize, + const BYTE* pSrcData, UINT32 SrcSize, RECTANGLE_16* auxRegionRects, UINT32 numAuxRegionRect, - BYTE* pAuxSrcData, UINT32 AuxSrcSize, + const BYTE* pAuxSrcData, UINT32 AuxSrcSize, BYTE* pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32 nDstWidth, UINT32 nDstHeight); diff --git a/include/freerdp/codec/progressive.h b/include/freerdp/codec/progressive.h index f373e6172..00e449ecf 100644 --- a/include/freerdp/codec/progressive.h +++ b/include/freerdp/codec/progressive.h @@ -36,7 +36,7 @@ extern "C" { #endif FREERDP_API int progressive_compress(PROGRESSIVE_CONTEXT* progressive, - BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstData, UINT32* pDstSize); + const BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstData, UINT32* pDstSize); FREERDP_API INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData, UINT32 SrcSize, diff --git a/libfreerdp/codec/bitmap.c b/libfreerdp/codec/bitmap.c index ccb104ed2..b324cea56 100644 --- a/libfreerdp/codec/bitmap.c +++ b/libfreerdp/codec/bitmap.c @@ -456,7 +456,7 @@ bicolor_spin = 0; \ } -int freerdp_bitmap_compress(char* srcData, int width, int height, +int freerdp_bitmap_compress(const char* srcData, int width, int height, wStream* s, int bpp, int byte_limit, int start_line, wStream* temp_s, int e) { char *line; diff --git a/libfreerdp/codec/clear.c b/libfreerdp/codec/clear.c index fe2351e4b..11a78418b 100644 --- a/libfreerdp/codec/clear.c +++ b/libfreerdp/codec/clear.c @@ -1185,7 +1185,7 @@ fail: return rc; } -int clear_compress(CLEAR_CONTEXT* clear, BYTE* pSrcData, UINT32 SrcSize, +int clear_compress(CLEAR_CONTEXT* clear, const BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstData, UINT32* pDstSize) { WLog_ERR(TAG, "TODO: %s not implemented!", __FUNCTION__); diff --git a/libfreerdp/codec/h264.c b/libfreerdp/codec/h264.c index 2222575c9..5b0e2b3f7 100644 --- a/libfreerdp/codec/h264.c +++ b/libfreerdp/codec/h264.c @@ -36,7 +36,7 @@ * Dummy subsystem */ -static int dummy_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize, +static int dummy_decompress(H264_CONTEXT* h264, const BYTE* pSrcData, UINT32 SrcSize, UINT32 plane) { return -1; @@ -1521,7 +1521,7 @@ static BOOL avc_yuv_to_rgb(H264_CONTEXT* h264, const RECTANGLE_16* regionRects, return TRUE; } -INT32 avc420_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize, +INT32 avc420_decompress(H264_CONTEXT* h264, const BYTE* pSrcData, UINT32 SrcSize, BYTE* pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32 nDstWidth, UINT32 nDstHeight, RECTANGLE_16* regionRects, UINT32 numRegionRects) @@ -1546,7 +1546,7 @@ INT32 avc420_decompress(H264_CONTEXT* h264, BYTE* pSrcData, UINT32 SrcSize, return 1; } -INT32 avc420_compress(H264_CONTEXT* h264, BYTE* pSrcData, DWORD SrcFormat, +INT32 avc420_compress(H264_CONTEXT* h264, const BYTE* pSrcData, DWORD SrcFormat, UINT32 nSrcStep, UINT32 nSrcWidth, UINT32 nSrcHeight, BYTE** ppDstData, UINT32* pDstSize) { @@ -1598,7 +1598,7 @@ error_1: return status; } -INT32 avc444_compress(H264_CONTEXT* h264, BYTE* pSrcData, DWORD SrcFormat, +INT32 avc444_compress(H264_CONTEXT* h264, const BYTE* pSrcData, DWORD SrcFormat, UINT32 nSrcStep, UINT32 nSrcWidth, UINT32 nSrcHeight, BYTE* op, BYTE** ppDstData, UINT32* pDstSize, BYTE** ppAuxDstData, UINT32* pAuxDstSize) @@ -1764,9 +1764,9 @@ static double avg(UINT64* count, double old, double size) INT32 avc444_decompress(H264_CONTEXT* h264, BYTE op, RECTANGLE_16* regionRects, UINT32 numRegionRects, - BYTE* pSrcData, UINT32 SrcSize, + const BYTE* pSrcData, UINT32 SrcSize, RECTANGLE_16* auxRegionRects, UINT32 numAuxRegionRect, - BYTE* pAuxSrcData, UINT32 AuxSrcSize, + const BYTE* pAuxSrcData, UINT32 AuxSrcSize, BYTE* pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32 nDstWidth, UINT32 nDstHeight) { diff --git a/libfreerdp/codec/progressive.c b/libfreerdp/codec/progressive.c index 309d212aa..09078d292 100644 --- a/libfreerdp/codec/progressive.c +++ b/libfreerdp/codec/progressive.c @@ -1928,7 +1928,7 @@ INT32 progressive_decompress(PROGRESSIVE_CONTEXT* progressive, return rc; } -int progressive_compress(PROGRESSIVE_CONTEXT* progressive, BYTE* pSrcData, +int progressive_compress(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstData, UINT32* pDstSize) { return 1;