diff options
author | Jonathon Jongsma <jjongsma@redhat.com> | 2015-01-27 14:17:28 -0600 |
---|---|---|
committer | Fabiano FidĂȘncio <fidencio@redhat.com> | 2015-02-23 23:00:45 +0100 |
commit | aa3ea9592fd9d2a72cf1367f38725d5ac35c6aca (patch) | |
tree | fce5ae4d8e33f58984259c4ffbb9681f2f8de3fd | |
parent | f03c8f9b3c09996d8f2ec714c7f5ba5f346e936c (diff) | |
download | spice-aa3ea9592fd9d2a72cf1367f38725d5ac35c6aca.tar.gz spice-aa3ea9592fd9d2a72cf1367f38725d5ac35c6aca.tar.xz spice-aa3ea9592fd9d2a72cf1367f38725d5ac35c6aca.zip |
Move zlib_glz_state to RedsState struct
Also required adding reds_get_zlib_glz_state() for external access.
-rw-r--r-- | server/red-worker.c | 2 | ||||
-rw-r--r-- | server/reds-private.h | 1 | ||||
-rw-r--r-- | server/reds.c | 9 | ||||
-rw-r--r-- | server/reds.h | 2 |
4 files changed, 10 insertions, 4 deletions
diff --git a/server/red-worker.c b/server/red-worker.c index 8fb414c0..113b64f7 100644 --- a/server/red-worker.c +++ b/server/red-worker.c @@ -1702,7 +1702,7 @@ RedWorker* red_worker_new(QXLInstance *qxl, RedDispatcher *red_dispatcher) worker->qxl = qxl; worker->image_compression = spice_server_get_image_compression(reds); worker->jpeg_state = reds_get_jpeg_state(reds); - worker->zlib_glz_state = zlib_glz_state; + worker->zlib_glz_state = reds_get_zlib_glz_state(reds); worker->driver_cap_monitors_config = 0; #ifdef RED_STATISTICS char worker_str[20]; diff --git a/server/reds-private.h b/server/reds-private.h index 467c2363..115719e2 100644 --- a/server/reds-private.h +++ b/server/reds-private.h @@ -204,6 +204,7 @@ struct RedsState { uint32_t streaming_video; spice_image_compression_t image_compression; spice_wan_compression_t jpeg_state; + spice_wan_compression_t zlib_glz_state; }; #endif diff --git a/server/reds.c b/server/reds.c index 392052e0..6b72701f 100644 --- a/server/reds.c +++ b/server/reds.c @@ -91,7 +91,6 @@ SpiceCoreInterface *core = NULL; static pthread_mutex_t *lock_cs; static long *lock_count; -spice_wan_compression_t zlib_glz_state = SPICE_WAN_COMPRESSION_AUTO; int agent_mouse = TRUE; int agent_copypaste = TRUE; int agent_file_xfer = TRUE; @@ -3319,6 +3318,7 @@ SPICE_GNUC_VISIBLE SpiceServer *spice_server_new(void) reds->streaming_video = STREAM_VIDEO_FILTER; reds->image_compression = SPICE_IMAGE_COMPRESS_AUTO_GLZ; reds->jpeg_state = SPICE_WAN_COMPRESSION_AUTO; + reds->zlib_glz_state = SPICE_WAN_COMPRESSION_AUTO; return reds; } @@ -3578,7 +3578,7 @@ SPICE_GNUC_VISIBLE int spice_server_set_zlib_glz_compression(SpiceServer *s, spi return -1; } // todo: support dynamically changing the state - zlib_glz_state = comp; + s->zlib_glz_state = comp; return 0; } @@ -3911,3 +3911,8 @@ spice_wan_compression_t reds_get_jpeg_state(RedsState *reds) { return reds->jpeg_state; } + +spice_wan_compression_t reds_get_zlib_glz_state(RedsState *reds) +{ + return reds->zlib_glz_state; +} diff --git a/server/reds.h b/server/reds.h index 8545dbb7..c9ffa30d 100644 --- a/server/reds.h +++ b/server/reds.h @@ -75,7 +75,6 @@ enum { }; extern struct SpiceCoreInterface *core; -extern spice_wan_compression_t zlib_glz_state; // Temporary measures to make splitting reds.c to inputs_channel.c easier @@ -114,5 +113,6 @@ void reds_on_char_device_state_destroy(RedsState *reds, SpiceCharDeviceState *de void reds_set_client_mm_time_latency(RedsState *reds, RedClient *client, uint32_t latency); uint32_t reds_get_streaming_video(RedsState *reds); spice_wan_compression_t reds_get_jpeg_state(RedsState *reds); +spice_wan_compression_t reds_get_zlib_glz_state(RedsState *reds); #endif |