nsc.h (2688B)
1/** 2 * FreeRDP: A Remote Desktop Protocol Implementation 3 * NSCodec Codec 4 * 5 * Copyright 2011 Samsung, Author Jiten Pathy 6 * Copyright 2012 Vic Lee 7 * Copyright 2016 Armin Novak <armin.novak@thincast.com> 8 * Copyright 2016 Thincast Technologies GmbH 9 * 10 * Licensed under the Apache License, Version 2.0 (the "License"); 11 * you may not use this file except in compliance with the License. 12 * You may obtain a copy of the License at 13 * 14 * http://www.apache.org/licenses/LICENSE-2.0 15 * 16 * Unless required by applicable law or agreed to in writing, software 17 * distributed under the License is distributed on an "AS IS" BASIS, 18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 19 * See the License for the specific language governing permissions and 20 * limitations under the License. 21 */ 22 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 _NSC_CONTEXT NSC_CONTEXT; 46 47#if !defined(DEFINE_NO_DEPRECATED) 48 FREERDP_API WINPR_DEPRECATED(BOOL nsc_context_set_pixel_format(NSC_CONTEXT* context, 49 UINT32 pixel_format)); 50#endif 51 52 FREERDP_API BOOL nsc_context_set_parameters(NSC_CONTEXT* context, NSC_PARAMETER what, 53 UINT32 value); 54 55 FREERDP_API BOOL nsc_process_message(NSC_CONTEXT* context, UINT16 bpp, UINT32 width, 56 UINT32 height, const BYTE* data, UINT32 length, 57 BYTE* pDstData, UINT32 DstFormat, UINT32 nDstStride, 58 UINT32 nXDst, UINT32 nYDst, UINT32 nWidth, UINT32 nHeight, 59 UINT32 flip); 60 FREERDP_API BOOL nsc_compose_message(NSC_CONTEXT* context, wStream* s, const BYTE* bmpdata, 61 UINT32 width, UINT32 height, UINT32 rowstride); 62 FREERDP_API BOOL nsc_decompose_message(NSC_CONTEXT* context, wStream* s, BYTE* bmpdata, 63 UINT32 x, UINT32 y, UINT32 width, UINT32 height, 64 UINT32 rowstride, UINT32 format, UINT32 flip); 65 66 FREERDP_API BOOL nsc_context_reset(NSC_CONTEXT* context, UINT32 width, UINT32 height); 67 68 FREERDP_API NSC_CONTEXT* nsc_context_new(void); 69 FREERDP_API void nsc_context_free(NSC_CONTEXT* context); 70 71#ifdef __cplusplus 72} 73#endif 74 75#endif /* FREERDP_CODEC_NSCODEC_H */