Add test for change in type of rdpBitmap.Decompress. Fix cliprdr header.
This commit is contained in:
parent
daa1e18355
commit
c0f681066e
53
configure.ac
53
configure.ac
@ -217,6 +217,7 @@ have_winpr=yes
|
||||
have_freerdp=yes
|
||||
legacy_freerdp_extensions=no
|
||||
rdpsettings_interface=unknown
|
||||
freerdp_interface=unknown
|
||||
RDP_LIBS=
|
||||
|
||||
# libfreerdp-cache
|
||||
@ -251,13 +252,21 @@ AC_CHECK_LIB([freerdp-codec], [freerdp_image_convert],
|
||||
AC_CHECK_MEMBERS([rdpSvcPlugin.interval_ms],
|
||||
[[#include <freerdp/utils/svc_plugin.h>]])
|
||||
|
||||
# FreeRDP-specific headers
|
||||
# Keyboard layout header
|
||||
AC_CHECK_HEADERS([freerdp/locale/keyboard.h],,
|
||||
AC_CHECK_HEADERS([freerdp/kbd/layouts.h],,
|
||||
[have_freerdp=no]))
|
||||
|
||||
# New headers defining addins
|
||||
AC_CHECK_HEADERS([freerdp/addin.h freerdp/client/channels.h])
|
||||
|
||||
# Header defining cliprdr
|
||||
AC_CHECK_HEADERS([freerdp/client/cliprdr.h],,
|
||||
AC_CHECK_HEADERS([freerdp/plugins/cliprdr.h],,
|
||||
[have_freerdp=no]),
|
||||
[#include <winpr/wtypes.h>
|
||||
#include <winpr/collections.h>])
|
||||
|
||||
AC_CHECK_DECL([freerdp_register_addin_provider],
|
||||
[AC_DEFINE([HAVE_FREERDP_REGISTER_ADDIN_PROVIDER])],,
|
||||
[#include <freerdp/addin.h>])
|
||||
@ -283,6 +292,30 @@ then
|
||||
AC_DEFINE([ENABLE_WINPR])
|
||||
fi
|
||||
|
||||
#
|
||||
# FreeRDP: freerdp
|
||||
#
|
||||
|
||||
# Check for current (as of 1.1) freerdp interface
|
||||
AC_CHECK_MEMBERS([freerdp.ContextSize],
|
||||
[freerdp_interface=stable],,
|
||||
[[#include <freerdp/freerdp.h>]])
|
||||
|
||||
# If not current, check for legacy interface
|
||||
if test "x${freerdp_interface}" = "xunknown"
|
||||
then
|
||||
AC_CHECK_MEMBERS([freerdp.context_size],
|
||||
[freerdp_interface=legacy],,
|
||||
[[#include <freerdp/freerdp.h>]])
|
||||
fi
|
||||
|
||||
# Set defines based on interface type, warn if unknown
|
||||
if test "x${freerdp_interface}" = "xlegacy"; then
|
||||
AC_DEFINE([LEGACY_FREERDP])
|
||||
elif test "x${freerdp_interface}" = "xunknown"; then
|
||||
have_freerdp=no
|
||||
fi
|
||||
|
||||
#
|
||||
# FreeRDP: rdpSettings
|
||||
#
|
||||
@ -311,6 +344,24 @@ elif test "x${rdpsettings_interface}" = "xunknown"; then
|
||||
have_freerdp=no
|
||||
fi
|
||||
|
||||
#
|
||||
# FreeRDP: rdpBitmap
|
||||
#
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <winpr/wtypes.h>
|
||||
#include <freerdp/freerdp.h>
|
||||
void __decompress(rdpContext* context,
|
||||
rdpBitmap* bitmap,
|
||||
UINT8* data,
|
||||
int width,
|
||||
int height,
|
||||
int bpp,
|
||||
int length,
|
||||
BOOL compressed,
|
||||
int codec_id);
|
||||
rdpBitmap b = { .Decompress = __decompress };]])],,
|
||||
[AC_DEFINE([LEGACY_RDPBITMAP])])
|
||||
|
||||
AM_CONDITIONAL([LEGACY_FREERDP_EXTENSIONS], [test "x${legacy_freerdp_extensions}" = "xyes"])
|
||||
AM_CONDITIONAL([ENABLE_WINPR], [test "x${have_winpr}" = "xyes"])
|
||||
AM_CONDITIONAL([ENABLE_RDP], [test "x${have_freerdp}" = "xyes"])
|
||||
|
@ -389,7 +389,11 @@ int guac_client_init(guac_client* client, int argc, char** argv) {
|
||||
rdp_inst->ReceiveChannelData = __guac_receive_channel_data;
|
||||
|
||||
/* Allocate FreeRDP context */
|
||||
#ifdef LEGACY_FREERDP
|
||||
rdp_inst->context_size = sizeof(rdp_freerdp_context);
|
||||
#else
|
||||
rdp_inst->ContextSize = sizeof(rdp_freerdp_context);
|
||||
#endif
|
||||
rdp_inst->ContextNew = (pContextNew) rdp_freerdp_context_new;
|
||||
rdp_inst->ContextFree = (pContextFree) rdp_freerdp_context_free;
|
||||
freerdp_context_new(rdp_inst);
|
||||
|
@ -52,7 +52,12 @@
|
||||
#include <freerdp/codec/color.h>
|
||||
#include <freerdp/cache/cache.h>
|
||||
#include <freerdp/utils/event.h>
|
||||
|
||||
#ifdef HAVE_FREERDP_CLIENT_CLIPRDR_H
|
||||
#include <freerdp/client/cliprdr.h>
|
||||
#else
|
||||
#include <freerdp/plugins/cliprdr.h>
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_WINPR
|
||||
#include <winpr/wtypes.h>
|
||||
|
@ -197,7 +197,13 @@ void guac_rdp_bitmap_setsurface(rdpContext* context, rdpBitmap* bitmap, BOOL pri
|
||||
|
||||
}
|
||||
|
||||
void guac_rdp_bitmap_decompress(rdpContext* context, rdpBitmap* bitmap, UINT8* data, int width, int height, int bpp, int length, BOOL compressed) {
|
||||
#ifdef LEGACY_RDPBITMAP
|
||||
void guac_rdp_bitmap_decompress(rdpContext* context, rdpBitmap* bitmap, UINT8* data,
|
||||
int width, int height, int bpp, int length, BOOL compressed) {
|
||||
#else
|
||||
void guac_rdp_bitmap_decompress(rdpContext* context, rdpBitmap* bitmap, UINT8* data,
|
||||
int width, int height, int bpp, int length, BOOL compressed, int codec_id) {
|
||||
#endif
|
||||
|
||||
int size = width * height * (bpp + 7) / 8;
|
||||
|
||||
|
@ -69,9 +69,16 @@ typedef struct guac_rdp_bitmap {
|
||||
|
||||
void guac_rdp_cache_bitmap(rdpContext* context, rdpBitmap* bitmap);
|
||||
void guac_rdp_bitmap_new(rdpContext* context, rdpBitmap* bitmap);
|
||||
void guac_rdp_bitmap_decompress(rdpContext* context, rdpBitmap* bitmap, UINT8* data, int width, int height, int bpp, int length, BOOL compressed);
|
||||
void guac_rdp_bitmap_paint(rdpContext* context, rdpBitmap* bitmap);
|
||||
void guac_rdp_bitmap_free(rdpContext* context, rdpBitmap* bitmap);
|
||||
void guac_rdp_bitmap_setsurface(rdpContext* context, rdpBitmap* bitmap, BOOL primary);
|
||||
|
||||
#ifdef LEGACY_RDPBITMAP
|
||||
void guac_rdp_bitmap_decompress(rdpContext* context, rdpBitmap* bitmap, UINT8* data,
|
||||
int width, int height, int bpp, int length, BOOL compressed);
|
||||
#else
|
||||
void guac_rdp_bitmap_decompress(rdpContext* context, rdpBitmap* bitmap, UINT8* data,
|
||||
int width, int height, int bpp, int length, BOOL compressed, int codec_id);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user