[Spice-commits] 2 commits - configure.ac spice-common src/channel-display.c src/spice-option.c src/spice-session.c

Christophe Fergau teuf at kemper.freedesktop.org
Fri Aug 14 07:41:23 PDT 2015


 configure.ac          |    8 +++++---
 spice-common          |    2 +-
 src/channel-display.c |    4 ++--
 src/spice-option.c    |   20 ++++++++++----------
 src/spice-session.c   |   34 +++++++++++++++++-----------------
 5 files changed, 35 insertions(+), 33 deletions(-)

New commits:
commit 21a872dc9b86065f1d8148f6a8b1b891523f0d7c
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Fri Aug 7 12:49:23 2015 +0200

    Adjust to new SpiceImageCompress name
    
    This has been renamed to SpiceImageCompression in order to avoid clashes
    with older spice-server in the SPICE_IMAGE_COMPRESS_ namespace. This
    commit is a straight rename of SpiceImageCompress to
    SpiceImageCompression and SPICE_IMAGE_COMPRESS_ to
    SPICE_IMAGE_COMPRESSION_

diff --git a/src/channel-display.c b/src/channel-display.c
index 752d69d..a65f926 100644
--- a/src/channel-display.c
+++ b/src/channel-display.c
@@ -792,7 +792,7 @@ static void spice_display_channel_up(SpiceChannel *channel)
     SpiceMsgcDisplayPreferredCompression pref_comp_msg;
     int cache_size;
     int glz_window_size;
-    SpiceImageCompress preferred_compression = SPICE_IMAGE_COMPRESS_INVALID;
+    SpiceImageCompression preferred_compression = SPICE_IMAGE_COMPRESSION_INVALID;
 
     g_object_get(s,
                  "cache-size", &cache_size,
@@ -813,7 +813,7 @@ static void spice_display_channel_up(SpiceChannel *channel)
     g_coroutine_object_notify(G_OBJECT(channel), "monitors");
 
     if (spice_channel_test_capability(channel, SPICE_DISPLAY_CAP_PREF_COMPRESSION) &&
-            preferred_compression > SPICE_IMAGE_COMPRESS_INVALID) {
+            preferred_compression > SPICE_IMAGE_COMPRESSION_INVALID) {
         pref_comp_msg.image_compression = preferred_compression;
         out = spice_msg_out_new(channel, SPICE_MSGC_DISPLAY_PREFERRED_COMPRESSION);
         out->marshallers->msgc_display_preferred_compression(out->marshaller, &pref_comp_msg);
diff --git a/src/spice-option.c b/src/spice-option.c
index 463a3e3..71e29a1 100644
--- a/src/spice-option.c
+++ b/src/spice-option.c
@@ -41,7 +41,7 @@ static gint cache_size = 0;
 static gint glz_window_size = 0;
 static gchar *secure_channels = NULL;
 static gchar *shared_dir = NULL;
-static SpiceImageCompress preferred_compression = SPICE_IMAGE_COMPRESS_INVALID;
+static SpiceImageCompression preferred_compression = SPICE_IMAGE_COMPRESSION_INVALID;
 
 G_GNUC_NORETURN
 static void option_version(void)
@@ -154,23 +154,23 @@ static gboolean parse_preferred_compression(const gchar *option_name, const gcha
                                             gpointer data, GError **error)
 {
     if (!strcmp(value, "auto-glz")) {
-        preferred_compression = SPICE_IMAGE_COMPRESS_AUTO_GLZ;
+        preferred_compression = SPICE_IMAGE_COMPRESSION_AUTO_GLZ;
     } else if (!strcmp(value, "auto-lz")) {
-        preferred_compression = SPICE_IMAGE_COMPRESS_AUTO_LZ;
+        preferred_compression = SPICE_IMAGE_COMPRESSION_AUTO_LZ;
     } else if (!strcmp(value, "quic")) {
-        preferred_compression = SPICE_IMAGE_COMPRESS_QUIC;
+        preferred_compression = SPICE_IMAGE_COMPRESSION_QUIC;
     } else if (!strcmp(value, "glz")) {
-        preferred_compression = SPICE_IMAGE_COMPRESS_GLZ;
+        preferred_compression = SPICE_IMAGE_COMPRESSION_GLZ;
     } else if (!strcmp(value, "lz")) {
-        preferred_compression = SPICE_IMAGE_COMPRESS_LZ;
+        preferred_compression = SPICE_IMAGE_COMPRESSION_LZ;
 #ifdef USE_LZ4
     } else if (!strcmp(value, "lz4")) {
-        preferred_compression = SPICE_IMAGE_COMPRESS_LZ4;
+        preferred_compression = SPICE_IMAGE_COMPRESSION_LZ4;
 #endif
     } else if (!strcmp(value, "off")) {
-        preferred_compression = SPICE_IMAGE_COMPRESS_OFF;
+        preferred_compression = SPICE_IMAGE_COMPRESSION_OFF;
     } else {
-        preferred_compression = SPICE_IMAGE_COMPRESS_INVALID;
+        preferred_compression = SPICE_IMAGE_COMPRESSION_INVALID;
         g_set_error(error, G_OPTION_ERROR, G_OPTION_ERROR_FAILED,
                     _("Image compression algorithm %s not supported"), value);
         return FALSE;
@@ -316,6 +316,6 @@ void spice_set_session_option(SpiceSession *session)
         g_object_set(session, "glz-window-size", glz_window_size, NULL);
     if (shared_dir)
         g_object_set(session, "shared-dir", shared_dir, NULL);
-    if (preferred_compression != SPICE_IMAGE_COMPRESS_INVALID)
+    if (preferred_compression != SPICE_IMAGE_COMPRESSION_INVALID)
         g_object_set(session, "preferred-compression", preferred_compression, NULL);
 }
diff --git a/src/spice-session.c b/src/spice-session.c
index f1261fd..d768796 100644
--- a/src/spice-session.c
+++ b/src/spice-session.c
@@ -117,7 +117,7 @@ struct _SpiceSessionPrivate {
     uint32_t          n_display_channels;
     guint8            uuid[16];
     gchar             *name;
-    SpiceImageCompress preferred_compression;
+    SpiceImageCompression preferred_compression;
 
     /* associated objects */
     SpiceAudio        *audio_manager;
@@ -204,7 +204,7 @@ enum {
     PROP_SHARE_DIR_RO,
     PROP_USERNAME,
     PROP_UNIX_PATH,
-    PROP_PREF_COMPRESS,
+    PROP_PREF_COMPRESSION,
 };
 
 /* signals */
@@ -216,22 +216,22 @@ enum {
 };
 
 /* Register SpiceImageCompress */
-#define SPICE_TYPE_IMAGE_COMPRESS spice_image_compress_get_type()
+#define SPICE_TYPE_IMAGE_COMPRESSION spice_image_compress_get_type()
 GType spice_image_compress_get_type (void);
 
 static const GEnumValue _spice_image_compress_values[] = {
-  { SPICE_IMAGE_COMPRESS_INVALID, "SPICE_IMAGE_COMPRESS_INVALID", "invalid" },
-  { SPICE_IMAGE_COMPRESS_OFF, "SPICE_IMAGE_COMPRESS_OFF", "off" },
-  { SPICE_IMAGE_COMPRESS_AUTO_GLZ, "SPICE_IMAGE_COMPRESS_AUTO_GLZ", "auto-glz" },
-  { SPICE_IMAGE_COMPRESS_AUTO_LZ, "SPICE_IMAGE_COMPRESS_AUTO_LZ", "auto-lz" },
-  { SPICE_IMAGE_COMPRESS_QUIC, "SPICE_IMAGE_COMPRESS_QUIC", "quic" },
-  { SPICE_IMAGE_COMPRESS_GLZ, "SPICE_IMAGE_COMPRESS_GLZ", "glz" },
-  { SPICE_IMAGE_COMPRESS_LZ, "SPICE_IMAGE_COMPRESS_LZ", "lz" },
-  { SPICE_IMAGE_COMPRESS_LZ4, "SPICE_IMAGE_COMPRESS_LZ4", "lz4" },
+  { SPICE_IMAGE_COMPRESSION_INVALID, "SPICE_IMAGE_COMPRESSION_INVALID", "invalid" },
+  { SPICE_IMAGE_COMPRESSION_OFF, "SPICE_IMAGE_COMPRESSION_OFF", "off" },
+  { SPICE_IMAGE_COMPRESSION_AUTO_GLZ, "SPICE_IMAGE_COMPRESSION_AUTO_GLZ", "auto-glz" },
+  { SPICE_IMAGE_COMPRESSION_AUTO_LZ, "SPICE_IMAGE_COMPRESSION_AUTO_LZ", "auto-lz" },
+  { SPICE_IMAGE_COMPRESSION_QUIC, "SPICE_IMAGE_COMPRESSION_QUIC", "quic" },
+  { SPICE_IMAGE_COMPRESSION_GLZ, "SPICE_IMAGE_COMPRESSION_GLZ", "glz" },
+  { SPICE_IMAGE_COMPRESSION_LZ, "SPICE_IMAGE_COMPRESSION_LZ", "lz" },
+  { SPICE_IMAGE_COMPRESSION_LZ4, "SPICE_IMAGE_COMPRESSION_LZ4", "lz4" },
   { 0, NULL, NULL }
 };
 
-G_STATIC_ASSERT(G_N_ELEMENTS(_spice_image_compress_values) == SPICE_IMAGE_COMPRESS_ENUM_END + 1);
+G_STATIC_ASSERT(G_N_ELEMENTS(_spice_image_compress_values) == SPICE_IMAGE_COMPRESSION_ENUM_END + 1);
 
 GType
 spice_image_compress_get_type (void)
@@ -692,7 +692,7 @@ static void spice_session_get_property(GObject    *gobject,
     case PROP_SHARE_DIR_RO:
         g_value_set_boolean(value, s->share_dir_ro);
         break;
-    case PROP_PREF_COMPRESS:
+    case PROP_PREF_COMPRESSION:
         g_value_set_enum(value, s->preferred_compression);
         break;
     default:
@@ -831,7 +831,7 @@ static void spice_session_set_property(GObject      *gobject,
     case PROP_SHARE_DIR_RO:
         s->share_dir_ro = g_value_get_boolean(value);
         break;
-    case PROP_PREF_COMPRESS:
+    case PROP_PREF_COMPRESSION:
         s->preferred_compression = g_value_get_enum(value);
         break;
     default:
@@ -1452,12 +1452,12 @@ static void spice_session_class_init(SpiceSessionClass *klass)
      * Since: 0.29
      **/
     g_object_class_install_property
-        (gobject_class, PROP_PREF_COMPRESS,
+        (gobject_class, PROP_PREF_COMPRESSION,
          g_param_spec_enum("preferred-compression",
                            "Preferred image compression algorithm",
                            "Preferred image compression algorithm",
-                           SPICE_TYPE_IMAGE_COMPRESS,
-                           SPICE_IMAGE_COMPRESS_INVALID,
+                           SPICE_TYPE_IMAGE_COMPRESSION,
+                           SPICE_IMAGE_COMPRESSION_INVALID,
                            G_PARAM_READWRITE |
                            G_PARAM_STATIC_STRINGS));
 
commit d0ae58a8dfe137564129ee9edac457d7a8e39bf6
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Fri Aug 7 12:49:22 2015 +0200

    build-sys: Remove spice-protocol submodule
    
    It's seeing regular releases and is API stable, so we don't need to
    bundle it with spice-gtk

diff --git a/configure.ac b/configure.ac
index 1b347c0..0a60ec3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,7 +73,9 @@ AC_CHECK_LIBM
 AC_SUBST(LIBM)
 
 AC_CONFIG_SUBDIRS([spice-common])
-COMMON_CFLAGS='-I ${top_srcdir}/spice-common/ -I ${top_srcdir}/spice-common/spice-protocol/'
+PKG_CHECK_MODULES([SPICE_PROTOCOL], [spice-protocol >= 0.12.10])
+
+COMMON_CFLAGS='-I ${top_srcdir}/spice-common/ ${SPICE_PROTOCOL_CFLAGS}'
 AC_SUBST(COMMON_CFLAGS)
 
 SPICE_GTK_MAJOR_VERSION=`echo $PACKAGE_VERSION | cut -d. -f1`
@@ -99,7 +101,7 @@ if test ! -e "$srcdir/src/vncdisplaykeymap_osx2xtkbd.c"; then
   AC_MSG_RESULT([found])
 fi
 
-SPICE_GLIB_REQUIRES=""
+SPICE_GLIB_REQUIRES="spice-protocol >= 0.12.10"
 SPICE_GTK_REQUIRES=""
 
 PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.17.7)
@@ -700,7 +702,7 @@ SPICE_CFLAGS="$SPICE_CFLAGS $WARN_CFLAGS"
 
 AC_SUBST(SPICE_CFLAGS)
 
-SPICE_GLIB_CFLAGS="$PROTOCOL_CFLAGS $PIXMAN_CFLAGS $PULSE_CFLAGS $GST_CFLAGS $GLIB2_CFLAGS $GIO_CFLAGS $GOBJECT2_CFLAGS $SSL_CFLAGS $SASL_CFLAGS"
+SPICE_GLIB_CFLAGS="$PIXMAN_CFLAGS $PULSE_CFLAGS $GST_CFLAGS $GLIB2_CFLAGS $GIO_CFLAGS $GOBJECT2_CFLAGS $SSL_CFLAGS $SASL_CFLAGS"
 SPICE_GTK_CFLAGS="$SPICE_GLIB_CFLAGS $GTK_CFLAGS "
 
 AC_SUBST(SPICE_GLIB_CFLAGS)
diff --git a/spice-common b/spice-common
index 2d054e0..dd63a3b 160000
--- a/spice-common
+++ b/spice-common
@@ -1 +1 @@
-Subproject commit 2d054e0e6901a1cfbe396f30d9899da46ff533d9
+Subproject commit dd63a3b656bd11af7d97317f2de0824cd6cef5da


More information about the Spice-commits mailing list