diff options
author | Javier Celaya <javier.celaya@flexvm.es> | 2015-04-17 12:40:47 +0200 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2015-06-30 16:49:29 +0200 |
commit | 22c40b9d1fadc7892580aeb831514a81320e7b76 (patch) | |
tree | 4865888209578e08c60ac6f30af73c7bffa35941 | |
parent | aa22138d057e8690e811abcf7a8aeeddc4425e6c (diff) |
Use image compress constants from spice-protocol
-rw-r--r-- | server/red_dispatcher.c | 2 | ||||
-rw-r--r-- | server/red_dispatcher.h | 2 | ||||
-rw-r--r-- | server/red_worker.c | 8 | ||||
-rw-r--r-- | server/red_worker.h | 2 | ||||
-rw-r--r-- | server/reds.c | 8 | ||||
-rw-r--r-- | server/spice-server.h | 16 | ||||
m--------- | spice-common | 0 |
7 files changed, 15 insertions, 23 deletions
diff --git a/server/red_dispatcher.c b/server/red_dispatcher.c index a2ef226..faa0d76 100644 --- a/server/red_dispatcher.c +++ b/server/red_dispatcher.c @@ -70,7 +70,7 @@ struct RedDispatcher { }; 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 70b8a62..b29cb8b 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 061b990..9237786 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -986,7 +986,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; @@ -6557,7 +6557,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; @@ -6869,7 +6869,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); @@ -8815,7 +8815,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 56e87a2..0867edb 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 = SPICE_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; @@ -3552,7 +3552,7 @@ 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); #ifndef USE_LZ4 @@ -3567,7 +3567,7 @@ SPICE_GNUC_VISIBLE int spice_server_set_image_compression(SpiceServer *s, 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..0c707a7 100644 --- a/server/spice-server.h +++ b/server/spice-server.h @@ -67,20 +67,12 @@ 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; +// Needed for backward API compatibility +typedef SpiceImageCompress 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 -Subproject 1b5edbe49e5c36c4f35453de448b54f770e1c1b +Subproject dcebede0ca3d012786b9ab8fd95961c637b0b4a |