mirror of https://github.com/FreeRDP/FreeRDP
Refactored bulk compression
* Arguments now opaque * Removed internal functions from external interface
This commit is contained in:
parent
eca32456bb
commit
49b17e4e03
|
@ -26,6 +26,19 @@
|
|||
#define TAG "com.freerdp.core"
|
||||
|
||||
//#define WITH_BULK_DEBUG 1
|
||||
struct rdp_bulk
|
||||
{
|
||||
rdpContext* context;
|
||||
UINT32 CompressionLevel;
|
||||
UINT32 CompressionMaxSize;
|
||||
MPPC_CONTEXT* mppcSend;
|
||||
MPPC_CONTEXT* mppcRecv;
|
||||
NCRUSH_CONTEXT* ncrushRecv;
|
||||
NCRUSH_CONTEXT* ncrushSend;
|
||||
XCRUSH_CONTEXT* xcrushRecv;
|
||||
XCRUSH_CONTEXT* xcrushSend;
|
||||
BYTE OutputBuffer[65536];
|
||||
};
|
||||
|
||||
static INLINE const char* bulk_get_compression_flags_string(UINT32 flags)
|
||||
{
|
||||
|
@ -51,7 +64,7 @@ static INLINE const char* bulk_get_compression_flags_string(UINT32 flags)
|
|||
return "PACKET_UNKNOWN";
|
||||
}
|
||||
|
||||
UINT32 bulk_compression_level(rdpBulk* bulk)
|
||||
static UINT32 bulk_compression_level(rdpBulk* bulk)
|
||||
{
|
||||
rdpSettings* settings = bulk->context->settings;
|
||||
bulk->CompressionLevel = (settings->CompressionLevel >= PACKET_COMPR_TYPE_RDP61)
|
||||
|
|
|
@ -29,24 +29,9 @@ typedef struct rdp_bulk rdpBulk;
|
|||
#include <freerdp/codec/ncrush.h>
|
||||
#include <freerdp/codec/xcrush.h>
|
||||
|
||||
struct rdp_bulk
|
||||
{
|
||||
rdpContext* context;
|
||||
UINT32 CompressionLevel;
|
||||
UINT32 CompressionMaxSize;
|
||||
MPPC_CONTEXT* mppcSend;
|
||||
MPPC_CONTEXT* mppcRecv;
|
||||
NCRUSH_CONTEXT* ncrushRecv;
|
||||
NCRUSH_CONTEXT* ncrushSend;
|
||||
XCRUSH_CONTEXT* xcrushRecv;
|
||||
XCRUSH_CONTEXT* xcrushSend;
|
||||
BYTE OutputBuffer[65536];
|
||||
};
|
||||
|
||||
#define BULK_COMPRESSION_FLAGS_MASK 0xE0
|
||||
#define BULK_COMPRESSION_TYPE_MASK 0x0F
|
||||
|
||||
FREERDP_LOCAL UINT32 bulk_compression_level(rdpBulk* bulk);
|
||||
FREERDP_LOCAL UINT32 bulk_compression_max_size(rdpBulk* bulk);
|
||||
|
||||
FREERDP_LOCAL int bulk_decompress(rdpBulk* bulk, BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstData,
|
||||
|
|
Loading…
Reference in New Issue