Merge pull request #3726 from hardening/add_const
Added missing const modifiers for source pointers in codecs
This commit is contained in:
commit
220f407278
@ -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
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
@ -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__);
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user