[PATCH 1/2] Use image compress constants from spice-protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 server/red_dispatcher.c |  2 +-
 server/red_dispatcher.h |  2 +-
 server/red_worker.c     |  8 ++++----
 server/red_worker.h     |  2 +-
 server/reds.c           |  8 ++++----
 server/spice-server.h   | 15 ++-------------
 spice-common            |  2 +-
 7 files changed, 14 insertions(+), 25 deletions(-)

diff --git a/server/red_dispatcher.c b/server/red_dispatcher.c
index d8389bc..4965a97 100644
--- a/server/red_dispatcher.c
+++ b/server/red_dispatcher.c
@@ -79,7 +79,7 @@ typedef struct RedWorkeState {
 } RedWorkeState;
 
 extern uint32_t streaming_video;
-extern spice_image_compression_t image_compression;
+extern SpiceImageCompress image_compression;
 extern spice_wan_compression_t jpeg_state;
 extern spice_wan_compression_t zlib_glz_state;
 
diff --git a/server/red_dispatcher.h b/server/red_dispatcher.h
index 907b7c7..2a1b446 100644
--- a/server/red_dispatcher.h
+++ b/server/red_dispatcher.h
@@ -167,7 +167,7 @@ typedef struct RedWorkerMessageLoadvmCommands {
 } RedWorkerMessageLoadvmCommands;
 
 typedef struct RedWorkerMessageSetCompression {
-    spice_image_compression_t image_compression;
+    SpiceImageCompress image_compression;
 } RedWorkerMessageSetCompression;
 
 typedef struct RedWorkerMessageSetStreamingVideo {
diff --git a/server/red_worker.c b/server/red_worker.c
index 5deb30b..29d6d6d 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -987,7 +987,7 @@ typedef struct RedWorker {
 
     ImageCache image_cache;
 
-    spice_image_compression_t image_compression;
+    SpiceImageCompress image_compression;
     spice_wan_compression_t jpeg_state;
     spice_wan_compression_t zlib_glz_state;
 
@@ -6573,7 +6573,7 @@ static inline int red_compress_image(DisplayChannelClient *dcc,
                                      compress_send_data_t* o_comp_data)
 {
     DisplayChannel *display_channel = DCC_TO_DC(dcc);
-    spice_image_compression_t image_compression =
+    SpiceImageCompress image_compression =
         display_channel->common.worker->image_compression;
     int quic_compress = FALSE;
 
@@ -6878,7 +6878,7 @@ static void fill_mask(RedChannelClient *rcc, SpiceMarshaller *m,
 
     if (mask_bitmap && m) {
         if (display_channel->common.worker->image_compression != SPICE_IMAGE_COMPRESS_OFF) {
-            spice_image_compression_t save_img_comp =
+            SpiceImageCompress save_img_comp =
                 display_channel->common.worker->image_compression;
             display_channel->common.worker->image_compression = SPICE_IMAGE_COMPRESS_OFF;
             fill_bits(dcc, m, mask_bitmap, drawable, FALSE);
@@ -8824,7 +8824,7 @@ static void red_marshall_image(RedChannelClient *rcc, SpiceMarshaller *m, ImageI
     int comp_succeeded;
     int lossy_comp = FALSE;
     int lz_comp = FALSE;
-    spice_image_compression_t comp_mode;
+    SpiceImageCompress comp_mode;
     SpiceMsgDisplayDrawCopy copy;
     SpiceMarshaller *src_bitmap_out, *mask_bitmap_out;
     SpiceMarshaller *bitmap_palette_out, *lzplt_palette_out;
diff --git a/server/red_worker.h b/server/red_worker.h
index 272661f..2042b3d 100644
--- a/server/red_worker.h
+++ b/server/red_worker.h
@@ -92,7 +92,7 @@ typedef struct WorkerInitData {
     uint32_t *pending;
     uint32_t num_renderers;
     uint32_t renderers[RED_MAX_RENDERERS];
-    spice_image_compression_t image_compression;
+    SpiceImageCompress image_compression;
     spice_wan_compression_t jpeg_state;
     spice_wan_compression_t zlib_glz_state;
     int streaming_video;
diff --git a/server/reds.c b/server/reds.c
index 6d70b68..d6d76b2 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -111,7 +111,7 @@ static int ticketing_enabled = 1; //Ticketing is enabled by default
 static pthread_mutex_t *lock_cs;
 static long *lock_count;
 uint32_t streaming_video = STREAM_VIDEO_FILTER;
-spice_image_compression_t image_compression = SPICE_IMAGE_COMPRESS_AUTO_GLZ;
+SpiceImageCompress image_compression = SPICE_IMAGE_COMPRESS_AUTO_GLZ;
 spice_wan_compression_t jpeg_state = SPICE_WAN_COMPRESSION_AUTO;
 spice_wan_compression_t zlib_glz_state = SPICE_WAN_COMPRESSION_AUTO;
 int agent_mouse = TRUE;
@@ -2709,7 +2709,7 @@ static inline void on_activating_ticketing(void)
     }
 }
 
-static void set_image_compression(spice_image_compression_t val)
+static void set_image_compression(SpiceImageCompress val)
 {
     if (val == image_compression) {
         return;
@@ -3550,14 +3550,14 @@ SPICE_GNUC_VISIBLE int spice_server_set_tls(SpiceServer *s, int port,
 }
 
 SPICE_GNUC_VISIBLE int spice_server_set_image_compression(SpiceServer *s,
-                                                          spice_image_compression_t comp)
+                                                          SpiceImageCompress comp)
 {
     spice_assert(reds == s);
     set_image_compression(comp);
     return 0;
 }
 
-SPICE_GNUC_VISIBLE spice_image_compression_t spice_server_get_image_compression(SpiceServer *s)
+SPICE_GNUC_VISIBLE SpiceImageCompress spice_server_get_image_compression(SpiceServer *s)
 {
     spice_assert(reds == s);
     return image_compression;
diff --git a/server/spice-server.h b/server/spice-server.h
index bca0da6..5880ff0 100644
--- a/server/spice-server.h
+++ b/server/spice-server.h
@@ -67,20 +67,9 @@ int spice_server_add_interface(SpiceServer *s,
                                SpiceBaseInstance *sin);
 int spice_server_remove_interface(SpiceBaseInstance *sin);
 
-typedef enum {
-    SPICE_IMAGE_COMPRESS_INVALID  = 0,
-    SPICE_IMAGE_COMPRESS_OFF      = 1,
-    SPICE_IMAGE_COMPRESS_AUTO_GLZ = 2,
-    SPICE_IMAGE_COMPRESS_AUTO_LZ  = 3,
-    SPICE_IMAGE_COMPRESS_QUIC     = 4,
-    SPICE_IMAGE_COMPRESS_GLZ      = 5,
-    SPICE_IMAGE_COMPRESS_LZ       = 6,
-    SPICE_IMAGE_COMPRESS_LZ4      = 7,
-} spice_image_compression_t;
-
 int spice_server_set_image_compression(SpiceServer *s,
-                                       spice_image_compression_t comp);
-spice_image_compression_t spice_server_get_image_compression(SpiceServer *s);
+                                       SpiceImageCompress comp);
+SpiceImageCompress spice_server_get_image_compression(SpiceServer *s);
 
 typedef enum {
     SPICE_WAN_COMPRESSION_INVALID,
diff --git a/spice-common b/spice-common
index c6e6dac..287913b 160000
--- a/spice-common
+++ b/spice-common
@@ -1 +1 @@
-Subproject commit c6e6dacb30b8130a069d522054718d757eefa0db
+Subproject commit 287913bc717a77630d6ab64684e63bb32168287a
-- 
1.9.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]