libfreerdp-codec: stub progressive codec decompressor

This commit is contained in:
Marc-André Moreau 2014-07-28 17:42:23 -04:00
parent 8321d7ffad
commit 0c408c213c
5 changed files with 133 additions and 0 deletions

View File

@ -0,0 +1,53 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* Progressive Codec Bitmap Compression
*
* Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef FREERDP_CODEC_PROGRESSIVE_H
#define FREERDP_CODEC_PROGRESSIVE_H
#include <freerdp/api.h>
#include <freerdp/types.h>
#include <freerdp/codec/color.h>
struct _PROGRESSIVE_CONTEXT
{
BOOL Compressor;
};
typedef struct _PROGRESSIVE_CONTEXT PROGRESSIVE_CONTEXT;
#ifdef __cplusplus
extern "C" {
#endif
FREERDP_API int progressive_compress(PROGRESSIVE_CONTEXT* progressive, BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstData, UINT32* pDstSize);
FREERDP_API int progressive_decompress(PROGRESSIVE_CONTEXT* progressive, BYTE* pSrcData, UINT32 SrcSize,
BYTE** ppDstData, DWORD DstFormat, int nDstStep, int nXDst, int nYDst, int nWidth, int nHeight);
FREERDP_API void progressive_context_reset(PROGRESSIVE_CONTEXT* progressive);
FREERDP_API PROGRESSIVE_CONTEXT* progressive_context_new(BOOL Compressor);
FREERDP_API void progressive_context_free(PROGRESSIVE_CONTEXT* progressive);
#ifdef __cplusplus
}
#endif
#endif /* FREERDP_CODEC_PROGRESSIVE_H */

View File

@ -24,6 +24,7 @@ set(${MODULE_PREFIX}_SRCS
audio.c
planar.c
planar.h
progressive.c
bitmap_decode.c
bitmap_encode.c
rfx_bitstream.h

View File

@ -0,0 +1,68 @@
/**
* FreeRDP: A Remote Desktop Protocol Implementation
* Progressive Codec Bitmap Compression
*
* Copyright 2014 Marc-Andre Moreau <marcandre.moreau@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <winpr/crt.h>
#include <winpr/print.h>
#include <winpr/bitstream.h>
#include <freerdp/codec/color.h>
#include <freerdp/codec/progressive.h>
int progressive_decompress(PROGRESSIVE_CONTEXT* progressive, BYTE* pSrcData, UINT32 SrcSize,
BYTE** ppDstData, DWORD DstFormat, int nDstStep, int nXDst, int nYDst, int nWidth, int nHeight)
{
return 1;
}
int progressive_compress(PROGRESSIVE_CONTEXT* progressive, BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstData, UINT32* pDstSize)
{
return 1;
}
void progressive_context_reset(PROGRESSIVE_CONTEXT* progressive)
{
}
PROGRESSIVE_CONTEXT* progressive_context_new(BOOL Compressor)
{
PROGRESSIVE_CONTEXT* progressive;
progressive = (PROGRESSIVE_CONTEXT*) calloc(1, sizeof(PROGRESSIVE_CONTEXT));
if (progressive)
{
progressive->Compressor = Compressor;
}
return progressive;
}
void progressive_context_free(PROGRESSIVE_CONTEXT* progressive)
{
if (!progressive)
return;
free(progressive);
}

View File

@ -12,6 +12,7 @@ set(${MODULE_PREFIX}_TESTS
TestFreeRDPCodecZGfx.c
TestFreeRDPCodecPlanar.c
TestFreeRDPCodecClear.c
TestFreeRDPCodecProgressive.c
TestFreeRDPCodecRemoteFX.c)
create_test_sourcelist(${MODULE_PREFIX}_SRCS

View File

@ -0,0 +1,10 @@
#include <winpr/crt.h>
#include <winpr/print.h>
#include <freerdp/codec/progressive.h>
int TestFreeRDPCodecProgressive(int argc, char* argv[])
{
return 0;
}