summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Celaya <javier.celaya@flexvm.es>2014-11-13 16:58:03 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2014-12-02 19:46:07 +0100
commit37cc8a1750cdaa3abadc6d1489404a7b27a0c9c0 (patch)
tree8cd19463c4200000309d03f46212f9c96e8bf253
parent14dc8e170e71e4b860afe84cd20900b462e9b132 (diff)
downloadspice-gtk-37cc8a1750cdaa3abadc6d1489404a7b27a0c9c0.tar.gz
spice-gtk-37cc8a1750cdaa3abadc6d1489404a7b27a0c9c0.tar.xz
spice-gtk-37cc8a1750cdaa3abadc6d1489404a7b27a0c9c0.zip
Add LZ4 compression algorithm support.
- Use PKG_CHECK_MODULES to find liblz4. - Set LZ4 display channel capability.
-rw-r--r--configure.ac14
-rw-r--r--gtk/Makefile.am2
-rw-r--r--gtk/channel-display.c3
m---------spice-common0
4 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 613a128..b55f3a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -695,6 +695,19 @@ if test "x$enable_dbus" != "xno"; then
fi
fi
+AC_ARG_ENABLE([lz4],
+ AS_HELP_STRING([--enable-lz4=@<:@yes/no@:>@],
+ [Enable lz4 compression algorithm @<:@default=no@:>@]),
+ [],
+ [enable_lz4="no"])
+
+if test "x$enable_lz4" = "xyes"; then
+ PKG_CHECK_MODULES(LZ4, liblz4)
+ AC_DEFINE([USE_LZ4], [1], [Define to build with Lz4 support])
+fi
+AC_SUBST(LZ4_CFLAGS)
+AC_SUBST(LZ4_LIBS)
+
dnl ===========================================================================
dnl check compiler flags
@@ -765,6 +778,7 @@ AC_MSG_NOTICE([
USB redirection support: ${have_usbredir} ${with_usbredir_hotplug}
DBus: ${have_dbus}
WebDAV support: ${have_phodav}
+ LZ4 support: ${enable_lz4}
Now type 'make' to build $PACKAGE
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
index f11cfb9..6003793 100644
--- a/gtk/Makefile.am
+++ b/gtk/Makefile.am
@@ -100,6 +100,7 @@ SPICE_COMMON_CPPFLAGS = \
$(GUDEV_CFLAGS) \
$(SOUP_CFLAGS) \
$(PHODAV_CFLAGS) \
+ $(LZ4_CFLAGS) \
$(NULL)
AM_CPPFLAGS = \
@@ -202,6 +203,7 @@ libspice_client_glib_2_0_la_LIBADD = \
$(OPUS_LIBS) \
$(JPEG_LIBS) \
$(Z_LIBS) \
+ $(LZ4_LIBS) \
$(PIXMAN_LIBS) \
$(SSL_LIBS) \
$(PULSE_LIBS) \
diff --git a/gtk/channel-display.c b/gtk/channel-display.c
index 17e2f6e..fa7fe3c 100644
--- a/gtk/channel-display.c
+++ b/gtk/channel-display.c
@@ -590,6 +590,9 @@ static void spice_display_channel_reset_capabilities(SpiceChannel *channel)
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_MONITORS_CONFIG);
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_COMPOSITE);
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_A8_SURFACE);
+#ifdef USE_LZ4
+ spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_LZ4_COMPRESSION);
+#endif
if (SPICE_DISPLAY_CHANNEL(channel)->priv->enable_adaptive_streaming) {
spice_channel_set_capability(SPICE_CHANNEL(channel), SPICE_DISPLAY_CAP_STREAM_REPORT);
}
diff --git a/spice-common b/spice-common
-Subproject c22fbffbc79f92e1d2976f6f19bf275cf81b5ec
+Subproject 5b3cdad921d32c9294377efac61243a09f849d0