mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 21:03:10 +00:00
Move zlib_glz_state to RedsState struct
Also required adding reds_get_zlib_glz_state() for external access. Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
ffd2cda51e
commit
5a8ccd1ac7
@ -1508,7 +1508,7 @@ RedWorker* red_worker_new(QXLInstance *qxl, RedDispatcher *red_dispatcher)
|
||||
|
||||
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];
|
||||
|
||||
@ -217,6 +217,7 @@ struct RedsState {
|
||||
gboolean ticketing_enabled;
|
||||
SpiceImageCompression image_compression;
|
||||
spice_wan_compression_t jpeg_state;
|
||||
spice_wan_compression_t zlib_glz_state;
|
||||
|
||||
gboolean agent_copypaste;
|
||||
gboolean agent_file_xfer;
|
||||
|
||||
@ -147,7 +147,6 @@ static SpiceCoreInterfaceInternal core_interface_adapter = {
|
||||
static pthread_mutex_t *lock_cs;
|
||||
static long *lock_count;
|
||||
uint32_t streaming_video = SPICE_STREAM_VIDEO_FILTER;
|
||||
spice_wan_compression_t zlib_glz_state = SPICE_WAN_COMPRESSION_AUTO;
|
||||
int agent_mouse = TRUE;
|
||||
|
||||
RedsState *reds = NULL;
|
||||
@ -3426,6 +3425,7 @@ SPICE_GNUC_VISIBLE SpiceServer *spice_server_new(void)
|
||||
reds->ticketing_enabled = TRUE; /* ticketing enabled by default */
|
||||
reds->image_compression = SPICE_IMAGE_COMPRESSION_AUTO_GLZ;
|
||||
reds->jpeg_state = SPICE_WAN_COMPRESSION_AUTO;
|
||||
reds->zlib_glz_state = SPICE_WAN_COMPRESSION_AUTO;
|
||||
reds->agent_copypaste = TRUE;
|
||||
reds->agent_file_xfer = TRUE;
|
||||
reds->exit_on_disconnect = FALSE;
|
||||
@ -3705,7 +3705,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;
|
||||
}
|
||||
|
||||
@ -4020,3 +4020,8 @@ spice_wan_compression_t reds_get_jpeg_state(const RedsState *reds)
|
||||
{
|
||||
return reds->jpeg_state;
|
||||
}
|
||||
|
||||
spice_wan_compression_t reds_get_zlib_glz_state(const RedsState *reds)
|
||||
{
|
||||
return reds->zlib_glz_state;
|
||||
}
|
||||
|
||||
@ -75,7 +75,6 @@ extern uint32_t num_renderers;
|
||||
|
||||
extern struct SpiceCoreInterfaceInternal *core;
|
||||
extern uint32_t streaming_video;
|
||||
extern spice_wan_compression_t zlib_glz_state;
|
||||
|
||||
// Temporary measures to make splitting reds.c to inputs-channel.c easier
|
||||
|
||||
@ -113,5 +112,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);
|
||||
spice_wan_compression_t reds_get_jpeg_state(const RedsState *reds);
|
||||
spice_wan_compression_t reds_get_zlib_glz_state(const RedsState *reds);
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user