FreeRDP
Loading...
Searching...
No Matches
nsc.h
1
23#ifndef FREERDP_CODEC_NSCODEC_H
24#define FREERDP_CODEC_NSCODEC_H
25
26#include <freerdp/api.h>
27#include <freerdp/types.h>
28#include <freerdp/constants.h>
29
30#include <winpr/stream.h>
31
32#ifdef __cplusplus
33extern "C"
34{
35#endif
36
37 typedef enum
38 {
39 NSC_COLOR_LOSS_LEVEL,
40 NSC_ALLOW_SUBSAMPLING,
41 NSC_DYNAMIC_COLOR_FIDELITY,
42 NSC_COLOR_FORMAT
43 } NSC_PARAMETER;
44
45 typedef struct S_NSC_CONTEXT NSC_CONTEXT;
46
47#if defined(WITH_FREERDP_DEPRECATED)
48 WINPR_DEPRECATED_VAR("Use nsc_context_set_parameters(NSC_COLOR_FORMAT)",
49 FREERDP_API BOOL nsc_context_set_pixel_format(NSC_CONTEXT* context,
50 UINT32 pixel_format));
51#endif
52
53 FREERDP_API BOOL nsc_context_set_parameters(NSC_CONTEXT* WINPR_RESTRICT context,
54 NSC_PARAMETER what, UINT32 value);
55
56 FREERDP_API BOOL nsc_process_message(NSC_CONTEXT* WINPR_RESTRICT context, UINT16 bpp,
57 UINT32 width, UINT32 height, const BYTE* data,
58 UINT32 length, BYTE* WINPR_RESTRICT pDstData,
59 UINT32 DstFormat, UINT32 nDstStride, UINT32 nXDst,
60 UINT32 nYDst, UINT32 nWidth, UINT32 nHeight, UINT32 flip);
61 FREERDP_API BOOL nsc_compose_message(NSC_CONTEXT* WINPR_RESTRICT context,
62 wStream* WINPR_RESTRICT s,
63 const BYTE* WINPR_RESTRICT bmpdata, UINT32 width,
64 UINT32 height, UINT32 rowstride);
65 FREERDP_API BOOL nsc_decompose_message(NSC_CONTEXT* WINPR_RESTRICT context,
66 wStream* WINPR_RESTRICT s, BYTE* WINPR_RESTRICT bmpdata,
67 UINT32 x, UINT32 y, UINT32 width, UINT32 height,
68 UINT32 rowstride, UINT32 format, UINT32 flip);
69
70 FREERDP_API BOOL nsc_context_reset(NSC_CONTEXT* WINPR_RESTRICT context, UINT32 width,
71 UINT32 height);
72
73 FREERDP_API void nsc_context_free(NSC_CONTEXT* context);
74
75 WINPR_ATTR_MALLOC(nsc_context_free, 1)
76 FREERDP_API NSC_CONTEXT* nsc_context_new(void);
77
78#ifdef __cplusplus
79}
80#endif
81
82#endif /* FREERDP_CODEC_NSCODEC_H */